[ http://issues.apache.org/jira/browse/TAPESTRY-973?page=all ]
Andreas Andreou resolved TAPESTRY-973.
--------------------------------------
Fix Version/s: unspecified
Resolution: Invalid
So, that's the way reqind works - bind to the action parameter...
> Having two @Select components on a page causes the selections to play up
> ------------------------------------------------------------------------
>
> Key: TAPESTRY-973
> URL: http://issues.apache.org/jira/browse/TAPESTRY-973
> Project: Tapestry
> Issue Type: Bug
> Components: Framework
> Affects Versions: 4.0.1
> Environment: Mac OS X / Eclipse 3.2 RC6 (3.1 / 3.2 RC4) / Jetty /
> Tapestry 4.0.1
> Reporter: Jason Andrews
> Priority: Minor
> Fix For: unspecified
>
>
> Having two @Select components on a page causes the selections to screw up -
> appears related to rewind not fully executing, or skipping.
> TAPESTRY-437 is closed, but I think this is a different issue, as it relates
> to the selections.
> I have two lists, a list of available options, and a list of selected options.
> in between, I have two arrow buttons (@ImageSubmit), one pointing left, the
> other pointing right - i.e. add/remove
> Initially, I had this in a custom component called @ListBox, but I removed
> that layer to simplify things and the end result is identical.
> Here it is, without the extra layer - i.e. just Tapestry Components
> <TR><TD>
> <select jwcid="[EMAIL PROTECTED]" multiple="ognl:true"
> disabled="ognl:!editMode" id="literal:leftList">
> <span jwcid="[EMAIL PROTECTED]" source="ognl:leftEntries"
> value="ognl:objectIterator" index="ognl:leftObjectIndex">
> <option jwcid="@Option"
> selected="ognl:leftObjectSelected" label="ognl:objectIteratorLabel"/>
> </span>
> </select>
> </TD>
> <TD>
> <SPAN jwcid="@ImageSubmit" listener="listener:clickMoveRight"
> image="asset:moveRightImage" />
> <BR><BR>
> <SPAN jwcid="@ImageSubmit" listener="listener:clickMoveLeft"
> image="asset:moveLeftImage" />
> </TD>
> <TD>
> <select jwcid="[EMAIL PROTECTED]" multiple="ognl:true"
> disabled="ognl:!editMode" id="literal:rightList">
> <span jwcid="[EMAIL PROTECTED]" source="ognl:rightEntries"
> value="ognl:objectIterator" index="ognl:rightObjectIndex">
> <option jwcid="@Option"
> selected="ognl:rightObjectSelected" label="ognl:objectIteratorLabel"/>
> </span>
> </select>
> </TD></TR>
> Rendering is fine - the lists appear with the correct entries.
> @Option selected="lefttObjectSelected"
> @Option selected="rightObjectSelected"
> These call a fairly simple method(s), which works every time for LeftList,
> but only every second time for RightList. For reference, here it is:
> /** Selected objects from the right list */
> @Persist
> public abstract List<Object> getRightSelections();
> public abstract void setRightSelections(List<Object> selections);
> public boolean getRightObjectSelected() {
> return getRightSelections().contains(getObjectIterator());
> }
>
> public void setRightObjectSelected(boolean isSelected) {
> if(isSelected) {
> if(!getRightSelections().contains(getObjectIterator()))
> getRightSelections().add(getObjectIterator());
> }
> else {
> getRightSelections().remove(getObjectIterator());
> }
> }
> Now the first time I click the moveLeft button - the selections are empty.
> The second time I click it - the selections hold the values as selected from
> the first button press - i.e. if I change the selections - that won't get
> picked up until the next button press.
> If it were the same for both, I would assume this was my fault, but as it
> only happens with the second list - I assume this is a bug.
> Oh - and I changed the order of the lists for interest, and once I got my
> head around which button to click for which action - I can confirm it is only
> a problem for the second listbox.
> So it appears that this is a problem with the rewind action not processing
> something correctly - as I am currently evaluating Tapestry as a replacement
> framework I don't have time to try and fix this myself.
> I also find some of the PageLoader functionality a little strange, but I may
> raise that separately.
--
This message is automatically generated by JIRA.
-
If you think it was sent incorrectly contact one of the administrators:
http://issues.apache.org/jira/secure/Administrators.jspa
-
For more information on JIRA, see: http://www.atlassian.com/software/jira
---------------------------------------------------------------------
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]