Alexandre,

Why use javascript for this? I would recommend a more JSF-oriented approach to master/detail. See [1].

If you're really looking for a javascript solution, there may be some tips in [2].

[1] http://wiki.apache.org/myfaces/ExecutingMethodsFromLinkButtonParameters
[2] http://wiki.apache.org/myfaces/JavascriptWithJavaServerFaces

Regards,

Jeff Bischoff
Kenneth L Kurz & Associates, Inc.

Alexandre Jaquet wrote:
Hi,

I'm facing a problem, I'm trying to get the id / value of a component of a data table for updating a parent window

exemple :

<h:column>
 <f:facet name="header">
    <h:outputText id="lblDealerId" value="#{text.dealer_id}" />
 </f:facet>
 <h:outputText id="txtDealerId" value="#{row.dealerId}"/>
</h:column>
<h:column>
  <h:commandLink id="lnkSelect" onclick="setDealerIdToProductDetail();">
<h:graphicImage id="imgSelect" value="/images/arrow-previous.gif" alt="#{text.common_detail}" style="border-style:none" />
   </h:commandLink>
</h:column>

but the problem is how to get a dynamic id in Javascript ? if the generated html looks like

<span id="frmLayout:dataList:0:txtDealerId">000000</span>
<span id="frmLayout:dataList:1:txtDealerId">000002</span>


regards






Reply via email to