|
View:
New views
4 Messages
—
Rating Filter:
Alert me
|
|
|
Dynamic update content in tabsHi,
I have a select that lists the items from the data instance, and below it I have three tabs. Each tab has some controls for users to edit the data elements. I would like to update the content in the tabs based on the selected item in the select control above. Can this be done? Thanks |
|
|
|
|
|
Re: Dynamic update content in tabs, checkbox control not displaying correctlyAaron,
I got the tabs to update with the current selected values by binding the select1 to a temporary nodeset and used xpath to fetch the proper value e.g: The problem I have now is with the checkbox controls. The checkboxes(like "Enabled" and "LogEnabled") are displayed as a checkboxes. They all have the correct boolean value displayed (either true or false). But the checkboxes are not checked when the value is true <xf:model id="main_model" schema="group.xsd"> <xf:instance xmlns="" id="saved-data" src="dynamictabs.xml" /> <xf:instance xmlns="" id="pathTo"> <data> <!-- set initial value to be the root node --> <current-role-id>0</current-role-id> </data> </xf:instance> <xf:bind id="current-role-id" nodeset="instance('pathTo')/current-role-id" /> </xf:model> </head> <body> <xf:select1 ref="instance('pathTo')/current-role-id"> <xf:itemset nodeset="//Group" model="main_model"> <xf:label ref="@Role"/> <xf:value ref="@RoleId"/> </xf:itemset> </xf:select1><br/> <xf:output ref="instance('path')/current-role-id"> <xf:label>Output:</xf:label> </xf:output> <br/> ... <xf:switch> <xf:case id="case-1" selected="true"> <div id="div-1"> <xf:input class="RoleId" ref="instance('pathTo')/current-role-id"> <xf:label>Role Id:</xf:label> </xf:input><br/> <xf:input class="GroupId" ref="//Group[@RoleId=instance('pathTo')/current-role-id]/@GID"> <xf:label>Group Id:</xf:label> </xf:input><br/> <xf:select ref="//Group[@RoleId=instance('pathTo')/current-role-id]/@Enabled" appearance="full"> <xf:item> <xf:label>Enabled</xf:label> <xf:value><xf:output ref="//Policy[@RuleId=instance('pathTo')/current-role-id]/@Enabled"/></xf:value> </xf:item> </xf:select><br/> <xf:select1 ref="//Group[@RoleId=instance('pathTo')/current-role-id]/@Action"> <xf:label>Action:</xf:label> <xf:item> <xf:label>Allow</xf:label> <xf:value>Allow</xf:value> </xf:item> <xf:item> <xf:label>Reject</xf:label> <xf:value>Reject</xf:value> </xf:item> </xf:select1><br/> <xf:select ref="//Group[@RoleId=instance('pathTo')/current-role-id]/@LogEnabled" appearance="full"> <xf:item> <xf:label>Log Enabled</xf:label> <xf:value><xf:output ref="//Policy[@RuleId=instance('pathTo')/current-role-id]/@LogEnabled"/></xf:value> </xf:item> </xf:select><br/> </div> </xf:case> ... |
|
|
|
| Free Forum Powered by Nabble | Forum Help |