| Generating a config.xml file [message #1010854] |
Mon, 18 February 2013 05:46  |
Harsha G Messages: 11 Registered: February 2013 |
Junior Member |
|
|
Hello all,
This is my first post in here.
We had a task to generate a config.xml file for one of our projects which is in turn a code generator, using an UI based editor rather than typing via XML source.
I came across Sapphire and tried to model it our use case using the Bug Repository samples. But i was not successful in doing so.
I have to generate the XML based on the selection of Java Models (POJOs) from a package and other additional inputs like view, input-types and so on.
The end product XML that is expected to be generated is a JSF xml configuration file.
1. Is Sapphire the way to do it ? If yes, from where do i start? or what am i doing wrong ( I will be happy to provide you additional information on what i have done ) ?
2. Are tools like Java EE WTP (built on Sapphire) to generate the configuration file, is the way to do it ?
Thanks in advance for your suggestions and help ?
Regards,
Harsha
|
|
|
|
| Re: Generating a config.xml file [message #1011686 is a reply to message #1011130] |
Tue, 19 February 2013 22:41   |
Harsha G Messages: 11 Registered: February 2013 |
Junior Member |
|
|
Thanks for the quick reply.
My aim is to generate a generic xml which looks like this.
<project>
<modules>
<module name="MainUser" auth="projectManagement">
<view-config>
<list>
<column name="username" />
<column name="forename" />
<column name="surname" />
<column name="email" />
</list>
<form>
<tab label="MainUser Details">
<input name="mainUserPk" />
<input name="username" />
<input name="password" />
<input name="forename" />
<input name="surname" />
<input name="email" />
</tab>
</form>
</view-config>
</module>
<module name="TypeCn">
<view-config>
<list type="">
<column name="typeCnId" />
</list>
<form>
<tab label="Type CN Details">
<input name="typeCnFirst" type="main-data-types/globalcls.ftl"/>
</tab>
</form>
</view-config>
</module>
</modules>
<datatypes>
<input type="id">
<template>
</input>
<input type="descr"></input>
<input type="globalcls"></input>
<input type="prp"></input>
</datatypes>
</project>
In this case, the modules are nothing but Java Models (POJOs) - which i have to pick / select from a java package within the project and the view-config below it are the properties inside the Java Models.
Currently, we are manually writing this xml using tags.
But we want to avoid this and give the user a UI where he can select this modules from a drop-down/ combo-box / picker and configure the properties below it and be able to view the xml at the end. This is when i came across Sapphire and was wondering how to model this case using Sapphire?
I went through the samples but was not able to visualize the same to my case properly. Hope some experts will be able to throw some light on this and give me a head-start in achieving this.
Thanks & Regards,
Harsha
[Updated on: Tue, 19 February 2013 22:57] Report message to a moderator
|
|
|
|
|
|
|
| Re: Generating a config.xml file [message #1015351 is a reply to message #1012732] |
Thu, 28 February 2013 05:14   |
Harsha G Messages: 11 Registered: February 2013 |
Junior Member |
|
|
The selected wizard could not be started.
Plug-in "org.eclipse.sapphire.samples" was unable to execute setInitializationData on an instance of "org.eclipse.sapphire.workspace.ui.CreateWorkspaceFileWizard".
java.lang.IllegalArgumentException
Can you tell what might me the problem in this case?
I have cloned one of your sample code to my cases.
[Updated on: Thu, 28 February 2013 07:44] Report message to a moderator
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
Powered by
FUDForum. Page generated in 0.02352 seconds