Hello there,

I have taken the plunge to start using MyFaces 1.2 (I've experience with
1.1.*). I have run into a strange problem that hopefully somebody will be
able to help with.

I have a standard h:commandButton with an actionListener, the code for which
is in a standrad request-scoped backing bean. When I click the button, the
event is being called twice. If I use an action instead of an action
listener it is only called once. If I use the Tomahawk 1.1.6
t:commandbutton, this problem is alleviated. I'm not however even certain
whether Tomahawk 1.1.* should be used with the new version of Myfaces.

I've scoured the web to see if there are any configuration changes that I
need to make when upgrading to 1.2.0 but without success. Should I, for
example still use the same performance related tweaks as described on the
wiki
(http://wiki.apache.org/myfaces/Performance?highlight=%28state_saving_method%29)
for this new version? I have the following performance features in my
web.xml (I did have the streamingaddresource stuff too but removed it):

  <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.COMPRESS_STATE_IN_SESSION</param-name>
    <param-value>false</param-value>
  </context-param>

  <context-param>
    <param-name>org.apache.myfaces.SERIALIZE_STATE_IN_SESSION</param-name>
    <param-value>false</param-value>
  </context-param>

The following details all other JSF related information in my web.xml - is
this still correct, or should I be adding some more/removing some?

 <context-param>
    <description>
      Set this flag to true if you want the JSF
      Reference Implementation to validate the XML in your
      faces-config.xml resources against the DTD. Default
      value is false.
    </description>
    <param-name>com.sun.faces.validateXml</param-name>
    <param-value>true</param-value>
  </context-param>

  <context-param>
    <description>
      Set this flag to true if you want the JSF
      Reference Implementation to verify that all of the application
      objects you have configured (components, converters,
      renderers, and validators) can be successfully created.
      Default value is false.
    </description>
    <param-name>com.sun.faces.verifyObjects</param-name>
    <param-value>true</param-value>
  </context-param>

  <filter>
    <filter-name>MyFacesExtensionsFilter</filter-name>
   
<filter-class>org.apache.myfaces.webapp.filter.ExtensionsFilter</filter-class>
    <init-param>
      <description>Set the size limit for uploaded files.
        Format: 10 - 10 bytes
        10k - 10 KB
        10m - 10 MB
        1g - 1 GB
      </description>
      <param-name>uploadMaxFileSize</param-name>
      <param-value>100m</param-value>
    </init-param>

    <init-param>
      <description>Set the threshold size - files
        below this limit are stored in memory, files above
        this limit are stored on disk.
        Format: 10 - 10 bytes
        10k - 10 KB
        10m - 10 MB
        1g - 1 GB
      </description>
      <param-name>uploadThresholdSize</param-name>
      <param-value>100k</param-value>
    </init-param>
  </filter>

  <filter-mapping>
    <filter-name>MyFacesExtensionsFilter</filter-name>
    <servlet-name>Faces Servlet</servlet-name>
  </filter-mapping>

  <filter-mapping>
    <filter-name>MyFacesExtensionsFilter</filter-name>
    <url-pattern>/faces/myFacesExtensionResource/*</url-pattern>
  </filter-mapping>

 <servlet>
    <servlet-name>Faces Servlet</servlet-name>
    <servlet-class>javax.faces.webapp.FacesServlet</servlet-class>
    <load-on-startup>1</load-on-startup>
  </servlet>

  <servlet-mapping>
    <servlet-name>Faces Servlet</servlet-name>
    <url-pattern>*.jsf</url-pattern>
  </servlet-mapping>

I'm not sure if any of this will be related to my problem, but thought it
would be worth providing up front just in case! Any help would be gratefully
received.

Many thanks, Carl

-- 
View this message in context: 
http://www.nabble.com/Faces-1.2-Command-Button-ActionListener-Problem-tf4396742.html#a12537678
Sent from the MyFaces - Users mailing list archive at Nabble.com.

Reply via email to