Hi,

Im a bit busy now. You could just look into the below code, which might help
you.
Here the scenario you have mentioned is working fine.

You could just ignore the part of code : <t:dataTable id="data"
styleClass="standardTable"
This is meant for dynamic table creation, for multivalued attributes.


Regards,
Kiran Singh

Code Snippet:

<div class="entry" style="margin-top:10px;">
        <!-- Table -->
        <t:dataTable id="tree_data_models"
            styleClass="scrollerTable"
            rowClasses="standardTable_Row1,standardTable_Row2"

columnClasses="standardTable_Column,standardTable_ColumnCentered"
            var="xsElement"
                value="#{nodesToDisplay}"
            preserveDataModel="false"
                cellspacing="3"
                rows="15">
            <h:column>
                <h:outputText rendered="#{xsElement.isVisible}"
value="#{xsElement.label} " style="font-size: 13px"/>
                <h:outputText rendered="#{xsElement.isMandatory}" value="*"
style="color:red;font-size: 15px;font-weight:bold;"/>
                <h:outputText rendered="true" value=": " style="font-size:
13px"/>
            </h:column>
            <h:column>
                <t:inputText id="idInputField1" immediate="true"
value="#{xsElement.stringValue}"
                            styleClass="inputField"
rendered="#{xsElement.isString and xsElement.isVisible and (not
xsElement.isPasswordfield)}" readonly="#{!xsElement.isEditable}"
required="#{xsElement.isMandatory}"/>
                <t:message for="idInputField1" showDetail="true"
showSummary="false" style="color: red"/>
                <t:inputText id="idInputField2" immediate="true"
value="#{xsElement.integerValue}"
                            styleClass="inputField"
rendered="#{xsElement.isInteger and xsElement.isVisible and (not
xsElement.isPasswordfield)}" readonly="#{!xsElement.isEditable}"
required="#{xsElement.isMandatory}"/>
                <t:message for="idInputField2" showDetail="true"
showSummary="false" style="color: red"/>
                <t:inputSecret id="idPassWordField" immediate="true"
value="#{xsElement.stringValue and xsElement.isVisible}"
                            rendered="#{xsElement.isPasswordfield}"
readonly="#{!xsElement.isEditable}" required="#{xsElement.isMandatory}"/>
                <t:message for="idPassWordField" showDetail="true"
showSummary="false" style="color: red"/>
                <t:selectBooleanCheckbox id="idInputField3" immediate="true"
value="#{xsElement.booleanValue}"
                            rendered="#{xsElement.isBoolean and
xsElement.isVisible}" readonly="#{!xsElement.isEditable}"
required="#{xsElement.isMandatory}"/>
                <t:message for="idInputField3" showDetail="true"
showSummary="false" style="color: red"/>
                <t:selectOneMenu id="idInputField4"
value="#{xsElement.enumValue}" rendered="#{xsElement.isEnum and
xsElement.isVisible}" readonly="#{!xsElement.isEditable}"
required="#{xsElement.isMandatory}">
                    <f:selectItems value="#{xsElement.enumValues}"/>
                </t:selectOneMenu>
                   <h:commandLink action="#{xsElement.addRow}"
rendered="#{(xsElement.unbound or xsElement.multiValued) and
xsElement.isEditable}">
                    <t:graphicImage id="img1" value="img/t_add16.gif"
border="0"/>
                    <h:outputText value="Add" style="font-size: 13px"/>

                   </h:commandLink>


                <t:dataTable id="data" styleClass="standardTable"
                    headerClass="standardTable_Header"
                    footerClass="standardTable_Header"
                    rowClasses="standardTable_Row1,standardTable_Row2"

columnClasses="standardTable_Column,standardTable_ColumnCentered"
var="element"
                    value="#{xsElement.attrValues}" border="1"
preserveDataModel="false" rendered="#{xsElement.unbound or
xsElement.multiValued}">

                    <t:column width="125px">

                       <h:outputText value="#{element}"/>

                    </t:column>
                    <t:column rendered="#{xsElement.isEditable}">
                       <h:commandLink action="#{xsElement.deleteRow}">

                        <f:param name="delValue" value="#{element}"/>
                        <t:graphicImage id="img1" value="img/delete.gif"
