[HtmlLabelRenderer] Unable to find component
Hi, I get this warning: 08:28:10,484 WARN [HtmlLabelRenderer] Unable to find component 'documentTitle' (calling findComponent on component 'form1:_id21') In fact I get it on all my labels! But I do not understand what the error means, since there is a component with id documentTitle. I'm I reading the error msg. wrong? Please can anyone help me.. Best regards, Kasper this is my jsf code (I know the td isn't good coding..): td class=formCell h:outputLabel for=documentTitle h:outputText id=documentTitleLabel value=#{msg.docTitleLabel} / h:outputText id=documentTitleLabelFreeText value=#{msg.freeText} / /h:outputLabel /td td h:inputText id=documentTitle tabindex=8 styleClass=textField value=#{searchPage.documentTitle} required=false f:validateLength minimum=0 maximum=50/ /h:inputTextbr / span class=elementErrorh:message for=documentTitle //span /td
Re: WARN [HtmlLabelRenderer]
That did help, thanks! But how do I get the label to be at the left side of the input component? Tirsdag 06 december 2005 08:50 skrev Dennis Byrne: Kasper, try placing the element h:outputLabel for=documentTitle after the element w/ @id=documentTitle . Original message Date: Tue, 6 Dec 2005 08:42:19 +0100 From: Kasper Hansen [EMAIL PROTECTED] Subject: WARN [HtmlLabelRenderer] To: users@myfaces.apache.org Hi, I get this warning: 08:28:10,484 WARN [HtmlLabelRenderer] Unable to find component 'documentTitle' (calling findComponent on component 'form1:_id21') In fact I get it on all my labels! But I do not understand what the error means, since there is a component with id documentTitle. I'm I reading the error msg. wrong? Please can anyone help me.. Best regards, Kasper this is my jsf code (I know the td isn't good coding..): td class=formCell h:outputLabel for=documentTitle h:outputText id=documentTitleLabel value=# {msg.docTitleLabel} / h:outputText id=documentTitleLabelFreeText value=#{msg.freeText} / /h:outputLabel /td td h:inputText id=documentTitle tabindex=8 styleClass=textField value=#{searchPage.documentTitle} required=false f:validateLength minimum=0 maximum=50/ /h:inputTextbr / span class=elementErrorh:message for=documentTitle //span /td Dennis Byrne
Re: facelet
I think it is not possible to combine tobago with facelets. I haven't used facelets, but I think facelets are based on HTML-designed JSP source code. Tobago on the other side abstracts from HTML. There are no HTML-Tags in the JSP source code. There are only abstract tags. The Renderkit converts it to HTML or any other ML. The idea of Tobago is: The theme controls the look-and-feel of the page. Udo Mike Kienenberger wrote: There's quite a few people using this framework. Which license issue are you needing to solve? As I recall, tobago is just using a different renderkit. I don't think there would be any issues using it with facelets. You'd just need to set up a facelets taglib.xml file for it, but that's true for all nonstandard JSF components. However, I haven't tried using tobago with facelets. You'll probably receive more in-depth answers on the facelets users mailing list. On 12/3/05, Arash Bijanzadeh [EMAIL PROTECTED] wrote: Hi, I would like to here any advise regarding to facelets. Did anybody used this framework? What is the situation? How could license issue be solved? Is there the possibility to combine tobago and facelets? Thanks in advance -- from debian manifesto: Debian Linux is a brand-new kind of Linux distribution. Rather than being developed by one isolated individua l or group, as other distributions of Linux have been developed in the past, Debian is being developed openly in the spirit of Linux and GNU.
AW: OnLoad in Myfaces --something like in Oracle ADF? --Problems with JSFCOMP
Hi! This listener looks great, but I have problems with implementing it. Here are the steps I took: .)Put the jsfExt.jar into my WEB-INF/lib directory. .)Add a onload-config.xml into my WEB-INF directory It looks like this: ?xml version=1.0 encoding=UTF-8? onload-config xslns=urn:onload-config xmlns:xsi=http://www.w3.org/2001/XMLSchema-instance; xsi:schemaLocation=urn:onload-config onload-config.xsd navigation-rule view-id/login.jsp/view-id action#{linker.startdatabase}/action /navigation-rule /onload-config .)Add a onload-config.xsd into my WEB-INF diretory: (Just copied it out of the zip File) .)Add the following into my Web.xml: context-param param-nameonload-rules/param-name param-value/WEB-INF/onload-config.xml/param-value /context-param Nevertheless the XML (both the onload-config.xml and the onload-config.xsd) doesn't seem to be well-formed: On the onload-config.xml I get the following error: cvc-elt1: Cannot find the declaration of element onload-config on the onload-config.xsd I get the following error at line: xs:element name=onload-config type=Config/ src-resolve 4.1: Error resolving component 'Config'. It was detected that Config has no namespace, but components with no target namespace are not referencable from schema document Can anybody help me? Thx Regards, Andy -Ursprüngliche Nachricht- Von: Andrew Robinson [mailto:[EMAIL PROTECTED] Gesendet: Montag, 5. Dezember 2005 18:22 An: MyFaces Discussion Betreff: Re: OnLoad in Myfaces --something like in Oracle ADF? I have an OnLoad phase listener implemented. It is part of http://sourceforge.net/projects/jsf-comp Check out the jsfExt release. It isn't a component, but may provide the functionality that you are looking for. -Andrew On 12/5/05, [EMAIL PROTECTED] [EMAIL PROTECTED] wrote: Hi all! Can I find a similar component like the Oracle ADF body, especially the onload, component in Myfaces? Or can I do a workaround to load a method from the backing bean at Onload of the jsf page? Regards Andy __ This email and any files transmitted with it are confidential and intended solely for the use of the individual or entity to whom they are addressed. If you have received this email in error please notify your system manager. This footnote also confirms that this email message has been swept for the presence of computer viruses. __ __ This email and any files transmitted with it are confidential and intended solely for the use of the individual or entity to whom they are addressed. If you have received this email in error please notify your system manager. This footnote also confirms that this email message has been swept for the presence of computer viruses. __
myfaces in weblogic
Hi all,I'm trying to get a basic myfaces application to run on weblogic 8.1 but without any luck yet. I googled arround a bit and found some contradicting bits on form but no 'THIS is how to to it, THIS is why'. The problem I'm running into seems to be related to context initialisation:java.lang.ExceptionInInitializerError. at weblogic.servlet.internal.ServletStubImpl.prepareServlet(ServletStubImpl.java :822) at weblogic.servlet.internal.WebAppServletContext.preloadServlet(WebAppServletContext.java:3236) at weblogic.servlet.internal.WebAppServletContext.preloadServlets(WebAppServletContext.java:3181) at weblogic.servlet.internal.WebAppServletContext.preloadResources(WebAppServletContext.java:3154) at weblogic.servlet.internal.HttpServer.preloadResources(HttpServer.java:654) at weblogic.servlet.internal.WebService.preloadResources (WebService.java:483) at weblogic.servlet.internal.ServletInitService.resume(ServletInitService.java:30) at weblogic.t3.srvr.SubsystemManager.resume(SubsystemManager.java:131) at weblogic.t3.srvr.T3Srvr.resume (T3Srvr.java:964) at weblogic.t3.srvr.T3Srvr.run(T3Srvr.java:359) at weblogic.Server.main(Server.java:32)A forum on the sun site recommends the use of a specific listener, which is not included in the myfaces distribution... another post on yet another forum recommended the use of a different servlet ( net.sourceforge.myfaces.webapp.MyFacesServlet) which is no part at of the myfaces distribution either?any help appriciated!-P
Re: editable forms
hi, Mike Kienenberger wrote: The problem is that #{param.edit} doesn't maintain a constant value. The component's rendered attribute value must be the same between the first and second request. If it's rendered on the initial request, but not rendered on the submitting request, then the backing bean won't be updated (the value won't even be validated). Components are only evaluated (decoded, converted, validated, copied to backing beans, rendered) if the rendered attribute is true. thank you, i think thats exactly the problem. the thing is, i'm trying to do as much as possible without changes in my JAVA-code. i think this problem is also a very common usecase for forms. Much forms have the possibility to check the inputs on a second page without the ability to change them (wizards). basically this must be possible with same form - just other renderers for the values !? is there another approach for doing this. regards ronald -- * *M-Unicomp GmbH * *Ronald Müller * *Plauener Straße 163-165, Haus 11 *13053 Berlin * *fon : +49 ( 0 ) 30 / 98 69 61 54 *mobil : +49 ( 0 ) 172 / 93 95 00 4 *fax : +49 ( 0 ) 30 / 98 69 61 55 *email : [EMAIL PROTECTED] *web : www.unicomp-berlin.de
Re: editable forms
Thank you. I think i will try a similiar approach. Regards Ronald Yee CN wrote: What I did is that I maintain an enum called screenMode={VIEW,EDIT,ADDNEW} in the backing bean. public boolean isEditMode() { return this.screenMode == ScreenMode.EDIT || this.screenMode == ScreenMode.ADDNEW; } public boolean isAddnewMode() { return this.screenMode == ScreenMode.ADDNEW; //return this.addNew; } /** * Getting/Setting the ScreenMode Enum as String * @return String */ public String getScreenMode() { return this.screenMode.toString() ; } public void setScreenMode(String mode) { this.screenMode = ScreenMode.valueOf(mode) ; } In your jsf file you will do: t:saveState value=”#{myBean.screenMode}” / h:selectOneMenu rendered=#{!myBean.editMode} Hope this help. Regards, Yee -Original Message- From: R. Müller [mailto:[EMAIL PROTECTED] Sent: Monday, 5 December 2005 11:06 PM To: users@myfaces.apache.org Subject: editable forms hi group, in a particular form i want the fields only editable, if there is explicitly set a edit-param. I've tried it with the following code : h:outputTextrendered=#{empty param.edit} value=#{backingBean.value}/ h:selectOneMenu rendered=#{!empty param.edit} value=#{backingBean.value} f:selectItems value=#{selectItems} / /h:selectOneMenu But i've noticed that when submitting the form the 'setter'-method of the 'backingBean.value' is never called. Leaving out the 'rendering'-attribute, which means that the component is always editable everthing works fine. I've got the same behaviour when using the 'disabled'-attribute. Does anybody has an explanation for this or hints how to solve this in a 'clean way' ? thanx ronald -- * *M-Unicomp GmbH * *Ronald Müller * *Plauener Straße 163-165, Haus 11 *13053 Berlin * *fon : +49 ( 0 ) 30 / 98 69 61 54 *mobil : +49 ( 0 ) 172 / 93 95 00 4 *fax : +49 ( 0 ) 30 / 98 69 61 55 *email : [EMAIL PROTECTED] *web : www.unicomp-berlin.de
Re: myfaces in weblogic
Which service pack? Udo Peter Maas wrote: Hi all, I'm trying to get a basic myfaces application to run on weblogic 8.1 but without any luck yet. I googled arround a bit and found some contradicting bits on form but no 'THIS is how to to it, THIS is why'. The problem I'm running into seems to be related to context initialisation: java.lang.ExceptionInInitializerError. at weblogic.servlet.internal.ServletStubImpl.prepareServlet(ServletStubImpl.java :822) at weblogic.servlet.internal.WebAppServletContext.preloadServlet(WebAppServletContext.java:3236) at weblogic.servlet.internal.WebAppServletContext.preloadServlets(WebAppServletContext.java:3181) at weblogic.servlet.internal.WebAppServletContext.preloadResources(WebAppServletContext.java:3154) at weblogic.servlet.internal.HttpServer.preloadResources(HttpServer.java:654) at weblogic.servlet.internal.WebService.preloadResources (WebService.java:483) at weblogic.servlet.internal.ServletInitService.resume(ServletInitService.java:30) at weblogic.t3.srvr.SubsystemManager.resume(SubsystemManager.java:131) at weblogic.t3.srvr.T3Srvr.resume (T3Srvr.java:964) at weblogic.t3.srvr.T3Srvr.run(T3Srvr.java:359) at weblogic.Server.main(Server.java:32) A forum on the sun site recommends the use of a specific listener, which is not included in the myfaces distribution... another post on yet another forum recommended the use of a different servlet ( net.sourceforge.myfaces.webapp.MyFacesServlet) which is no part at of the myfaces distribution either? any help appriciated! -P
Re: WARN [HtmlLabelRenderer]
That's not so easy if you want to still use HTML Layouting for enclosing your components. The problem is a know problem in the interaction of JSF and HTML/JSP. It will be fixed in JSF 1.2, right now all you can do is enclose your inputText's and outputLabels in a component like panelGrid. The problem is that JSP build's up the component tree one by one, and at the time of the rendering of the label, the inputText hasn't been built so far. Another option: just ignore the warning respectively set the log-level to a higher level for the HTMLLabelRenderer. You can safely ignore it, the label component will do its best to render correctly even without finding the inputText component. regards, Martin On 12/6/05, Kasper Hansen [EMAIL PROTECTED] wrote: That did help, thanks! But how do I get the label to be at the left side of the input component? Tirsdag 06 december 2005 08:50 skrev Dennis Byrne: Kasper, try placing the element h:outputLabel for=documentTitle after the element w/ @id=documentTitle . Original message Date: Tue, 6 Dec 2005 08:42:19 +0100 From: Kasper Hansen [EMAIL PROTECTED] Subject: WARN [HtmlLabelRenderer] To: users@myfaces.apache.org Hi, I get this warning: 08:28:10,484 WARN [HtmlLabelRenderer] Unable to find component 'documentTitle' (calling findComponent on component 'form1:_id21') In fact I get it on all my labels! But I do not understand what the error means, since there is a component with id documentTitle. I'm I reading the error msg. wrong? Please can anyone help me.. Best regards, Kasper this is my jsf code (I know the td isn't good coding..): td class=formCell h:outputLabel for=documentTitle h:outputText id=documentTitleLabel value=# {msg.docTitleLabel} / h:outputText id=documentTitleLabelFreeText value=#{msg.freeText} / /h:outputLabel /td td h:inputText id=documentTitle tabindex=8 styleClass=textField value=#{searchPage.documentTitle} required=false f:validateLength minimum=0 maximum=50/ /h:inputTextbr / span class=elementErrorh:message for=documentTitle //span /td Dennis Byrne -- http://www.irian.at Your JSF powerhouse - JSF Consulting, Development and Courses in English and German Professional Support for Apache MyFaces
Issue with images in jscookmenu
Hello I'm dealing successfully withthe jscookmenu component when I work on the test environments. But when I put the application in the production environment, the jsCookMenu does not display the images anymore. The difference is that the production environment is accessible via a reverse proxy. When I look into the generated page, I see the following: headscript type="text/_javascript_" src=""https://myserver/myapp/faces/myFacesExtensionResource/org.apache.myfaces.component.html.util.MyFacesResourceLoader/11337878/navmenu.jscookmenu.HtmlJSCookMenuRenderer/JSCookMenu.js">https://myserver/myapp/faces/myFacesExtensionResource/org.apache.myfaces.component.html.util.MyFacesResourceLoader/11337878/navmenu.jscookmenu.HtmlJSCookMenuRenderer/JSCookMenu.js"!-- //--/scriptscript type="text/_javascript_" src=""https://webgate.cec.eu.int/sigl2test/Sigl4/faces/myFacesExtensionResource/org.apache.myfaces.component.html.util.MyFacesResourceLoader/11337878/navmenu.jscookmenu.HtmlJSCookMenuRenderer/MyFacesHack.js">https://myserver/myapp/Sigl4/faces/myFacesExtensionResource/org.apache.myfaces.component.html.util.MyFacesResourceLoader/11337878/navmenu.jscookmenu.HtmlJSCookMenuRenderer/MyFacesHack.js"!-- //--/scriptscript type="text/_javascript_"!--var myThemeOfficeBase=/myapp/faces/myFacesExtensionResource/org.apache.myfaces.component.html.util.MyFacesResourceLoader/11337878/navmenu.jscookmenu.HtmlJSCookMenuRenderer/ThemeOffice/';//--/scriptscript type="text/_javascript_" src=""https://webgate.cec.eu.int/sigl2test/Sigl4/faces/myFacesExtensionResource/org.apache.myfaces.component.html.util.MyFacesResourceLoader/11337878/navmenu.jscookmenu.HtmlJSCookMenuRenderer/ThemeOffice/theme.js">https://myserver/myapp/Sigl4/faces/myFacesExtensionResource/org.apache.myfaces.component.html.util.MyFacesResourceLoader/11337878/navmenu.jscookmenu.HtmlJSCookMenuRenderer/ThemeOffice/theme.js"!-- //--/script As you can see, all references are absolute, except the initialisation of the myThemeOfficeBase variable which uses a relative reference to the theme directory. I think this is the reason of the problem. This reference should be made absolute as the others and the images will then be rendered correctly, evenvia a reverse proxy. Yours, Dan
Re: myfaces in weblogic
wl version 8.11, so SP1... and I don't have the option to install additional service packs... hopefully this is not mandatory?-POn 12/6/05, Udo Schnurpfeil [EMAIL PROTECTED] wrote: Which service pack?UdoPeter Maas wrote: Hi all, I'm trying to get a basic myfaces application to run on weblogic 8.1 but without any luck yet. I googled arround a bit and found some contradicting bits on form but no 'THIS is how to to it, THIS is why'. The problem I'm running into seems to be related to context initialisation: java.lang.ExceptionInInitializerError . at weblogic.servlet.internal.ServletStubImpl.prepareServlet(ServletStubImpl.java :822) at weblogic.servlet.internal.WebAppServletContext.preloadServlet(WebAppServletContext.java :3236) at weblogic.servlet.internal.WebAppServletContext.preloadServlets(WebAppServletContext.java:3181) at weblogic.servlet.internal.WebAppServletContext.preloadResources (WebAppServletContext.java:3154) at weblogic.servlet.internal.HttpServer.preloadResources(HttpServer.java:654) at weblogic.servlet.internal.WebService.preloadResources (WebService.java :483) at weblogic.servlet.internal.ServletInitService.resume(ServletInitService.java:30) at weblogic.t3.srvr.SubsystemManager.resume(SubsystemManager.java:131) at weblogic.t3.srvr.T3Srvr.resume (T3Srvr.java:964) at weblogic.t3.srvr.T3Srvr.run(T3Srvr.java:359) at weblogic.Server.main(Server.java:32) A forum on the sun site recommends the use of a specific listener, which is not included in the myfaces distribution... another post on yet another forum recommended the use of a different servlet ( net.sourceforge.myfaces.webapp.MyFacesServlet) which is no part at of the myfaces distribution either? any help appriciated! -P
Re: WARN [HtmlLabelRenderer]
Thanks, I will use panelGrid!! Tirsdag 06 december 2005 10:14 skrev Martin Marinschek: That's not so easy if you want to still use HTML Layouting for enclosing your components. The problem is a know problem in the interaction of JSF and HTML/JSP. It will be fixed in JSF 1.2, right now all you can do is enclose your inputText's and outputLabels in a component like panelGrid. The problem is that JSP build's up the component tree one by one, and at the time of the rendering of the label, the inputText hasn't been built so far. Another option: just ignore the warning respectively set the log-level to a higher level for the HTMLLabelRenderer. You can safely ignore it, the label component will do its best to render correctly even without finding the inputText component. regards, Martin On 12/6/05, Kasper Hansen [EMAIL PROTECTED] wrote: That did help, thanks! But how do I get the label to be at the left side of the input component? Tirsdag 06 december 2005 08:50 skrev Dennis Byrne: Kasper, try placing the element h:outputLabel for=documentTitle after the element w/ @id=documentTitle . Original message Date: Tue, 6 Dec 2005 08:42:19 +0100 From: Kasper Hansen [EMAIL PROTECTED] Subject: WARN [HtmlLabelRenderer] To: users@myfaces.apache.org Hi, I get this warning: 08:28:10,484 WARN [HtmlLabelRenderer] Unable to find component 'documentTitle' (calling findComponent on component 'form1:_id21') In fact I get it on all my labels! But I do not understand what the error means, since there is a component with id documentTitle. I'm I reading the error msg. wrong? Please can anyone help me.. Best regards, Kasper this is my jsf code (I know the td isn't good coding..): td class=formCell h:outputLabel for=documentTitle h:outputText id=documentTitleLabel value=# {msg.docTitleLabel} / h:outputText id=documentTitleLabelFreeText value=#{msg.freeText} / /h:outputLabel /td td h:inputText id=documentTitle tabindex=8 styleClass=textField value=#{searchPage.documentTitle} required=false f:validateLength minimum=0 maximum=50/ /h:inputTextbr / span class=elementErrorh:message for=documentTitle //span /td Dennis Byrne -- http://www.irian.at Your JSF powerhouse - JSF Consulting, Development and Courses in English and German Professional Support for Apache MyFaces
Re: myfaces in weblogic
Hi Peter, I had your same problem and finally solved it including the file jsp-api.jar in the lib directory of my project. Hope it helps, Rosalba --- Peter Maas [EMAIL PROTECTED] wrote: wl version 8.11, so SP1... and I don't have the option to install additional service packs... hopefully this is not mandatory? -P On 12/6/05, Udo Schnurpfeil [EMAIL PROTECTED] wrote: Which service pack? Udo Peter Maas wrote: Hi all, I'm trying to get a basic myfaces application to run on weblogic 8.1 but without any luck yet. I googled arround a bit and found some contradicting bits on form but no 'THIS is how to to it, THIS is why'. The problem I'm running into seems to be related to context initialisation: java.lang.ExceptionInInitializerError. at weblogic.servlet.internal.ServletStubImpl.prepareServlet( ServletStubImpl.java :822) at weblogic.servlet.internal.WebAppServletContext.preloadServlet( WebAppServletContext.java:3236) at weblogic.servlet.internal.WebAppServletContext.preloadServlets( WebAppServletContext.java:3181) at weblogic.servlet.internal.WebAppServletContext.preloadResources( WebAppServletContext.java:3154) at weblogic.servlet.internal.HttpServer.preloadResources(HttpServer.java :654) at weblogic.servlet.internal.WebService.preloadResources (WebService.java:483) at weblogic.servlet.internal.ServletInitService.resume( ServletInitService.java:30) at weblogic.t3.srvr.SubsystemManager.resume(SubsystemManager.java:131) at weblogic.t3.srvr.T3Srvr.resume (T3Srvr.java:964) at weblogic.t3.srvr.T3Srvr.run(T3Srvr.java:359) at weblogic.Server.main(Server.java:32) A forum on the sun site recommends the use of a specific listener, which is not included in the myfaces distribution... another post on yet another forum recommended the use of a different servlet ( net.sourceforge.myfaces.webapp.MyFacesServlet) which is no part at of the myfaces distribution either? any help appriciated! -P __ Yahoo! DSL Something to write home about. Just $16.99/mo. or less. dsl.yahoo.com
Re: myfaces in weblogic
Ah! O.k.I think I already tried this, but I'll give it a go. Supposively this jsp-api.jar needs to be jsp2.0 and is needed for the web.xml dtd?-POn 12/6/05, rosalba bochicchio [EMAIL PROTECTED] wrote: Hi Peter,I had your same problem and finally solved itincluding the file jsp-api.jar in the libdirectory of my project.Hope it helps,Rosalba--- Peter Maas [EMAIL PROTECTED] wrote: wl version 8.11, so SP1... and I don't have the option to install additional service packs... hopefully this is not mandatory? -P On 12/6/05, Udo Schnurpfeil [EMAIL PROTECTED] wrote: Which service pack? Udo Peter Maas wrote: Hi all, I'm trying to get a basic myfaces application to run on weblogic 8.1 but without any luck yet. I googled arround a bit and found some contradicting bits on form but no 'THIS is how to to it, THIS is why'. The problem I'm running into seems to be related to context initialisation: java.lang.ExceptionInInitializerError. at weblogic.servlet.internal.ServletStubImpl.prepareServlet ( ServletStubImpl.java :822) at weblogic.servlet.internal.WebAppServletContext.preloadServlet( WebAppServletContext.java:3236) at weblogic.servlet.internal.WebAppServletContext.preloadServlets( WebAppServletContext.java:3181) at weblogic.servlet.internal.WebAppServletContext.preloadResources( WebAppServletContext.java:3154) at weblogic.servlet.internal.HttpServer.preloadResources (HttpServer.java :654) atweblogic.servlet.internal.WebService.preloadResources (WebService.java:483) at weblogic.servlet.internal.ServletInitService.resume( ServletInitService.java:30) at weblogic.t3.srvr.SubsystemManager.resume(SubsystemManager.java:131) at weblogic.t3.srvr.T3Srvr.resume (T3Srvr.java:964) at weblogic.t3.srvr.T3Srvr.run(T3Srvr.java:359) at weblogic.Server.main(Server.java :32) A forum on the sun site recommends the use of a specific listener, which is not included in the myfaces distribution... another post on yet another forum recommended the use of a different servlet ( net.sourceforge.myfaces.webapp.MyFacesServlet) which is no part at of the myfaces distribution either? any help appriciated! -P __Yahoo! DSL – Something to write home about. Just $16.99/mo. or less.dsl.yahoo.com
Re: Error in deploying jsf application
Hi GAB,The user list might be a better place to post this question.I can't be sure but it looks like you are missing the tomcat jar from your WEB-INF/lib directory.Hope this helps!TTFN,-bd-On Dec 6, 2005, at 4:08 AM, Gabriele Morelli wrote:Hi,i found your email on mail-archives.org and thought to write you because I am getting an error as I deploy my jsf application, this is the error: org.apache.jasper.JasperException: The absolute uri: http://myfaces.apache.org/extensions cannot be resolved in either web.xml or the jar files deployed with this applicationD:\Schede285_jsf\nbproject\build-impl.xml:330: Java returned: 1 Do you have any clue of what it might be? Thank you for you time. -=GAB=-
Re: Issue with images in jscookmenu
Could you submit a JIRA [1] issue explaining the problem, so we do not forget? Regards, Bruno [1] http://issues.apache.org/jira/secure/BrowseProject.jspa?id=10600 2005/12/6, Lefevre, Daniel [EMAIL PROTECTED]: Hello I'm dealing successfully with the jscookmenu component when I work on the test environments. But when I put the application in the production environment, the jsCookMenu does not display the images anymore. The difference is that the production environment is accessible via a reverse proxy. When I look into the generated page, I see the following: head script type=text/javascript src=https://myserver/myapp/faces/myFacesExtensionResource/org.apache.myfaces.component.html.util.MyFacesResourceLoader/11337878/navmenu.jscookmenu.HtmlJSCookMenuRenderer/JSCookMenu.js;!-- //--/script script type=text/javascript src=https://myserver/myapp/Sigl4/faces/myFacesExtensionResource/org.apache.myfaces.component.html.util.MyFacesResourceLoader/11337878/navmenu.jscookmenu.HtmlJSCookMenuRenderer/MyFacesHack.js;!-- //--/script script type=text/javascript!-- var myThemeOfficeBase=/myapp/faces/myFacesExtensionResource/org.apache.myfaces.component.html.util.MyFacesResourceLoader/11337878/navmenu.jscookmenu.HtmlJSCookMenuRenderer/ThemeOffice/'; //--/script script type=text/javascript src=https://myserver/myapp/Sigl4/faces/myFacesExtensionResource/org.apache.myfaces.component.html.util.MyFacesResourceLoader/11337878/navmenu.jscookmenu.HtmlJSCookMenuRenderer/ThemeOffice/theme.js;!-- //--/script As you can see, all references are absolute, except the initialisation of the myThemeOfficeBase variable which uses a relative reference to the theme directory. I think this is the reason of the problem. This reference should be made absolute as the others and the images will then be rendered correctly, even via a reverse proxy. Yours, Dan
RE: Issue with images in jscookmenu
Hello Bruno, Jira issue MYFACES-908 has been created. Bye, Dan
RE: myfaces in weblogic
Hi Peter I think I read somewhere, that SP4 for WLS fixes the problem, that WLS initializes the Servlets before the listeners have finished. That's why the MyFacesServlet explicetely can initialize MyFaces in its init()-method. This Servlet is still in the MyFaces jar-files. It only changed its package-name. - org.apache.myfaces.webapp.MyFacesServlet For the listener it could be something similar to the servlet: repackaging... hth Alexander --- Peter Maas [EMAIL PROTECTED] wrote: wl version 8.11, so SP1... and I don't have the option to install additional service packs... hopefully this is not mandatory? -P On 12/6/05, Udo Schnurpfeil [EMAIL PROTECTED] wrote: Which service pack? Udo Peter Maas wrote: Hi all, I'm trying to get a basic myfaces application to run on weblogic 8.1 but without any luck yet. I googled arround a bit and found some contradicting bits on form but no 'THIS is how to to it, THIS is why'. The problem I'm running into seems to be related to context initialisation: java.lang.ExceptionInInitializerError. at weblogic.servlet.internal.ServletStubImpl.prepareServlet( ServletStubImpl.java :822) at weblogic.servlet.internal.WebAppServletContext.preloadServlet( WebAppServletContext.java:3236) at weblogic.servlet.internal.WebAppServletContext.preloadServlets( WebAppServletContext.java:3181) at weblogic.servlet.internal.WebAppServletContext.preloadResources( WebAppServletContext.java:3154) at weblogic.servlet.internal.HttpServer.preloadResources(HttpServer.java :654) at weblogic.servlet.internal.WebService.preloadResources (WebService.java:483) at weblogic.servlet.internal.ServletInitService.resume( ServletInitService.java:30) at weblogic.t3.srvr.SubsystemManager.resume(SubsystemManager.java:131) at weblogic.t3.srvr.T3Srvr.resume (T3Srvr.java:964) at weblogic.t3.srvr.T3Srvr.run(T3Srvr.java:359) at weblogic.Server.main(Server.java:32) A forum on the sun site recommends the use of a specific listener, which is not included in the myfaces distribution... another post on yet another forum recommended the use of a different servlet ( net.sourceforge.myfaces.webapp.MyFacesServlet) which is no part at of the myfaces distribution either? any help appriciated! -P __ Yahoo! DSL - Something to write home about. Just $16.99/mo. or less. dsl.yahoo.com
FW: Error in deploying jsf application
Sorry bad list again... -Original Message- From: Jesse Alexander (KBSA 21) Sent: Tuesday, December 06, 2005 1:44 PM To: MyFaces Development Subject: RE: Error in deploying jsf application Hi Bill do you mean tomcat.jar or tomahawk.jar hth Alexander I can't be sure but it looks like you are missing the tomcat jar from your WEB-INF/lib directory. On Dec 6, 2005, at 4:08 AM, Gabriele Morelli wrote: Hi, i found your email on mail-archives.org and thought to write you because I am getting an error as I deploy my jsf application, this is the error: org.apache.jasper.JasperException: The absolute uri: http://myfaces.apache.org/extensions http://myfaces.apache.org/extensions cannot be resolved in either web.xml or the jar files deployed with this application D:\Schede285_jsf\nbproject\build-impl.xml:330: Java returned: 1 Do you have any clue of what it might be? Thank you for you time. -=GAB=-
Re: myfaces in weblogic
yes,I think so. Let mi know if it works! --- Peter Maas [EMAIL PROTECTED] wrote: Ah! O.k. I think I already tried this, but I'll give it a go. Supposively this jsp-api.jar needs to be jsp2.0 and is needed for the web.xml dtd? -P On 12/6/05, rosalba bochicchio [EMAIL PROTECTED] wrote: Hi Peter, I had your same problem and finally solved it including the file jsp-api.jar in the lib directory of my project. Hope it helps, Rosalba --- Peter Maas [EMAIL PROTECTED] wrote: wl version 8.11, so SP1... and I don't have the option to install additional service packs... hopefully this is not mandatory? -P On 12/6/05, Udo Schnurpfeil [EMAIL PROTECTED] wrote: Which service pack? Udo Peter Maas wrote: Hi all, I'm trying to get a basic myfaces application to run on weblogic 8.1 but without any luck yet. I googled arround a bit and found some contradicting bits on form but no 'THIS is how to to it, THIS is why'. The problem I'm running into seems to be related to context initialisation: java.lang.ExceptionInInitializerError. at weblogic.servlet.internal.ServletStubImpl.prepareServlet( ServletStubImpl.java :822) at weblogic.servlet.internal.WebAppServletContext.preloadServlet( WebAppServletContext.java:3236) at weblogic.servlet.internal.WebAppServletContext.preloadServlets( WebAppServletContext.java:3181) at weblogic.servlet.internal.WebAppServletContext.preloadResources( WebAppServletContext.java:3154) at weblogic.servlet.internal.HttpServer.preloadResources(HttpServer.java :654) at weblogic.servlet.internal.WebService.preloadResources (WebService.java:483) at weblogic.servlet.internal.ServletInitService.resume( ServletInitService.java:30) at weblogic.t3.srvr.SubsystemManager.resume(SubsystemManager.java:131) at weblogic.t3.srvr.T3Srvr.resume (T3Srvr.java:964) at weblogic.t3.srvr.T3Srvr.run(T3Srvr.java:359) at weblogic.Server.main(Server.java:32) A forum on the sun site recommends the use of a specific listener, which is not included in the myfaces distribution... another post on yet another forum recommended the use of a different servlet ( net.sourceforge.myfaces.webapp.MyFacesServlet) which is no part at of the myfaces distribution either? any help appriciated! -P __ Yahoo! DSL Something to write home about. Just $16.99/mo. or less. dsl.yahoo.com __ Yahoo! DSL Something to write home about. Just $16.99/mo. or less. dsl.yahoo.com
t:columns not working in myfaces example provided
I am using the latest myfaces distribution 1.1.1 on WAS 6.0. I deployed simple.war and accessed crossDataTable.jsf Adding columns functionality is working i click on Edit values i get a set of textboxes for each of the countries. when i try to edit values data is not getting submitted for all rows. Only the first row/column changes i do are reflected. All the other data is getting reset back. Probably because the id attribute of all the textboxes is the same irrespective of row numbers/column number. How do i generate unique id's for each row and column? h:dataTable does generate unique id per row. Can you guys tell me how to fix this issue?
Tree2 Levels
Hi there, I have the following question, how do I implement n levels with a tree2? I have to statically define in the jsp the levels that the tree will have (via facets)? Is there any way to do this dynamically? Thanks for your time. Regards Matias Gomez Carabias
Tree2 Levels
Hi there, I have the following question, how do I implement n levels with a tree2? I have to statically define in the jsp the levels that the tree will have (via facets)? Is there any way to do this dynamically? Thanks for your time. Regards Matias Gomez Carabias
Re: Tree2 Levels
Wait a minute - the facets just define the view for a node-type, right? So you build up your data-model just as you want, and can implement n levels into this datamodel, and the view is determined by the corresponding facet of the node. That doesn't mean that you have to have n levels for the facets as well! regards, Martin On 12/6/05, Matias Gomez Carabias [EMAIL PROTECTED] wrote: Hi there, I have the following question, how do I implement n levels with a tree2? I have to statically define in the jsp the levels that the tree will have (via facets)? Is there any way to do this dynamically? Thanks for your time. Regards Matias Gomez Carabias -- http://www.irian.at Your JSF powerhouse - JSF Consulting, Development and Courses in English and German Professional Support for Apache MyFaces
RE: Tree2 Levels
My mistake, I've just took a look again to the code and got the answer, you just define the facets for the different rendering type of the nodes, but not for the levels. Thanks a lot Martin, really. Regards Matias -Original Message- From: Martin Marinschek [mailto:[EMAIL PROTECTED] Sent: Tuesday, December 06, 2005 11:32 AM To: MyFaces Discussion Subject: Re: Tree2 Levels Wait a minute - the facets just define the view for a node-type, right? So you build up your data-model just as you want, and can implement n levels into this datamodel, and the view is determined by the corresponding facet of the node. That doesn't mean that you have to have n levels for the facets as well! regards, Martin On 12/6/05, Matias Gomez Carabias [EMAIL PROTECTED] wrote: Hi there, I have the following question, how do I implement n levels with a tree2? I have to statically define in the jsp the levels that the tree will have (via facets)? Is there any way to do this dynamically? Thanks for your time. Regards Matias Gomez Carabias -- http://www.irian.at Your JSF powerhouse - JSF Consulting, Development and Courses in English and German Professional Support for Apache MyFaces
Execute method automatically after page has been loaded and shown to user
Title: Execute method automatically after page has been loaded and shown to user Hi All! How can I execute a method from a backing bean AUTOMATICALLY after a page has been loaded and shown to the user? My exactly problem is the following: When the user opens the first page, this page should be shown normally (and quickly) to the user. In the background the connection to the database should be build (automatically, no button should be pressed) --I use Hibernate and the first connection (building of connection pool) takes some seconds, so this should be done in background, but the user should already see something in his browser (with an info, that the connection to the database is just built) Is there a possibility to do that? Thx Regards Andy __ This email and any files transmitted with it are confidential and intended solely for the use of the individual or entity to whom they are addressed. If you have received this email in error please notify your system manager. This footnote also confirms that this email message has been swept for the presence of computer viruses. __
Re: naming conventions in faces-config.xml
Oops. I hadn't realized that we'd moved off the mailing list to private email. Yes, the problem is that he has superclass methods for get/setDataSource. -- Forwarded message -- From: Mike Kienenberger [EMAIL PROTECTED] Date: Dec 5, 2005 10:12 PM Subject: Re: naming conventions in faces-config.xml To: [EMAIL PROTECTED] [EMAIL PROTECTED] Aha! You've changed the name of the method. Is there already a get/setDataSource(javax.sql.DataSource) method defined in the superclass? There must be because you're calling it from this method! So there's no way for JSF to know which one to use. I'm guessing it's using the one which has a defined getter. The problem might go away if you create a matching getter...then again, it might not. The safest solution is to not overload the getDataSource method and use getJDBCDataSource (or getDs) instead. On 12/5/05, [EMAIL PROTECTED] [EMAIL PROTECTED] wrote: Mike, thank you for your patience and effort trying to resolve this issue. I just changed the essential parts to reproduce the error. Here's the setter in CasesJdbcDAO: public void setDataSource(JDBCDataSource dataSource) { if (log.isDebugEnabled()) log.debug(setting dataSource in casesDAO); this.ds = dataSource; //the dataSource has to be updated after the bean has been injected this.setDataSource(this.ds.getDs()); } and the correlating snipplet of the faces-config.xml configuration file: managed-bean descriptionthis one retrieves the cases/description managed-bean-namecasesDAOBean/managed-bean-name managed-bean-classcom.edegger.dao.springJDBC.CasesJdbcDAO/managed-bean-class managed-bean-scopesession/managed-bean-scope managed-property property-namedataSource/property-name value#{jdbcDataSourceBean}/value /managed-property /managed-bean Since the field ds is only used within the class CasesJdbcDAO, I don't need an getter for this property. And finally the signature of the class is: public class CasesJdbcDAO extends JdbcDaoSupport implements CasesDAO { whereas CasesDAO is the interface defining a methode to get all the cases as a list. With this configuration, I'm getting the 'javax.servlet.jsp.el.ELException: Attempt to coerce a value of type com.edegger.dao.springJDBC.JDBCDataSource to type javax.sql.DataSource' exception. To get rid off this exception, I'll need to apply the following chances: public void setDs(JDBCDataSource dataSource) { if (log.isDebugEnabled()) log.debug(setting dataSource in casesDAO); this.ds = dataSource; //the dataSource has to be updated after the bean has been injected this.setDataSource(this.ds.getDs()); } and the correlating snipplet of the faces-config.xml configuration file: managed-bean descriptionthis one retrieves the cases/description managed-bean-namecasesDAOBean/managed-bean-name managed-bean-classcom.edegger.dao.springJDBC.CasesJdbcDAO/managed-bean-class managed-bean-scopesession/managed-bean-scope managed-property property-nameds/property-name value#{jdbcDataSourceBean}/value /managed-property /managed-bean The signature stays the same. I know something's not adding up - but I can't explain it. Enjoy, Kurt Quoting Mike Kienenberger [EMAIL PROTECTED]: Kurt, what does both your setter and getter code and method signatures look like on CasesJdbcDAO when you're getting this error? 'javax.servlet.jsp.el.ELException: Attempt to coerce a value of type JDBCDataSource to type javax.sql.DataSource' indicates an attempt to inject a JDBCDataSource into a value binding expecting a javax.sql.DataSource. Something's not adding up here. On 12/5/05, Kurt Edegger [EMAIL PROTECTED] wrote: Hi Mike, thank you for your help, but I don't think that your answer is correct. We are talking about two different classes. The first one is CasesJdbcDAO with the setter taking an JDBCDataSource Object and the second on is the JDBCDataSource class having a getDs() method to return the actual javax.sql.DataSource object. To clearify: The JDBCDataSource object is injected to CasesJdbcDAO using the setter in CasesJdbcDAO which takes the correct type of JDBCDataSource. I don't think this is an issue of a misscasted type since it works if the field in CasesJdbcDAO (marked as [1] in my former postings) isn't named 'dataSource'. In that case the JSF implementation seems to interpret the name as a type and causing the exception. In the case it isn't named 'dataSource' (e.g. 'ds' in my example) the injection is done without any problems. I'm appreciating your help and thoughts. Kurt on 12/5/2005 8:54 AM Mike Kienenberger stated: Your setter and getter return different types. public DataSource getDs() needs to be public JDBCDataSource getDs() { On 12/2/05, Kurt Edegger [EMAIL PROTECTED] wrote: Hi Mike, thank you for your response.
Re: myfaces in weblogic
Hmmm,after installing SP4 the myfaces blank application works... adding the jsp2.0 jar didn't seem to help to much!-POn 12/6/05, rosalba bochicchio [EMAIL PROTECTED] wrote:yes,I think so. Let mi know if it works! --- Peter Maas [EMAIL PROTECTED] wrote: Ah! O.k. I think I already tried this, but I'll give it a go. Supposively this jsp-api.jar needs to be jsp2.0 and is needed for the web.xml dtd? -P On 12/6/05, rosalba bochicchio [EMAIL PROTECTED] wrote: Hi Peter, I had your same problem and finally solved it including the file jsp-api.jar in the lib directory of my project. Hope it helps, Rosalba --- Peter Maas [EMAIL PROTECTED] wrote:wl version 8.11, so SP1... and I don't have the option to install additional service packs... hopefully this is not mandatory? -P On 12/6/05, Udo Schnurpfeil [EMAIL PROTECTED] wrote: Which service pack? Udo Peter Maas wrote: Hi all, I'm trying to get a basic myfaces application to run on weblogic 8.1 but without any luck yet. I googled arround a bit and found some contradicting bits on form but no 'THIS is how to to it, THIS is why'. The problem I'm running into seems to be related to context initialisation: java.lang.ExceptionInInitializerError. at weblogic.servlet.internal.ServletStubImpl.prepareServlet(ServletStubImpl.java :822) at weblogic.servlet.internal.WebAppServletContext.preloadServlet(WebAppServletContext.java:3236) at weblogic.servlet.internal.WebAppServletContext.preloadServlets(WebAppServletContext.java:3181) at weblogic.servlet.internal.WebAppServletContext.preloadResources(WebAppServletContext.java:3154) at weblogic.servlet.internal.HttpServer.preloadResources(HttpServer.java:654) at weblogic.servlet.internal.WebService.preloadResources (WebService.java:483) at weblogic.servlet.internal.ServletInitService.resume(ServletInitService.java:30) at weblogic.t3.srvr.SubsystemManager.resume(SubsystemManager.java:131) at weblogic.t3.srvr.T3Srvr.resume (T3Srvr.java:964) at weblogic.t3.srvr.T3Srvr.run(T3Srvr.java:359) at weblogic.Server.main(Server.java:32) A forum on the sun site recommends the use of a specific listener, which is not included in the myfaces distribution... another post on yet another forum recommended the use of a different servlet ( net.sourceforge.myfaces.webapp.MyFacesServlet) which is no part at of the myfaces distribution either? any help appriciated! -P __ Yahoo! DSL – Something to write home about. Just $16.99/mo. or less. dsl.yahoo.com __Yahoo! DSL – Something to write home about.Just $16.99/mo. or less. dsl.yahoo.com
Re: Value is not a valid option
Khurram, I suspect that if the bug was fixed in the Dec 2nd nightly that it did not make it into the Dec 4th release of 1.1.1. Try grabbing one of the nightlies and see if it's fixed for you. On 12/6/05, Khurram Ahmed [EMAIL PROTECTED] wrote: We have developed an application using myfaces 1.0.9, however due to some critical bugs in 1.0.9 we were forced to upgrade to myfaces 1.1.0 with the same code base that was working with the previous version of myfaces 1.0.9. This was when we ran into the Value is not a valid option bug on a page containing several drop down boxes and the JSF calendar component. After carrying out some research it was discovered that the bug had been fixed in the nightly build of 2nd December 2005 so we downloaded the latest nightly build of myfaces 1.1.1 (that of 4th December 2005), however we are running into the same Value is not an option error again. Can someone verify if the bug has really been fixed? Are there any workarounds?
Re: Issue with images in jscookmenu
Dan, I don't know enough to work on this issue, but you probably want to take a look at the following method to see if you can get it working. myfaces/tomahawk/trunk/src/java/org/apache/myfaces/component/html/util/AddResource.java serveResource(HttpServletRequest request, HttpServletResponse response) After a bug fix I added yesterday, I suspect you need to modify this method to add the absolute path information. On 12/6/05, Lefevre, Daniel [EMAIL PROTECTED] wrote: Hello Bruno, Jira issue MYFACES-908 has been created. Bye, Dan
Question about strings in faces-config
Hi, I got a simple question regarding the faces-config navigation rules. Right now, my rules are defined as follows: navigation-case from-action#{myBean.action}/from-action from-outcomesuccess/from-outcome to-view-id/test.jsp/to-view-id /navigation-case In the action() method I would return a constant defined in an application scope bean that translates to success. My question is the following: is there a way to put EL in the faces-config file so that I can write something like that: navigation-case from-action#{myBean.action}/from-action from-outcome#{myConstantsBean.SUCCESS}/from-outcome to-view-id/test.jsp/to-view-id /navigation-case It's just because it bugs me to know that even if I use variables in my files, a mistake can be made in faces-config and it could be an issue for code maintenance as well. Thanks, greg
Re: Execute method automatically after page has been loaded and shown to user
Andy, There's many ways to do this. Some ways you could do it: 1) Use the Shale ViewController stuff to define your backing bean to be the controlling bean for your page. It'd be able to receive events like pre-render and post-render. 2) Create a phase listener that ran at pre-render and post-render phase. 3) Use a servlet filter -- this is how I manage my database connections, but I have need for my database connection to be active at all phases of JSF. On 12/6/05, [EMAIL PROTECTED] [EMAIL PROTECTED] wrote: Hi All! How can I execute a method from a backing bean AUTOMATICALLY after a page has been loaded and shown to the user? My exactly problem is the following: When the user opens the first page, this page should be shown normally (and quickly) to the user. In the background the connection to the database should be build (automatically, no button should be pressed) --I use Hibernate and the first connection (building of connection pool) takes some seconds, so this should be done in background, but the user should already see something in his browser (with an info, that the connection to the database is just built) Is there a possibility to do that? Thx Regards Andy __ This email and any files transmitted with it are confidential and intended solely for the use of the individual or entity to whom they are addressed. If you have received this email in error please notify your system manager. This footnote also confirms that this email message has been swept for the presence of computer viruses. __
Re: WARN [HtmlLabelRenderer]
I usually do this w/ floating div tags. Original message Date: Tue, 6 Dec 2005 09:12:31 +0100 From: Kasper Hansen [EMAIL PROTECTED] Subject: Re: WARN [HtmlLabelRenderer] To: users@myfaces.apache.org That did help, thanks! But how do I get the label to be at the left side of the input component? Tirsdag 06 december 2005 08:50 skrev Dennis Byrne: Kasper, try placing the element h:outputLabel for=documentTitle after the element w/ @id=documentTitle . Original message Date: Tue, 6 Dec 2005 08:42:19 +0100 From: Kasper Hansen [EMAIL PROTECTED] Subject: WARN [HtmlLabelRenderer] To: users@myfaces.apache.org Hi, I get this warning: 08:28:10,484 WARN [HtmlLabelRenderer] Unable to find component 'documentTitle' (calling findComponent on component 'form1:_id21') In fact I get it on all my labels! But I do not understand what the error means, since there is a component with id documentTitle. I'm I reading the error msg. wrong? Please can anyone help me.. Best regards, Kasper this is my jsf code (I know the td isn't good coding..): td class=formCell h:outputLabel for=documentTitle h:outputText id=documentTitleLabel value=# {msg.docTitleLabel} / h:outputText id=documentTitleLabelFreeText value=#{msg.freeText} / /h:outputLabel /td td h:inputText id=documentTitle tabindex=8 styleClass=textField value=#{searchPage.documentTitle} required=false f:validateLength minimum=0 maximum=50/ /h:inputTextbr / span class=elementErrorh:message for=documentTitle //span /td Dennis Byrne Dennis Byrne
sessionhandling question
Hi there, I've a very special question: I need to make sure that, after going to an overview page, the user can't go back to the previous pages and perform actions there. I thought about invalidating the user's session and assigning a new one (I've a filter which redirects invalid sessions to the login page) - Can this work?? I know how to invalidate a users session but how do I retrieve a new one (and how do I set it in context? ? - Or is there any other possibility to realize this? I know this is not quite myfaces related but if anybody could help I would be very thankful!! See ya, Hans
panelTabbedPane styling, how?
How may I override the default styles of panelTabbedPane? I'm trying to take control of the styles defined in the extensions like .myFaces_panelTabbedPane_activeHeaderCell but cannot determine how this is intended to be done. I've added classes for activeTabStyleClass and inactiveTabStyleClass but they do not take effect.
Tree2 Best Practices.
Hi guys, I was just wondering which would be the best approach to use the tree2 component. Ive tried with frames, but I dont know if this would be the smartest solution, is there any jsf or tomahawk component that allows me to divide the page with scroll bars? Ive been reading about frameset and panelLayout but I dont know which would be the best approach to follow. Thanks in advance Regards Matias Gomez Carabias
Error adding dataScroller before my UIData
I need to add a dataScroller to both the top and bottom of my dataTable. However I get an exception when putting it before the dataTable is defined (i.e. in the header) saying it cant find the UIData element. Does anyone know the solution for this (other than adding it after the datatable and using stylesheet positioning. I really am not interested in that solution) NOTICE: This message, including all attachments transmitted with it, is for the use of the addressee only. It may contain proprietary, confidential and/or legally privileged information belonging to Litle Co. No confidentiality or privilege is waived or lost by any mistransmission. If you are not the intended recipient, you must not, directly or indirectly, use, disclose, distribute, print or copy any part of this message. If you believe you have received this message in error, please delete it and all copies of it from your system and notify the sender immediately by reply e-mail. Thank you.
Re: Error adding dataScroller before my UIData
Hi! I need to add a dataScroller to both the top and bottom of my dataTable. However I get an exception when putting it before the dataTable is defined (i.e. in the header) saying it cant find the UIData element. Does anyone know the solution for this (other than adding it after the datatable and using stylesheet positioning…. I really am not interested in that solution) I am not sure if this is the same problem, but try putting these three components into an panelGrid, looks like this has something to do with how jsp processes tags and this might be a workaround for it (see WARN [HtmlLabelRenderer] thread) --- Mario
Navigation Panel 2 error
I am trying to use the Navigation Panel 2 (org.apache.myfaces.custom.navmenu.htmlnavmenu.HtmlPanelNavigationMenu) and I receive the following error.[Class: org.apache.myfaces.custom.navmenu.htmlnavmenu.HtmlPanelNavigationMenu ,Id: nav2]} is not instance of org.apache.myfaces.custom.navigation.HtmlPanelNavigation as it should beAnyone have an idea of what I am doing wrong?-- Alexandre PoitrasQuébec, Canada
Re: Error adding dataScroller before my UIData
Miller, John wrote: I need to add a dataScroller to both the top and bottom of my dataTable. However I get an exception when putting it before the dataTable is defined (i.e. in the header) saying it cant find the UIData element. Does anyone know the solution for this (other than adding it after the datatable and using stylesheet positioning…. I really am not interested in that solution) This is a fundamental issue with JSP/JSF: that components are both created and rendered in a single pass through a JSP page. You could try enclosing the table scroller components in some parent component which renders its children, eg an h:panelGroup. This should cause the child components to all be created first before any rendering (which does the id lookup) occurs. If this works, please reply to the list to let us know. Note that components which render their children cannot have template text (raw text or JSP tags) in them; any plain text must be wrapped in f:verbatim or similar. Or you could avoid using JSP. Alternatives include Facelets and Clay. Regards, Simon
Re: Navigation Panel 2 error
I think there's a bug in the HtmlPanelNavigation.xml, because the component class is org.apache.myfaces.custom.navigation.HtmlPanelNavigation and it should beorg.apache.myfaces.custom.navmenu.htmlnavmenu.HtmlPanelNavigationMenu . Anyone have noticed this bug before?On 12/6/05, Alexandre Poitras [EMAIL PROTECTED] wrote: I am trying to use the Navigation Panel 2 (org.apache.myfaces.custom.navmenu.htmlnavmenu.HtmlPanelNavigationMenu ) and I receive the following error.[Class: org.apache.myfaces.custom.navmenu.htmlnavmenu.HtmlPanelNavigationMenu ,Id: nav2]} is not instance of org.apache.myfaces.custom.navigation.HtmlPanelNavigation as it should beAnyone have an idea of what I am doing wrong?-- Alexandre Poitras Québec, Canada -- Alexandre PoitrasQuébec, Canada
Re: Navigation Panel 2 error
Whoops I mean there are no xml files at all in the package so it is probably why it doesn't work.On 12/6/05, Alexandre Poitras [EMAIL PROTECTED] wrote:I think there's a bug in the HtmlPanelNavigation.xml , because the component class is org.apache.myfaces.custom.navigation.HtmlPanelNavigation and it should beorg.apache.myfaces.custom.navmenu.htmlnavmenu.HtmlPanelNavigationMenu . Anyone have noticed this bug before?On 12/6/05, Alexandre Poitras [EMAIL PROTECTED] wrote: I am trying to use the Navigation Panel 2 (org.apache.myfaces.custom.navmenu.htmlnavmenu.HtmlPanelNavigationMenu ) and I receive the following error.[Class: org.apache.myfaces.custom.navmenu.htmlnavmenu.HtmlPanelNavigationMenu ,Id: nav2]} is not instance of org.apache.myfaces.custom.navigation.HtmlPanelNavigation as it should beAnyone have an idea of what I am doing wrong?-- Alexandre Poitras Québec, Canada -- Alexandre PoitrasQuébec, Canada -- Alexandre PoitrasQuébec, Canada
Re: Navigation Panel 2 error
The component.xml files are leftovers from the days of code generation.They're currently unused in MyFaces, so it's unlikely to be the cause of your problem. On 12/6/05, Alexandre Poitras [EMAIL PROTECTED] wrote: Whoops I mean there are no xml files at all in the package so it is probably why it doesn't work. On 12/6/05, Alexandre Poitras [EMAIL PROTECTED] wrote: I think there's a bug in the HtmlPanelNavigation.xml , because the component class is org.apache.myfaces.custom.navigation.HtmlPanelNavigation and it should be org.apache.myfaces.custom.navmenu.htmlnavmenu.HtmlPanelNavigationMenu . Anyone have noticed this bug before? On 12/6/05, Alexandre Poitras [EMAIL PROTECTED] wrote: I am trying to use the Navigation Panel 2 (org.apache.myfaces.custom.navmenu.htmlnavmenu.HtmlPanelNavigationMenu ) and I receive the following error. [Class: org.apache.myfaces.custom.navmenu.htmlnavmenu.HtmlPanelNavigationMenu ,Id: nav2]} is not instance of org.apache.myfaces.custom.navigation.HtmlPanelNavigation as it should be Anyone have an idea of what I am doing wrong? -- Alexandre Poitras Québec, Canada -- Alexandre Poitras Québec, Canada -- Alexandre Poitras Québec, Canada
AW: Problem with selectBooleanCheckbox inside dataTable
Hi! Ok, it seems that the rendering behavior of the selectBooleanCheckbox (with immediate = false) inside a dataTable is how to expect from an EditableValueHolder, and I have to call either setSubmittedValue(null) or setSelectedState(false) to prevent the checkboxes from beeing selected if the page is redisplayed, dependent on the immediate state of the commandButton: - setSubmittedValue(null) if commandButton is immediate = true - submitted value is rendered if not null - setSelectedState(false) if commandButton is immediate = false But what I don't really understand is, why the problem described (all checkboxes are selected when the page is redisplayed, and runtime error after deleting this selection) only happens when the checkbox of the last shown row has been selected, and not when any other checkbox had been selected. Any ideas? Regards, Matthias -Ursprüngliche Nachricht- Von: [EMAIL PROTECTED] [mailto:[EMAIL PROTECTED] Auftrag von Matthias Kahlau Gesendet: Dienstag, 6. Dezember 2005 02:47 An: Users MyFaces Betreff: Problem with selectBooleanCheckbox inside dataTable Hi! I encounter a strange behavior of selectBooleanCheckbox component-binding inside a dataTable. When I select the checkbox in the last row and call an action method to delete the selected row, the page is redisplayed with all the remaining checkboxes selected, that had been deselected before. This happens only if I select the last row/checkbox, not if I select another row and press delete. I don't modify any component state in the application. This behavior is independent of setting the selectBooleanCheckbox or the delete commandButton to false/true. The behavior described doesn't happen in any possible case, but always when the options are shown the first time and I select the last one and press delete. If this happens, and the checkboxes are all redisplayed in selected state, and I press delete, a runtime error is thrown because a row is unavailable: 02:36:22,218 ERROR [Engine] StandardWrapperValve[Faces Servlet]: Servlet.service() for servlet Faces Servlet threw exception javax.faces.FacesException: Error calling action method of component with id _id1:_id34 at org.apache.myfaces.application.ActionListenerImpl.processAction(Ac tionListen erImpl.java:74) at javax.faces.component.UICommand.broadcast(UICommand.java:106) at javax.faces.component.UIViewRoot._broadcastForPhase(UIViewRoot.java:90) at javax.faces.component.UIViewRoot.processDecodes(UIViewRoot.java:132) at org.apache.myfaces.lifecycle.LifecycleImpl.applyRequestValues(Life cycleImpl. java:219) at org.apache.myfaces.lifecycle.LifecycleImpl.execute(LifecycleImpl.java:71) at javax.faces.webapp.FacesServlet.service(FacesServlet.java:106) at org.apache.catalina.core.ApplicationFilterChain.internalDoFilter(A pplication FilterChain.java:237) at org.apache.catalina.core.ApplicationFilterChain.doFilter(Applicati onFilterCh ain.java:157) at org.apache.myfaces.component.html.util.ExtensionsFilter.doFilter(E xtensionsF ilter.java:123) at org.apache.catalina.core.ApplicationFilterChain.internalDoFilter(A pplication FilterChain.java:186) at org.apache.catalina.core.ApplicationFilterChain.doFilter(Applicati onFilterCh ain.java:157) at org.jboss.web.tomcat.filters.ReplyHeaderFilter.doFilter(ReplyHeade rFilter.ja va:75) at org.apache.catalina.core.ApplicationFilterChain.internalDoFilter(A pplication FilterChain.java:186) at org.apache.catalina.core.ApplicationFilterChain.doFilter(Applicati onFilterCh ain.java:157) at org.apache.catalina.core.StandardWrapperValve.invoke(StandardWrapp erValve.ja va:214) at org.apache.catalina.core.StandardValveContext.invokeNext(StandardV alveContex t.java:104) at org.apache.catalina.core.StandardPipeline.invoke(StandardPipeline. java:520) at org.apache.catalina.core.StandardContextValve.invokeInternal(Stand ardContext Valve.java:198) at org.apache.catalina.core.StandardContextValve.invoke(StandardConte xtValve.ja va:152) at org.apache.catalina.core.StandardValveContext.invokeNext(StandardV alveContex t.java:104) at org.jboss.web.tomcat.security.CustomPrincipalValve.invoke(CustomPr incipalVal ve.java:66) at org.apache.catalina.core.StandardValveContext.invokeNext(StandardV alveContex t.java:102) at org.jboss.web.tomcat.security.SecurityAssociationValve.invoke(Secu rityAssoci ationValve.java:150) at org.apache.catalina.core.StandardValveContext.invokeNext(StandardV alveContex t.java:102) at org.jboss.web.tomcat.security.JaccContextValve.invoke(JaccContextV alve.java: 54) at org.apache.catalina.core.StandardValveContext.invokeNext(StandardV alveContex t.java:102) at
Re: Navigation Panel 2 error
Ok I found the error. The default renderkit is org.apache.myfaces.Navigation in the class.The jsp tag overwrite it with org.apache.myfaces.NavigationMenu but since I'm using another view technology I end up with the default one. On 12/6/05, Mike Kienenberger [EMAIL PROTECTED] wrote: The component.xml files are leftovers from the days of codegeneration.They're currently unused in MyFaces, so it's unlikelyto be the cause of your problem.On 12/6/05, Alexandre Poitras [EMAIL PROTECTED] wrote: Whoops I mean there are no xml files at all in the package so it is probably why it doesn't work. On 12/6/05, Alexandre Poitras [EMAIL PROTECTED] wrote: I think there's a bug in the HtmlPanelNavigation.xml , because the component class is org.apache.myfaces.custom.navigation.HtmlPanelNavigation and it should be org.apache.myfaces.custom.navmenu.htmlnavmenu.HtmlPanelNavigationMenu . Anyone have noticed this bug before? On 12/6/05, Alexandre Poitras [EMAIL PROTECTED] wrote: I am trying to use the Navigation Panel 2 (org.apache.myfaces.custom.navmenu.htmlnavmenu.HtmlPanelNavigationMenu ) and I receive the following error. [Class: org.apache.myfaces.custom.navmenu.htmlnavmenu.HtmlPanelNavigationMenu ,Id: nav2]} is not instance of org.apache.myfaces.custom.navigation.HtmlPanelNavigation as it should be Anyone have an idea of what I am doing wrong? -- Alexandre Poitras Québec, Canada -- Alexandre Poitras Québec, Canada -- Alexandre Poitras Québec, Canada -- Alexandre PoitrasQuébec, Canada
Re: Navigation Panel 2 error
That's lame. If you open a JIRA issue with a patch, I'll be sure to commit it. On 12/6/05, Alexandre Poitras [EMAIL PROTECTED] wrote: Ok I found the error. The default renderkit is org.apache.myfaces.Navigation in the class. The jsp tag overwrite it with org.apache.myfaces.NavigationMenu but since I'm using another view technology I end up with the default one. On 12/6/05, Mike Kienenberger [EMAIL PROTECTED] wrote: The component.xml files are leftovers from the days of code generation.They're currently unused in MyFaces, so it's unlikely to be the cause of your problem. On 12/6/05, Alexandre Poitras [EMAIL PROTECTED] wrote: Whoops I mean there are no xml files at all in the package so it is probably why it doesn't work. On 12/6/05, Alexandre Poitras [EMAIL PROTECTED] wrote: I think there's a bug in the HtmlPanelNavigation.xml , because the component class is org.apache.myfaces.custom.navigation.HtmlPanelNavigation and it should be org.apache.myfaces.custom.navmenu.htmlnavmenu.HtmlPanelNavigationMenu . Anyone have noticed this bug before? On 12/6/05, Alexandre Poitras [EMAIL PROTECTED] wrote: I am trying to use the Navigation Panel 2 (org.apache.myfaces.custom.navmenu.htmlnavmenu.HtmlPanelNavigationMenu ) and I receive the following error. [Class: org.apache.myfaces.custom.navmenu.htmlnavmenu.HtmlPanelNavigationMenu ,Id: nav2]} is not instance of org.apache.myfaces.custom.navigation.HtmlPanelNavigation as it should be Anyone have an idea of what I am doing wrong? -- Alexandre Poitras Québec, Canada -- Alexandre Poitras Québec, Canada -- Alexandre Poitras Québec, Canada -- Alexandre Poitras Québec, Canada
Re: Navigation Panel 2 error
It's already fixed in the nightly build :) Guess someone else has found it before me.On 12/6/05, Mike Kienenberger [EMAIL PROTECTED] wrote:That's lame. If you open a JIRA issue with a patch, I'll be sure to commit it. On 12/6/05, Alexandre Poitras [EMAIL PROTECTED] wrote: Ok I found the error. The default renderkit is org.apache.myfaces.Navigation in the class. The jsp tag overwrite it with org.apache.myfaces.NavigationMenu but since I'm using another view technology I end up with the default one. On 12/6/05, Mike Kienenberger [EMAIL PROTECTED] wrote: The component.xml files are leftovers from the days of code generation.They're currently unused in MyFaces, so it's unlikely to be the cause of your problem. On 12/6/05, Alexandre Poitras [EMAIL PROTECTED] wrote: Whoops I mean there are no xml files at all in the package so it is probably why it doesn't work. On 12/6/05, Alexandre Poitras [EMAIL PROTECTED] wrote:I think there's a bug in the HtmlPanelNavigation.xml , because the component class is org.apache.myfaces.custom.navigation.HtmlPanelNavigation and it should be org.apache.myfaces.custom.navmenu.htmlnavmenu.HtmlPanelNavigationMenu . Anyone have noticed this bug before? On 12/6/05, Alexandre Poitras [EMAIL PROTECTED] wrote: I am trying to use the Navigation Panel 2 (org.apache.myfaces.custom.navmenu.htmlnavmenu.HtmlPanelNavigationMenu ) and I receive the following error. [Class: org.apache.myfaces.custom.navmenu.htmlnavmenu.HtmlPanelNavigationMenu ,Id: nav2]} is not instance of org.apache.myfaces.custom.navigation.HtmlPanelNavigation as it should be Anyone have an idea of what I am doing wrong? -- Alexandre Poitras Québec, Canada --Alexandre PoitrasQuébec, Canada -- Alexandre Poitras Québec, Canada -- Alexandre Poitras Québec, Canada-- Alexandre Poitras Québec, Canada
Re: Tree2 Best Practices.
You may want to look into Tiles. sean On 12/6/05, Matias Gomez Carabias [EMAIL PROTECTED] wrote: Hi guys, I was just wondering which would be the best approach to use the tree2 component. I've tried with frames, but I don't know if this would be the smartest solution, is there any jsf or tomahawk component that allows me to divide the page with scroll bars? I've been reading about frameset and panelLayout but I don't know which would be the best approach to follow. Thanks in advance Regards Matias Gomez Carabias
RE: naming conventions in faces-config.xml
Thanks for all the help. Embedding the dataScroller and dataTable within another JSF component worked. -Original Message- From: Mike Kienenberger [mailto:[EMAIL PROTECTED] Sent: Tuesday, December 06, 2005 10:24 AM To: MyFaces Discussion Subject: Re: naming conventions in faces-config.xml Oops. I hadn't realized that we'd moved off the mailing list to private email. Yes, the problem is that he has superclass methods for get/setDataSource. -- Forwarded message -- From: Mike Kienenberger [EMAIL PROTECTED] Date: Dec 5, 2005 10:12 PM Subject: Re: naming conventions in faces-config.xml To: [EMAIL PROTECTED] [EMAIL PROTECTED] Aha! You've changed the name of the method. Is there already a get/setDataSource(javax.sql.DataSource) method defined in the superclass? There must be because you're calling it from this method! So there's no way for JSF to know which one to use. I'm guessing it's using the one which has a defined getter. The problem might go away if you create a matching getter...then again, it might not. The safest solution is to not overload the getDataSource method and use getJDBCDataSource (or getDs) instead. On 12/5/05, [EMAIL PROTECTED] [EMAIL PROTECTED] wrote: Mike, thank you for your patience and effort trying to resolve this issue. I just changed the essential parts to reproduce the error. Here's the setter in CasesJdbcDAO: public void setDataSource(JDBCDataSource dataSource) { if (log.isDebugEnabled()) log.debug(setting dataSource in casesDAO); this.ds = dataSource; //the dataSource has to be updated after the bean has been injected this.setDataSource(this.ds.getDs()); } and the correlating snipplet of the faces-config.xml configuration file: managed-bean descriptionthis one retrieves the cases/description managed-bean-namecasesDAOBean/managed-bean-name managed-bean-classcom.edegger.dao.springJDBC.CasesJdbcDAO/managed-bea n-class managed-bean-scopesession/managed-bean-scope managed-property property-namedataSource/property-name value#{jdbcDataSourceBean}/value /managed-property /managed-bean Since the field ds is only used within the class CasesJdbcDAO, I don't need an getter for this property. And finally the signature of the class is: public class CasesJdbcDAO extends JdbcDaoSupport implements CasesDAO { whereas CasesDAO is the interface defining a methode to get all the cases as a list. With this configuration, I'm getting the 'javax.servlet.jsp.el.ELException: Attempt to coerce a value of type com.edegger.dao.springJDBC.JDBCDataSource to type javax.sql.DataSource' exception. To get rid off this exception, I'll need to apply the following chances: public void setDs(JDBCDataSource dataSource) { if (log.isDebugEnabled()) log.debug(setting dataSource in casesDAO); this.ds = dataSource; //the dataSource has to be updated after the bean has been injected this.setDataSource(this.ds.getDs()); } and the correlating snipplet of the faces-config.xml configuration file: managed-bean descriptionthis one retrieves the cases/description managed-bean-namecasesDAOBean/managed-bean-name managed-bean-classcom.edegger.dao.springJDBC.CasesJdbcDAO/managed-bea n-class managed-bean-scopesession/managed-bean-scope managed-property property-nameds/property-name value#{jdbcDataSourceBean}/value /managed-property /managed-bean The signature stays the same. I know something's not adding up - but I can't explain it. Enjoy, Kurt Quoting Mike Kienenberger [EMAIL PROTECTED]: Kurt, what does both your setter and getter code and method signatures look like on CasesJdbcDAO when you're getting this error? 'javax.servlet.jsp.el.ELException: Attempt to coerce a value of type JDBCDataSource to type javax.sql.DataSource' indicates an attempt to inject a JDBCDataSource into a value binding expecting a javax.sql.DataSource. Something's not adding up here. On 12/5/05, Kurt Edegger [EMAIL PROTECTED] wrote: Hi Mike, thank you for your help, but I don't think that your answer is correct. We are talking about two different classes. The first one is CasesJdbcDAO with the setter taking an JDBCDataSource Object and the second on is the JDBCDataSource class having a getDs() method to return the actual javax.sql.DataSource object. To clearify: The JDBCDataSource object is injected to CasesJdbcDAO using the setter in CasesJdbcDAO which takes the correct type of JDBCDataSource. I don't think this is an issue of a misscasted type since it works if the field in CasesJdbcDAO (marked as [1] in my former postings) isn't named 'dataSource'. In that case the JSF implementation seems to interpret the name as a type and causing the exception. In the case it isn't named 'dataSource' (e.g. 'ds' in my example) the injection is done without any problems. I'm appreciating your help and thoughts. Kurt on
Re: Tree2 Best Practices.
Hi, I'm not sure that Tiles is relevant. It allows you to compose a page from different fragments, and easily rearrange the order in which the fragments are output in the response. However if you want some large JSF components (eg a tree with many nodes) to be rendered inside a fixed-size box, with scrollbars to access the bits of the component not currently visible then that's a different issue. And if you want a split-pane type effect on the screen so that you can adjust the amount of visible screen allocated to different parts of the page then that's also a different issue. I'm not aware of any JSF components that provide either of these features. For the first one, you might like to try wrapping the target JSF component in a div with explicit size and overflow attributes: div style=width:400; height:400; overflow:scroll t:tree2 .../ /div I haven't tried this myself but it looks like it might work. An IFrame also presents an embedded scrollable area. However an iframe always needs to pull its content from some other URL, so you'd need to write a separate page containing your tree component. And as this will act within the same session but JSF1.1 doesn't support the concept of separate windows within a single session I think this will lead to major headaches; I expect the iframe page access will effectively discard the original page's view when it sees the same session accessing a different view-url. ... iframe src=/width=400 height=400 scrolling=auto /iframe ... Having a t:splitPanel component for the second option would be very cool. However I suspect it would be quite a lot of complicated javascript to implement (if it's possible at all). I'm willing to try to implement this if someone will fund the development :-). Or maybe there's some existing open-source code out there that can be used. I would suggest looking at available JSP tag libraries; I think a standard JSP tag would work fine with JSF tags in this case (as long as there is no parent component with rendersChildren=true?). Regards, Simon Sean Schofield wrote: You may want to look into Tiles. sean On 12/6/05, Matias Gomez Carabias [EMAIL PROTECTED] wrote: Hi guys, I was just wondering which would be the best approach to use the tree2 component. I've tried with frames, but I don't know if this would be the smartest solution, is there any jsf or tomahawk component that allows me to divide the page with scroll bars? I've been reading about frameset and panelLayout but I don't know which would be the best approach to follow. Thanks in advance Regards Matias Gomez Carabias
Strange
I use a JSF web application with JBoss. I get this strange error stack. All the necessary JSF libs are included in the war file. Do You have any hint? 22:32:25,663 WARN [Digester] [ValidatorRule]{faces-config/validator} Merge(org.apache.myfaces.validator.CreditCard) 22:32:25,673 WARN [Digester] [ValidatorRule]{faces-config/validator} Merge(org.apache.myfaces.validator.Email) 22:32:25,673 WARN [Digester] [ValidatorRule]{faces-config/validator} Merge(org.apache.myfaces.validator.Equal) 22:32:25,673 WARN [Digester] [ValidatorRule]{faces-config/validator} Merge(org.apache.myfaces.validator.RegExpr) 22:32:25,773 ERROR [[/bookstore]] Exception sending context initialized event to listener instance of class com.sun.faces.config.ConfigureListener javax.faces.FacesException: java.lang.ClassCastException: org.apache.myfaces.custom.ajax.api.AjaxPhaseListener at com.sun.faces.config.ConfigureListener.contextInitialized(ConfigureListener.java:336) at org.apache.catalina.core.StandardContext.listenerStart(StandardContext.java:3669) at org.apache.catalina.core.StandardContext.start(StandardContext.java:4104) at org.apache.catalina.core.ContainerBase.addChildInternal(ContainerBase.java:759) at org.apache.catalina.core.ContainerBase.addChild(ContainerBase.java:739) at org.apache.catalina.core.StandardHost.addChild(StandardHost.java:524) at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method)
Re: AW: Problem with selectBooleanCheckbox inside dataTable
Hi, When a table contains editable components, the value list is fetched at the following times: (initial page view occurs) * during the rendering phase (postback occurs) * during validation phase (navigate occurs, ie internal forward) * during the rendering phase The data is needed at the validation phase in order to determine whether ValueChangeEvent events should be queued. The same list is retained by the UIData and used during the update-model phase when the validated values are pushed to the backing objects from the value list. A new list must be fetched before rendering, however, as the list may change as a result of processing during update-model or invoke-application phases. When a table contains editable components, the table fetched during the validation phase must contain exactly the same elements (and in exactly the same order) as was present during the previous rendering phase. If this isn't true then all sorts of confusion can occur. Are your checkbox components bound to some backing list whose size has changed? I can't see why that would happen, but it would explain some of your symptoms. The table is iterating through all its rows, fetching the corresponding element from the value list for that row, and then trying to determine whether the submitted value is different from the value of the corresponding model object. If the list is too short, then of course an exception will occur while trying to fetch the matching model object. Regards, Simon Matthias Kahlau wrote: Hi! Ok, it seems that the rendering behavior of the selectBooleanCheckbox (with immediate = false) inside a dataTable is how to expect from an EditableValueHolder, and I have to call either setSubmittedValue(null) or setSelectedState(false) to prevent the checkboxes from beeing selected if the page is redisplayed, dependent on the immediate state of the commandButton: - setSubmittedValue(null) if commandButton is immediate = true - submitted value is rendered if not null - setSelectedState(false) if commandButton is immediate = false But what I don't really understand is, why the problem described (all checkboxes are selected when the page is redisplayed, and runtime error after deleting this selection) only happens when the checkbox of the last shown row has been selected, and not when any other checkbox had been selected. Any ideas? Regards, Matthias -Ursprüngliche Nachricht- Von: [EMAIL PROTECTED] [mailto:[EMAIL PROTECTED] Auftrag von Matthias Kahlau Gesendet: Dienstag, 6. Dezember 2005 02:47 An: Users MyFaces Betreff: Problem with selectBooleanCheckbox inside dataTable Hi! I encounter a strange behavior of selectBooleanCheckbox component-binding inside a dataTable. When I select the checkbox in the last row and call an action method to delete the selected row, the page is redisplayed with all the remaining checkboxes selected, that had been deselected before. This happens only if I select the last row/checkbox, not if I select another row and press delete. I don't modify any component state in the application. This behavior is independent of setting the selectBooleanCheckbox or the delete commandButton to false/true. The behavior described doesn't happen in any possible case, but always when the options are shown the first time and I select the last one and press delete. If this happens, and the checkboxes are all redisplayed in selected state, and I press delete, a runtime error is thrown because a row is unavailable: 02:36:22,218 ERROR [Engine] StandardWrapperValve[Faces Servlet]: Servlet.service() for servlet Faces Servlet threw exception javax.faces.FacesException: Error calling action method of component with id _id1:_id34 at org.apache.myfaces.application.ActionListenerImpl.processAction(Ac tionListen erImpl.java:74) at javax.faces.component.UICommand.broadcast(UICommand.java:106) at javax.faces.component.UIViewRoot._broadcastForPhase(UIViewRoot.java:90) at javax.faces.component.UIViewRoot.processDecodes(UIViewRoot.java:132) at org.apache.myfaces.lifecycle.LifecycleImpl.applyRequestValues(Life cycleImpl. java:219) at org.apache.myfaces.lifecycle.LifecycleImpl.execute(LifecycleImpl.java:71) at javax.faces.webapp.FacesServlet.service(FacesServlet.java:106) at org.apache.catalina.core.ApplicationFilterChain.internalDoFilter(A pplication FilterChain.java:237) at org.apache.catalina.core.ApplicationFilterChain.doFilter(Applicati onFilterCh ain.java:157) at org.apache.myfaces.component.html.util.ExtensionsFilter.doFilter(E xtensionsF ilter.java:123) at org.apache.catalina.core.ApplicationFilterChain.internalDoFilter(A pplication FilterChain.java:186) at org.apache.catalina.core.ApplicationFilterChain.doFilter(Applicati onFilterCh ain.java:157) at org.jboss.web.tomcat.filters.ReplyHeaderFilter.doFilter(ReplyHeade rFilter.ja va:75) at
Re: Strange
[EMAIL PROTECTED] wrote: I use a JSF web application with JBoss. I get this strange error stack. All the necessary JSF libs are included in the war file. Do You have any hint? 22:32:25,663 WARN [Digester] [ValidatorRule]{faces-config/validator} Merge(org.apache.myfaces.validator.CreditCard) 22:32:25,673 WARN [Digester] [ValidatorRule]{faces-config/validator} Merge(org.apache.myfaces.validator.Email) 22:32:25,673 WARN [Digester] [ValidatorRule]{faces-config/validator} Merge(org.apache.myfaces.validator.Equal) 22:32:25,673 WARN [Digester] [ValidatorRule]{faces-config/validator} Merge(org.apache.myfaces.validator.RegExpr) 22:32:25,773 ERROR [[/bookstore]] Exception sending context initialized event to listener instance of class com.sun.faces.config.ConfigureListener javax.faces.FacesException: java.lang.ClassCastException: org.apache.myfaces.custom.ajax.api.AjaxPhaseListener at com.sun.faces.config.ConfigureListener.contextInitialized(ConfigureListener.java:336) at org.apache.catalina.core.StandardContext.listenerStart(StandardContext.java:3669) at org.apache.catalina.core.StandardContext.start(StandardContext.java:4104) at org.apache.catalina.core.ContainerBase.addChildInternal(ContainerBase.java:759) at org.apache.catalina.core.ContainerBase.addChild(ContainerBase.java:739) at org.apache.catalina.core.StandardHost.addChild(StandardHost.java:524) at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method) It looks to me like you've got both MyFaces and the Sun JSF jars in the classpath. This is bound to cause problems. Remove one or the other. BTW, in any follow-up emails, please note which versions of MyFaces libraries you're using. And please provide a more helpful subject line on your email. Regards, Simon
Problem with inputHtml
Hallo,I have problems with t:inputHtml:- The content of the value-parameter (Initial value) disapperars when I goover the inputHtml-area with the mouse. (in IE)- It doesn't work if I want to use two t:inputHtml on the same site.- There is a _javascript_ -Error when I push the button "edit HTML code". Can anyone help me? ThanksGeorg Kiss
Re: Drilldown type app. without session bean?
Simon, Mike, Thanks for the explanation. I was able to make it work by using below code: FacesContext ctx = FacesContext.getCurrentInstance(); ValueBinding binding = ctx.getApplication().createValueBinding(#{User}); binding.setValue(ctx, new User(id)); Trying to put the User bean in the request map was apparently the wrong way of doing it: ctx.getExternalContext().getRequestMap().put(#{User}, new User(id)); The myfaces example use another method with t:updateActionListener. I will stay safe for now, and use above method. :) Thanks!
Re: Drilldown type app. without session bean?
Yannick Le Teigner wrote: Simon, Mike, Thanks for the explanation. I was able to make it work by using below code: FacesContext ctx = FacesContext.getCurrentInstance(); ValueBinding binding = ctx.getApplication().createValueBinding(#{User}); binding.setValue(ctx, new User(id)); Trying to put the User bean in the request map was apparently the wrong way of doing it: ctx.getExternalContext().getRequestMap().put(#{User}, new User(id)); Just FYI, using getRequestMap().put(User, new User(id)); should be the same as the above code. The expression evaluator simply looks in request, session and application scopes for an entry of the specified name. If not found, then it looks for a managed bean declaration and instantiates as described earlier. However as long as you've got something working, that's the important bit :-). Cheers, Simon
Re: Error adding dataScroller before my UIData
Simon Kitching wrote: Miller, John wrote: I need to add a dataScroller to both the top and bottom of my dataTable. However I get an exception when putting it before the dataTable is defined (i.e. in the header) saying it cant find the UIData element. Does anyone know the solution for this (other than adding it after the datatable and using stylesheet positioning…. I really am not interested in that solution) This is a fundamental issue with JSP/JSF: that components are both created and rendered in a single pass through a JSP page. You could try enclosing the table scroller components in some parent component which renders its children, eg an h:panelGroup. This should cause the child components to all be created first before any rendering (which does the id lookup) occurs. If this works, please reply to the list to let us know. Just for future searchers of this list, John Miller has reported (in another thread) that wrapping the 2 dataScrollers + 1 dataTable within another JSF component has resolved the issue with having forward references from the dataScroller component to the dataTable component. Presumably that other component is a panelGroup or similar component that renders its children. Cheers, Simon
Re: Drilldown type app. without session bean?
Hi. Simon, Mike, Thanks for the explanation. I was able to make it work by using below code: FacesContext ctx = FacesContext.getCurrentInstance(); ValueBinding binding = ctx.getApplication().createValueBinding(#{User}); binding.setValue(ctx, new User(id)); Trying to put the User bean in the request map was apparently the wrong way of doing it: ctx.getExternalContext().getRequestMap().put(#{User}, new User(id)); The myfaces example use another method with t:updateActionListener. I will stay safe for now, and use above method. :) I know many people will criticize my statement, but I think that EL in JSF really needs method invocations. Several months ago I've added JavaScript support to JSF (via Rhino) and my life has become MUCH easier. That is, for the drill-down scenario you're describing, I'm using h:dataTable value=#{userManager.users} var=user ... h:commandButton value=Remove user action=#{[userManager.removeUser(user)]}/ ... /h:dataTable Where userManager has method like: public String removeUser(User user) {...} Square brackets in #{[...]} denote JavaScript expressions (all other expressions are processed normally). JS scripts are compiled using Mozilla's Rhino. The danger is that JavaScript in EL allows moving controller logic back to the JSPs (writing too much JavaScript in actions), which is undesirable. You have to constrain yourself, but that's a tradeoff I can live with. Anyway, #{[userManager.removeUser(user)]} is the most convenient solution from all that I've seen. Bye. /lexi -- Telefonieren Sie schon oder sparen Sie noch? NEU: GMX Phone_Flat http://www.gmx.net/de/go/telefonie
Bean definition question faces-config.xml
Hi, I wonder if it is possible to declare the constructor of a bean in faces-config.xml similar to using constructor-arg in spring's configuration files. The idea behind this is, that I'd like to inject a bean into my application and use a referenced bean already in the constructor. As far as I know and encountered, first the default constructor is called, then the referenced beans are injected by using the corresponding setters, and finally the bean is used in the application depending of the scope. Or is possible to use/reference Spring beans in faces-config.xml? Thank you for your answers, Kurt
Attention Tree2 Users
If you are using tree2 to build dynamic server side trees, please be sure to follow MYFACES-911. I will be committing a patch tomorrow (Wed.) that will allow for a custom id naming scheme. Mathias Werlitz came up with the idea of a TreeWalker interface and sent me a rough patch. Over the past week I have made significant improvements to the patch and I have been testing it out. So far it looks pretty good. Even if you are not using tree2 for dynamic trees its possible that the patch will introduce new bugs. If you are using tree2 in a production system please consider adding yourself as a watcher to the MYFACES-911 JIRA issue. This way when the patch is committed you can check out the next nightly build. Please report comments/concerns about the patch in JIRA. sean
Re: Bean definition question faces-config.xml
Kurt Edegger wrote: Hi, I wonder if it is possible to declare the constructor of a bean in faces-config.xml similar to using constructor-arg in spring's configuration files. This is definitely not a feature of the JSF specification, and MyFaces can't add any new tags to the faces-config.xml file without violating the spec. The idea behind this is, that I'd like to inject a bean into my application and use a referenced bean already in the constructor. As far as I know and encountered, first the default constructor is called, then the referenced beans are injected by using the corresponding setters, and finally the bean is used in the application depending of the scope. There's no way to set anything in the constructor AFAIK. The constructor could manually look up the desired object, though: see the FAQ entry How can I access one Managed Bean from another?. You can also do initialisation after all the properties have been set. See the FAQ entry How do I know when a managed bean's properties have all been set?. http://wiki.apache.org/myfaces/FAQ Or is possible to use/reference Spring beans in faces-config.xml? Any managed-property like: managed-property namefoo/name value#{someValue}/value /managed-property simply looks for a key someValue in the request, session and application scopes. So if your spring bean is stored in one of those maps then it will be passed to the managed bean on creation. Regards, Simon
Re: Bean definition question faces-config.xml
Faces doesn't do constructor injection :( Original message Date: Tue, 06 Dec 2005 18:55:01 -0800 From: Kurt Edegger [EMAIL PROTECTED] Subject: Bean definition question faces-config.xml To: MyFaces Discussion users@myfaces.apache.org Hi, I wonder if it is possible to declare the constructor of a bean in faces-config.xml similar to using constructor-arg in spring's configuration files. The idea behind this is, that I'd like to inject a bean into my application and use a referenced bean already in the constructor. As far as I know and encountered, first the default constructor is called, then the referenced beans are injected by using the corresponding setters, and finally the bean is used in the application depending of the scope. Or is possible to use/reference Spring beans in faces- config.xml? Thank you for your answers, Kurt Dennis Byrne
Re: Bean definition question faces-config.xml
Thank you for your fast response! on 12/6/2005 7:39 PM Simon Kitching stated: [...snip...] This is definitely not a feature of the JSF specification, and MyFaces can't add any new tags to the faces-config.xml file without violating the spec. Ok, short and precise answer ;) [...snip...] You can also do initialisation after all the properties have been set. See the FAQ entry How do I know when a managed bean's properties have all been set?. There's a method called initDao() in the class org.springframework.jdbc.core.support.JdbcDaoSupport which should be overwritten in a case you need to init a DAO (which is the case in my situation). But this one is not called by JSF right? So I'd need to use spring to construct the bean? Thank you for pointing to the FAQ - missed that one .. Take care, Kurt http://wiki.apache.org/myfaces/FAQ Or is possible to use/reference Spring beans in faces-config.xml? Any managed-property like: managed-property namefoo/name value#{someValue}/value /managed-property simply looks for a key someValue in the request, session and application scopes. So if your spring bean is stored in one of those maps then it will be passed to the managed bean on creation. Regards, Simon
Question: Hibernate SessionPerRequest with JSF navigation
Hi, I have been pondering about this particular issue regarding the usage of SessionPerRequest with JSF. In the SessionPerRequest pattern, a hibernate session is open and a transaction started at the beginning of the request, and the transaction is committed just before returning a response to the browse. I have been using this pattern for a while until a couple days ago I realized that a request in JSF usually involves an action that navigates to another JSF. For example a viewCustomer.jsf could have a delete customer button, which deletes the customer and navigates to listCustomer.jsf. The sequence of action is thus: 1. Begin hibernate transaction 2 .deleteCustomerAction() 3. Deletes customer from database 4. JSF navigation to listCustomer.jsf 5. Retrieve and display customer list 6. Commit hibernate transaction There are two distinctly independent operations within the same Httprequest. To be correct the transaction should commit after step 3, and a new transaction should begin. If I use redirect in JSF navigation that is what it would amount to. But what is the proper way to inject the commit without redirect? Regards, Yee
obtaining real url after navigation rules
i'm having an issue attempting to apply the spring based acegi security layer to myfaces. basically, acegi seeks to apply a servlet filter to each page navigated to and apply a set of security rules to either grant or deny access to that page. the issue that i'm encountering is that the servlet filter always seems to be one url behind the page that i'm on (and thus the desired security functionality is sadly lacking). i tried reversing the order of the extensions filter and the acegi filter and that had no effect. any insight appreciated. in lieu of a direct solution to this issue, my next strategy may be to attempt to grab the correct url programatically and pass it to over to acegi, so any suggestions on ways to go after that via faces context would also be welcomed. i already tried looking in HttpServletRequest obtained from the external context, and sadly, it was one url behind as well :( thanks, tony.
Re: Value is not a valid option
I downloaded the latest myfaces nightly build that of 6th December 2005 and the problem still persists. Any solutions or workarounds? Lack of any stack traces is making it infuriatingly difficult to even track the bug.
Re: OnLoad in Myfaces --something like in Oracle ADF? --Problems with JSFCOMP
I have uploaded release 0.8.1 as a bug fix patch for this. There were two problems, one was that I used a prefix on the namespace in the xsd, which may not be incorrect, but was bad practice, that is now removed. Also, the example XML had a typo of xslns instead of xmlns. I am able to run it in a test environment on Tomcat 5.5. Let me know if this is still an issue with the new release. -Andrew On 12/6/05, [EMAIL PROTECTED] [EMAIL PROTECTED] wrote: Hi! This listener looks great, but I have problems with implementing it. Here are the steps I took: .)Put the jsfExt.jar into my WEB-INF/lib directory. .)Add a onload-config.xml into my WEB-INF directory It looks like this: ?xml version=1.0 encoding=UTF-8? onload-config xslns=urn:onload-config xmlns:xsi=http://www.w3.org/2001/XMLSchema-instance; xsi:schemaLocation=urn:onload-config onload-config.xsd navigation-rule view-id/login.jsp/view-id action#{linker.startdatabase}/action /navigation-rule /onload-config .)Add a onload-config.xsd into my WEB-INF diretory: (Just copied it out of the zip File) .)Add the following into my Web.xml: context-param param-nameonload-rules/param-name param-value/WEB-INF/onload-config.xml/param-value /context-param Nevertheless the XML (both the onload-config.xml and the onload-config.xsd) doesn't seem to be well-formed: On the onload-config.xml I get the following error: cvc-elt1: Cannot find the declaration of element onload-config on the onload-config.xsd I get the following error at line: xs:element name=onload-config type=Config/ src-resolve 4.1: Error resolving component 'Config'. It was detected that Config has no namespace, but components with no target namespace are not referencable from schema document Can anybody help me? Thx Regards, Andy -Ursprüngliche Nachricht- Von: Andrew Robinson [mailto:[EMAIL PROTECTED] Gesendet: Montag, 5. Dezember 2005 18:22 An: MyFaces Discussion Betreff: Re: OnLoad in Myfaces --something like in Oracle ADF? I have an OnLoad phase listener implemented. It is part of http://sourceforge.net/projects/jsf-comp Check out the jsfExt release. It isn't a component, but may provide the functionality that you are looking for. -Andrew On 12/5/05, [EMAIL PROTECTED] [EMAIL PROTECTED] wrote: Hi all! Can I find a similar component like the Oracle ADF body, especially the onload, component in Myfaces? Or can I do a workaround to load a method from the backing bean at Onload of the jsf page? Regards Andy __ This email and any files transmitted with it are confidential and intended solely for the use of the individual or entity to whom they are addressed. If you have received this email in error please notify your system manager. This footnote also confirms that this email message has been swept for the presence of computer viruses. __ __ This email and any files transmitted with it are confidential and intended solely for the use of the individual or entity to whom they are addressed. If you have received this email in error please notify your system manager. This footnote also confirms that this email message has been swept for the presence of computer viruses. __
Re: obtaining real url after navigation rules
You can get the correct JSF view ID inside of a phase listener in the before render response. At this point in the lifecycle, you should also be allowed to forward to a login page. -Andrew On 12/6/05, tony kerz [EMAIL PROTECTED] wrote: i'm having an issue attempting to apply the spring based acegi security layer to myfaces. basically, acegi seeks to apply a servlet filter to each page navigated to and apply a set of security rules to either grant or deny access to that page. the issue that i'm encountering is that the servlet filter always seems to be one url behind the page that i'm on (and thus the desired security functionality is sadly lacking). i tried reversing the order of the extensions filter and the acegi filter and that had no effect. any insight appreciated. in lieu of a direct solution to this issue, my next strategy may be to attempt to grab the correct url programatically and pass it to over to acegi, so any suggestions on ways to go after that via faces context would also be welcomed. i already tried looking in HttpServletRequest obtained from the external context, and sadly, it was one url behind as well :( thanks, tony.
Simplifying column expression
Hi, I want to simplify the expression x:column f:facet name=header h:outputText value=#{text.firstname} / /f:facet h:outputText value=#{auser.firstName} / /x:column with this one: my:column my:columnheader value=#{text.firstname} / h:outputText value=#{auser.firstName} / /my:column Does anyone know how to make it? Thanks, Juergen _ Die neue MSN Suche Toolbar mit Windows-Desktopsuche. Suchen Sie gleichzeitig im Web, Ihren E-Mails und auf Ihrem PC! Jetzt neu! http://desktop.msn.de/ Jetzt gratis downloaden!
Re: Question: Hibernate SessionPerRequest with JSF navigation
I use this aproch in my apps to. session.flush is enught 2005/12/7, Yee CN [EMAIL PROTECTED]: Hi, I have been pondering about this particular issue regarding the usage of SessionPerRequest with JSF. In the SessionPerRequest pattern, a hibernate session is open and a transaction started at the beginning of the request, and the transaction is committed just before returning a response to the browse. I have been using this pattern for a while until a couple days ago I realized that a request in JSF usually involves an action that navigates to another JSF. For example a viewCustomer.jsf could have a delete customer button, which deletes the customer and navigates to listCustomer.jsf. The sequence of action is thus: 1. Begin hibernate transaction 2 .deleteCustomerAction() 3. Deletes customer from database 4. JSF navigation to listCustomer.jsf 5. Retrieve and display customer list 6. Commit hibernate transaction There are two distinctly independent operations within the same Httprequest. To be correct – the transaction should commit after step 3, and a new transaction should begin. If I use 'redirect' in JSF navigation that is what it would amount to. But what is the proper way to inject the commit without redirect? Regards, Yee -- ::SammyRulez:: http://sammyprojectz.blogspot.com