Yes, it doesn't work, you are right.
The problem occurs when ALLOW_JAVASCRIPT is set to false.
But if you change commandLink with commandButton, then  it works.
Try this:

<h:commandButton rendered="#{detailToggler.currentDetailExpanded}" action="#{detailToggler.toggleDetail}">
                           <h:outputText value="Hide"/>
                       </h:commandButton>
<h:commandButton rendered="#{!detailToggler.currentDetailExpanded}" action="#{detailToggler.toggleDetail}">
                           <h:outputText value="Show"/>
                       </h:commandButton>

Tomorrow I'll try to find the cause of this problem, but I suppose that the reason of this behaviour could reside somewhere else. In fact, if you look at "sample 1" in the myfaces-example-simple project, you can see that the adding numbers example doesn't work properly when you try adding numbers using links; if you try using buttons instead, every thing works fine.


Boris Kovalenko ha scritto:

Hello!

I use the latest (12.02.2006) nightly. Claudio, may You test this code with ALLOW_JAVASCRIPT to false? My configuration indeed:
    <context-param>
      <param-name>javax.faces.STATE_SAVING_METHOD</param-name>
      <param-value>server</param-value>
    </context-param>
    <context-param>
<param-name>org.apache.myfaces.NUMBER_OF_VIEWS_IN_SESSION</param-name>
      <param-value>20</param-value>
    </context-param>
<context-param> <param-name>org.apache.myfaces.SERIALIZE_STATE_IN_SESSION</param-name>
      <param-value>true</param-value>
    </context-param>
    <context-param>
<param-name>org.apache.myfaces.COMPRESS_STATE_IN_SESSION</param-name>
      <param-value>true</param-value>
    </context-param>
    <context-param>
      <param-name>org.apache.myfaces.ALLOW_JAVASCRIPT</param-name>
      <param-value>false</param-value>
    </context-param>
    <context-param>
      <param-name>org.apache.myfaces.DETECT_JAVASCRIPT</param-name>
      <param-value>false</param-value>
    </context-param>
    <context-param>
      <param-name>org.apache.myfaces.PRETTY_HTML</param-name>
      <param-value>true</param-value>
    </context-param>
    <context-param>
      <param-name>org.apache.myfaces.AUTO_SCROLL</param-name>
      <param-value>true</param-value>
    </context-param>


Reply via email to