Skip to main content



      Home
Home » Archived » 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] Wed, 25 February 2015 22:11 Go to next message
Eclipse UserFriend
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: Wed, 25 February 2015 22:24] by Moderator

Re: Combining root-node style and normal property editors on one page [message #1636070 is a reply to message #1636062] Wed, 25 February 2015 22:17 Go to previous messageGo to next message
Eclipse UserFriend
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] Wed, 25 February 2015 22:23 Go to previous messageGo to next message
Eclipse UserFriend
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] Wed, 25 February 2015 23:08 Go to previous message
Eclipse UserFriend
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: Mon May 05 11:17:02 EDT 2025

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

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

Back to the top