You are viewing a plain text version of this content. The canonical link for it is here.
Posted to users@tapestry.apache.org by seshu babu <se...@gmail.com> on 2010/01/19 12:08:24 UTC

Tapestry 4.1.6 : setCheckboxGroup not consistent with refresh button & Browser refresh(F5)

Hi All,

I am facing a problem in a scenario where table rows get dynamically updated
using a refresh button.

Problem :Clicking on the table group checkbox doesn't select(check) all the
rows in the table if refresh button is used (not browser F5).

Say if initially there are 2 rows & later a new row is updated by pressing
the refresh button.
The 3rd row is not getting updated in the setCheckboxGroup function
setCheckboxGroup  still shows as(only 2 rows) :
function setCheckboxGroup(value) {
  document.forms.refreshForm.checkbox.checked=value;

  document.forms.refreshForm.checkbox_0.checked=value;
}

This is stopping the 3rd row to get selected when the group checkbox is
selected.
Can any one please tell how this can be avoided?


---------------------------------------------------------------------------------------------------------------------------------------------
Refresh button updates all the components in the page using this method:

    public Collection<String> getComponentsToUpdate() {
        List<String> componentsToUpdate = new ArrayList<String>();
        componentsToUpdate.add("refreshedContent");
        componentsToUpdate.addAll(getUpdateComponents());

        return componentsToUpdate;

-----------------------------------------------------------------------------------------
Table component:


<table jwcid="tableView@common/Table"
           id="conferencesTable"
           columns="* status,name,nickname"
           row="ognl:currentMember"
           converter="ognl:converter"
           source="ognl:members"
           selections="bean:selections">
        <span jwcid="nameColumnValue@Block">
            <img jwcid="@Image" image="asset:userIcon" align="top" />
            <span jwcid="@Insert" value="ognl:currentMember.name" />
        </span>
        <span jwcid="statusColumnValue@Block">
            <span jwcid="@conference/ConferenceMemberStatus"
                  conferenceMember="ognl:currentMember" />
        </span>
        <span jwcid="nicknameColumnValue@Block">
            <a jwcid="@DirectLink" listener="listener:editCurrentMember"
parameters="ognl:{currentMember.uuid}">
              <span jwcid="@Insert" value="ognl:nicknameForCurrentMember" />
            </a>
        </span>
    </table>
---------------------------------------------------------------------------------------------------------------------------



Thanks in advance,
Seshu

Note: The above problem doesn't occur it Browser level refresh(F5) is used.