border="0"/>
                       </h:commandLink>
                     </t:column>
                </t:dataTable>
                <t:message for="idInputField4" showDetail="true"
showSummary="false" style="color: red"/>
            </h:column>
        </t:dataTable>
    </div>

    <!-- Scroller : Requires action bean to initialize scroller -->
    <div class="entry" style="margin-top:10px; margin-left:20px" >
        <h:panelGrid columns="1" styleClass="scrollerTable2"
                    columnClasses="standardTable_ColumnCentered"
                    rendered="#{noOfNodesPerPage > 15}"> <!-- This 15 should
be equal to the number of rows -->
            <t:dataScroller id="scroll_1"
                    for="tree_data_models"
                    fastStep="5"
                    pageCountVar="pageCount"
                    pageIndexVar="pageIndex"
                    styleClass="scroller"
                    paginator="true"
                    paginatorMaxPages="7"
                    paginatorTableClass="paginator"
                    paginatorActiveColumnStyle="font-weight:bold;"
                    binding="#{actionBean.scroll}"
                    >
                <f:facet name="first" >
                    <t:graphicImage url="img/arrow-first.gif"
style="border:0px" title="Press to go to first page" />
                </f:facet>
                <f:facet name="last">
                    <t:graphicImage url="img/arrow-last.gif"
style="border:0px" title="Press to go to last page" />
                </f:facet>
                <f:facet name="previous">
                    <t:graphicImage url="img/arrow-previous.gif"
style="border:0px" title="Press to go to previous page" />
                </f:facet>
                <f:facet name="next">
                    <t:graphicImage url="img/arrow-next.gif"
style="border:0px" title="Press to go to next page" />
                </f:facet>
                <f:facet name="fastforward">
                    <t:graphicImage url="img/arrow-ff.gif"
style="border:0px" title="Press to use fast forward" />
                </f:facet>
                <f:facet name="fastrewind">
                    <t:graphicImage url="img/arrow-fr.gif"
style="border:0px" title="Press to use fast rewind" />
                </f:facet>
            </t:dataScroller>
            <t:dataScroller id="scroll_2" for="tree_data_models"
                rowsCountVar="rowsCount"
                displayedRowsCountVar="displayedRowsCountVar"
                firstRowIndexVar="firstRowIndex"
lastRowIndexVar="lastRowIndex"
                pageCountVar="pageCount" immediate="true"
                pageIndexVar="pageIndex">
                <h:outputFormat value="Showing {0} attributes, from {1} to
{2}. Page {3} of {4}."
                    styleClass="standard">
                    <f:param value="#{displayedRowsCountVar}" />
                    <f:param value="#{firstRowIndex}" />
                    <f:param value="#{lastRowIndex}" />
                    <f:param value="#{pageIndex}" />
                    <f:param value="#{pageCount}" />
                </h:outputFormat>
            </t:dataScroller>
        </h:panelGrid>
    </div>


On Tue, Jul 29, 2008 at 5:29 PM, Partha <[EMAIL PROTECTED]> wrote:

