You are viewing a plain text version of this content. The canonical link for it is here.
Posted to users@myfaces.apache.org by Vladimir Coutinho <vl...@gmail.com> on 2006/01/12 19:34:05 UTC

ExecutingMethodsFromLinkButtonParameters

I tried to follow the instruction to open a detail page from a table. The
first time I click the commandlink opens the detail page. But if I click the
BACK button of the BROWSER, the table apears, but the links doesn't work
more.

Master table

<t:dataTable id="clientes"
    preserveDataModel="false"
    cellpadding="0" cellspacing="1"
    columnClasses="" headerClass="tbcadH" rowClasses="tbcadTR1,tbcadTR2"
    styleClass="tbcad" value="#{Cliente.clientesEncontrados}"
    rows="35"
    var="c">
  <h:column>
    <f:facet name="header">
      <h:outputText  value="Nome"/>
    </f:facet>

    <t:commandLink  immediate="true" action="#{Cliente.encontrarMCI}">
        <h:outputText value="#{c.NM_CLI}" />
        <t:updateActionListener property="#{Cliente.CD_CLI}" value="#{
c.CD_CLI}" />
    </t:commandLink>

  </h:column>
  <h:column>
    <f:facet name="header">
      <h:outputText  value="Código"/>
    </f:facet>
    <h:outputText value="#{c.CD_CLI}"/>
  </h:column>
  <h:column>
    <f:facet name="header">
      <h:outputText  value="CNPJ/CPF"/>
    </f:facet>
     <h:outputText value="#{c.CNPJ_CPF}"/>
  </h:column>
</t:dataTable>

************************************************************************


  <navigation-rule>
        <from-view-id>/*</from-view-id>
        <navigation-case>
            <from-outcome>cadastro</from-outcome>
            <to-view-id>/cadastro/cadastro.jsp</to-view-id>
        </navigation-case>
        <navigation-case>
            <from-outcome>cadastroselcli</from-outcome>
            <to-view-id>/cadastro/cadastroselcli.jsp</to-view-id>
        </navigation-case>
    </navigation-rule>

commandlink/button client-id bug

Posted by Hansjörg Meuschel <hj...@gmx.de>.
Hi guys,
the following jsf code:

<h:form id="theForm">
<h:dataTable value="#{myBean.allXYBeans}" var="myBeanXYBean" id="table1">
<h:column>
<h:dataTable value="#{myBeanXYBean.allZBeans}" var="ZBean" id="table2">
<h:column>
    <h:input type="text" value="#{ZBean.username}" id="username"/>
    <h:commandButton value="SAVE" action="#{ZBean.saveUsername}" 
id="savebutton"/>
</h:column>
</h:dataTable>
</h:column>
</h:dataTable>
</h:form>

--> all data can be submitted, but commandButton / commandlink 
components get identical client-ids:

theForm:table1:savebutton

--> very strange about this - the iteration on the text input is 
correctly done: [that's why the data can be submitted]

theForm:table1:0:table2:username ... theForm:table1:6:table2:username


Do you experience the same problem or is there any know bug?
Any ideas for a workarround/bugfix ?

Thanks for anyreplies!

Regards,
Hans

PS. I'm using the current myfaces implementation with JSF RI 1.1.01 on 
apache tomcat 5



Re: ExecutingMethodsFromLinkButtonParameters

Posted by Vladimir Coutinho <vl...@gmail.com>.
Could someone help with this.

I get a user input, query the database and show a list ( <t:dataTable>). The
user choose a item
( <t:commandLink> <t:updateActionListener>), and I open a detail page.
Almost is OK, but when the user clicks the browser back button in the detail
page, the page (with the table) stop working.



On 1/12/06, Vladimir Coutinho <vl...@gmail.com> wrote:
>
> I tried to follow the instruction to open a detail page from a table. The
> first time I click the commandlink opens the detail page. But if I click the
> BACK button of the BROWSER, the table apears, but the links doesn't work
> more.
>
> Master table
>
> <t:dataTable id="clientes"
>     preserveDataModel="false"
>     cellpadding="0" cellspacing="1"
>     columnClasses="" headerClass="tbcadH" rowClasses="tbcadTR1,tbcadTR2"
>     styleClass="tbcad" value="#{Cliente.clientesEncontrados}"
>     rows="35"
>     var="c">
>   <h:column>
>     <f:facet name="header">
>       <h:outputText  value="Nome"/>
>     </f:facet>
>
>     <t:commandLink  immediate="true" action="#{Cliente.encontrarMCI}">
>         <h:outputText value="#{c.NM_CLI}" />
>         <t:updateActionListener property="#{Cliente.CD_CLI}" value="#{
> c.CD_CLI}" />
>     </t:commandLink>
>
>   </h:column>
>   <h:column>
>     <f:facet name="header">
>       <h:outputText  value="Código"/>
>     </f:facet>
>     <h:outputText value="#{c.CD_CLI}"/>
>   </h:column>
>   <h:column>
>     <f:facet name="header">
>       <h:outputText  value="CNPJ/CPF"/>
>     </f:facet>
>      <h:outputText value="#{c.CNPJ_CPF}"/>
>   </h:column>
> </t:dataTable>
>
> ************************************************************************
>
>
>   <navigation-rule>
>         <from-view-id>/*</from-view-id>
>         <navigation-case>
>             <from-outcome>cadastro</from-outcome>
>             <to-view-id>/cadastro/cadastro.jsp</to-view-id>
>         </navigation-case>
>         <navigation-case>
>             <from-outcome>cadastroselcli</from-outcome>
>             <to-view-id>/cadastro/cadastroselcli.jsp</to-view-id>
>         </navigation-case>
>     </navigation-rule>
>



--
Vladimir M Coutinho