incubator-adffaces-user mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From Günther, Thorsten <Thorsten.Guent...@medocino.de>
Subject AW: MyFaces 1.1.3, Trinidad and selectOneChoice-autoSubmit
Date Fri, 08 Sep 2006 09:13:17 GMT
Hi Markus!

I think autoSubmit is issuing a PPR, so only the selectOneChoice is rendered again unless
you tie other components to the PPR with the partialTriggers property. Perhaps using onchange="submit()"
is a solution for you problem.

Regards,
Thorsten



-----Ursprüngliche Nachricht-----
Von: Döring Markus [mailto:Markus.Doering@tcc-products.de] 
Gesendet: Freitag, 8. September 2006 10:24
An: adffaces-user@incubator.apache.org
Betreff: MyFaces 1.1.3, Trinidad and selectOneChoice-autoSubmit

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