>
> Hi Kiran,
>
> As advised by you I have used the immediate attribute but still the issue
> persists.
> Is it a bug in myfaces.
>
> Thanks and Regards,
> Partha.
>
>
> Partha wrote:
> >
> > HI there,
> >
> > I have implemented pagination using datascroller and I have a checkbox
> for
> > each record on the page.
> > 10 records are displayed at a time.The checkbox value is bound to a
> > backing bean getter and setter properties.
> > When the user checks the box for a record and
> > clicks on the nextpage in the pagination,the checked value of the
> checkbox
> > is not
> > retained in the backing bean.
> >
> > Please find the code below:
> >
> >
> > <p><t:panelGrid id="mainPanel"
> >
> rendered="#{pc_PeopleFinderPortletView.showData}" >
> >                               <t:dataTable id="userData"
> >
> binding="#{pc_PeopleFinderPortletView.dataTable}"
> >
> value="#{pc_PeopleFinderPortletView.pagedListDataModel}"
> > var="dataItem"
> >                                       width="100%" border="0"
> styleClass="scrollerTable"
> >                                       headerClass="standardTable_Header"
> >                                       footerClass="standardTable_Header"
> >
> rowClasses="standardTable_Row1,standardTable_Row2"
> >
> >
> columnClasses="standardTable_Column,standardTable_ColumnCentered,standardTable_Column"
> >                                       preserveDataModel="true" rows="10">
> >
> >
> >                                       <t:column id="column20">
> >                                               <t:selectBooleanCheckbox
> id="checkbox1"
> >
> styleClass="selectBooleanCheckbox" value="#{dataItem.selected}">
> >                                               </t:selectBooleanCheckbox>
> >                                       </t:column>
> >       </t:dataTable>
> >
> >                       </t:panelGrid></p>
> >
> > <p><t:panelGrid id="pp2" columns="1" styleClass="scrollerTable2"
> >
> columnClasses="standardTable_ColumnCentered"
> >
> rendered="#{pc_PeopleFinderPortletView.showData}">
> >                               <t:dataScroller id="scroll_1"
> for="userData" fastStep="10"
> >                                       pageCountVar="pageCount"
> pageIndexVar="pageIndex"
> >                                       styleClass="scroller"
> paginator="true" paginatorMaxPages="9"
> >                                       paginatorTableClass="paginator"
> >
> paginatorActiveColumnStyle="font-weight:bold;" immediate="true"
> >
> actionListener="#{pc_PeopleFinderPortletView.scrollerAction}"
> >
> rendered="#{pc_PeopleFinderPortletView.showData}">
> >                                       <f:facet name="first">
> >                                               <t:graphicImage
> url="images/arrow-first.gif" border="1" />
> >                                       </f:facet>
> >                                       <f:facet name="last">
> >                                               <t:graphicImage
> url="images/arrow-last.gif" border="1" />
> >                                       </f:facet>
> >                                       <f:facet name="previous">
> >                                               <t:graphicImage
> url="images/arrow-previous.gif" border="1" />
> >                                       </f:facet>
> >                                       <f:facet name="next">
> >                                               <t:graphicImage
> url="images/arrow-next.gif" border="1" />
> >                                       </f:facet>
> >                                       <f:facet name="fastforward">
> >                                               <t:graphicImage
> url="images/arrow-ff.gif" border="1" />
> >                                       </f:facet>
> >                                       <f:facet name="fastrewind">
> >                                               <t:graphicImage
> url="images/arrow-fr.gif" border="1" />
> >                                       </f:facet>
> >                               </t:dataScroller>
> >                               <t:dataScroller id="scroll_2"
> for="userData"
> >                                       rowsCountVar="rowsCount"
> >
> displayedRowsCountVar="displayedRowsCountVar"
> >                                       firstRowIndexVar="firstRowIndex"
> lastRowIndexVar="lastRowIndex"
> >                                       pageCountVar="pageCount"
> immediate="true" pageIndexVar="pageIndex"
> >
> rendered="#{pc_PeopleFinderPortletView.showData}" >
> >                                       <h:outputText id="pagemsg10"
> value="#{firstRowIndex}"></h:outputText>
> >                                       <h:outputText id="pagemsg11"
> value="  -  "></h:outputText>
> >                                       <h:outputText id="pagemsg12"
> value="#{lastRowIndex}"></h:outputText>
> >                                       <h:outputText id="pagemsg13"
> value=" of "></h:outputText>
> >                                       <h:outputText id="pagemsg14"
> value="#{rowsCount}"></h:outputText>
> >                                       <h:outputText id="pagemsg15"
> value=" results"></h:outputText>
> >                               </t:dataScroller>
> >                       </t:panelGrid></p>
> >
> >
> > This is a weird issue.I am using tomahawk 1.1.6.
> > Please help me.
> >
> > Thanks and Regards,
> > Partha.
> >
> >
>
> --
> View this message in context:
> http://www.nabble.com/Issue-with-checkbox-when-Datascroller-is-used-tp18705430p18710608.html
> Sent from the MyFaces - Users mailing list archive at Nabble.com.
>
>

Reply via email to