incubator-adffaces-user mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From Döring Markus <Markus.Doer...@tcc-products.de>
Subject MyFaces 1.1.3, Trinidad and selectOneChoice-autoSubmit
Date Fri, 08 Sep 2006 08:23:45 GMT
Hi,
I'm trying around with MyFaces 1.1.3 and Trinidad for some days.
I've implemented a small site with a panelPage, some facets for navigation, ect. and everything
works fine.

In the main area i have a selectOneChoice component and a button to change the skin.
That's also working.

But if i remove the button and set the selectOneChoice component to autoSubmit="true" it don't
work. The page reloads so it looks like the submit works, but the skin don't change. If i
reload the page manually after that, the skin changes correctly, but not directly after i
select it in the choiceBox.

Here is some of my code:

<jsp:root xmlns:jsp="http://java.sun.com/JSP/Page" version="2.0"
  xmlns:f="http://java.sun.com/jsf/core"
  xmlns:h="http://java.sun.com/jsf/html"
  xmlns:trh="http://myfaces.apache.org/trinidad/html"
  xmlns:tr="http://myfaces.apache.org/trinidad">
  <jsp:directive.page contentType="text/html;charset=utf-8" />
  <f:view>
    <tr:document title="Test Trinidad application">
      <tr:form>
        <tr:panelPage>
          <f:facet name="appAbout">
            <tr:outputText value="appAbout: This application is for Testing the Trinidad
JSF components." />
          </f:facet>

    <-- some more facet to fill the page .... -->

          <f:facet name="navigation1">
            <tr:outputText value="navigation1" />
          </f:facet>

          <f:facet name="navigation2">
            <tr:outputText value="navigation2" />
          </f:facet>

          <f:facet name="navigation3">
            <tr:outputText value="navigation3" />
          </f:facet>

          <f:facet name="navigationGlobal">
            <tr:outputText value="navigationGlobal" />
          </f:facet>

          <tr:selectOneChoice labelAndAccessKey="&amp;Skinfamily"
id="skinFamilyId" value="#{userPreferences.skinFamily}" autoSubmit="true">
            <f:selectItems value="#{availableSkinFamilies}" />
          </tr:selectOneChoice>
          <tr:commandButton text="Submit"></tr:commandButton>

        </tr:panelPage>
      </tr:form>
    </tr:document>
  </f:view>
</jsp:root>

availableSkinFamilies is a HashMap defined in the faces-config.xml userPreferences is a managed-bean
with one attribute: skinFamily with session-scope to save the current selected skin

Greetings
M.Döring

Mime
View raw message