-
Type: Bug
-
Status: Resolved
-
Priority: Minor
-
Resolution: Fixed
-
Affects Version/s: 5.5
-
Component/s: Seam / JSF UI
The nxu:valueHolder tag does not save the submitted value field as its parent UIInput does not do it: it assumes that the submiited value will always be held by the request.
When using the nxu:valueHolder tag in ajax, this is a problem when switching two layout modes on the same page (see NXP-8144) as the bound layout mode is lost at some point, making it impossible to switch the layout modes again (toggle actions have no effect).
steps to reproduce:
- on the same page, display two layouts, each displaying a widget "toggableLayoutWithForms"
<nxl:layout name="test_layout_one" mode="view" value="#{currentDocument}" /> <nxl:layout name="test_layout_two" mode="view" value="#{currentDocument}" />
sample contribs:
<layout name="test_layout_one"> <templates> <template mode="any">/layouts/layout_default_template.xhtml</template> </templates> <rows> <row> <widget>layout_one</widget> </row> </rows> <widget name="layout_one" type="toggableLayoutWithForms"> <labels> <label mode="any">my layout</label> </labels> <!-- add empty field to map layout value directly --> <fields> <field></field> </fields> <properties mode="any"> <property name="initialLayoutName">dublincore</property> <property name="toggledLayoutName">dublincore</property> </properties> </widget> </layout> <layout name="test_layout_two"> <templates> <template mode="any">/layouts/layout_default_template.xhtml</template> </templates> <rows> <row> <widget>layout_two</widget> </row> </rows> <widget name="layout_two" type="toggableLayoutWithForms"> <labels> <label mode="any">my layout</label> </labels> <!-- add empty field to map layout value directly --> <fields> <field></field> </fields> <properties mode="any"> <property name="initialLayoutName">heading</property> <property name="toggledLayoutName">heading</property> <property name="useAjaxForm">true</property> </properties> </widget> </layout>
- toggle the first layout to be in edit mode
- toggle the second layout to be in edit mode
=> the first layout cannot be toggled back to view mode using the "cancel" button
other kinds of combination where first layout is toggled to edit and view again, and same for second layout, do not produce the issue. other kinds of combinations can also produce the issue.