Re: MyFaces binding problem with HtmlSelectOneMenu/SelectOneChoice
Hi Simon, as you already have noticed, a component binding is not the right place to get the value of a component. The reason is simple: on a postback (submit) the component binding setter is called in the restore view phase where the value of the component is not yet set. In this phase not even the submitted value is yet set for the component. On the first submit the value is set after your setter was called. Therefore you can't see it before the second submit. If you are interested you can have a look at [1] for details (I assume you speak german). regards Michael [1]: http://jsfatwork.irian.at/semistatic/jsf.html#idx:/jsf.html:2.6 Am 25.01.2010 14:35, schrieb schneidc: Hi, I tried both drop down menus, MyFaces's HtmlSelectOneMenu and Trinidad's SelectOneChoice and both seem to have the same problem or at least I can't understand their behaviour. The menus are bound to an according object in a managed bean and the setter looks like this: public void setSelectOne(CoreSelectOneChoice selectOne) { this.selectOne = selectOne; if(selectOne.getValue() != null) System.out.println(selectOne.getValue().toString()); else System.out.println(broker null); } the tags: tr:selectOneChoice id=menu0 inlineStyle=margin-left: 20px binding=#{createTransactionModel.selectOne} tr:selectItem label=Broker value=broker / tr:selectItem label=Customer value=customer / /tr:selectOneChoice The very first time I call a page I get broker null as expected. Then I push a button which causes a submit and the setter get's called again but although I SELECTED a value I still get broker null. When I push the button a second time I finally get a not null value. And if it wasn't confusing enough the behaviour differs from App Server to App Server. The above behaviour was observed on a Websphere App Server. On a Glassfish instead I get broker null when the page is called for the first time (ok so far) and when I hit a button broker null broker != null as output straight one after another. Can somebody explain to me this behaviour? Especially why I only get a not null value on the WAS after causing a submit a second time? Cheers Simon
[OFFTOPIC] JSFDays 2010 Vienna
Hi all, we'd like to invite you to come to a JSF conference in Vienna, Austria from 23rd-25th of February. The program is packed with the latest and greatest information about JSF 2.0 and the new versions of the major component libraries as well as extensions. It will be worthwhile for you as a JSF developer to hear what this new version of JSF has to offer. In addition to the JSF track, there will also be a general Java EE track where the important new developments in the Java EE space will be covered. Additionally, the third day hosts a series of workshops on such interesting topics as: - Collaboration with Ajax Push, ICEfaces 2, and JSF 2 - RichFaces 4 with JSF 2 - The Java Memory Model - Real World Java EE (Patterns) - Rethinking Best Practices - Developing loosely coupled services - Hands on with the Portlet Bridge - Go Fullstack: JSF, Spring, JPA perfectly linked Here is the link: http://conference.irian.at - click on “Registration”. Attendees will pay a very small conference fee - 360,- Euro (including 20% VAT). The third day - the workshop day - will be charged separately. The attendance fee for the workshop day is 600,- Euro (including 20% VAT) per person. There will be a supporting program alongside the conference - so you will (additionally to learning about JSF and improving your JSF knowledge) have a good chance of getting to know Vienna and its surroundings. So far, there have been a lot registrations - so this conference is definitely going to be a meeting point for everyone interested in JSF! Regards, Gerhard http://www.irian.at Your JSF powerhouse - JSF Consulting, Development and Courses in English and German Professional Support for Apache MyFaces
Re: problem using myfaces-core-2.0.0-SNAPSHOT + myfaces-orchestra20-1.5-SNAPSHOT
Hello Matthias, On 01/21/2010 09:53 AM, Matthias Wessendorf wrote: Ok, good to know. Quick follow-up: Does it work with the RI/Mojarra ? No , it doesn't. As you might have noticed looking at the FAQ, the current version of Trinidad might be part of the problem. If so, do you mind to create a JIRA ticket against MyFaces2 ? It seems that such a ticket has already been created. regards. Edmond/
Re: MyFaces binding problem with HtmlSelectOneMenu/SelectOneChoice
Just in case it helps, I'm also having problems with HtmlSelectOne: This used to work until last week. Leonardos patch in MYFACES-2356.3 fixes this problem. I'd say this is a blocker for the beta release... LieGrue, strub 2010-01-26 13:25:27.623:WARN::/reservation-fe/reservationRequest.jsf java.lang.IllegalArgumentException: Expected submitted value of type String for component : {Component-Path : [Class: org.ajax4jsf.component.AjaxViewRoot,ViewId: /reservationRequest.xhtml][Class: javax.faces.component.html.HtmlForm,Id: suchformular][Class: org.richfaces.component.html.HtmlGraphValidator,Id: j_id9][Class: javax.faces.component.html.HtmlSelectOneRadio,Id: wellKnown]} at org.apache.myfaces.shared_impl.renderkit.RendererUtils.getStringValue(RendererUtils.java:275) at org.apache.myfaces.shared_impl.renderkit.html.HtmlRadioRendererBase.encodeEnd(HtmlRadioRendererBase.java:97) at javax.faces.component.UIComponentBase.encodeEnd(UIComponentBase.java:486) at javax.faces.component.UIComponent.encodeAll(UIComponent.java:612) at org.richfaces.component.UIGraphValidator.encodeChildren(UIGraphValidator.java:268) at javax.faces.component.UIComponent.encodeAll(UIComponent.java:603) at javax.faces.component.UIComponent.encodeAll(UIComponent.java:608) at javax.faces.component.UIComponent.encodeAll(UIComponent.java:608) at com.sun.facelets.FaceletViewHandler.renderView(FaceletViewHandler.java:592) at org.ajax4jsf.application.ViewHandlerWrapper.renderView(ViewHandlerWrapper.java:100) at org.ajax4jsf.application.AjaxViewHandler.renderView(AjaxViewHandler.java:176) at org.apache.myfaces.lifecycle.RenderResponseExecutor.execute(RenderResponseExecutor.java:107) at org.apache.myfaces.lifecycle.LifecycleImpl.render(LifecycleImpl.java:201) at javax.faces.webapp.FacesServlet.service(FacesServlet.java:191) at org.mortbay.jetty.servlet.ServletHolder.handle(ServletHolder.java:511) at org.mortbay.jetty.servlet.ServletHandler$CachedChain.doFilter(ServletHandler.java:1166) at org.ajax4jsf.webapp.BaseXMLFilter.doXmlFilter(BaseXMLFilter.java:178) at org.ajax4jsf.webapp.BaseFilter.handleRequest(BaseFilter.java:290) at org.ajax4jsf.webapp.BaseFilter.processUploadsAndHandleRequest(BaseFilter.java:388) at org.ajax4jsf.webapp.BaseFilter.doFilter(BaseFilter.java:515) at org.mortbay.jetty.servlet.ServletHandler$CachedChain.doFilter(ServletHandler.java:1157) --- On Tue, 1/26/10, Michael Kurz michi.k...@gmx.at wrote: From: Michael Kurz michi.k...@gmx.at Subject: Re: MyFaces binding problem with HtmlSelectOneMenu/SelectOneChoice To: users@myfaces.apache.org Date: Tuesday, January 26, 2010, 10:22 AM Hi Simon, as you already have noticed, a component binding is not the right place to get the value of a component. The reason is simple: on a postback (submit) the component binding setter is called in the restore view phase where the value of the component is not yet set. In this phase not even the submitted value is yet set for the component. On the first submit the value is set after your setter was called. Therefore you can't see it before the second submit. If you are interested you can have a look at [1] for details (I assume you speak german). regards Michael [1]: http://jsfatwork.irian.at/semistatic/jsf.html#idx:/jsf.html:2.6 Am 25.01.2010 14:35, schrieb schneidc: Hi, I tried both drop down menus, MyFaces's HtmlSelectOneMenu and Trinidad's SelectOneChoice and both seem to have the same problem or at least I can't understand their behaviour. The menus are bound to an according object in a managed bean and the setter looks like this: public void setSelectOne(CoreSelectOneChoice selectOne) { this.selectOne = selectOne; if(selectOne.getValue() != null) System.out.println(selectOne.getValue().toString()); else System.out.println(broker null); } the tags: tr:selectOneChoice id=menu0 inlineStyle=margin-left: 20px binding=#{createTransactionModel.selectOne} tr:selectItem label=Broker value=broker / tr:selectItem label=Customer value=customer / /tr:selectOneChoice The very first time I call a page I get broker null as expected. Then I push a button which causes a submit and the setter get's called again but although I SELECTED a value I still get broker null. When I push the button a second time I finally get a not null value. And if it wasn't confusing enough the behaviour differs from App Server to App Server. The above behaviour was observed on a Websphere App Server. On a Glassfish instead I get broker null when the page is called for the first time (ok so far) and when I hit a button broker null broker != null
Antwort: Customizing scroller by using t:dataTable with t:dataScroller
I tried to get the UIData.getFirst() for the first index. this is ok, but there is no chance to get the right index of the collection if the data is sorted again. Is there any action event on clicking the row subject for sorting? Klaus SCHUSTER schus...@racon-linz.at 22.01.2010 07:27 Bitte antworten an MyFaces Discussion users@myfaces.apache.org An users@myfaces.apache.org Kopie Thema Customizing scroller by using t:dataTable with t:dataScroller Hello, I'm using a t:dataTable attached to a t:dataScroller. Currently, the t:dataScroller shows the navigation buttons and a list of page numbers (e.g.: first, previous 1 2 3 etc). I am using a collection in my t:dataTable by the attribute value=... The Scroller shows me only 10 items of the full Collection. My question is: How can I have access to the 10 shown items ? I only have my whole list in the backing bean. The second question is, what happens if I sort the elements, can I get the shown items also in a sorted way? Thanks, Klaus Der Austausch von Nachrichten mit o.a. Absender via e-mail dient ausschließlich Informationszwecken. Rechtsgeschäftliche Erklärungen dürfen über dieses Medium nicht ausgetauscht werden. Correspondence with a.m. sender via e-mail is only for information purposes. This medium is not to be used for the exchange of legally-binding communications. Der Austausch von Nachrichten mit o.a. Absender via e-mail dient ausschließlich Informationszwecken. Rechtsgeschäftliche Erklärungen dürfen über dieses Medium nicht ausgetauscht werden. Correspondence with a.m. sender via e-mail is only for information purposes. This medium is not to be used for the exchange of legally-binding communications.
Re: MyFaces binding problem with HtmlSelectOneMenu/SelectOneChoice
Yeah, this is the same I got. Should be fixed with the patch. - Michael Am 26.01.2010 13:54, schrieb Mark Struberg: Just in case it helps, I'm also having problems with HtmlSelectOne: This used to work until last week. Leonardos patch in MYFACES-2356.3 fixes this problem. I'd say this is a blocker for the beta release... LieGrue, strub 2010-01-26 13:25:27.623:WARN::/reservation-fe/reservationRequest.jsf java.lang.IllegalArgumentException: Expected submitted value of type String for component : {Component-Path : [Class: org.ajax4jsf.component.AjaxViewRoot,ViewId: /reservationRequest.xhtml][Class: javax.faces.component.html.HtmlForm,Id: suchformular][Class: org.richfaces.component.html.HtmlGraphValidator,Id: j_id9][Class: javax.faces.component.html.HtmlSelectOneRadio,Id: wellKnown]} at org.apache.myfaces.shared_impl.renderkit.RendererUtils.getStringValue(RendererUtils.java:275) at org.apache.myfaces.shared_impl.renderkit.html.HtmlRadioRendererBase.encodeEnd(HtmlRadioRendererBase.java:97) at javax.faces.component.UIComponentBase.encodeEnd(UIComponentBase.java:486) at javax.faces.component.UIComponent.encodeAll(UIComponent.java:612) at org.richfaces.component.UIGraphValidator.encodeChildren(UIGraphValidator.java:268) at javax.faces.component.UIComponent.encodeAll(UIComponent.java:603) at javax.faces.component.UIComponent.encodeAll(UIComponent.java:608) at javax.faces.component.UIComponent.encodeAll(UIComponent.java:608) at com.sun.facelets.FaceletViewHandler.renderView(FaceletViewHandler.java:592) at org.ajax4jsf.application.ViewHandlerWrapper.renderView(ViewHandlerWrapper.java:100) at org.ajax4jsf.application.AjaxViewHandler.renderView(AjaxViewHandler.java:176) at org.apache.myfaces.lifecycle.RenderResponseExecutor.execute(RenderResponseExecutor.java:107) at org.apache.myfaces.lifecycle.LifecycleImpl.render(LifecycleImpl.java:201) at javax.faces.webapp.FacesServlet.service(FacesServlet.java:191) at org.mortbay.jetty.servlet.ServletHolder.handle(ServletHolder.java:511) at org.mortbay.jetty.servlet.ServletHandler$CachedChain.doFilter(ServletHandler.java:1166) at org.ajax4jsf.webapp.BaseXMLFilter.doXmlFilter(BaseXMLFilter.java:178) at org.ajax4jsf.webapp.BaseFilter.handleRequest(BaseFilter.java:290) at org.ajax4jsf.webapp.BaseFilter.processUploadsAndHandleRequest(BaseFilter.java:388) at org.ajax4jsf.webapp.BaseFilter.doFilter(BaseFilter.java:515) at org.mortbay.jetty.servlet.ServletHandler$CachedChain.doFilter(ServletHandler.java:1157) --- On Tue, 1/26/10, Michael Kurzmichi.k...@gmx.at wrote: From: Michael Kurzmichi.k...@gmx.at Subject: Re: MyFaces binding problem with HtmlSelectOneMenu/SelectOneChoice To: users@myfaces.apache.org Date: Tuesday, January 26, 2010, 10:22 AM Hi Simon, as you already have noticed, a component binding is not the right place to get the value of a component. The reason is simple: on a postback (submit) the component binding setter is called in the restore view phase where the value of the component is not yet set. In this phase not even the submitted value is yet set for the component. On the first submit the value is set after your setter was called. Therefore you can't see it before the second submit. If you are interested you can have a look at [1] for details (I assume you speak german). regards Michael [1]: http://jsfatwork.irian.at/semistatic/jsf.html#idx:/jsf.html:2.6 Am 25.01.2010 14:35, schrieb schneidc: Hi, I tried both drop down menus, MyFaces's HtmlSelectOneMenu and Trinidad's SelectOneChoice and both seem to have the same problem or at least I can't understand their behaviour. The menus are bound to an according object in a managed bean and the setter looks like this: public void setSelectOne(CoreSelectOneChoice selectOne) { this.selectOne = selectOne; if(selectOne.getValue() != null) System.out.println(selectOne.getValue().toString()); else System.out.println(broker null); } the tags: tr:selectOneChoice id=menu0 inlineStyle=margin-left: 20px binding=#{createTransactionModel.selectOne} tr:selectItem label=Broker value=broker / tr:selectItem label=Customer value=customer / /tr:selectOneChoice The very first time I call a page I get broker null as expected. Then I push a button which causes a submit and the setter get's called again but although I SELECTED a value I still get broker null. When I push the button a second time I finally get a not null value. And if it wasn't confusing enough the behaviour differs from App Server to App Server. The above behaviour was observed on a Websphere App Server. On a Glassfish instead I get broker null when the page is called for the first time (ok so far) and when I hit a button broker null broker != null as output
Re: Customizing scroller by using t:dataTable with t:dataScroller
Hi Klaus, I'm not sure if I understand your problem. What index do you need? The index of the first item, which is currently displayed? Please provide a little bit more information about the problem, maybe also a JSP snippet. Regards, Jakob 2010/1/26 Klaus SCHUSTER schus...@racon-linz.at I tried to get the UIData.getFirst() for the first index. this is ok, but there is no chance to get the right index of the collection if the data is sorted again. Is there any action event on clicking the row subject for sorting? Klaus SCHUSTER schus...@racon-linz.at 22.01.2010 07:27 Bitte antworten an MyFaces Discussion users@myfaces.apache.org An users@myfaces.apache.org Kopie Thema Customizing scroller by using t:dataTable with t:dataScroller Hello, I'm using a t:dataTable attached to a t:dataScroller. Currently, the t:dataScroller shows the navigation buttons and a list of page numbers (e.g.: first, previous 1 2 3 etc). I am using a collection in my t:dataTable by the attribute value=... The Scroller shows me only 10 items of the full Collection. My question is: How can I have access to the 10 shown items ? I only have my whole list in the backing bean. The second question is, what happens if I sort the elements, can I get the shown items also in a sorted way? Thanks, Klaus Der Austausch von Nachrichten mit o.a. Absender via e-mail dient ausschließlich Informationszwecken. Rechtsgeschäftliche Erklärungen dürfen über dieses Medium nicht ausgetauscht werden. Correspondence with a.m. sender via e-mail is only for information purposes. This medium is not to be used for the exchange of legally-binding communications. Der Austausch von Nachrichten mit o.a. Absender via e-mail dient ausschließlich Informationszwecken. Rechtsgeschäftliche Erklärungen dürfen über dieses Medium nicht ausgetauscht werden. Correspondence with a.m. sender via e-mail is only for information purposes. This medium is not to be used for the exchange of legally-binding communications.
Antwort: Re: Customizing scroller by using t:dataTable with t:dataScroller
Hi jakob, thanks for the reply. I need the index of the collection, of the first shown element on the page. If I navigate to the 3rd page of the dataTable, the UIData.getFirst() gives me the index of the first shown item in the Collection from the 3rd page. This works well, but I can sort the table by klicking on the header of the rows. If I click on sorting, the whole collection is sorted, and splittet to the shown pages. UIData.getFirst() gives me the same results, as I had before without sorting. Thanks, Klaus Jakob Korherr jakob.korh...@gmail.com Gesendet von: sethfromaust...@gmail.com 26.01.2010 22:06 Bitte antworten an MyFaces Discussion users@myfaces.apache.org An MyFaces Discussion users@myfaces.apache.org Kopie Thema Re: Customizing scroller by using t:dataTable with t:dataScroller Hi Klaus, I'm not sure if I understand your problem. What index do you need? The index of the first item, which is currently displayed? Please provide a little bit more information about the problem, maybe also a JSP snippet. Regards, Jakob 2010/1/26 Klaus SCHUSTER schus...@racon-linz.at I tried to get the UIData.getFirst() for the first index. this is ok, but there is no chance to get the right index of the collection if the data is sorted again. Is there any action event on clicking the row subject for sorting? Klaus SCHUSTER schus...@racon-linz.at 22.01.2010 07:27 Bitte antworten an MyFaces Discussion users@myfaces.apache.org An users@myfaces.apache.org Kopie Thema Customizing scroller by using t:dataTable with t:dataScroller Hello, I'm using a t:dataTable attached to a t:dataScroller. Currently, the t:dataScroller shows the navigation buttons and a list of page numbers (e.g.: first, previous 1 2 3 etc). I am using a collection in my t:dataTable by the attribute value=... The Scroller shows me only 10 items of the full Collection. My question is: How can I have access to the 10 shown items ? I only have my whole list in the backing bean. The second question is, what happens if I sort the elements, can I get the shown items also in a sorted way? Thanks, Klaus Der Austausch von Nachrichten mit o.a. Absender via e-mail dient ausschließlich Informationszwecken. Rechtsgeschäftliche Erklärungen dürfen über dieses Medium nicht ausgetauscht werden. Correspondence with a.m. sender via e-mail is only for information purposes. This medium is not to be used for the exchange of legally-binding communications. Der Austausch von Nachrichten mit o.a. Absender via e-mail dient ausschließlich Informationszwecken. Rechtsgeschäftliche Erklärungen dürfen über dieses Medium nicht ausgetauscht werden. Correspondence with a.m. sender via e-mail is only for information purposes. This medium is not to be used for the exchange of legally-binding communications. Der Austausch von Nachrichten mit o.a. Absender via e-mail dient ausschließlich Informationszwecken. Rechtsgeschäftliche Erklärungen dürfen über dieses Medium nicht ausgetauscht werden. Correspondence with a.m. sender via e-mail is only for information purposes. This medium is not to be used for the exchange of legally-binding communications.
[Announce] Release of Apache MyFaces Trinidad 1.2.13
The Apache MyFaces Trinidad team is pleased to announce the release of Apache MyFaces Trinidad Core 1.2.13. Apache MyFaces Trinidad is a JavaServer(tm) Faces 1.2 component library. Trinidad Core 1.2.13 is available in both binary and source distributions: * http://myfaces.apache.org/trinidad/download.html Apache MyFaces Trinidad is available in the central Maven repository under Group ID org.apache.myfaces.trinidad. Release Notes: https://issues.apache.org/jira/secure/ReleaseNote.jspa?projectId=12310661styleName=Htmlversion=12314170 Enjoy! Matthias -- Matthias Wessendorf blog: http://matthiaswessendorf.wordpress.com/ sessions: http://www.slideshare.net/mwessendorf twitter: http://twitter.com/mwessendorf