[ 
http://issues.apache.org/jira/browse/MYFACES-1365?page=comments#action_12421062 
] 
            
Torsten Krah commented on MYFACES-1365:
---------------------------------------

Yo are wrong.

Look at http://wiki.apache.org/myfaces/How_The_Immediate_Attribute_Works:

Their you can read:

...
The only data available on a non-immediate component is what is fetched with 
component.getSubmittedValue(). Also, trying to change any backing bean value or 
component value is likely to be overwritten when the non-immediate value goes 
through validation and update model. And if any non-immediate component fails 
validation, then no backing bean updates will be performed.

On the other hand, any UIInput component marked immediate will already be 
validated before the action. If the validation failed for an immediate 
component, then the immediate action will not be executed, and no validation or 
model updates will occur for non-immediate components.
...

And if you read carefully - its only on the first event, the others do fine - 
with this "missing phases" for the first one. If you are right, than it should 
never behave so, that for all events after the first it works with these 
missing phases, than it would be also a bug.

And - you can delete the immidiate or set it to false. -> Bug is still there - 
so its not immediate="true" related.

Please reopen!

kind regards

Torsten

> h:selectOneMenu - Phase processing broken for the first selectOneMenu when 
> using 2 of them.
> -------------------------------------------------------------------------------------------
>
>                 Key: MYFACES-1365
>                 URL: http://issues.apache.org/jira/browse/MYFACES-1365
>             Project: MyFaces Core
>          Issue Type: Bug
>    Affects Versions: 1.1.3
>         Environment: tomcat 5.5.17, java 1.5
>            Reporter: Torsten Krah
>
> Using two selectOneMenu on one page results in a broken phase processing.
> example:
> Works:
> <html>
> <%@ taglib uri="http://java.sun.com/jsf/core"; prefix="f"%>
> <%@ taglib uri="http://java.sun.com/jsf/html"; prefix="h"%>
> <%@ taglib uri="http://myfaces.apache.org/tomahawk"; prefix="t"%>
> <[EMAIL PROTECTED] file="../inc/head.jsp"%>
> <body>
> <f:view>
>         <h:form>
>                 <f:loadBundle basename="my.examples.ressources.messages" 
> var="msgs" />
>                 <h:selectOneMenu id="oneoption" value="#{tableData.rows}"
>                         onchange="submit()" 
> valueChangeListener="#{tableData.rowsChanged}"
>                         immediate="true">
>                         <f:selectItem itemValue="5" itemLabel="5" />
>                         <f:selectItem itemValue="10" itemLabel="10" />
>                         <f:selectItem itemValue="15" itemLabel="15" />
>                         <f:selectItem itemValue="20" itemLabel="20" />
>                 </h:selectOneMenu>
>         </h:form>
> </f:view>
> <[EMAIL PROTECTED] file="../inc/page_footer.jsp"%>
> </body>
> </html>
> doesnt work:
> <html>
> <%@ taglib uri="http://java.sun.com/jsf/core"; prefix="f"%>
> <%@ taglib uri="http://java.sun.com/jsf/html"; prefix="h"%>
> <%@ taglib uri="http://myfaces.apache.org/tomahawk"; prefix="t"%>
> <[EMAIL PROTECTED] file="../inc/head.jsp"%>
> <body>
> <f:view>
>         <h:form>
>                 <f:loadBundle basename="my.examples.ressources.messages" 
> var="msgs" />
>                 <h:selectOneMenu id="oneoption" value="#{tableData.rows}"
>                         onchange="submit()" 
> valueChangeListener="#{tableData.rowsChanged}"
>                         immediate="true">
>                         <f:selectItem itemValue="5" itemLabel="5" />
>                         <f:selectItem itemValue="10" itemLabel="10" />
>                         <f:selectItem itemValue="15" itemLabel="15" />
>                         <f:selectItem itemValue="20" itemLabel="20" />
>                 </h:selectOneMenu>
>                 <h:selectOneMenu value="#{tableData.country}" 
> onchange="submit()">
>                         <f:valueChangeListener
>                                 
> type="my.examples.sortabletable.CountryListener" />
>                         <f:selectItems value="#{tableData.countryNames}" />
>                 </h:selectOneMenu>
>         </h:form>
> </f:view>
> <[EMAIL PROTECTED] file="../inc/page_footer.jsp"%>
> </body>
> </html>
> Using the first one, the event gets fired and looking at the phase listener, 
> all 6 phases are processed.
> Using the second example with both menus and firing an event on the first 
> menu, application invoke and model update phase aren't executed.
> The second menu works fine
> Only happens after the bean is new - using it on a already created session 
> bean, works. Only after the first invoking of the view this happens.
> I don't see any cause why the first event should not process phase 4 and 5 ( 
> like it does when only one menu is used ), so imho it's a bug.
> kind regards
> Torsten

-- 
This message is automatically generated by JIRA.
-
If you think it was sent incorrectly contact one of the administrators: 
http://issues.apache.org/jira/secure/Administrators.jspa
-
For more information on JIRA, see: http://www.atlassian.com/software/jira

        

Reply via email to