You are viewing a plain text version of this content. The canonical link for it is here.
Posted to users@myfaces.apache.org by Alexandre Jaquet <a....@avintis.com> on 2006/06/29 15:20:47 UTC

dataTable rowOnClick problem

Hi ,

I use rowOnClick method to retrieve the current id, my problem is when I 
click on the first row, the id is null.
Do I've something wrong in my declaration :

<t:dataTable id="data"
                value="#{currencyGui.currenciesFilter}"
                rendered="true"
                var="row"
                border="1"
                headerClass="standardTable_Header"
                preserveDataModel="false"
                rows="4"
                rowId="#{row.id}"
                rowOnClick="alert('rowId: ' + this.id)"
                id="data">          
            <t:column>
                <f:facet name="header">
                    <h:outputText value="#{text.common_code}"/>
                </f:facet>
                <h:outputText id="fieldId" value="#{row.id}"/>
            </t:column>


Regards

Re: dataTable rowOnClick problem

Posted by ldr <ch...@niro-it.dk>.
You have 2 id decl., maybe that messes it up - just a guess...

/ldr_
-- 
View this message in context: http://www.nabble.com/dataTable--rowOnClick-problem-tf1867456.html#a5218107
Sent from the MyFaces - Users forum at Nabble.com.


Re: dataTable rowOnClick problem

Posted by Alexandre Jaquet <a....@avintis.com>.
In fact when I click under the second row, I get the third value :|

Alexandre Jaquet wrote:
> Hi ,
>
> I use rowOnClick method to retrieve the current id, my problem is when 
> I click on the first row, the id is null.
> Do I've something wrong in my declaration :
>
> <t:dataTable id="data"
>                value="#{currencyGui.currenciesFilter}"
>                rendered="true"
>                var="row"
>                border="1"
>                headerClass="standardTable_Header"
>                preserveDataModel="false"
>                rows="4"
>                rowId="#{row.id}"
>                rowOnClick="alert('rowId: ' + this.id)"
>                id="data">                     <t:column>
>                <f:facet name="header">
>                    <h:outputText value="#{text.common_code}"/>
>                </f:facet>
>                <h:outputText id="fieldId" value="#{row.id}"/>
>            </t:column>
>
>
> Regards
>