Skip to main content


Eclipse Community Forums
Forum Search:

Search      Help    Register    Login    Home
Home » Eclipse Projects » Sapphire » Combining root-node style and normal property editors on one page
Combining root-node style and normal property editors on one page [message #1636062] Thu, 26 February 2015 03:11 Go to next message
Jason Pell is currently offline Jason PellFriend
Messages: 55
Registered: February 2011
Member
I would like to be able to have a page with some simple properties at the top and then the root-node style for the bottom of the page. I don't see to be able to get this to work, and I can't find an example.


<form-editor-page>
        <id>MappingsPage</id>
        <page-name>Mappings</page-name>
        <page-header-text>Mappings</page-header-text>
        <initial-selection>Mappings</initial-selection>
        <element-type>GeneratorConfig</element-type>
        	
        <content>
        	<section>
	        		<content>
	        			<property-editor>MappingType</property-editor>
	        		</content>
			</section>
			
			<section>
		        <root-node>
		            <node>
		                <label>Mappings</label>
		                <section>
		                    <content>
		                        <actuator>
		                            <action-id>Sapphire.Add</action-id>
		                            <label>New Mapping</label>
		                        </actuator>
		                    </content>
		                    <description>Use this editor to manage your mapping config.</description>
		                </section>
		                <node-factory>
		                    <property>Mappings</property>
		                    <case>
		                        <label>${ operationName == null ? "&lt;operation&gt;" : operationName }</label>
		                        <section>
		                            <label>Mapping</label>
		                            <content>
		                                <include>MappingForm</include>
		                            </content>
		                        </section>
		                    </case>
		                </node-factory>
		            </node>
		        </root-node>
			</section>
		</content>
    </form-editor-page>

[Updated on: Thu, 26 February 2015 03:24]

Report message to a moderator

Re: Combining root-node style and normal property editors on one page [message #1636070 is a reply to message #1636062] Thu, 26 February 2015 03:17 Go to previous messageGo to next message
Konstantin Komissarchik is currently offline Konstantin KomissarchikFriend
Messages: 1077
Registered: July 2009
Senior Member
No, you cannot embed a master-details tree as a section of a form editor page. Typically you would put general/simple properties as a section under the root node with more detailed content as you drill down.

PS: If you use the code format block in the forum editor toolbar, it will be easier to read your code snippets.
Re: Combining root-node style and normal property editors on one page [message #1636078 is a reply to message #1636070] Thu, 26 February 2015 03:23 Go to previous messageGo to next message
Jason Pell is currently offline Jason PellFriend
Messages: 55
Registered: February 2011
Member
Konstantin Komissarchik wrote on Wed, 25 February 2015 22:17

PS: If you use the code format block in the forum editor toolbar, it will be easier to read your code snippets.


Thanks and was wondering how to do that. Appreciate your responsiveness. This is my second day of playing with Sapphire.

Re: Combining root-node style and normal property editors on one page [message #1636142 is a reply to message #1636070] Thu, 26 February 2015 04:08 Go to previous message
Jason Pell is currently offline Jason PellFriend
Messages: 55
Registered: February 2011
Member
I actually managed to get my simple properties in the node root:

<node>
                <label>Enumeration Mappings</label>
                
                <section>
                    <content>
		                <with>
		                    <path>EnumerationMappings</path>
		                    <case>
		                        <content>
		                            <property-editor>MappingStrategy</property-editor>
		                        </content>
		                    </case>
		                </with>
						
						<spacer></spacer>
						
                        <actuator>
                            <action-id>Sapphire.Add</action-id>
                            <label>New Mapping</label>
                        </actuator>
                    </content>
                </section>
                
                <node-factory>
                    <property>EnumerationMappings/EnumerationMappings</property>
                    <case>
                        <label>${ Name == null ? "&lt;name&gt;" : Name }</label>
                        <section>
                            <label>Mapping</label>
                            <content>
                                <include>EnumerationMappingForm</include>
                            </content>
                        </section>
                    </case>
                </node-factory>
            </node>


Works nicely.

Previous Topic:InitialValue vs DefaultValue and persistence
Next Topic:Default value recomputed but not refreshed in UI on Linux
Goto Forum:
  


Current Time: Thu Nov 15 07:03:58 GMT 2018

Powered by FUDForum. Page generated in 0.01988 seconds
.:: Contact :: Home ::.

Powered by: FUDforum 3.0.2.
Copyright ©2001-2010 FUDforum Bulletin Board Software

Back to the top