Re: [Solved] ERROR: Value is not a valid option
You can also use tr:selectOneChoice instead of h:selectOneMenu With the same t:selectItems inside, h:... gives me errors; tr:... not at all! -Wolf On 27 Feb 2007, at 10:31, CarlHowarth wrote: Thanks very much Mike - all I needed to do to get this to work is change the itemvalue of my t:selectitems from: #{r.idString} to: #{r} Thanks again - Carl Mike Kienenberger wrote: Yes, that's how I would do it. If you specify an itemValue, then that value must be of the correct type. Ie, is not a containerType (Srinivas) and 0 is not a region (Carl). On 2/26/07, Kevin Galligan [EMAIL PROTECTED] wrote: I am using facelets. Where would that function go? Each f:selectItem entry? f:selectItem itemLabel=Website URL itemValue=#{myfn:convertStringToShort(3)}/ On 2/26/07, Mike Kienenberger [EMAIL PROTECTED] wrote: Take a look at http://issues.apache.org/jira/browse/MYFACES-1328. It looks like the RI does not have this convenience conversion. I don't know what the spec says, but that'd be the place to get a definitive answer. If you're using facelets, as a temporary workaround you could create a convertStringToShort() function (or whatever conversion you're expecting to have happen automatically). On 2/26/07, Kevin Galligan [EMAIL PROTECTED] wrote: I did try that and didn't have any luck. I think that was due to the fact that I was using shorts rather than ints, but I'd have to try it again now that I have a better understanding of everything involved. I looked at TOMAHAWK-152 briefly. I'll have to sit down and take a better look at it. It looks to be in the realm. The string value of 'true' not matching with a boolean type value? I guess the bottom line is I'd like to find out if I should be using an explicit converter to go from String to Short, or if the JSF api being used should be able to handle a simple[r] conversion like that. It was doing that conversion originally. Does the JSF spec cover this? Anybody happen to know what the reference implementation does? I'd love to try it out, but we're trying to push this out the door, so for the near future I have to focus on what's right in front of me. On 2/26/07, Martin Grotzke [EMAIL PROTECTED] wrote: Does it work when you use itemValue=#{3} as workaround? I also had the same problem with itemValue=true, what I think is http://issues.apache.org/jira/browse/TOMAHAWK-152 ... Cheers, Martin On Mon, 2007-02-26 at 11:23 -0500, Kevin Galligan wrote: I'm having the same problem. I had some code that was working for a long time with 1.1.5-SNAPSHOT, and now I'm getting that error. h:selectOneMenu value=#{shared$FavoriteDocumentAdd.documentTypeId} onchange=toggleInputRow() id=documentTypeSelect style=background-color:rgb(204,204,255) f:selectItem itemLabel=Website URL itemValue=3/ f:selectItem itemLabel=File Upload itemValue=1/ f:selectItem itemLabel=Description Only itemValue=2/ /h:selectOneMenu The value being set is a short. Essentially it looks like the code was doing an automatic conversion before, but now chokes. I just reverted the code to 1.1.5-SNAPSHOT, and it works again. I'm going to try to take a quick look at the differences between UISelectOne.java between those two versions, but in practice I've found with any large code base, it'll take a little time to really understand the layout. On 2/26/07, CarlHowarth [EMAIL PROTECTED] wrote: Hi, I am having this problem too. My select one is set up as follows: h:selectOneMenu id=regionList binding=#{Bean.regionListUI} value=#{ Bean.region} f:converter converterId= myapp.Region/ f:selectItem itemValue=0 itemLabel=(all)/ t:selectItems var=r itemLabel=#{ r.name } itemValue=#{ r.idString} value=#{applicationBean.regionMap} / f:attribute name=fieldRef value=Region List/ /h:selectOneMenu - This was working fine with 1.1.4 but since the upgrade to 1.1.5 it now falls over. - The application bean is at application scope, so the values should always be available. - The converter changes an ID to a region and vice versa. - The page loads up fine, I only have the problem when I select a command button that runs an action listener. - I use a 't:saveState value=#{Bean_track}/' for my request-scoped bean. - The region bean implements a working 'equals' method. - If I select the manually populated select item, (all), it works correctly. My converter is like this: public final static String CONVERTER_ID = myapp.Region; public Object getAsObject(FacesContext facesContext, UIComponent uiComponent, String string) throws ConverterException { return JSFUtils .getAppBackingBean().getRegionMap().get(Integer.parseInt(string)); } public String
Re: tr:convertNumber
Indeed. The error I got related to a Null-value, which gave me the NumberConversionError (instead of a NPE - which is why I first thought Longs were not supported) Thanks Mathias, -Wolf On Jan 30, 2008 11:36 AM, Matthias Wessendorf [EMAIL PROTECTED] wrote: should work; it works like the f:convertNumber type=number / all clzzes that extend java.lang.Number are supported Please note, that Trinidad decorates the default converters for javax.faces.Long, in order to support client-side conversion -M On Jan 30, 2008 11:27 AM, Wolf Benz [EMAIL PROTECTED] wrote: Hi List, Does anyone know whether tr:convertNumber type='number' works well with java.lang.Long? (of should I stick to f:convertor convertorId=javax.faces.Long /?) I'm asking as the Trinidad doc of the tag is not stated whether or not longs are covered. It says there's a 'type' attribute you can set to 'number', yet not what types of numbers are covered. -Wolf -- Matthias Wessendorf further stuff: blog: http://matthiaswessendorf.wordpress.com/ sessions: http://www.slideshare.net/mwessendorf mail: matzew-at-apache-dot-org
Re: tr:convertNumber
I didn't post a JIRA issue - wanted to hear some others first. For me, it's working now! So, it's closed for me! :-) -Wolf On Jan 31, 2008 11:46 AM, Matthias Wessendorf [EMAIL PROTECTED] wrote: so? still an open issue here? or, solved ? On Jan 31, 2008 11:25 AM, Wolf Benz [EMAIL PROTECTED] wrote: Indeed. The error I got related to a Null-value, which gave me the NumberConversionError (instead of a NPE - which is why I first thought Longs were not supported) Thanks Mathias, -Wolf On Jan 30, 2008 11:36 AM, Matthias Wessendorf [EMAIL PROTECTED] wrote: should work; it works like the f:convertNumber type=number / all clzzes that extend java.lang.Number are supported Please note, that Trinidad decorates the default converters for javax.faces.Long, in order to support client-side conversion -M On Jan 30, 2008 11:27 AM, Wolf Benz [EMAIL PROTECTED] wrote: Hi List, Does anyone know whether tr:convertNumber type='number' works well with java.lang.Long? (of should I stick to f:convertor convertorId=javax.faces.Long /?) I'm asking as the Trinidad doc of the tag is not stated whether or not longs are covered. It says there's a 'type' attribute you can set to 'number', yet not what types of numbers are covered. -Wolf -- Matthias Wessendorf further stuff: blog: http://matthiaswessendorf.wordpress.com/ sessions: http://www.slideshare.net/mwessendorf mail: matzew-at-apache-dot-org -- Matthias Wessendorf further stuff: blog: http://matthiaswessendorf.wordpress.com/ sessions: http://www.slideshare.net/mwessendorf mail: matzew-at-apache-dot-org
tr:convertNumber
Hi List, Does anyone know whether tr:convertNumber type='number' works well with java.lang.Long? (of should I stick to f:convertor convertorId=javax.faces.Long /?) I'm asking as the Trinidad doc of the tag is not stated whether or not longs are covered. It says there's a 'type' attribute you can set to 'number', yet not what types of numbers are covered. -Wolf
Re: Tree example
Murat, is the archive valid? I cannot unzip it (see what versions of libs you use etc) Both on the Mac and on my PeeCee it gave zip errors. -Wolf On Jan 28, 2008 4:21 PM, murat aydin [EMAIL PROTECTED] wrote: Hi, I developed a new web based ontology browser in java. It uses Myfaces and tree component. It may be an example for tree usage. It contains TreeSelectionListener. If you are interested in, take a look at https://sourceforge.net/projects/obrowse. murat
Re: Tree example
Thx murat - now all's fine. -Wolf On 28 Jan 2008, at 19:40, murat aydin wrote: Thank you for your warning. i reuploaded the file. File should be around 16.5 MB. Try the Paris,France mirror of sourceforge firstly. murat On 1/28/08, Wolf Benz [EMAIL PROTECTED] wrote: Murat, is the archive valid? I cannot unzip it (see what versions of libs you use etc) Both on the Mac and on my PeeCee it gave zip errors. -Wolf On Jan 28, 2008 4:21 PM, murat aydin [EMAIL PROTECTED] wrote: Hi, I developed a new web based ontology browser in java. It uses Myfaces and tree component. It may be an example for tree usage. It contains TreeSelectionListener. If you are interested in, take a look at https://sourceforge.net/projects/obrowse. murat
Re: Trinidad 404 error: requested resource (/tutoring/__ADFv__.jsp) is not available
Hi List, I'm using MF 1.2.2 + Trinidad 1.2.5 and Facelets. And still getting this The requested resource (/tutoring/ __ADFv__.jsp) is not available (see conversation below) message when using tr:inputDate Is there a way to remedy from this bug until it has been corrected in the(MF core) distributions? I thought it was planned to be corrected in MF Core 1.2.1, what happened to that version? :-) --Wolf On 23 Sep 2007, at 15:40, Gregg Leichtman wrote: I'm getting a 404 error as follows: HTTP Status 404 - /tutoring/__ADFv__.jsp type Status report message /tutoring/__ADFv__.jsp description The requested resource (/tutoring/__ADFv__.jsp) is not available. Apache Tomcat/6.0.13 whenever I try to select the popup of an inputColor or inputDate component _without_ a supporting chooseColor or chooseDate component respectively. If I use a supporting chooseColor or chooseDate component all is well. I found the following forum conversation below from the 12th of this month and it might apply, but unlike Mr. Bertrand, I have no evidence that the __ADFv__.jsp file has been generated. I did a find from the top of my deployed Tomcat 6.0.13 distribution and there just doesn't seem to be any such jsp or class file anywhere. In fact there is no file whose name contains ADF. The components themselves do render, just the popups fail. I have not tried to change the faces mapping as described below, since the resource doesn't seem to be generated and there would be nothing to link to. I'm using the following: INFO: Initializing Sun's JavaServer Faces implementation (1.2_04-b16- p02) for context '/tutoring' Trinidad 1.2.1 Tiles 2.0.4 Shale snapshot 1.1.0 from 20070717 [EMAIL PROTECTED]:~ uname -a Linux aragorn 2.6.11.4-21.13-default #1 Mon Jul 17 09:21:59 UTC 2006 i686 i686 i386 GNU/Linux Here is a snippet of the jsp file: ... tr:panelGroupLayout layout=horizontal tr:inputColor shortDesc=Set color of new message. columns=6 value=#{list.newMessageColor} f:facet name=help tr:outputText value=(#RRGGBB) or (r,g,b)/ /f:facet /tr:inputColor tr:inputDate id=insertDate columns=8 maximumLength=8 shortDesc=Insert a date into a new message at the cursor./ /tr:panelGroupLayout ... Any help would be appreciated. -= Gregg =- Yeah, that sounds like the issue. Older versions of the RI,as well as MyFaces 1.2 don't support *.faces mappings well enough for this scenario (I haven't looked into why). -- Adam On 9/12/07, Matthias Wessendorf [EMAIL PROTECTED] wrote: Is it possible, that you are using myfaces 1.2 ? and *.faces mapping ? try, /faces/* as your mapping On 9/12/07, Bertrand, Shawn R [EMAIL PROTECTED] wrote: Thanks for the clarification. Unfortunately, it isn't working in Trinidad as it did in ADF Faces. FredJSP.getRedirectURL generates a baseURL of /nas/__ADFv__.faces?_afPfm=497604ee_t=fred and arguments of {_vir, /jsp/SnmpSsMacDetail.jsp, loc, en-US, _minWidth, _minHeight,}. The second argument is correct and that resource is definitely present in the deployed application. The separate browser window does appear as it used to but it contains an HTTP 404 error with the description The requested resource (/__ADFv__.jsp) is not available.. Thanks again, Shawn Bertrand Tyco Electronics Corporation From: Adam Winer [EMAIL PROTECTED] Sent: Tuesday, September 11, 2007 4:32 PM To: MyFaces Discussion Subject: Re: Dialog issue during ADF-Trinidad migration There's two separate flags here: - useWindow - usePopup If useWindow is false, that means we navigate the whole page to the dialog. Simple enough. If useWindow is true, then we look at usePopup: if it's false, we want to show the dialog in a new browser window. We use FredJSP so that we have a frameset around the dialog view, needed to make sure that context is not lost when you navigate within the dialog. If usePopup is true, we use a DHTML dialog. We don't need FredJSP, since we're putting the dialog in an iframe, and can directly navigate to the page. Does this make sense? What you're describing - uses the URL returned from FredJSP. getRedirectURL - is intentional (and was the way things worked back in ADF, FWIW). What should be happening next is that a frameset gets generated where the frame's source is the URL of the desired page - so your dialog does show up. Is that not working? -- Adam On 9/11/07, Bertrand, Shawn R [EMAIL PROTECTED] wrote: (Trinidad 1.0.2 – build from July – the current one). I've migrated our application to use Trinidad, and see some PPR issues that are likely ours, but for the most part everything is working
Re: Trinidad 404 error: requested resource (/tutoring/__ADFv__.jsp) is not available
Matthias, the JIRA enry is MYFACES-1794 -Wolf On 28 Jan 2008, at 21:25, Matthias Wessendorf wrote: /faces/* as servlet mapping. not yet fixed in MyFaces. Is there an issue for that already in our jira ? On Jan 28, 2008 8:50 PM, Wolf Benz [EMAIL PROTECTED] wrote: Hi List, I'm using MF 1.2.2 + Trinidad 1.2.5 and Facelets. And still getting this The requested resource (/tutoring/ __ADFv__.jsp) is not available (see conversation below) message when using tr:inputDate Is there a way to remedy from this bug until it has been corrected in the(MF core) distributions? I thought it was planned to be corrected in MF Core 1.2.1, what happened to that version? :-) --Wolf On 23 Sep 2007, at 15:40, Gregg Leichtman wrote: I'm getting a 404 error as follows: HTTP Status 404 - /tutoring/__ADFv__.jsp type Status report message /tutoring/__ADFv__.jsp description The requested resource (/tutoring/__ADFv__.jsp) is not available. Apache Tomcat/6.0.13 whenever I try to select the popup of an inputColor or inputDate component _without_ a supporting chooseColor or chooseDate component respectively. If I use a supporting chooseColor or chooseDate component all is well. I found the following forum conversation below from the 12th of this month and it might apply, but unlike Mr. Bertrand, I have no evidence that the __ADFv__.jsp file has been generated. I did a find from the top of my deployed Tomcat 6.0.13 distribution and there just doesn't seem to be any such jsp or class file anywhere. In fact there is no file whose name contains ADF. The components themselves do render, just the popups fail. I have not tried to change the faces mapping as described below, since the resource doesn't seem to be generated and there would be nothing to link to. I'm using the following: INFO: Initializing Sun's JavaServer Faces implementation (1.2_04- b16-p02) for context '/tutoring' Trinidad 1.2.1 Tiles 2.0.4 Shale snapshot 1.1.0 from 20070717 [EMAIL PROTECTED]:~ uname -a Linux aragorn 2.6.11.4-21.13-default #1 Mon Jul 17 09:21:59 UTC 2006 i686 i686 i386 GNU/Linux Here is a snippet of the jsp file: ... tr:panelGroupLayout layout=horizontal tr:inputColor shortDesc=Set color of new message. columns=6 value=#{list.newMessageColor} f:facet name=help tr:outputText value=(#RRGGBB) or (r,g,b)/ /f:facet /tr:inputColor tr:inputDate id=insertDate columns=8 maximumLength=8 shortDesc=Insert a date into a new message at the cursor./ /tr:panelGroupLayout ... Any help would be appreciated. -= Gregg =- Yeah, that sounds like the issue. Older versions of the RI,as well as MyFaces 1.2 don't support *.faces mappings well enough for this scenario (I haven't looked into why). -- Adam On 9/12/07, Matthias Wessendorf [EMAIL PROTECTED] wrote: Is it possible, that you are using myfaces 1.2 ? and *.faces mapping ? try, /faces/* as your mapping On 9/12/07, Bertrand, Shawn R [EMAIL PROTECTED] wrote: Thanks for the clarification. Unfortunately, it isn't working in Trinidad as it did in ADF Faces. FredJSP.getRedirectURL generates a baseURL of /nas/__ADFv__.faces?_afPfm=497604ee_t=fred and arguments of {_vir, /jsp/SnmpSsMacDetail.jsp, loc, en-US, _minWidth, _minHeight,}. The second argument is correct and that resource is definitely present in the deployed application. The separate browser window does appear as it used to but it contains an HTTP 404 error with the description The requested resource (/__ADFv__.jsp) is not available.. Thanks again, Shawn Bertrand Tyco Electronics Corporation From: Adam Winer [EMAIL PROTECTED] Sent: Tuesday, September 11, 2007 4:32 PM To: MyFaces Discussion Subject: Re: Dialog issue during ADF-Trinidad migration There's two separate flags here: - useWindow - usePopup If useWindow is false, that means we navigate the whole page to the dialog. Simple enough. If useWindow is true, then we look at usePopup: if it's false, we want to show the dialog in a new browser window. We use FredJSP so that we have a frameset around the dialog view, needed to make sure that context is not lost when you navigate within the dialog. If usePopup is true, we use a DHTML dialog. We don't need FredJSP, since we're putting the dialog in an iframe, and can directly navigate to the page. Does this make sense? What you're describing - uses the URL returned from FredJSP. getRedirectURL - is intentional (and was the way things worked back in ADF, FWIW). What should be happening next is that a frameset gets generated where the frame's source is the URL of the desired page - so your dialog does show up. Is that not working? -- Adam On 9/11/07, Bertrand, Shawn R [EMAIL PROTECTED] wrote: (Trinidad 1.0.2 – build from
Re: Trinidad 404 error: requested resource (/tutoring/__ADFv__.jsp) is not available
Hi Matthias, I read this reply (of your part as well, if I remember correctly!) already, but this doesn't help. (I have it already configured this way) But I read for some people it does help. perhaps for me not as I'm also using facelets, donno. -- Any other idea to remedy? Oh, and for your other question: the first time I encoutered it, I made a JIRA entry (was at the time of 1.2.0 I believe) but it hasn't been corrected since. I also remember Simon Kitching had a brief look at it, but it's not solved yet. Kind Regards, --Wolf On 28 Jan 2008, at 21:25, Matthias Wessendorf wrote: /faces/* as servlet mapping. not yet fixed in MyFaces. Is there an issue for that already in our jira ? On Jan 28, 2008 8:50 PM, Wolf Benz [EMAIL PROTECTED] wrote: Hi List, I'm using MF 1.2.2 + Trinidad 1.2.5 and Facelets. And still getting this The requested resource (/tutoring/ __ADFv__.jsp) is not available (see conversation below) message when using tr:inputDate Is there a way to remedy from this bug until it has been corrected in the(MF core) distributions? I thought it was planned to be corrected in MF Core 1.2.1, what happened to that version? :-) --Wolf On 23 Sep 2007, at 15:40, Gregg Leichtman wrote: I'm getting a 404 error as follows: HTTP Status 404 - /tutoring/__ADFv__.jsp type Status report message /tutoring/__ADFv__.jsp description The requested resource (/tutoring/__ADFv__.jsp) is not available. Apache Tomcat/6.0.13 whenever I try to select the popup of an inputColor or inputDate component _without_ a supporting chooseColor or chooseDate component respectively. If I use a supporting chooseColor or chooseDate component all is well. I found the following forum conversation below from the 12th of this month and it might apply, but unlike Mr. Bertrand, I have no evidence that the __ADFv__.jsp file has been generated. I did a find from the top of my deployed Tomcat 6.0.13 distribution and there just doesn't seem to be any such jsp or class file anywhere. In fact there is no file whose name contains ADF. The components themselves do render, just the popups fail. I have not tried to change the faces mapping as described below, since the resource doesn't seem to be generated and there would be nothing to link to. I'm using the following: INFO: Initializing Sun's JavaServer Faces implementation (1.2_04- b16-p02) for context '/tutoring' Trinidad 1.2.1 Tiles 2.0.4 Shale snapshot 1.1.0 from 20070717 [EMAIL PROTECTED]:~ uname -a Linux aragorn 2.6.11.4-21.13-default #1 Mon Jul 17 09:21:59 UTC 2006 i686 i686 i386 GNU/Linux Here is a snippet of the jsp file: ... tr:panelGroupLayout layout=horizontal tr:inputColor shortDesc=Set color of new message. columns=6 value=#{list.newMessageColor} f:facet name=help tr:outputText value=(#RRGGBB) or (r,g,b)/ /f:facet /tr:inputColor tr:inputDate id=insertDate columns=8 maximumLength=8 shortDesc=Insert a date into a new message at the cursor./ /tr:panelGroupLayout ... Any help would be appreciated. -= Gregg =- Yeah, that sounds like the issue. Older versions of the RI,as well as MyFaces 1.2 don't support *.faces mappings well enough for this scenario (I haven't looked into why). -- Adam On 9/12/07, Matthias Wessendorf [EMAIL PROTECTED] wrote: Is it possible, that you are using myfaces 1.2 ? and *.faces mapping ? try, /faces/* as your mapping On 9/12/07, Bertrand, Shawn R [EMAIL PROTECTED] wrote: Thanks for the clarification. Unfortunately, it isn't working in Trinidad as it did in ADF Faces. FredJSP.getRedirectURL generates a baseURL of /nas/__ADFv__.faces?_afPfm=497604ee_t=fred and arguments of {_vir, /jsp/SnmpSsMacDetail.jsp, loc, en-US, _minWidth, _minHeight,}. The second argument is correct and that resource is definitely present in the deployed application. The separate browser window does appear as it used to but it contains an HTTP 404 error with the description The requested resource (/__ADFv__.jsp) is not available.. Thanks again, Shawn Bertrand Tyco Electronics Corporation From: Adam Winer [EMAIL PROTECTED] Sent: Tuesday, September 11, 2007 4:32 PM To: MyFaces Discussion Subject: Re: Dialog issue during ADF-Trinidad migration There's two separate flags here: - useWindow - usePopup If useWindow is false, that means we navigate the whole page to the dialog. Simple enough. If useWindow is true, then we look at usePopup: if it's false, we want to show the dialog in a new browser window. We use FredJSP so that we have a frameset around the dialog view, needed to make sure that context is not lost when you navigate within the dialog. If usePopup is true, we use a DHTML dialog. We don't need FredJSP, since we're putting
Tomahawk tree2 new error
Hi List, I'm (trying to) use Facelets - MF 1.2.1- SNAPSHOT - Tomahawk 1.2.0 (latest checkeout) - Trinidad 1.2.6 snapshot (and the tomahawk-facelets taglib) Using tree2, I get this error. Anyone an idea how to remedy? -Wolf 18:06:35,335 (http-8080-2) ERROR [javax.faces.webapp._ErrorPageWriter] -handleException - An exception occurred java.lang.ClassCastException: org.apache.myfaces.application.TreeStructureManager$TreeStructComponent at org.apache.myfaces.trinidadinternal.util.SubKeyMap._getBaseKey(SubKeyMap.java:116) at org.apache.myfaces.trinidadinternal.util.SubKeyMap.get(SubKeyMap.java:75) at org.apache.myfaces.trinidadinternal.application.StateManagerImpl.restoreView(StateManagerImpl.java:517) at org.apache.myfaces.application.jsp.JspViewHandlerImpl.restoreView(JspViewHandlerImpl.java:505) at com.sun.facelets.FaceletViewHandler.restoreView(FaceletViewHandler.java:316) at javax.faces.application.ViewHandlerWrapper.restoreView(ViewHandlerWrapper.java:61) at org.apache.myfaces.trinidadinternal.application.ViewHandlerImpl.restoreView(ViewHandlerImpl.java:260) at org.apache.myfaces.lifecycle.RestoreViewExecutor.execute(RestoreViewExecutor.java:85) at org.apache.myfaces.lifecycle.LifecycleImpl.executePhase(LifecycleImpl.java:103) at org.apache.myfaces.lifecycle.LifecycleImpl.execute(LifecycleImpl.java:76) at javax.faces.webapp.FacesServlet.service(FacesServlet.java:148) at org.apache.catalina.core.ApplicationFilterChain.internalDoFilter(ApplicationFilterChain.java:290) at org.apache.catalina.core.ApplicationFilterChain.doFilter(ApplicationFilterChain.java:206) at org.apache.myfaces.webapp.filter.ExtensionsFilter.doFilter(ExtensionsFilter.java:190) at org.apache.catalina.core.ApplicationFilterChain.internalDoFilter(ApplicationFilterChain.java:235) at org.apache.catalina.core.ApplicationFilterChain.doFilter(ApplicationFilterChain.java:206) at org.apache.myfaces.trinidadinternal.webapp.TrinidadFilterImpl._invokeDoFilter(TrinidadFilterImpl.java:238) at org.apache.myfaces.trinidadinternal.webapp.TrinidadFilterImpl._doFilterImpl(TrinidadFilterImpl.java:195) at org.apache.myfaces.trinidadinternal.webapp.TrinidadFilterImpl.doFilter(TrinidadFilterImpl.java:138) at org.apache.myfaces.trinidad.webapp.TrinidadFilter.doFilter(TrinidadFilter.java:92) at org.apache.catalina.core.ApplicationFilterChain.internalDoFilter(ApplicationFilterChain.java:235) at org.apache.catalina.core.ApplicationFilterChain.doFilter(ApplicationFilterChain.java:206) at org.apache.catalina.core.StandardWrapperValve.invoke(StandardWrapperValve.java:233) at org.apache.catalina.core.StandardContextValve.invoke(StandardContextValve.java:175) at org.apache.catalina.core.StandardHostValve.invoke(StandardHostValve.java:128) at org.apache.catalina.valves.ErrorReportValve.invoke(ErrorReportValve.java:102) at org.apache.catalina.core.StandardEngineValve.invoke(StandardEngineValve.java:109) at org.apache.catalina.connector.CoyoteAdapter.service(CoyoteAdapter.java:263) at org.apache.coyote.http11.Http11Processor.process(Http11Processor.java:844) at org.apache.coyote.http11.Http11Protocol$Http11ConnectionHandler.process(Http11Protocol.java:584) at org.apache.tomcat.util.net.JIoEndpoint$Worker.run(JIoEndpoint.java:447) at java.lang.Thread.run(Thread.java:613)
Re: Trinidad + Facelets + Tomahawk Tree2
I read the tree2 component needs js to be in the header When I look at the page source, there is nothing in the header! (apart from the title and css link I added in the head of the template. What can I try to make it work again? (have the necessary js added or change smth so that it doesn't need it anymore) I found someone (earlier posts) suggesting to put the clientSideToggle on fase (- server state mgmt) but this didn't help. -Wolf On Jan 21, 2008 4:57 PM, Wolf Benz [EMAIL PROTECTED] wrote: Good observation Sven - but no, I didn't forget. HTML is my default namespace, I just forgot to copy the t:tree2 Toma prefix in the question. Sorry about that. (Eclipse would have complained if that were the error!) -Wolf On Jan 21, 2008 3:57 PM, Rottstock, Sven [EMAIL PROTECTED] wrote: Have you defined Tomahawk as your default namespace in your navigation menu? Or why is the namespace prefix missing for tree2? Cheers Sven -Ursprüngliche Nachricht- Von: Wolf Benz [mailto:[EMAIL PROTECTED] Gesendet: Montag, 21. Januar 2008 14:30 An: MyFaces Discussion Betreff: Trinidad + Facelets + Tomahawk Tree2 Hi List, I use this combination: MF 1.2.1 SNAPSHOT - Trinidad 1.2.5 + latest Tomahawk + Facelets. For my page templating, I do as explained here: http://wiki.apache.org/myfaces/StreamingAddResource, html xmlns // all the namespace declarations f:view t:document t:documentHead titlethe title/title /t:docmentHead t:documentBody // my body where all the ui:inserts happen, e.g. my navigation menu /t:documentBody /t:document /f:view /html The navigation itself is very simple: it's setup is: html // aml the xmlns'es !-- No f:view etc: all covered in the facelets template-- ui:composition tr:panelGroup tree2 f:facet: name=root ... /f:facet /tree2 /tr:panelGroup ui:composition The problem is: only /tr:panelGroup is rendered: of the tree2, nothing is rendered. ( I didn't forget to declare the facelets view handler in the web.xml and the trinidad core as default renderkit id in the faces-config) It has certainly to do with either the combination of Toma + Facelets + Trini, OR the adding of the t:document etc, as before(html tags for html-head and body) all worked fine. -- Anyone an idea of smth I could try to make it work? -Wolf
Re: Trinidad + Facelets + Tomahawk Tree2
Found it! :-) I was apparently using a bad tomahawk-facelet taglib jar. I swapped the one I used with the this one: http://code.google.com/p/tomahawk-facelets And it worked from the first time! (credits to Bruno Aranda who made this jar!) -Wolf On Jan 22, 2008 12:57 PM, Wolf Benz [EMAIL PROTECTED] wrote: I read the tree2 component needs js to be in the header When I look at the page source, there is nothing in the header! (apart from the title and css link I added in the head of the template. What can I try to make it work again? (have the necessary js added or change smth so that it doesn't need it anymore) I found someone (earlier posts) suggesting to put the clientSideToggle on fase (- server state mgmt) but this didn't help. -Wolf On Jan 21, 2008 4:57 PM, Wolf Benz [EMAIL PROTECTED] wrote: Good observation Sven - but no, I didn't forget. HTML is my default namespace, I just forgot to copy the t:tree2 Toma prefix in the question. Sorry about that. (Eclipse would have complained if that were the error!) -Wolf On Jan 21, 2008 3:57 PM, Rottstock, Sven [EMAIL PROTECTED] wrote: Have you defined Tomahawk as your default namespace in your navigation menu? Or why is the namespace prefix missing for tree2? Cheers Sven -Ursprüngliche Nachricht- Von: Wolf Benz [mailto:[EMAIL PROTECTED] Gesendet: Montag, 21. Januar 2008 14:30 An: MyFaces Discussion Betreff: Trinidad + Facelets + Tomahawk Tree2 Hi List, I use this combination: MF 1.2.1 SNAPSHOT - Trinidad 1.2.5 + latest Tomahawk + Facelets. For my page templating, I do as explained here: http://wiki.apache.org/myfaces/StreamingAddResource, html xmlns // all the namespace declarations f:view t:document t:documentHead titlethe title/title /t:docmentHead t:documentBody // my body where all the ui:inserts happen, e.g. my navigation menu /t:documentBody /t:document /f:view /html The navigation itself is very simple: it's setup is: html // aml the xmlns'es !-- No f:view etc: all covered in the facelets template-- ui:composition tr:panelGroup tree2 f:facet: name=root ... /f:facet /tree2 /tr:panelGroup ui:composition The problem is: only /tr:panelGroup is rendered: of the tree2, nothing is rendered. ( I didn't forget to declare the facelets view handler in the web.xml and the trinidad core as default renderkit id in the faces-config) It has certainly to do with either the combination of Toma + Facelets + Trini, OR the adding of the t:document etc, as before(html tags for html-head and body) all worked fine. -- Anyone an idea of smth I could try to make it work? -Wolf
Trinidad + Facelets + Tomahawk Tree2
Hi List, I use this combination: MF 1.2.1 SNAPSHOT - Trinidad 1.2.5 + latest Tomahawk + Facelets. For my page templating, I do as explained here: http://wiki.apache.org/myfaces/StreamingAddResource, html xmlns // all the namespace declarations f:view t:document t:documentHead titlethe title/title /t:docmentHead t:documentBody // my body where all the ui:inserts happen, e.g. my navigation menu /t:documentBody /t:document /f:view /html The navigation itself is very simple: it's setup is: html // aml the xmlns'es !-- No f:view etc: all covered in the facelets template-- ui:composition tr:panelGroup tree2 f:facet: name=root ... /f:facet /tree2 /tr:panelGroup ui:composition The problem is: only /tr:panelGroup is rendered: of the tree2, nothing is rendered. ( I didn't forget to declare the facelets view handler in the web.xml and the trinidad core as default renderkit id in the faces-config) It has certainly to do with either the combination of Toma + Facelets + Trini, OR the adding of the t:document etc, as before(html tags for html-head and body) all worked fine. -- Anyone an idea of smth I could try to make it work? -Wolf
Re: Trinidad + Facelets + Tomahawk Tree2
Good observation Sven - but no, I didn't forget. HTML is my default namespace, I just forgot to copy the t:tree2 Toma prefix in the question. Sorry about that. (Eclipse would have complained if that were the error!) -Wolf On Jan 21, 2008 3:57 PM, Rottstock, Sven [EMAIL PROTECTED] wrote: Have you defined Tomahawk as your default namespace in your navigation menu? Or why is the namespace prefix missing for tree2? Cheers Sven -Ursprüngliche Nachricht- Von: Wolf Benz [mailto:[EMAIL PROTECTED] Gesendet: Montag, 21. Januar 2008 14:30 An: MyFaces Discussion Betreff: Trinidad + Facelets + Tomahawk Tree2 Hi List, I use this combination: MF 1.2.1 SNAPSHOT - Trinidad 1.2.5 + latest Tomahawk + Facelets. For my page templating, I do as explained here: http://wiki.apache.org/myfaces/StreamingAddResource, html xmlns // all the namespace declarations f:view t:document t:documentHead titlethe title/title /t:docmentHead t:documentBody // my body where all the ui:inserts happen, e.g. my navigation menu /t:documentBody /t:document /f:view /html The navigation itself is very simple: it's setup is: html // aml the xmlns'es !-- No f:view etc: all covered in the facelets template-- ui:composition tr:panelGroup tree2 f:facet: name=root ... /f:facet /tree2 /tr:panelGroup ui:composition The problem is: only /tr:panelGroup is rendered: of the tree2, nothing is rendered. ( I didn't forget to declare the facelets view handler in the web.xml and the trinidad core as default renderkit id in the faces-config) It has certainly to do with either the combination of Toma + Facelets + Trini, OR the adding of the t:document etc, as before(html tags for html-head and body) all worked fine. -- Anyone an idea of smth I could try to make it work? -Wolf
Re: access to error messages attributes with unitfied EL
Thanks Simon, The exact error I get, is: /resources/pages/fileNotFound.xhtml: Property 'javax.servlet.error.request_uri' not found on type org.apache.catalina.core.ApplicationHttpRequest javax.el.ELException: /resources/pages/fileNotFound.xhtml: Property 'javax.servlet.error.request_uri' not found on type org.apache.catalina.core.ApplicationHttpRequest at com.sun.facelets.compiler.TextInstruction.write(TextInstruction.java:48) at com .sun.facelets.compiler.UIInstructions.encodeBegin(UIInstructions.java: 39) at com.sun.facelets.compiler.UILeaf.encodeAll(UILeaf.java:149) at javax.faces.component.UIComponent.encodeAll(UIComponent.java:246) at com.sun.facelets.FaceletViewHandler.renderView(FaceletViewHandler.java: 577) at javax .faces .application.ViewHandlerWrapper.renderView(ViewHandlerWrapper.java:45) at org .apache .myfaces .trinidadinternal .application.ViewHandlerImpl.renderView(ViewHandlerImpl.java:176) at org .apache .myfaces .lifecycle.RenderResponseExecutor.execute(RenderResponseExecutor.java: 41) at org.apache.myfaces.lifecycle.LifecycleImpl.render(LifecycleImpl.java: 132) at javax.faces.webapp.FacesServlet.service(FacesServlet.java:152) at org .apache .catalina .core .ApplicationFilterChain.internalDoFilter(ApplicationFilterChain.java: 290) at org .apache .catalina .core.ApplicationFilterChain.doFilter(ApplicationFilterChain.java:206) at org .apache .catalina.core.ApplicationDispatcher.invoke(ApplicationDispatcher.java: 654) at org .apache .catalina .core.ApplicationDispatcher.processRequest(ApplicationDispatcher.java: 447) at org .apache .catalina .core.ApplicationDispatcher.doForward(ApplicationDispatcher.java:379) at org .apache .catalina .core.ApplicationDispatcher.forward(ApplicationDispatcher.java:292) at org .apache.catalina.core.StandardHostValve.custom(StandardHostValve.java: 424) at org .apache.catalina.core.StandardHostValve.status(StandardHostValve.java: 343) at org .apache.catalina.core.StandardHostValve.invoke(StandardHostValve.java: 144) at org .apache.catalina.valves.ErrorReportValve.invoke(ErrorReportValve.java: 104) at org .apache .catalina.core.StandardEngineValve.invoke(StandardEngineValve.java:109) at org.apache.catalina.connector.CoyoteAdapter.service(CoyoteAdapter.java: 261) at org.apache.coyote.http11.Http11Processor.process(Http11Processor.java: 844) at org.apache.coyote.http11.Http11Protocol $Http11ConnectionHandler.process(Http11Protocol.java:581) at org.apache.tomcat.util.net.JIoEndpoint$Worker.run(JIoEndpoint.java: 447) at java.lang.Thread.run(Thread.java:613) ... That javax.servlet.error.message is on the RequestMap when an error occures, was found in posting from Craigh M himself. (MF Mailing list with topic Re: catch FacesException - d.d. Sat 18 Feb 2006 20:05:11 GMT+01:00) --Wolf _ [Hmm..if the code requestMap.get(javax.servlet.error.message) works, then I would have really expected #{request['javax.servlet.error.message']} to work too. Is it really the case that the first works, but the second does not? If the first doesn't work, then that is just a Facelets issue that you need to follow up on the facelets list.. Regards, Simon]
Re: Dialog issue during ADF-Trinidad migration
Not here... it's still failing although I have a /faces/* mapping My setup is: MyFaces Core Impl 1.2.0 -- Toma -- Trini 1.2.4 -- facelets I read(google) it is bound to the Core JSF implementation and that it was recently corrected in Sun's own RI. -- does someone know whether it has already been corrected in the MF Core 1.2.1 implementation? Speaking of: while trying to acquire the latest jar from the Apache trunk http://svn.apache.org/repos/asf/myfaces/core/trunk_1.2.x;, when trying to mvn(almost any target), I always get this error: java.lang.NoSuchMethodError: org.codehaus.plexus.util.FileUtils.copyFile(Ljava/io/File;Ljava/io/ File;Ljava/lang/String;[Lorg/codehaus/plexus/util/FileUtils $FilterWrapper;) It seems smth is wrongly referenced/forgotten. Google told me it was an (Apache) config error. As it's still pending, I was wondering: how do other people get this jar? (ideas?) I can hardly imagine I'm the only one trying this ;-) --Wolf On 12 Sep 2007, at 21:46, Bertrand, Shawn R wrote: Thanks, fellas. We did indeed have a *.faces mapping. We now use / faces and all is well! All the best, Shawn From: Adam Winer [mailto:[EMAIL PROTECTED] Sent: Wednesday, September 12, 2007 2:06 PM To: MyFaces Discussion Subject: Re: Dialog issue during ADF-Trinidad migration Yeah, that sounds like the issue. Older versions of the RI, as well as MyFaces 1.2 don't support *.faces mappings well enough for this scenario (I haven't looked into why). -- Adam On 9/12/07, Matthias Wessendorf [EMAIL PROTECTED] wrote: Is it possible, that you are using myfaces 1.2 ? and *.faces mapping ? try, /faces/* as your mapping On 9/12/07, Bertrand, Shawn R [EMAIL PROTECTED] wrote: Thanks for the clarification. Unfortunately, it isn't working in Trinidad as it did in ADF Faces. FredJSP.getRedirectURL generates a baseURL of /nas/__ADFv__.faces?_afPfm =497604ee_t=fred and arguments of {_vir, /jsp/SnmpSsMacDetail.jsp, loc, en-US, _minWidth, _minHeight,}. The second argument is correct and that resource is definitely present in the deployed application. The separate browser window does appear as it used to but it contains an HTTP 404 error with the description The requested resource (/ __ADFv__.jsp) is not available.. Thanks again, Shawn Bertrand Tyco Electronics Corporation __ __ From: Adam Winer [mailto:[EMAIL PROTECTED] Sent: Tuesday, September 11, 2007 4:32 PM To: MyFaces Discussion Subject: Re: Dialog issue during ADF-Trinidad migration There's two separate flags here: - useWindow - usePopup If useWindow is false, that means we navigate the whole page to the dialog. Simple enough. If useWindow is true, then we look at usePopup: if it's false, we want to show the dialog in a new browser window. We use FredJSP so that we have a frameset around the dialog view, needed to make sure that context is not lost when you navigate within the dialog. If usePopup is true, we use a DHTML dialog. We don't need FredJSP, since we're putting the dialog in an iframe, and can directly navigate to the page. Does this make sense? What you're describing - uses the URL returned from FredJSP. getRedirectURL - is intentional (and was the way things worked back in ADF, FWIW). What should be happening next is that a frameset gets generated where the frame's source is the URL of the desired page - so your dialog does show up. Is that not working? -- Adam On 9/11/07, Bertrand, Shawn R [EMAIL PROTECTED] wrote: (Trinidad 1.0.2 – build from July – the current one). I've migrated our application to use Trinidad, and see some PPR issues that are likely ours, but for the most part everything is working as expected. Except…. We use the dialog framework extensively, and every time we attempt to display one a popup appears but uses the URL returned from FredJSP.getRedirectURL. This happens because the code in CoreRenderKit, when constructing a DialogRequest object, calls usePopupForDialog to determine if the popup is supported. Why wouldn't the passed-in usePopup setting be used? Fortunately for me (at least for now), I added the org.apache.myfaces.trinidadinternal.renderkit.USE_DIALOG_POPUP context parameter to my web.xml and popups are now appearing (though they appear in a dhtml-looking layer instead of the traditional popup dialog (probably a good thing). Note: the Trinidad demo doesn't seem to need this context parameter to display dialogs. Thanks in advance, Shawn Bertrand Tyco Electronics Corporation -- Matthias Wessendorf further stuff: blog: http://matthiaswessendorf.wordpress.com/ mail: matzew-at-apache-dot-org
access to error messages attributes with unitfied EL
Hi all, I know that, within a JSP page, you have access to information about the exception that occurred under several request attribute keys: javax.servlet.error.exception -- the actual exception itself javax.servlet.error.status_code -- the HTTP status code (as a java.lang.Integer) javax.servlet.error.exception_type -- the Class of the exception that was thrown javax.servlet.error.message -- the message string from the exception that was thrown javax.servlet.error.request_uri -- the request URI of the incoming request javax.servlet.error.servlet_name -- the name of the servlet processing the request But if you use JSF facelets, other than using code in a bean doing stuff like: requestMap.get(javax.servlet.error.message); , is there a way to access them in the pag itself using the unified EL? What I've already tried, is: - I tried in y JSF page: #{request.javax.servlet.error.message}, but got this error: /resources/pages/fileNotFound.xhtml: Property 'javax' not found on type org.apache.catalina.core.ApplicationHttpRequest - I cut out the javax... to no avail. - I've then tried: #{request['javax.servlet.error.message']} All failed. Ideas? --Wolf
Re: Dialog issue during ADF-Trinidad migration
Oops. Hope you had a backup. Are the plexus guys aware of it/even better: remedying it? Or is this adressed by the latest M2 2.0.8 version? I'm afraid not: http://jira.codehaus.org/secure/ReleaseNote.jspa?version=13139styleName=TextprojectId=10500Create=Create (don't see any mention of it) Too bad. Apart from this M2 problem, I posted the mail as, when using tr:inputDate, the popup I got caused the missing adf resource error. And to say that I migrated from Tomahawk to Trinidad just because t:inputCalendar kept throwing me errors, gr, not one working date picker component, it's a bummer. You have any idea whether this adf is corrected in MF Core 1.2.1? --Wolf On 27 Dec 2007, at 21:33, Matthias Wessendorf wrote: it is a plexus bug; I managed to fix it, when killing my m2_repo, as far as I remember -M On Dec 27, 2007 7:23 PM, Wolf Benz [EMAIL PROTECTED] wrote: Not here... it's still failing although I have a /faces/* mapping My setup is: MyFaces Core Impl 1.2.0 -- Toma -- Trini 1.2.4 -- facelets I read(google) it is bound to the Core JSF implementation and that it was recently corrected in Sun's own RI. -- does someone know whether it has already been corrected in the MF Core 1.2.1 implementation? Speaking of: while trying to acquire the latest jar from the Apache trunk http://svn.apache.org/repos/asf/myfaces/core/trunk_1.2.x;, when trying to mvn(almost any target), I always get this error: java.lang.NoSuchMethodError: org.codehaus.plexus.util.FileUtils.copyFile(Ljava/io/File;Ljava/io/ File;Ljava/lang/String;[Lorg/codehaus/plexus/util/FileUtils $FilterWrapper;) It seems smth is wrongly referenced/forgotten. Google told me it was an (Apache) config error. As it's still pending, I was wondering: how do other people get this jar? (ideas?) I can hardly imagine I'm the only one trying this ;-) --Wolf On 12 Sep 2007, at 21:46, Bertrand, Shawn R wrote: Thanks, fellas. We did indeed have a *.faces mapping. We now use / faces and all is well! All the best, Shawn From: Adam Winer [mailto:[EMAIL PROTECTED] Sent: Wednesday, September 12, 2007 2:06 PM To: MyFaces Discussion Subject: Re: Dialog issue during ADF-Trinidad migration Yeah, that sounds like the issue. Older versions of the RI, as well as MyFaces 1.2 don't support *.faces mappings well enough for this scenario (I haven't looked into why). -- Adam On 9/12/07, Matthias Wessendorf [EMAIL PROTECTED] wrote: Is it possible, that you are using myfaces 1.2 ? and *.faces mapping ? try, /faces/* as your mapping On 9/12/07, Bertrand, Shawn R [EMAIL PROTECTED] wrote: Thanks for the clarification. Unfortunately, it isn't working in Trinidad as it did in ADF Faces. FredJSP.getRedirectURL generates a baseURL of /nas/__ADFv__.faces?_afPfm =497604ee_t=fred and arguments of {_vir, /jsp/SnmpSsMacDetail.jsp, loc, en-US, _minWidth, _minHeight,}. The second argument is correct and that resource is definitely present in the deployed application. The separate browser window does appear as it used to but it contains an HTTP 404 error with the description The requested resource (/__ADFv__.jsp) is not available.. Thanks again, Shawn Bertrand Tyco Electronics Corporation __ __ From: Adam Winer [mailto:[EMAIL PROTECTED] Sent: Tuesday, September 11, 2007 4:32 PM To: MyFaces Discussion Subject: Re: Dialog issue during ADF-Trinidad migration There's two separate flags here: - useWindow - usePopup If useWindow is false, that means we navigate the whole page to the dialog. Simple enough. If useWindow is true, then we look at usePopup: if it's false, we want to show the dialog in a new browser window. We use FredJSP so that we have a frameset around the dialog view, needed to make sure that context is not lost when you navigate within the dialog. If usePopup is true, we use a DHTML dialog. We don't need FredJSP, since we're putting the dialog in an iframe, and can directly navigate to the page. Does this make sense? What you're describing - uses the URL returned from FredJSP. getRedirectURL - is intentional (and was the way things worked back in ADF, FWIW). What should be happening next is that a frameset gets generated where the frame's source is the URL of the desired page - so your dialog does show up. Is that not working? -- Adam On 9/11/07, Bertrand, Shawn R [EMAIL PROTECTED] wrote: (Trinidad 1.0.2 – build from July – the current one). I've migrated our application to use Trinidad, and see some PPR issues that are likely ours, but for the most part everything is working as expected. Except…. We use the dialog framework extensively, and every time we attempt to display one a popup appears but uses the URL returned from FredJSP.getRedirectURL. This happens because the code in CoreRenderKit, when constructing a DialogRequest object, calls usePopupForDialog to determine if the popup
defreeze MF/Toma evolution
Hi everybody, I was wondering whether anybody knew what the status is w.r.t.the finalization/release of the components needed for a robust, modern JSF1.2 (MyFaces) deploy, i.e. - MF 1.2.1 bugfix release - Tomahawk 2.0 (in par with the above) , these 2 also allowing the run MF +T in combination with acelets without all the problems we have been plagued with so far. (due to e.g. the lack of a complete and correct taglib in Tomahawk's META-INF/ inside teh jar file) As the last release was half a year ago (for T even longer) I thought I might popup this question without being shot. :-) -Wolf
panelGrid causing javax.crypto.BadPaddingException: Given final block not properly padded ?!
Hi all, Has anyone come acrosos this: I have the situation where a user can type some keywords that will be added to a choice list by clicking on a +, and removed from that choice list by clicking on the -. I've put these elements in a choice list, but after entering a word and clicking on the +, I seem to get an error I would never expect (as I don't get its meaning) The page code is: h:panelGrid columns=4 h:selectOneMenu value=#{testOverviewBean.selectedAnalSysDevice} f:selectItems value=#{testOverviewBean.analSystem.devices}/ /h:selectOneMenu h:commandButton value=- action=#{testOverviewBean.removeDeviceFromAnalSys} immediate=true/ h:inputText value=#{testOverviewBean.addedAnalDevice} / h:commandButton value=+ action=#{testOverviewBean.addDeviceToAnalSys} immediate=true/ /h:panelGrid The exception I get, is: javax.faces.FacesException: javax.crypto.BadPaddingException: Given final block not properly padded at org.apache.myfaces.shared_impl.util.StateUtils.symmetric(StateUtils.java:370) at org.apache.myfaces.shared_impl.util.StateUtils.symmetric(StateUtils.java:408) at org.apache.myfaces.shared_impl.util.StateUtils.decrypt(StateUtils.java:288) at org.apache.myfaces.shared_impl.util.StateUtils.reconstruct(StateUtils.java:237) at org.apache.myfaces.renderkit.html.HtmlResponseStateManager.getSavedState(HtmlResponseStateManager.java:170) at org.apache.myfaces.renderkit.html.HtmlResponseStateManager.getState(HtmlResponseStateManager.java:122) at org.apache.myfaces.application.jsp.JspStateManagerImpl.restoreView(JspStateManagerImpl.java:283) at org.apache.myfaces.application.jsp.JspViewHandlerImpl.restoreView(JspViewHandlerImpl.java:354) at com.sun.facelets.FaceletViewHandler.restoreView(FaceletViewHandler.java:316) at org.apache.myfaces.lifecycle.RestoreViewExecutor.execute(RestoreViewExecutor.java:85) at org.apache.myfaces.lifecycle.LifecycleImpl.executePhase(LifecycleImpl.java:95) at org.apache.myfaces.lifecycle.LifecycleImpl.execute(LifecycleImpl.java:70) at javax.faces.webapp.FacesServlet.service(FacesServlet.java:148) at org.apache.catalina.core.ApplicationFilterChain.internalDoFilter(ApplicationFilterChain.java:290) at org.apache.catalina.core.ApplicationFilterChain.doFilter(ApplicationFilterChain.java:206) at org.apache.myfaces.webapp.filter.ExtensionsFilter.doFilter(ExtensionsFilter.java:190) at org.apache.catalina.core.ApplicationFilterChain.internalDoFilter(ApplicationFilterChain.java:235) at org.apache.catalina.core.ApplicationFilterChain.doFilter(ApplicationFilterChain.java:206) at org.apache.catalina.core.StandardWrapperValve.invoke(StandardWrapperValve.java:230) at org.apache.catalina.core.StandardContextValve.invoke(StandardContextValve.java:175) at org.apache.catalina.core.StandardHostValve.invoke(StandardHostValve.java:128) at org.apache.catalina.valves.ErrorReportValve.invoke(ErrorReportValve.java:104) at org.apache.catalina.core.StandardEngineValve.invoke(StandardEngineValve.java:109) at org.apache.catalina.connector.CoyoteAdapter.service(CoyoteAdapter.java:261) at org.apache.coyote.http11.Http11Processor.process(Http11Processor.java:844) at org.apache.coyote.http11.Http11Protocol$Http11ConnectionHandler.process(Http11Protocol.java:581) at org.apache.tomcat.util.net.JIoEndpoint$Worker.run(JIoEndpoint.java:447) at java.lang.Thread.run(Thread.java:613) Caused by: javax.crypto.BadPaddingException: Given final block not properly padded at com.sun.crypto.provider.SunJCE_h.b(DashoA12275) at com.sun.crypto.provider.SunJCE_h.b(DashoA12275) at com.sun.crypto.provider.DESCipher.engineDoFinal(DashoA12275) at javax.crypto.Cipher.doFinal(DashoA12275) at org.apache.myfaces.shared_impl.util.StateUtils.symmetric(StateUtils.java:366) ... 27 more Ps Using MF1.2.1 - Toma 2.0 - facelets 1.1.13
t:selectItems behavior (MF 121 - Facelets1.1.13 - Tomahawk Sandbox 2.0)
Has someone else had trouble with t:selectItems behavior? I have the below code in my page. The setup is: a user account name is picked from a selctOne menu, which has as effect the user is digged up from the DB, a variable person is set in the UserBean (JSF bean) and this person's fields are then shown under the Menu to update. t:selectOneMenu id=personMenu value=#{userMgmtBean.person.account} valueChangeListener=#{userMgmtBean.chooseUserTrigger} onchange=submit() immediate=true f:selectItem itemLabel=Choose One itemValue=choose_one / t:selectItems value=#{utilBean.persons} var=person itemLabel=#{person.firstName}#160;#{person.lastName} itemValue=#{person.account} /t:selectItems /t:selectOneMenu The referenced listener method, chooseUserTrigger of UserBean, digs up the User from the DB. public void chooseUserTrigger(ValueChangeEvent event){ FacesContext ctx = FacesContext.getCurrentInstance(); String gekozenGebruiker = event.getNewValue().toString(); // = the User's NT Account logger.info(The Chosen Person, is + gekozenGebruiker); if(gekozenGebruiker.equalsIgnoreCase(choose_one)) // -- no valid Action has been chosen but Choose One { // Do nothing Exit this loop. return; } // A real user was chosen - dig up all his data: try { // First check: Selected user in DB? setPerson(getFacade().getUserMgmtBD().getPerson(gekozenGebruiker)); // If Person is still null, show error: if(getPerson() == null){// tell the user no such person was found ctx.addMessage(userMgmtForm, new FacesMessage(Util.getSpecificMeToMaBundleValue(usr_noneFound),Util.getSpecificMeToMaBundleValue(usr_noneFound))); } if(getPerson() != null)logger.info(The Person we found, has these data: + person.toString()); } catch (PersistenceException e) { ctx.addMessage(userMgmtForm, new FacesMessage(Util.getSpecificMeToMaBundleValue(usr_err),Util.getSpecificMeToMaBundleValue(usr_err))); e.printStackTrace(); } } The problem: Although the logging(The Person we found, has these data...) shows the correct user with the correct info was digged up, in a blik of an eye, the menu filled with users, refills itself, by itself, with null-items. In the loggings, I also see the person's method setWWID() is called with a null value. (shouldn't be happening, and certainly not with a null value; it's WWID - world Wide ID. Certainly my code is NOT calling it) Anyone experienced the same probs/has an idea on how to remedy? -Wolf
Re: very simple question
In short: there are issues - if you want stable development, stick to MF1.1 for the time being. In long: MF has a 1.2.1 and a Tomahawk v.2.0 (both to be snapshotted) that are meant to work together, but there's far from being final or stable(at least of you use facelets), I run into issues on daily basis (posted another one just today). An added problem is there is no complete and bug-free taglib / jar with taglib for Tomahawk (again, for using with facelets). So, for the time being, I'd wait until Toma 2.0 comes out. Unless you want to get yourself acquainted with the new tech. -Wolf On 10/28/07, apoorve elhence [EMAIL PROTECTED] wrote: Does tomahawk support JSF 1.2. If not, is it being tested. Any timelines (is it just waiting Sun approval on the JSR) __ Do You Yahoo!? Tired of spam? Yahoo! Mail has the best spam protection around http://mail.yahoo.com
Re: Don't use Facelets + MyFaces 2.0 + Tomahawk
you mean MyFaces 1.2 or 2.0 ? -- I tried both MF 1.2.0 and 1.2.1. I'am using Facelets 1.1.13 + MyFaces 1.2.0 + Tomahawk 1.1.6 (+Trinidad 1.2.2) without major problems! -- Try using some Tomahawk components. :-) E.g. t:selectItems t:inputCalendar have (JIRA documented) bugs. Btw I switched to 1.2.1 as 120 had a bug in combination with facelets that was again corrected in 1.2.1. Currently I'm switching back to MF1.1, I have to deliver software and this stack just isn't production material yet, it has slowed me down with 2 months. Perhaps when Tomahawk gets its 2.0 release, but I don;t see too much evolution in that area. Bruno seems the only one to care but currently has a lot other (day-job!) stuff going on. -Wolf
Re: Don't use Facelets + MyFaces 2.0 + Tomahawk
Hi Werner, I hope it too. Toma has some darn fine components if they work. Perhaps the (MF/Toma)site could add some extra cautions in the mean time. Bruno estimates that most bugs don't even require too much work (taglib configuration stuff) but as you say... alltogether for most people it's all these extras that come on top and there's life beyond work too! (Playstation, kids, wife ;-) -Wolf On 10/11/07, Werner Punz [EMAIL PROTECTED] wrote: Wolf Benz schrieb: Perhaps when Tomahawk gets its 2.0 release, but I don;t see too much evolution in that area. Bruno seems the only one to care but currently has a lot other (day-job!) stuff going on. Day job issues are a big problem for many committers currently. My working week currently for instance consists of 60-70 hours just jobs. Anyway, I jope some movement in the Tomahawk area will come soon, I will switch jobs on november the first I will be at Irian from then on, I hope this will give me some opportunities to drive Tomahawk forward, since Irian is a JSF to the core company. I am one of the Tomahawk committers and would love to do some stuff on it, but 60-70 hours average weeks kept me away from any commits. I am sure I am not alone in this area. I am not a tomahawk core person but my hope is that my job switch to Irian will help the project to be driven forward. (one of the reasons for the switch was that I couldnt find any time anymore to do real myfaces work in my current job structure)
Re: Don't use Facelets + MyFaces 2.0 + Tomahawk
I will resume that soon -- Great great great! Wife... and mother-in-law! (she actually believes I am some kind of strange person because spending so many times in front of the computer)... -- I am convinced mothers-in-law will always believe their sons-in-law are weird creatures, if only because their precious daughter chose -of all people- you instead of her. They went to diapers, breast-feeding, teenage horror and ... when all of it finally seemed to come at a presentable end, they run off with someone that doesn't even seem to bother about all the former. (apart from, perhaps the breast-feeding part) We're really drifting off now, although the association between a Tomahawk axe and mother-in-law is usually not that far-fetched :-) -Wolf
Don't use Facelets + MyFaces 2.0 + Tomahawk
It's just to soon. If you try to use Facelets 1.1.13 + MyFaces 2.0 + Tomahawk 1.1.6, whether with the taglibs declared in web.xml, or with the taglibs in the jars -- it does't work. h: and f: tags work fine, but all Tomahawk tags are just not rendered. - My advice: wait, or drop Facelets. Then all works again. -Wolf
MF 120 - Tomahawk 116 - Facelets - Bruno's Facelet Taglib jar (Cf MF Wiki page)
Hi all, Has anyone succeeded in getting t:inputCalendar to work with the above combination? It appears really nothing is rendered... Apart from the libs in mentioned in subject line, this is my page: ?xml version=1.0 encoding=UTF-8 standalone=yes ? !DOCTYPE html PUBLIC -//W3C//DTD XHTML 1.0 Transitional//EN http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd; html xmlns=http://www.w3.org/1999/xhtml; xmlns:f= http://java.sun.com/jsf/core; xmlns:ui=http://java.sun.com/jsf/facelets; xmlns:h=http://java.sun.com/jsf/html; xmlns:s=http://myfaces.apache.org/sandbox; xmlns:t=http://myfaces.apache.org/tomahawk; xmlns:c=http://java.sun.com/jsp/jstl/core; body topmargin=0 leftmargin=0 rightmargin=0 bgcolor=#ff marginheight=0 marginwidth=0 class=body ui:composition template=/resources/pages/MeToMaAppTemplate.xhtml ui:define name =navigation / ui:define name =body div align=center h:form id=studyOverviewForm styleClass=body [snip] h:outputLabel value=Study Summary Data styleClass=titleText/ br/ table class=overviewTable tr td h:panelGrid columns=4 border=0 h:outputLabel value=Study Sponsor: / h:selectOneMenu value=#{studyOverviewBean.study.sponsor} f:selectItem itemLabel=Choose One itemValue=choose_one/ t:selectItems value=#{utilBean.sponsors} var=sponsor itemLabel=#{sponsor} itemValue=#{sponsor}/ /h:selectOneMenu [snip] /h:panelGrid /td td style=border-left-width:1px;border-left-style:solid;border-left-color:black; h:panelGrid columns=2 h:inputText value=#{studyOverviewBean.study.testPhase}/ h:outputLabel value=#160;#160;Planned Start Date/ t:inputCalendar renderAsPopup=true popupButtonString=Click here to show Calendar renderPopupButtonAsImage=true popupDateFormat=dd/MM/ required=true value=#{studyOverviewBean.study.plannedStartDate.date} /t:inputCalendar [snip] /h:panelGrid /td /tr tr [snip] /h:form h:messages styleClass=error/ br/ /div /ui:define /ui:composition /body /html Other Tomahawk components seem to work fine. -Wolf
Re: t:inputCalendar and StreamingAddResource
I'm using MF 1.2.0 and Facelets and Tomahawk 1.1.6 nd t:inputCalendar doesn't even renders! I posted a question on this yesterday but I've gotten no feedback yet so I guess either no one tested this, or no one uses it already with this combination :-) -Wolf On 8/7/07, Nicu Mercioiu [EMAIL PROTECTED] wrote: I'm building an application using myfaces orchestra. First I've used DefaultAddResource but there seems to be a conflict with orchestra so I've moved to StreamingAddResource but does not confer good results for t:inputCalendar. Does anybody have a clue about this? On 8/7/07, Nicu Mercioiu [EMAIL PROTECTED] wrote: Did someone successfully used t:inputCalendar (renderAsPopup=true) with StreamingAddResource? In my case there is a big space on the page after closing the popup.
anyone succeeded to render the t:inputCalendar? (MF 1.2.0 - Facelets - Tomahawk 1.1.6)
Has anyone any success with the t:inputCalendar using this setup? I think I did everything required: I set up the extensionsFilter, I declared the t-tag, added the Tomahawk-faclet taglib, ... The element in the page, in a panelGrid, looks like this: h:panelGrid columns=2 h:outputLabel value=#160;#160;Planned Start Date/ t:inputCalendar renderAsPopup=true popupButtonString=Click here to show Calendar renderPopupButtonAsImage=true popupDateFormat=dd/MM/ required=true value=#{studyOverviewBean.study.plannedStartDate.date} /t:inputCalendar I also checked the Toma example (calendar.jsp - this uses a diff setup though; no facelets and most probabely not yet tested with MF 1.2.0 ?) can someone throw me a bone here? :-) -Wolf Ps Ext Filer declaration: filter filter-nameJSFExtraResourcesExtensionsFilter/filter-name filter-classorg.apache.myfaces.webapp.filter.ExtensionsFilter/filter-class init-param descriptionSet the size limit for uploaded files. Format: 10 - 10 bytes 10k - 10 KB 10m - 10 MB 1g - 1 GB /description param-nameuploadMaxFileSize/param-name param-value100m/param-value /init-param init-param descriptionSet the threshold size - files below this limit are stored in memory, files above this limit are stored on disk. Format: 10 - 10 bytes 10k - 10 KB 10m - 10 MB 1g - 1 GB /description param-nameuploadThresholdSize/param-name param-value100k/param-value /init-param /filter filter-mapping filter-nameJSFExtraResourcesExtensionsFilter/filter-name !-- servlet-name must match the name of your javax.faces.webapp.FacesServlet entry -- servlet-nameFaces Servlet/servlet-name /filter-mapping filter-mapping filter-nameJSFExtraResourcesExtensionsFilter/filter-name url-pattern/faces/myFacesExtensionResource/*/url-pattern /filter-mapping
Re: SelectItem style
Settting the style (styleClass or style attribute) in the parent element (e.g. the SelectOneMenu wrapping tehe selectItems) doesn't do the trick? -Wolf On 8/23/07, [EMAIL PROTECTED] [EMAIL PROTECTED] wrote: Hi all, I would like to set the style of my SelectItems in a HtmlSelectManyListbox. Is there a way to do it ? Greetings Matze _ Der WEB.DE SmartSurfer hilft bis zu 70% Ihrer Onlinekosten zu sparen! http://smartsurfer.web.de/?mc=100071distributionid=0066
Re: Eclipse Bug ID for Faclets Support
Just voted +1 for motivating people to go there. I also posted a extra comment, apparently currently it's scheduled for WTP v3. I think it would be easy to include it earlier in one if the incremental v2 releases. (as all tech is already there working for JSP) -Wolf On 8/7/07, David Delbecq [EMAIL PROTECTED] wrote: Could be useful, indeed :) En l'instant précis du 07/08/07 08:35, Burghard Britzke s'exprimait en ces termes: There is a bug listet in Eclipse Bugzilla for faclets code completion in their xhtml editor. you are invited to vote for it. https://bugs.eclipse.org/bugs/show_bug.cgi?id=192393 -- David Delbecq Institut Royal Météorologique Ext:518
Re: Eclipse Bug ID for Faclets Support
I agree. Eclipse already is a plugin soup, don't wanne make that worse. It's natural place is also WTP. -W On 8/7/07, David Delbecq [EMAIL PROTECTED] wrote: For myself, exadel studio is far too heavy to run. When i edit a facelets file that has quite a lot of includes, i sometimes have to wait up to 20 second for the character i typed to display. I have no idea what exadel tries to do during that time. Also, sometine i have to go to .metadata and remove com.exadel.* because some component is deadlocking at eclipse startup. Only things exadel is still usefull to me are 1) edit small facelet files 2) autocompletion in hibernate files :) PS: have 1G memory En l'instant précis du 07/08/07 09:48, Adrian Mitev s'exprimait en ces termes: Exadel Studio is now free and it offers full facelets support 2007/8/7, Wolf Benz [EMAIL PROTECTED] mailto:[EMAIL PROTECTED]: Just voted +1 for motivating people to go there. I also posted a extra comment, apparently currently it's scheduled for WTP v3. I think it would be easy to include it earlier in one if the incremental v2 releases. (as all tech is already there working for JSP) -Wolf On 8/7/07, David Delbecq [EMAIL PROTECTED] mailto:[EMAIL PROTECTED] wrote: Could be useful, indeed :) En l'instant précis du 07/08/07 08:35, Burghard Britzke s'exprimait en ces termes: There is a bug listet in Eclipse Bugzilla for faclets code completion in their xhtml editor. you are invited to vote for it. https://bugs.eclipse.org/bugs/show_bug.cgi?id=192393 -- David Delbecq Institut Royal Météorologique Ext:518 -- http://www.noooxml.org/
Sanbox - Up to date Taglib descriptor
Hi List, Does anyone have a up-to-date taglib file for sandbox bny any chance? I wanted to use h:inputText required=true size=20 value=#{loginbean.user.WWID} id=username s:convertNumber destType=java.lang.Long / /h:inputText [WWID = world wide ID; 8 digits long] To convert the String to a Long, but I got the exception saying /index.xhtml @78,54 s:convertNumber Tag Library supports namespace: http://myfaces.apache.org/sandbox, but no tag was defined for name: convertNumber And with reason; I took a look and convertBoolean is there; convertNumer isn't. What would also help me, is if some knows how to add, in that sandbox file, the tag info like for convertBoolean: tag tag-nameconvertBoolean/tag-name converter converter-idorg.apache.myfaces.custom.convertboolean.BooleanConverter/converter-id /converter /tag but then for convertNumber. I checked on the MF site (http://wiki.java.net/bin/view/Projects/FaceletsTaglibsMyfacesSandbox) but there as well, it's not taken in the list. - should be updated. Btw I hope I get it right in thinking it also converts captured info from the user, to convert it before it goes back to the back-end? (i.e. not only for rendering info coming from the BE) -Wolf
Re: Sanbox - Up to date Taglib descriptor
Sorry for the Title Typo - I obviously meant sandbox :-) (which is apparently where my typing skills reside ;-) - Wolf On 8/7/07, Wolf Benz [EMAIL PROTECTED] wrote: Hi List, Does anyone have a up-to-date taglib file for sandbox bny any chance? I wanted to use h:inputText required=true size=20 value=#{loginbean.user.WWID} id=username s:convertNumber destType=java.lang.Long / /h:inputText [WWID = world wide ID; 8 digits long] To convert the String to a Long, but I got the exception saying /index.xhtml @78,54 s:convertNumber Tag Library supports namespace: http://myfaces.apache.org/sandbox, but no tag was defined for name: convertNumber And with reason; I took a look and convertBoolean is there; convertNumer isn't. What would also help me, is if some knows how to add, in that sandbox file, the tag info like for convertBoolean: tag tag-nameconvertBoolean/tag-name converter converter-idorg.apache.myfaces.custom.convertboolean.BooleanConverter/converter-id /converter /tag but then for convertNumber. I checked on the MF site (http://wiki.java.net/bin/view/Projects/FaceletsTaglibsMyfacesSandbox) but there as well, it's not taken in the list. - should be updated. Btw I hope I get it right in thinking it also converts captured info from the user, to convert it before it goes back to the back-end? (i.e. not only for rendering info coming from the BE) -Wolf
SelectOneMenu Enums in items var possible?
Hi List, Does anyone know whether you can load an Enum into a SelectOneMenu's items variable? So smth like: h:selectOneMenu value=#{jsfBean.beanVar.varOfEnumType} f:selectItem itemLabel=#{labels.choose_one} itemValue=choose_one/ f:selectItems value=#{jsfBean.model.EnumClass} / /h:selectOneMenu -Wolf
Re: SelectOneMenu Enums in items var possible?
I just discover there is a class called java.lang.EnumSet. Sandeep - have you tried that already? -Wolf On 8/7/07, sandeep gururaj [EMAIL PROTECTED] wrote: Well, I haven't been lucky! If it is possible, do let me know so that I can re-factor my code. ~Sandeep -Original Message- From: Wolf Benz [mailto:[EMAIL PROTECTED] Sent: Tuesday, August 07, 2007 5:40 PM To: MyFaces Discussion Subject: SelectOneMenu Enums in items var possible? Hi List, Does anyone know whether you can load an Enum into a SelectOneMenu's items variable? So smth like: h:selectOneMenu value=#{jsfBean.beanVar.varOfEnumType} f:selectItem itemLabel=#{labels.choose_one} itemValue=choose_one/ f:selectItems value=#{jsfBean.model.EnumClass} / /h:selectOneMenu -Wolf
MF1.2.0 faces: no Images rendered?
Hi List, Has anyone tried the combination Facelets + MF1.2.0 and rendering an image? Setup: I keep all my pics in /WEB-INF/resources/pics (and then per Use Case subfolders) I've tried with both style elements on the HTML element itself, like for Table Data: style=background-image:url('/WEB-INF/resources/pics/metal.jpg'); ... and with the HTML img element, like e.g.: img src=/WEB-INF/resources/pics/login/frame_hr.gif alt=pic border=0 height=13 vspace=8 width=412 / But both fail. The paths are right; Eclipse renders all well in it's Web Page editor view. (btw I'm using Tomcat 6.0.13, Java 5, on OSX) -Wolf
Re: MF1.2.0 faces: no Images rendered?
No? - I'll try that, just a sec. -Wolf. On 8/6/07, Fleischer Peter [EMAIL PROTECTED] wrote: Just a quick thought, but I think Tomcat doesn't allow access to WEB-INF folder via HTTP. Peter -Ursprüngliche Nachricht- Von: Wolf Benz [mailto:[EMAIL PROTECTED] Gesendet: Montag, 6. August 2007 12:38 An: users@myfaces.apache.org Betreff: MF1.2.0 faces: no Images rendered? Hi List, Has anyone tried the combination Facelets + MF1.2.0 and rendering an image? Setup: I keep all my pics in /WEB-INF/resources/pics (and then per Use Case subfolders) I've tried with both style elements on the HTML element itself, like for Table Data: style=background-image:url('/WEB-INF/resources/pics/metal.jpg'); ... and with the HTML img element, like e.g.: img src=/WEB-INF/resources/pics/login/frame_hr.gif alt=pic border=0 height=13 vspace=8 width=412 / But both fail. The paths are right; Eclipse renders all well in it's Web Page editor view. (btw I'm using Tomcat 6.0.13, Java 5, on OSX) -Wolf
Re: MF1.2.0 faces: no Images rendered?
Peter was right - I moved all pics to /resources/pics from /WEB-INF/resources/pics, now all works. And what is the exact reason for this? I thought all you put under /WEB-INF is secret for the *outside*, but that yoru own resources (pages e.g.) could still access it! -Wolf On 8/6/07, Matthias Wessendorf [EMAIL PROTECTED] wrote: no! /web-inf/web.xml (or web-inf/faces-config) you are not interested in serving them. -M On 8/6/07, Wolf Benz [EMAIL PROTECTED] wrote: No? - I'll try that, just a sec. -Wolf. On 8/6/07, Fleischer Peter [EMAIL PROTECTED] wrote: Just a quick thought, but I think Tomcat doesn't allow access to WEB-INF folder via HTTP. Peter -Ursprüngliche Nachricht- Von: Wolf Benz [mailto:[EMAIL PROTECTED] Gesendet: Montag, 6. August 2007 12:38 An: users@myfaces.apache.org Betreff: MF1.2.0 faces: no Images rendered? Hi List, Has anyone tried the combination Facelets + MF1.2.0 and rendering an image? Setup: I keep all my pics in /WEB-INF/resources/pics (and then per Use Case subfolders) I've tried with both style elements on the HTML element itself, like for Table Data: style=background-image:url('/WEB-INF/resources/pics/metal.jpg'); ... and with the HTML img element, like e.g.: img src=/WEB-INF/resources/pics/login/frame_hr.gif alt=pic border=0 height=13 vspace=8 width=412 / But both fail. The paths are right; Eclipse renders all well in it's Web Page editor view. (btw I'm using Tomcat 6.0.13, Java 5, on OSX) -Wolf -- Matthias Wessendorf further stuff: blog: http://matthiaswessendorf.wordpress.com/ mail: matzew-at-apache-dot-org
Re: EL 2 Ref/Tut
Bruno/List, On a PageNotFound page, showing Error message: The requested File is not Found: #{request.requestURI} ... has little use (just found out the obvious) as obviously THIS request is not the one for the page he couldn't find... :-) - Is there a way in EL2 to do stuff like in javascript with the history -1 etc? As in fact what I want to show on that page, is smth like (ficticious) Error message: The requested File is not Found: #{request.previousRequestURI} -Wolf On 8/3/07, Bruno Aranda [EMAIL PROTECTED] wrote: You can use implicit objects such as request, session and header with Facelets too, so #{request.requestURI} should be perfectly valid, but of course, you can always go through facesContext which brings a world of possibilities :-) Cheers, Bruno On 03/08/07, Wolf Benz [EMAIL PROTECTED] wrote: If you are in a JSP view handler, JSP implicit variable are accessible. -- I'm not - I'm a fresh facelets convert! However if you are not in JSP context (eg using Facelets as view handler) am not sure session, request, headers, etc are available. -- Well, they must be, I guess, although I'm not sure how directlyt really. Like whether #{request.requestURI} will do, or whether I would have to do: e.g. #{facesContext.externalContext.session.request.requestURI} -Wolf En l'instant précis du 03/08/07 09:19, Wolf Benz s'exprimait en ces termes: David, In the doc I found that you could get to the session via #{facesContext.externalContext.session} Are session request accessible *directly* as well? To do simple stuff like e.g. #{request.requestURI} (would this work?) -Wolf On 8/3/07, Wolf Benz [EMAIL PROTECTED] wrote: Thx David - that was what I was looking for! -Wolf On 8/3/07, David Delbecq [EMAIL PROTECTED] wrote: http://www.coreservlets.com/JSF-Tutorial/ Section 4 But it's not complete. En l'instant précis du 02/08/07 21:43, Wolf Benz s'exprimait en ces termes: That one I had :-) I hoped someone might have made a typical dev's summary (By that I mean cut the crap, just the rules and e few examples-ish.) -Wolf On 8/2/07, David Delbecq [EMAIL PROTECTED] wrote: http://java.sun.com/javaee/5/docs/tutorial/doc/JavaEETutorial.pdf html version: http://java.sun.com/javaee/5/docs/tutorial/doc/ Search for implicit objets and take also a look at Chapter 4: JavaServer Pages Technology - Unified Expression Language Wolf Benz a écrit : Hi List, Does anyone know of a nice Intro/Ref/Tutorial to EL v2? (with stuff like: what is new, what implicit objects can be used, like request and its instance vars like request.requestURI etc) -Wolf -- http://www.noooxml.org/ -- http://www.noooxml.org/
Re: EL 2 Ref/Tut
Thx David - that was what I was looking for! -Wolf On 8/3/07, David Delbecq [EMAIL PROTECTED] wrote: http://www.coreservlets.com/JSF-Tutorial/ Section 4 But it's not complete. En l'instant précis du 02/08/07 21:43, Wolf Benz s'exprimait en ces termes: That one I had :-) I hoped someone might have made a typical dev's summary (By that I mean cut the crap, just the rules and e few examples-ish.) -Wolf On 8/2/07, David Delbecq [EMAIL PROTECTED] wrote: http://java.sun.com/javaee/5/docs/tutorial/doc/JavaEETutorial.pdf html version: http://java.sun.com/javaee/5/docs/tutorial/doc/ Search for implicit objets and take also a look at Chapter 4: JavaServer Pages Technology - Unified Expression Language Wolf Benz a écrit : Hi List, Does anyone know of a nice Intro/Ref/Tutorial to EL v2? (with stuff like: what is new, what implicit objects can be used, like request and its instance vars like request.requestURI etc) -Wolf -- http://www.noooxml.org/
Re: EL 2 Ref/Tut
David, In the doc I found that you could get to the session via #{facesContext.externalContext.session} Are session request accessible *directly* as well? To do simple stuff like e.g. #{request.requestURI} (would this work?) -Wolf On 8/3/07, Wolf Benz [EMAIL PROTECTED] wrote: Thx David - that was what I was looking for! -Wolf On 8/3/07, David Delbecq [EMAIL PROTECTED] wrote: http://www.coreservlets.com/JSF-Tutorial/ Section 4 But it's not complete. En l'instant précis du 02/08/07 21:43, Wolf Benz s'exprimait en ces termes: That one I had :-) I hoped someone might have made a typical dev's summary (By that I mean cut the crap, just the rules and e few examples-ish.) -Wolf On 8/2/07, David Delbecq [EMAIL PROTECTED] wrote: http://java.sun.com/javaee/5/docs/tutorial/doc/JavaEETutorial.pdf html version: http://java.sun.com/javaee/5/docs/tutorial/doc/ Search for implicit objets and take also a look at Chapter 4: JavaServer Pages Technology - Unified Expression Language Wolf Benz a écrit : Hi List, Does anyone know of a nice Intro/Ref/Tutorial to EL v2? (with stuff like: what is new, what implicit objects can be used, like request and its instance vars like request.requestURI etc) -Wolf -- http://www.noooxml.org/
Re: EL 2 Ref/Tut
If you are in a JSP view handler, JSP implicit variable are accessible. -- I'm not - I'm a fresh facelets convert! However if you are not in JSP context (eg using Facelets as view handler) am not sure session, request, headers, etc are available. -- Well, they must be, I guess, although I'm not sure how directlyt really. Like whether #{request.requestURI} will do, or whether I would have to do: e.g. #{facesContext.externalContext.session.request.requestURI} -Wolf En l'instant précis du 03/08/07 09:19, Wolf Benz s'exprimait en ces termes: David, In the doc I found that you could get to the session via #{facesContext.externalContext.session} Are session request accessible *directly* as well? To do simple stuff like e.g. #{request.requestURI} (would this work?) -Wolf On 8/3/07, Wolf Benz [EMAIL PROTECTED] wrote: Thx David - that was what I was looking for! -Wolf On 8/3/07, David Delbecq [EMAIL PROTECTED] wrote: http://www.coreservlets.com/JSF-Tutorial/ Section 4 But it's not complete. En l'instant précis du 02/08/07 21:43, Wolf Benz s'exprimait en ces termes: That one I had :-) I hoped someone might have made a typical dev's summary (By that I mean cut the crap, just the rules and e few examples-ish.) -Wolf On 8/2/07, David Delbecq [EMAIL PROTECTED] wrote: http://java.sun.com/javaee/5/docs/tutorial/doc/JavaEETutorial.pdf html version: http://java.sun.com/javaee/5/docs/tutorial/doc/ Search for implicit objets and take also a look at Chapter 4: JavaServer Pages Technology - Unified Expression Language Wolf Benz a écrit : Hi List, Does anyone know of a nice Intro/Ref/Tutorial to EL v2? (with stuff like: what is new, what implicit objects can be used, like request and its instance vars like request.requestURI etc) -Wolf -- http://www.noooxml.org/ -- http://www.noooxml.org/
Re: EL 2 Ref/Tut
I'm starting to fall in love with ELv2! :-) Thx Bruno, -Wolf On 8/3/07, Bruno Aranda [EMAIL PROTECTED] wrote: You can use implicit objects such as request, session and header with Facelets too, so #{request.requestURI} should be perfectly valid, but of course, you can always go through facesContext which brings a world of possibilities :-) Cheers, Bruno On 03/08/07, Wolf Benz [EMAIL PROTECTED] wrote: If you are in a JSP view handler, JSP implicit variable are accessible. -- I'm not - I'm a fresh facelets convert! However if you are not in JSP context (eg using Facelets as view handler) am not sure session, request, headers, etc are available. -- Well, they must be, I guess, although I'm not sure how directlyt really. Like whether #{request.requestURI} will do, or whether I would have to do: e.g. #{facesContext.externalContext.session.request.requestURI} -Wolf En l'instant précis du 03/08/07 09:19, Wolf Benz s'exprimait en ces termes: David, In the doc I found that you could get to the session via #{facesContext.externalContext.session} Are session request accessible *directly* as well? To do simple stuff like e.g. #{request.requestURI} (would this work?) -Wolf On 8/3/07, Wolf Benz [EMAIL PROTECTED] wrote: Thx David - that was what I was looking for! -Wolf On 8/3/07, David Delbecq [EMAIL PROTECTED] wrote: http://www.coreservlets.com/JSF-Tutorial/ Section 4 But it's not complete. En l'instant précis du 02/08/07 21:43, Wolf Benz s'exprimait en ces termes: That one I had :-) I hoped someone might have made a typical dev's summary (By that I mean cut the crap, just the rules and e few examples-ish.) -Wolf On 8/2/07, David Delbecq [EMAIL PROTECTED] wrote: http://java.sun.com/javaee/5/docs/tutorial/doc/JavaEETutorial.pdf html version: http://java.sun.com/javaee/5/docs/tutorial/doc/ Search for implicit objets and take also a look at Chapter 4: JavaServer Pages Technology - Unified Expression Language Wolf Benz a écrit : Hi List, Does anyone know of a nice Intro/Ref/Tutorial to EL v2? (with stuff like: what is new, what implicit objects can be used, like request and its instance vars like request.requestURI etc) -Wolf -- http://www.noooxml.org/ -- http://www.noooxml.org/
Re: MF1.2.0 + Facelets XML Parsing Error
Ah, I smell a MF 1.2.1 along the corner ;-) -Wolf On 8/2/07, Werner Punz [EMAIL PROTECTED] wrote: Wolf Benz schrieb: Ha, that was a community effort really: It is based upon efforts - from my last project - help from Werner (who wickedly convinced me to use facelets and helped me sorting out the libs, remember the Tomahawk dependency/EL issues) - help from Bruno, for whom I reviewed his Facelets Chapter (upcoming book of Martin Bruno God knows who ;-) on JSF1.2 and from which I could borrow + understand how templating etc works and how to make a JSF + Facelets project from an old JSP project. ... as for the latter: I have promised Martin not to disclose any source material(for obvious copyright reasons) of it, so you'd really have to ask Bruno. But: as for Werner's help: he made a kickstarter project(MF-Facelets) that I tested and which works now. I thought he already put it on the Wiki ? @Werner: wasn't that your intention? Intention = yes Time = so far no, but I soon will have vacation which means more time for myfaces
EL 2 Ref/Tut
Hi List, Does anyone know of a nice Intro/Ref/Tutorial to EL v2? (with stuff like: what is new, what implicit objects can be used, like request and its instance vars like request.requestURI etc) -Wolf
Re: EL 2 Ref/Tut
That one I had :-) I hoped someone might have made a typical dev's summary (By that I mean cut the crap, just the rules and e few examples-ish.) -Wolf On 8/2/07, David Delbecq [EMAIL PROTECTED] wrote: http://java.sun.com/javaee/5/docs/tutorial/doc/JavaEETutorial.pdf html version: http://java.sun.com/javaee/5/docs/tutorial/doc/ Search for implicit objets and take also a look at Chapter 4: JavaServer Pages Technology - Unified Expression Language Wolf Benz a écrit : Hi List, Does anyone know of a nice Intro/Ref/Tutorial to EL v2? (with stuff like: what is new, what implicit objects can be used, like request and its instance vars like request.requestURI etc) -Wolf
Re: MF1.2.0 + Facelets XML Parsing Error
Hi Werner, Bruno solved my problem yesterday: - I had a PageNotFound.jsp page but as you see, forgot to call it *.xhtml. (inherited extension of last project...) - The path in my faces-config was /resources/pages instead of /WEB-INF/resources/pages These 2 combined give: the loginPage gave a PageNotFound error, but the PageNotFound page wasn't rendered ... So: I adapted that path, renamed the page's extension and I was set to go. I'm learning... :-) -Wolf On 8/1/07, Werner Punz [EMAIL PROTECTED] wrote: Hi wolf, just asking conincidentally did you call the page with xhtml extension, if yes, call it with the jsf extension, otherwise you wont trigger jsf or the facelets. Cheers Werner Wolf Benz schrieb: Hi Bruno, No, it's not, I just stripped a little too much in teh copy-paste to mail. :-) This is the entire page: ?xml version=1.0 encoding=UTF-8 standalone=yes ? !DOCTYPE html PUBLIC -//W3C//DTD XHTML 1.0 Transitional//EN http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd; html xmlns=http://www.w3.org/1999/xhtml; xmlns:f= http://java.sun.com/jsf/core; xmlns:h=http://java.sun.com/jsf/html; xmlns:ui=http://java.sun.com/jsf/facelets; xmlns:t=http://myfaces.apache.org/tomahawk; ui:removeBtw this declares html as the default namespace/ui:remove body Text outside the ui-composition tags will not be displayed. ui:composition template=template.xhtml Text in between de ui:composite en ui:define tags will not be displayed either. ui:removeThis is the way to edit comments with Facelets./ui:remove ui:define name=header LoginPage title /ui:define ui:define name=body This is clear text: Hello everyone. h1This is a html tag /h1 h:outputText value=This is a string from an outputText / /ui:define /ui:composition /body /html On 7/31/07, Bruno Aranda [EMAIL PROTECTED] wrote: In the login page, where are you opening the ui:composition tag? Seems to be missing right? Hope this is the problem, Cheers, Bruno On 31/07/07, Wolf Benz [EMAIL PROTECTED] wrote: Hi everybody, I get this error(@loginPage.xhtml) after my first page(index.xhtml) renders correctly - anyone an idea as to the why? XML Parsing Error: no element found Location: http://localhost:8080/MeToMa/index.xhtml Line Number 1, Column 1: (in FF; in other browsers I get just a blank page) My setup: template.xhtml: ... body f:view h:form ui:insert name=headerDefault Header/ui:insert ui:insert name=navigationDefault navigation/ui:insert ui:insert name=bodyDefault Body/ui:insert ui:insert name=messagesDefault Messages/ui:insert ui:insert name=footerDefault Footer/ui:insert /h:form /f:view /body /html index.xhtml (rendering OK) body ui:composition template=/WEB-INF/resources/pages/template.xhtml ui:define name=navigation ui:include src=/WEB-INF/resources/pages/menu.xhtml/ /ui:define /ui:composition /body with menu.xhtml (rendering OK) ui:composition h3UC Picker/h3 hr/ h:panelGrid columns=1 h:commandLink value=Home action=loginPage / h:commandLink value=Page1 action=page1 / h:commandLink value=page2 action=page2 / /h:panelGrid /ui:composition and loginPage(giving me the error) ... body ui:define name=header LoginPage title /ui:define ui:define name=body This is clear text: Hello everyone. h1This is a html tag /h1 h:outputText value=This is a string from an outputText / /ui:define /ui:composition /body /html
Re: [Tomahawk] facelets
I talked about this with Werner Punz...I thought: why not putting this file right away in the meta-inf of the Tomahawk jar? Won't harm nobody but will certainly help a lot of people. Although I still subscribe to that idea, he had a point also: MF and facelets are indeed 2 different technologies, better keep the 2 apart. Yet, it's another thing we can';tr forget to set up and currently the file @MF Wiki is indeed to be stitched together manually with is kinda funny (unprofessional). I think there is room for improvement, either in the form of a facelets-integrated download. (so Toma Sandbox WITH the taglibs in their meta-in dirs) or at least another entry in the download table just for facelets: a link to the jsf-facelts.jar, and 2 links, to the respective taglib files. This, for me, would seem to be its logical place. -Wolf On 7/31/07, Erlend Hamnaberg [EMAIL PROTECTED] wrote: does anyone have an updated tomahawk.taglib.xml ? The one at the wiki does not seem updated. Will Myfaces add full facelets support to its custom components? Regards Erlend
MF Facelets XML Parsing Error: no element found error
Hi guys, I get this error(@loginPage.xhtml) after my first page(index.xhtml) renders correctly - anyone an idea as to the why? XML Parsing Error: no element found Location: http://localhost:8080/MeToMa/index.xhtml Line Number 1, Column 1: My setup: template.xhtml: ... body f:view h:form ui:insert name=headerDefault Header/ui:insert ui:insert name=navigationDefault navigation/ui:insert ui:insert name=bodyDefault Body/ui:insert ui:insert name=messagesDefault Messages/ui:insert ui:insert name=footerDefault Footer/ui:insert /h:form /f:view /body /html index.xhtml (rendering OK) body ui:composition template=/WEB-INF/resources/pages/template.xhtml ui:define name=navigation ui:include src=/WEB-INF/resources/pages/menu.xhtml/ /ui:define /ui:composition /body with menu.xhtml (rendering OK) ui:composition h3UC Picker/h3 hr/ h:panelGrid columns=1 h:commandLink value=Home action=loginPage / h:commandLink value=Page1 action=page1 / h:commandLink value=page2 action=page2 / /h:panelGrid /ui:composition and loginPage(giving me the error) ... body ui:define name=header LoginPage title /ui:define ui:define name=body This is clear text: Hello everyone. h1This is a html tag /h1 h:outputText value=This is a string from an outputText / /ui:define /ui:composition /body /html
Re: [Tomahawk] facelets
Thx Alexander, For what Tomahawk version is this? (116/117?) -Wolf On 7/31/07, Bruno Aranda [EMAIL PROTECTED] wrote: It is probably that the next major version of tomahawk (the one explicitly created for jsf 1.2) will integrate the facelets taglib generation in the build process, as it will take advantage of the code generation of the trinidad's maven-faces-plugin. In the meanwhile, I use this library (implemented by myself): http://people.apache.org/~baranda/tomahawk-facelets-1.0.jar Feel free to use it, apache license... Cheers, Bruno On 31/07/07, Jesse Alexander (KSFD 121) [EMAIL PROTECTED] wrote: instead of supplying two taglib-files... just create two jar-files with nothing more in it, than the two taglib files... Then the deployment of the two jar-files is enough, whereas the deployment of the two taglib-files requires additional work from the user... regards Alexander From: Wolf Benz [mailto:[EMAIL PROTECTED] Sent: Tuesday, July 31, 2007 11:56 AM To: MyFaces Discussion Subject: Re: [Tomahawk] facelets I talked about this with Werner Punz... I thought: why not putting this file right away in the meta-inf of the Tomahawk jar? Won't harm nobody but will certainly help a lot of people. Although I still subscribe to that idea, he had a point also: MF and facelets are indeed 2 different technologies, better keep the 2 apart. Yet, it's another thing we can';tr forget to set up and currently the file @MF Wiki is indeed to be stitched together manually with is kinda funny (unprofessional). I think there is room for improvement, either in the form of a facelets-integrated download. (so Toma Sandbox WITH the taglibs in their meta-in dirs) or at least another entry in the download table just for facelets: a link to the jsf-facelts.jar, and 2 links, to the respective taglib files. This, for me, would seem to be its logical place. -Wolf On 7/31/07, Erlend Hamnaberg [EMAIL PROTECTED] wrote: does anyone have an updated tomahawk.taglib.xml ? The one at the wiki does not seem updated. Will Myfaces add full facelets support to its custom components? Regards Erlend
MF1.2.0 + Facelets XML Parsing Error
Hi everybody, I get this error(@loginPage.xhtml) after my first page(index.xhtml) renders correctly - anyone an idea as to the why? XML Parsing Error: no element found Location: http://localhost:8080/MeToMa/index.xhtml Line Number 1, Column 1: (in FF; in other browsers I get just a blank page) My setup: template.xhtml: ... body f:view h:form ui:insert name=headerDefault Header/ui:insert ui:insert name=navigationDefault navigation/ui:insert ui:insert name=bodyDefault Body/ui:insert ui:insert name=messagesDefault Messages/ui:insert ui:insert name=footerDefault Footer/ui:insert /h:form /f:view /body /html index.xhtml (rendering OK) body ui:composition template=/WEB-INF/resources/pages/template.xhtml ui:define name=navigation ui:include src=/WEB-INF/resources/pages/menu.xhtml/ /ui:define /ui:composition /body with menu.xhtml (rendering OK) ui:composition h3UC Picker/h3 hr/ h:panelGrid columns=1 h:commandLink value=Home action=loginPage / h:commandLink value=Page1 action=page1 / h:commandLink value=page2 action=page2 / /h:panelGrid /ui:composition and loginPage(giving me the error) ... body ui:define name=header LoginPage title /ui:define ui:define name=body This is clear text: Hello everyone. h1This is a html tag /h1 h:outputText value=This is a string from an outputText / /ui:define /ui:composition /body /html
Re: MF1.2.0 + Facelets XML Parsing Error
Hi Bruno, No, it's not, I just stripped a little too much in teh copy-paste to mail. :-) This is the entire page: ?xml version=1.0 encoding=UTF-8 standalone=yes ? !DOCTYPE html PUBLIC -//W3C//DTD XHTML 1.0 Transitional//EN http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd; html xmlns=http://www.w3.org/1999/xhtml; xmlns:f= http://java.sun.com/jsf/core; xmlns:h=http://java.sun.com/jsf/html; xmlns:ui=http://java.sun.com/jsf/facelets; xmlns:t=http://myfaces.apache.org/tomahawk; ui:removeBtw this declares html as the default namespace/ui:remove body Text outside the ui-composition tags will not be displayed. ui:composition template=template.xhtml Text in between de ui:composite en ui:define tags will not be displayed either. ui:removeThis is the way to edit comments with Facelets./ui:remove ui:define name=header LoginPage title /ui:define ui:define name=body This is clear text: Hello everyone. h1This is a html tag /h1 h:outputText value=This is a string from an outputText / /ui:define /ui:composition /body /html On 7/31/07, Bruno Aranda [EMAIL PROTECTED] wrote: In the login page, where are you opening the ui:composition tag? Seems to be missing right? Hope this is the problem, Cheers, Bruno On 31/07/07, Wolf Benz [EMAIL PROTECTED] wrote: Hi everybody, I get this error(@loginPage.xhtml) after my first page(index.xhtml) renders correctly - anyone an idea as to the why? XML Parsing Error: no element found Location: http://localhost:8080/MeToMa/index.xhtml Line Number 1, Column 1: (in FF; in other browsers I get just a blank page) My setup: template.xhtml: ... body f:view h:form ui:insert name=headerDefault Header/ui:insert ui:insert name=navigationDefault navigation/ui:insert ui:insert name=bodyDefault Body/ui:insert ui:insert name=messagesDefault Messages/ui:insert ui:insert name=footerDefault Footer/ui:insert /h:form /f:view /body /html index.xhtml (rendering OK) body ui:composition template=/WEB-INF/resources/pages/template.xhtml ui:define name=navigation ui:include src=/WEB-INF/resources/pages/menu.xhtml/ /ui:define /ui:composition /body with menu.xhtml (rendering OK) ui:composition h3UC Picker/h3 hr/ h:panelGrid columns=1 h:commandLink value=Home action=loginPage / h:commandLink value=Page1 action=page1 / h:commandLink value=page2 action=page2 / /h:panelGrid /ui:composition and loginPage(giving me the error) ... body ui:define name=header LoginPage title /ui:define ui:define name=body This is clear text: Hello everyone. h1This is a html tag /h1 h:outputText value=This is a string from an outputText / /ui:define /ui:composition /body /html
Re: facelets 7 MyFaces error: javax/el/ELResolver
Doesn't facelets need this then?Or is it covered by commons-el? Or is commons-el an implementation of the EL-API? (which would suggest to only keep commons-el and EL-api. But this doesn;t work, tried that already.) I don't know what to do with all these EL libs. :-) -Wolf On 7/26/07, rlubke [EMAIL PROTECTED] wrote: I'd guess removing the el-api JAR from you webapp will do the trick. Wolf Benz-2 wrote: Hi all, I am trying to get MF faclets to work together. 1/ I followed the advice on the site, but I get this error: EVERE: Exception sending context initialized event to listener instance of class org.apache.myfaces.webapp.StartupServletContextListener java.lang.LinkageError: loader constraints violated when linking javax/el/ELResolver class at org.apache.myfaces.webapp.DefaultFacesInitializer.configureResolverForJS P(DefaultFacesInitializer.java:158) at org.apache.myfaces.webapp.DefaultFacesInitializer.initFaces (DefaultFacesInitializer.java:117) at org.apache.myfaces.webapp.StartupServletContextListener.contextInitializ ed(StartupServletContextListener.java:57) at org.apache.catalina.core.StandardContext.listenerStart (StandardContext.java:3827) at org.apache.catalina.core.StandardContext.start (StandardContext.java:4334) at org.apache.catalina.core.ContainerBase.start(ContainerBase.java : 1045) at org.apache.catalina.core.StandardHost.start(StandardHost.java :719) at org.apache.catalina.core.ContainerBase.start(ContainerBase.java : 1045) at org.apache.catalina.core.StandardEngine.start( StandardEngine.java: 443) at org.apache.catalina.core.StandardService.start (StandardService.java:516) at org.apache.catalina.core.StandardServer.start( StandardServer.java: 710) at org.apache.catalina.startup.Catalina.start(Catalina.java:566) at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method) at sun.reflect.NativeMethodAccessorImpl.invoke (NativeMethodAccessorImpl.java:39) at sun.reflect.DelegatingMethodAccessorImpl.invoke (DelegatingMethodAccessorImpl.java:25) at java.lang.reflect.Method.invoke(Method.java:585) at org.apache.catalina.startup.Bootstrap.start(Bootstrap.java:288) at org.apache.catalina.startup.Bootstrap.main(Bootstrap.java:413) And also: SEVERE: Exception sending context destroyed event to listener instance of class org.apache.myfaces.webapp.StartupServletContextListener java.lang.LinkageError: Class javax/el/ELContextListener violates loader constraints at java.lang.ClassLoader.defineClass1(Native Method) at java.lang.ClassLoader.defineClass(ClassLoader.java:620) at java.security.SecureClassLoader.defineClass (SecureClassLoader.java:124) at java.net.URLClassLoader.defineClass(URLClassLoader.java:260) at java.net.URLClassLoader.access$100(URLClassLoader.java:56) at java.net.URLClassLoader$1.run(URLClassLoader.java:195) at java.security.AccessController.doPrivileged(Native Method) at java.net.URLClassLoader.findClass(URLClassLoader.java:188) at java.lang.ClassLoader.loadClass(ClassLoader.java:306) at java.lang.ClassLoader.loadClass(ClassLoader.java:251) at java.lang.ClassLoader.loadClassInternal(ClassLoader.java:319) at java.lang.Class.getDeclaredMethods0(Native Method) at java.lang.Class.privateGetDeclaredMethods(Class.java:2365) at java.lang.Class.getDeclaredMethods(Class.java:1763) at org.apache.myfaces.config.annotation.NoInjectionAnnotationLifecycleProvi der.destroyInstance(NoInjectionAnnotationLifecycleProvider.java:91) at org.apache.myfaces.webapp.AbstractMyFacesListener.doPreDestroy (AbstractMyFacesListener.java:60) at org.apache.myfaces.webapp.StartupServletContextListener.doPredestroy (StartupServletContextListener.java:114) at org.apache.myfaces.webapp.StartupServletContextListener.contextDestroyed (StartupServletContextListener.java:95) at org.apache.catalina.core.StandardContext.listenerStop (StandardContext.java:3866) at org.apache.catalina.core.StandardContext.stop (StandardContext.java:4500) at org.apache.catalina.core.StandardContext.start (StandardContext.java:4364) at org.apache.catalina.core.ContainerBase.start(ContainerBase.java : 1045) at org.apache.catalina.core.StandardHost.start(StandardHost.java :719) at org.apache.catalina.core.ContainerBase.start(ContainerBase.java : 1045) at org.apache.catalina.core.StandardEngine.start( StandardEngine.java: 443) at org.apache.catalina.core.StandardService.start (StandardService.java:516) at org.apache.catalina.core.StandardServer.start( StandardServer.java: 710) at org.apache.catalina.startup.Catalina.start(Catalina.java:566) at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method) at sun.reflect.NativeMethodAccessorImpl.invoke
Re: myFaces 1.2 problem
Indeed - and this is what made things already better for me - before (2.5 1.2 versions), I had weird startup errors. -- for the time being: better stick with versions 2.4 1.1 :-)-Wolf On 7/25/07, ncheltsov [EMAIL PROTECTED] wrote: Hi, as much as I see, both documents are, like you say: 2.4 1.1? Wolf Benz wrote: Sorry - Look at the top of the 2 docs you cite: it refers to the version the document conforms to. At first I thought: I'm building a JSF1.2 app so I state: servlet v. 2.5( web.xml) JSF-version 1.2 (in faces-config top) Yet, to my surprise, this gave me problems... Changed them back to 2.4 1.1 and the problems were gone. If you look at the demo apps Werner put online this morning, you'll see he also references 2.4 1.1 The why for this failure is not clear to me. As you state yourself: it shouldn't be like this, it really should be 2.5 1.2... OK like this? -Wolf On 7/24/07, ncheltsov [EMAIL PROTECTED] wrote: Hi, I don't really understand what you are saying! Can you give more explanations? I need to use JSF version 1.2, not 1.1. Wolf Benz wrote: On Tomcat I had this too at first. Then I changed - in the web.xml the web app xsd version from 2.5 to 2.4, and - in faces-config.xml the JSF version from 1.2 to 1.1 ... and the problem was solved... ! The bleeb part is... it really should be 2.5 and 1.2, yet this gave me errors... Are the URLs wrong/not yet online (-- would SYSTEM have the files locally solve the problem?) @Matthias: is the StartupServletContextListener still necessary to declare in the web.xml? -Wolf On 7/24/07, Matthias Wessendorf [EMAIL PROTECTED] wrote: can you try this jetty version: version6.1.2rc0/version On 7/24/07, ncheltsov [EMAIL PROTECTED] wrote: Hi, I am trying to use myfaces 1.2 and I have the following error: No Factories configured for this Application. This happens if the faces-initialization does not work at all - make sure that you properly include all configuration settings necessary for a basic faces application and that all the necessary libs are included. Also check the logging output of your web application and your container for any exceptions! If you did that and find nothing, the mistake might be due to the fact that you use some special web-containers which do not support registering context-listeners via TLD files and a context listener is not setup in your web.xml. A typical config looks like this; listener listener-classorg.apache.myfaces.webapp .StartupServletContextListener/listener-class /listener Caused by: java.lang.IllegalStateExceptio n: No Factories configured for this Application. This happens if the faces-initialization does not work at all - make sure that you properly include all configuration settings necessary for a basic faces application and that all the necessary libs are included. Also check the logging output of your web application and your container for any exceptions! If you did that and find nothing, the mistake might be due to the fact that you use some special web-containers which do not support registering context-listeners via TLD files and a context listener is not setup in your web.xml. A typical config looks like this; org.apache.myfaces.webapp.StartupServletContextListener at javax.faces.FactoryFinder.getFactory(FactoryFinder.java:90) at javax.faces.webapp.FacesServlet.init(FacesServlet.java:88) at org.mortbay.jetty.servlet.ServletHolder.initServlet( ServletHolder.java :433) at org.mortbay.jetty.servlet.ServletHolder.getServlet( ServletHolder.java:342) at org.mortbay.jetty.servlet.ServletHolder.handle(ServletHolder.java :463) at org.mortbay.jetty.servlet .ServletHandler.handle(ServletHandler.java :362) at org.mortbay.jetty.security.SecurityHandler.handle( SecurityHandler.java:216) at org.mortbay.jetty.servlet.SessionHandler.handle(SessionHandler.java:181) at org.mortbay.jetty.handler.ContextHandler.handle(ContextHandler.java :712) at org.mortbay.jetty.webapp.WebAppContext.handle(WebAppContext.java :405) at org.mortbay.jetty.handler .ContextHandlerCollection.handle( ContextHandlerCollection.java:211) at org.mortbay.jetty.handler.HandlerCollection.handle( HandlerCollection.java:114) at org.mortbay.jetty.handler.HandlerWrapper.handle( HandlerWrapper.java :139) at org.mortbay.jetty.Server.handle(Server.java:313) at org.mortbay.jetty.HttpConnection.handleRequest(HttpConnection.java :506) at org.mortbay.jetty.HttpConnection$RequestHandler.headerComple te( HttpConnection.java:830) at org.mortbay.jetty.HttpParser.parseNext(HttpParser.java:514) at org.mortbay.jetty.HttpParser.parseAvailable(HttpParser.java:211) at org.mortbay.jetty.HttpConnecti on.handle(HttpConnection.java:381
Re: myFaces 1.2 problem
Perhaps I better started a new thread on this but as this is a good example: Wouldn't it be a good idea for much more and aggressive defaulting from MyFaces? Take the web.xml: merely using myfaces makes the poor thing go through the roof! There are a few Context pars you can't do without but... the pretty html, scroll, js, ... c'mon. This StartupServletContextListener is another good example, the AddStreamingresource Listener, ... it all just adds and adds. For newbies coming from RI this alone is a reason to run back, fast! Certainly as -as is pointed out in this thread as well- even doing do doesn;t guarantee a free ride. With every Myfaces project, I have had startup problems. Currently as well. (counter ticks 2 weeks now) It's setup is too complex. Also a more standardized approach would make troubleshooting much easier. It's a trend also, with reason. Look at annotations e.g. where you mostly only have to use them if you wish to override a default setting. -Wolf On 7/25/07, Martin Marinschek [EMAIL PROTECTED] wrote: Hi guys, the StartupServletContextListener should automatically be run by the servlet container when it parses the tld. What you can do as a workaround: - declare the context-listener as explained in the stacktrace in your web.xml - use the MyFacesServlet instead of the FacesServlet In any case, make sure that the work and temp directories of the Tomcat are cleared, and that you have the MyFaces libraries available only in one version. I have had this problem quite often now - especially in Tomcat, and I'm quite desperate to find a solution for this. regards, Martin On 7/25/07, Wolf Benz [EMAIL PROTECTED] wrote: Indeed - and this is what made things already better for me - before ( 2.5 1.2 versions), I had weird startup errors. -- for the time being: better stick with versions 2.4 1.1 :-)-Wolf On 7/25/07, ncheltsov [EMAIL PROTECTED] wrote: Hi, as much as I see, both documents are, like you say: 2.4 1.1? Wolf Benz wrote: Sorry - Look at the top of the 2 docs you cite: it refers to the version the document conforms to. At first I thought: I'm building a JSF1.2 app so I state: servlet v. 2.5(web.xml) JSF-version 1.2 (in faces-config top) Yet, to my surprise, this gave me problems... Changed them back to 2.4 1.1 and the problems were gone. If you look at the demo apps Werner put online this morning, you'll see he also references 2.4 1.1 The why for this failure is not clear to me. As you state yourself: it shouldn't be like this, it really should be 2.5 1.2... OK like this? -Wolf On 7/24/07, ncheltsov [EMAIL PROTECTED] wrote: Hi, I don't really understand what you are saying! Can you give more explanations? I need to use JSF version 1.2, not 1.1. Wolf Benz wrote: On Tomcat I had this too at first. Then I changed - in the web.xml the web app xsd version from 2.5 to 2.4, and - in faces-config.xml the JSF version from 1.2 to 1.1 ... and the problem was solved... ! The bleeb part is... it really should be 2.5 and 1.2, yet this gave me errors... Are the URLs wrong/not yet online (-- would SYSTEM have the files locally solve the problem?) @Matthias: is the StartupServletContextListener still necessary to declare in the web.xml? -Wolf On 7/24/07, Matthias Wessendorf [EMAIL PROTECTED] wrote: can you try this jetty version: version6.1.2rc0/version On 7/24/07, ncheltsov [EMAIL PROTECTED] wrote: Hi, I am trying to use myfaces 1.2 and I have the following error: No Factories configured for this Application. This happens if the faces-initialization does not work at all - make sure that you properly include all configuration settings necessary for a basic faces application and that all the necessary libs are included. Also check the logging output of your web application and your container for any exceptions! If you did that and find nothing, the mistake might be due to the fact that you use some special web-containers which do not support registering context-listeners via TLD files and a context listener is not setup in your web.xml. A typical config looks like this; listener listener-classorg.apache.myfaces.webapp .StartupServletContextListener/listener-class /listener Caused by: java.lang.IllegalStateExceptio n: No Factories configured for this Application. This happens if the faces-initialization does not work at all - make sure that you properly include all configuration settings necessary for a basic faces application and that all the necessary libs are included. Also check the logging output of your web application and your container for any exceptions! If you did that and find nothing, the mistake might be due to the fact
Re: myFaces 1.2 problem
Exactly my thoughts. I'd feel very much for such approach.Simplicity to get you started. Full complexity when you need it. -Wolf On 7/25/07, Jesse Alexander (KSFD 121) [EMAIL PROTECTED] wrote: Or remove them from the simple sample and document them in the setup-document. The people for whom the defaults are ok, and that anyway wouldn't read the docs, they have a seed which is simple. For the others... they usually read the doc... regards Alexander -- *From:* Martin Marinschek [mailto:[EMAIL PROTECTED] *Sent:* Wednesday, July 25, 2007 1:38 PM *To:* MyFaces Discussion *Subject:* Re: myFaces 1.2 problem You mean we should get those parameter out of the web.xml simple examples? Yes, that might be an option. I generally thought it helps people if they see the possibilities there are right in the examples. Maybe a marker optional would help. regards, Martin On 7/25/07, Wolf Benz [EMAIL PROTECTED] wrote: That's true Martin - there is a lot defaulted. Yet, if it's almost all defaulted, I think there's a case for leaving the web.xml much cleaner. Certainly the obvious ones could be better left out, it makes the web.xml only more verbose. It gives people the impression there's a lot to configure before you get MF to work. Look at all the setup issues of MF120 now: a lot of people(that would include me) then start to wonder whether perhaps it's perhaps due to one of all these params that is wrongly set, whereas that's(mostly) not the case. All that and those their explanation could perhaps be better shifted to the project documentation. To my taste, I find that a little cleaner :-) -Wolf On 7/25/07, Martin Marinschek [EMAIL PROTECTED] wrote: I believe your statement is entirely wrong. None of the MyFaces-web.xml parameter is necessary - they are all optional, with default values if they are not provided. For MyFaces - the implementation - you got nothing to configure additionally in comparison to the RI. The StartupServletContextListener is an issue with certain servlet-containers only, and it is certainly not our problem, but a problem with these servlet-containers. MyFaces doesn't require configuring this. For Tomahawk, there is one additional filter necessary. That's it. For performance tweaks, you might need one or two more settings. I wouldn't call that much. regards, Martin On 7/25/07, Wolf Benz [EMAIL PROTECTED] wrote: Perhaps I better started a new thread on this but as this is a good example: Wouldn't it be a good idea for much more and aggressive defaulting from MyFaces? Take the web.xml: merely using myfaces makes the poor thing go through the roof! There are a few Context pars you can't do without but... the pretty html, scroll, js, ... c'mon. This StartupServletContextListener is another good example, the AddStreamingresource Listener, ... it all just adds and adds. For newbies coming from RI this alone is a reason to run back, fast! Certainly as -as is pointed out in this thread as well- even doing do doesn;t guarantee a free ride. With every Myfaces project, I have had startup problems. Currently as well. (counter ticks 2 weeks now) It's setup is too complex. Also a more standardized approach would make troubleshooting much easier. It's a trend also, with reason. Look at annotations e.g. where you mostly only have to use them if you wish to override a default setting. -Wolf On 7/25/07, Martin Marinschek [EMAIL PROTECTED] wrote: Hi guys, the StartupServletContextListener should automatically be run by the servlet container when it parses the tld. What you can do as a workaround: - declare the context-listener as explained in the stacktrace in your web.xml - use the MyFacesServlet instead of the FacesServlet In any case, make sure that the work and temp directories of the Tomcat are cleared, and that you have the MyFaces libraries available only in one version. I have had this problem quite often now - especially in Tomcat, and I'm quite desperate to find a solution for this. regards, Martin On 7/25/07, Wolf Benz [EMAIL PROTECTED] wrote: Indeed - and this is what made things already better for me - before (2.5 1.2 versions), I had weird startup errors. -- for the time being: better stick with versions 2.4 1.1 :-) -Wolf On 7/25/07, ncheltsov [EMAIL PROTECTED] wrote: Hi, as much as I see, both documents are, like you say: 2.4 1.1? Wolf Benz wrote: Sorry - Look at the top of the 2 docs you cite: it refers to the version the document conforms to. At first I thought: I'm building a JSF1.2 app so I state: servlet v. 2.5(web.xml) JSF-version 1.2 (in faces-config top) Yet, to my surprise, this gave me problems
facelets 7 MyFaces error: javax/el/ELResolver
Hi all, I am trying to get MF faclets to work together. 1/ I followed the advice on the site, but I get this error: EVERE: Exception sending context initialized event to listener instance of class org.apache.myfaces.webapp.StartupServletContextListener java.lang.LinkageError: loader constraints violated when linking javax/el/ELResolver class at org.apache.myfaces.webapp.DefaultFacesInitializer.configureResolverForJS P(DefaultFacesInitializer.java:158) at org.apache.myfaces.webapp.DefaultFacesInitializer.initFaces (DefaultFacesInitializer.java:117) at org.apache.myfaces.webapp.StartupServletContextListener.contextInitializ ed(StartupServletContextListener.java:57) at org.apache.catalina.core.StandardContext.listenerStart (StandardContext.java:3827) at org.apache.catalina.core.StandardContext.start (StandardContext.java:4334) at org.apache.catalina.core.ContainerBase.start(ContainerBase.java: 1045) at org.apache.catalina.core.StandardHost.start(StandardHost.java:719) at org.apache.catalina.core.ContainerBase.start(ContainerBase.java: 1045) at org.apache.catalina.core.StandardEngine.start(StandardEngine.java: 443) at org.apache.catalina.core.StandardService.start (StandardService.java:516) at org.apache.catalina.core.StandardServer.start(StandardServer.java: 710) at org.apache.catalina.startup.Catalina.start(Catalina.java:566) at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method) at sun.reflect.NativeMethodAccessorImpl.invoke (NativeMethodAccessorImpl.java:39) at sun.reflect.DelegatingMethodAccessorImpl.invoke (DelegatingMethodAccessorImpl.java:25) at java.lang.reflect.Method.invoke(Method.java:585) at org.apache.catalina.startup.Bootstrap.start(Bootstrap.java:288) at org.apache.catalina.startup.Bootstrap.main(Bootstrap.java:413) And also: SEVERE: Exception sending context destroyed event to listener instance of class org.apache.myfaces.webapp.StartupServletContextListener java.lang.LinkageError: Class javax/el/ELContextListener violates loader constraints at java.lang.ClassLoader.defineClass1(Native Method) at java.lang.ClassLoader.defineClass(ClassLoader.java:620) at java.security.SecureClassLoader.defineClass (SecureClassLoader.java:124) at java.net.URLClassLoader.defineClass(URLClassLoader.java:260) at java.net.URLClassLoader.access$100(URLClassLoader.java:56) at java.net.URLClassLoader$1.run(URLClassLoader.java:195) at java.security.AccessController.doPrivileged(Native Method) at java.net.URLClassLoader.findClass(URLClassLoader.java:188) at java.lang.ClassLoader.loadClass(ClassLoader.java:306) at java.lang.ClassLoader.loadClass(ClassLoader.java:251) at java.lang.ClassLoader.loadClassInternal(ClassLoader.java:319) at java.lang.Class.getDeclaredMethods0(Native Method) at java.lang.Class.privateGetDeclaredMethods(Class.java:2365) at java.lang.Class.getDeclaredMethods(Class.java:1763) at org.apache.myfaces.config.annotation.NoInjectionAnnotationLifecycleProvi der.destroyInstance(NoInjectionAnnotationLifecycleProvider.java:91) at org.apache.myfaces.webapp.AbstractMyFacesListener.doPreDestroy (AbstractMyFacesListener.java:60) at org.apache.myfaces.webapp.StartupServletContextListener.doPredestroy (StartupServletContextListener.java:114) at org.apache.myfaces.webapp.StartupServletContextListener.contextDestroyed (StartupServletContextListener.java:95) at org.apache.catalina.core.StandardContext.listenerStop (StandardContext.java:3866) at org.apache.catalina.core.StandardContext.stop (StandardContext.java:4500) at org.apache.catalina.core.StandardContext.start (StandardContext.java:4364) at org.apache.catalina.core.ContainerBase.start(ContainerBase.java: 1045) at org.apache.catalina.core.StandardHost.start(StandardHost.java:719) at org.apache.catalina.core.ContainerBase.start(ContainerBase.java: 1045) at org.apache.catalina.core.StandardEngine.start(StandardEngine.java: 443) at org.apache.catalina.core.StandardService.start (StandardService.java:516) at org.apache.catalina.core.StandardServer.start(StandardServer.java: 710) at org.apache.catalina.startup.Catalina.start(Catalina.java:566) at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method) at sun.reflect.NativeMethodAccessorImpl.invoke (NativeMethodAccessorImpl.java:39) at sun.reflect.DelegatingMethodAccessorImpl.invoke (DelegatingMethodAccessorImpl.java:25) at java.lang.reflect.Method.invoke(Method.java:585) at org.apache.catalina.startup.Bootstrap.start(Bootstrap.java:288) at org.apache.catalina.startup.Bootstrap.main(Bootstrap.java:413) In my web-lib, I have (w.r.t EL) these jars: - commons-el.1.0 - el-api.jar (not the el-impl.jar, but this does't give a difference) - jsf-facelets.jar - jstl.jar - myfaces-api-1.2.0 myfaces-impl-1.2.0 -
Re: Are you using MyFaces ?
Hi MatthiasCan we add it ourselves? (Don't see an add button or so) -Wolf On 7/24/07, Matthias Wessendorf [EMAIL PROTECTED] wrote: If your are using MyFaces (1.1.x || 1.2.x) and your company isn't listed here: http://wiki.apache.org/myfaces/Companies_Using_MyFaces Please add it! Thx, Matthias -- Matthias Wessendorf further stuff: blog: http://matthiaswessendorf.wordpress.com/ mail: matzew-at-apache-dot-org
Re: Are you using MyFaces ?
Done.-Wolf On 7/24/07, Matthias Wessendorf [EMAIL PROTECTED] wrote: yes, you need to create an account (easy and free) than you can edit the page, that's all -Matthias On 7/24/07, Wolf Benz [EMAIL PROTECTED] wrote: Hi Matthias Can we add it ourselves? (Don't see an add button or so) -Wolf On 7/24/07, Matthias Wessendorf [EMAIL PROTECTED] wrote: If your are using MyFaces (1.1.x || 1.2.x) and your company isn't listed here: http://wiki.apache.org/myfaces/Companies_Using_MyFaces Please add it! Thx, Matthias -- Matthias Wessendorf further stuff: blog: http://matthiaswessendorf.wordpress.com/ mail: matzew-at-apache-dot-org -- Matthias Wessendorf further stuff: blog: http://matthiaswessendorf.wordpress.com/ mail: matzew-at-apache-dot-org
Re: facelets vs. jsp
Hi Zied, I went to a conferencce last month(JavaOne afterglow in Brussels) but what they were showing was JavaFX as a Swing replacement, not for the web. I'm not saying it's impossible/not planned - just that I've never seen any code/demo for it. Or any integration initiative. (FX JSF e.g.) At first impression, it also seems quite verbose. (to my taste at least) -Wolf but the more I hear about it the more I think it's a good candidate to be the next web generation, but don't forget it has JavaFX in front of it and this one is making a lot more noise today...
Re: MyFaces 1.2 + Tomahawk Kickstart was: Re: Myfaces 1.2.0 setup issues (again)
Great work Werner.A true added value. This is smth useful we can all start from. -Wolf On 7/23/07, Werner Punz [EMAIL PROTECTED] wrote: Matthias Wessendorf schrieb: release often, release early ... :-) Ok guys I am dropping the tomahawk builds and the blank application as well as a working myfaces 1.2 sandbox war into http://people.apache.org/~werpu/ as we speak, first of all there is a slight build error, once extracted you safely can remove the jstl-1.1.jar from the WEB-INF/lib the wars should work out of the box on a tomcat 6 install with a jdk5+ most tomahawk components seem to work, the same goes for the sandbox, 3-4 fail on tomahawk, and the same on the sandbox for various reasons (most of them are slight programming errors, or misuse of the 1.1 spec to achieve a certain functionality) Note, all this wont work with jdk 1.4 or a non JEE5 compliant servlet runner since myfaces relies on the latest JSP and Servlet implementations (as defined by the spec) The blank application should get you kickstarted and the tomahawk build should give you an overview which components work. Have much fun with myfaces 1.2 As for a short explanation on how to get the build simply check out myfaces and do a mvn clean pack -Djsf=12 on the examples and it will configure everything for myfaces 1.2 a -Djsf=ri12 should make the packing for the ri according to Bruno. I will add a wiki page the next few days explaining everything so that people have an easier time to kickstart with myfaces 1.2. Werner
Re: facelets vs. jsp
+1 :-)I still put in any footer of my apps: Please use a standards compliant browser for surfing the web. We advocate Firefox for surfing the web on PC. Use IE at your own (security) risk. hehe. I especially adore the last part. We should all use such headers. Last week I read in Eastern-Europe, FF looks at a market share of almost 50%, that's awesome. Smth else: what about open laszlo? Is there no potential? -Wolf Or in other words, the web was fun and used to work until Microsoft wanted to take over.
Re: MyFaces 1.2 + Tomahawk Kickstart was: Re: Myfaces 1.2.0 setup issues (again)
Guys, you got me all misty eyed.When's the first Apache Hug Fest / Myfaces Love Parade? ;-) MyFaces may not be the RI for JSF, it certainly smells like the RI for a dev community ;-) Kudos, -Wolf On 7/24/07, Bruno Aranda [EMAIL PROTECTED] wrote: Hey hey, we are a community here, credits go for all. We all write our bits and pieces here and there and it is the combination of all them what matters :-) Cheers, Bruno On 24/07/07, Werner Punz [EMAIL PROTECTED] wrote: Wolf Benz schrieb: Great work Werner. A true added value. This is smth useful we can all start from. -Wolf Don´t thank me, give Bruno the credits, he added the hooks for jsf=12 in the myfaces build process so that it is easy to get kickstart projects which are jsf12 enabled out of the box. ;-)
Re: myFaces 1.2 problem
On Tomcat I had this too at first. Then I changed - in the web.xml the web app xsd version from 2.5 to 2.4, and - in faces-config.xml the JSF version from 1.2 to 1.1 ... and the problem was solved... ! The bleeb part is... it really should be 2.5 and 1.2, yet this gave me errors... Are the URLs wrong/not yet online (-- would SYSTEM have the files locally solve the problem?) @Matthias: is the StartupServletContextListener still necessary to declare in the web.xml? -Wolf On 7/24/07, Matthias Wessendorf [EMAIL PROTECTED] wrote: can you try this jetty version: version6.1.2rc0/version On 7/24/07, ncheltsov [EMAIL PROTECTED] wrote: Hi, I am trying to use myfaces 1.2 and I have the following error: No Factories configured for this Application. This happens if the faces-initialization does not work at all - make sure that you properly include all configuration settings necessary for a basic faces application and that all the necessary libs are included. Also check the logging output of your web application and your container for any exceptions! If you did that and find nothing, the mistake might be due to the fact that you use some special web-containers which do not support registering context-listeners via TLD files and a context listener is not setup in your web.xml. A typical config looks like this; listener listener-classorg.apache.myfaces.webapp .StartupServletContextListener/listener-class /listener Caused by: java.lang.IllegalStateException: No Factories configured for this Application. This happens if the faces-initialization does not work at all - make sure that you properly include all configuration settings necessary for a basic faces application and that all the necessary libs are included. Also check the logging output of your web application and your container for any exceptions! If you did that and find nothing, the mistake might be due to the fact that you use some special web-containers which do not support registering context-listeners via TLD files and a context listener is not setup in your web.xml. A typical config looks like this; org.apache.myfaces.webapp.StartupServletContextListener at javax.faces.FactoryFinder.getFactory(FactoryFinder.java:90) at javax.faces.webapp.FacesServlet.init(FacesServlet.java:88) at org.mortbay.jetty.servlet.ServletHolder.initServlet(ServletHolder.java :433) at org.mortbay.jetty.servlet.ServletHolder.getServlet(ServletHolder.java :342) at org.mortbay.jetty.servlet.ServletHolder.handle(ServletHolder.java:463) at org.mortbay.jetty.servlet.ServletHandler.handle(ServletHandler.java:362) at org.mortbay.jetty.security.SecurityHandler.handle(SecurityHandler.java :216) at org.mortbay.jetty.servlet.SessionHandler.handle(SessionHandler.java:181) at org.mortbay.jetty.handler.ContextHandler.handle(ContextHandler.java:712) at org.mortbay.jetty.webapp.WebAppContext.handle(WebAppContext.java:405) at org.mortbay.jetty.handler.ContextHandlerCollection.handle( ContextHandlerCollection.java:211) at org.mortbay.jetty.handler.HandlerCollection.handle( HandlerCollection.java:114) at org.mortbay.jetty.handler.HandlerWrapper.handle(HandlerWrapper.java:139) at org.mortbay.jetty.Server.handle(Server.java:313) at org.mortbay.jetty.HttpConnection.handleRequest(HttpConnection.java:506) at org.mortbay.jetty.HttpConnection$RequestHandler.headerComplete( HttpConnection.java:830) at org.mortbay.jetty.HttpParser.parseNext(HttpParser.java:514) at org.mortbay.jetty.HttpParser.parseAvailable(HttpParser.java:211) at org.mortbay.jetty.HttpConnection.handle(HttpConnection.java:381) at org.mortbay.io.nio.SelectChannelEndPoint.run(SelectChannelEndPoint.java :396) at org.mortbay.thread.BoundedThreadPool$PoolThread.run( BoundedThreadPool.java:442) I am using maven-jetty-plugin 6.1.5. I don't know what stays behind this plugin, but when I try to use JBoss-4.2 I got the similar exception: [INFO] [talledLocalContainer] java.lang.IllegalStateException: Application was not properly initialized at startup, could not find Factor y: javax.faces.application.ApplicationFactory [INFO] [talledLocalContainer] at javax.faces.FactoryFinder.getFactory(FactoryFinder.java:256) [INFO] [talledLocalContainer] at com.sun.faces.config.ConfigureListener$InitFacesContext.getApplication( ConfigureListener.java:1614) [INFO] [talledLocalContainer] at com.sun.faces.util.MessageFactory.getApplication(MessageFactory.java :255) [INFO] [talledLocalContainer] at com.sun.faces.util.MessageFactory.getMessage(MessageFactory.java:144) [INFO] [talledLocalContainer] at com.sun.faces.util.MessageFactory.getMessage(MessageFactory.java:122) [INFO] [talledLocalContainer] at com.sun.faces.util.MessageUtils.getExceptionMessageString( MessageUtils.java:277) [INFO] [talledLocalContainer] at com.sun.faces.config.ConfigureListener.digester(ConfigureListener.java :1180) [INFO] [talledLocalContainer] at
Re: myFaces 1.2 problem
Sorry - Look at the top of the 2 docs you cite: it refers to the version the document conforms to. At first I thought: I'm building a JSF1.2 app so I state: servlet v. 2.5( web.xml) JSF-version 1.2 (in faces-config top) Yet, to my surprise, this gave me problems... Changed them back to 2.4 1.1 and the problems were gone. If you look at the demo apps Werner put online this morning, you'll see he also references 2.4 1.1 The why for this failure is not clear to me. As you state yourself: it shouldn't be like this, it really should be 2.5 1.2... OK like this? -Wolf On 7/24/07, ncheltsov [EMAIL PROTECTED] wrote: Hi, I don't really understand what you are saying! Can you give more explanations? I need to use JSF version 1.2, not 1.1. Wolf Benz wrote: On Tomcat I had this too at first. Then I changed - in the web.xml the web app xsd version from 2.5 to 2.4, and - in faces-config.xml the JSF version from 1.2 to 1.1 ... and the problem was solved... ! The bleeb part is... it really should be 2.5 and 1.2, yet this gave me errors... Are the URLs wrong/not yet online (-- would SYSTEM have the files locally solve the problem?) @Matthias: is the StartupServletContextListener still necessary to declare in the web.xml? -Wolf On 7/24/07, Matthias Wessendorf [EMAIL PROTECTED] wrote: can you try this jetty version: version6.1.2rc0/version On 7/24/07, ncheltsov [EMAIL PROTECTED] wrote: Hi, I am trying to use myfaces 1.2 and I have the following error: No Factories configured for this Application. This happens if the faces-initialization does not work at all - make sure that you properly include all configuration settings necessary for a basic faces application and that all the necessary libs are included. Also check the logging output of your web application and your container for any exceptions! If you did that and find nothing, the mistake might be due to the fact that you use some special web-containers which do not support registering context-listeners via TLD files and a context listener is not setup in your web.xml. A typical config looks like this; listener listener-classorg.apache.myfaces.webapp .StartupServletContextListener/listener-class /listener Caused by: java.lang.IllegalStateExceptio n: No Factories configured for this Application. This happens if the faces-initialization does not work at all - make sure that you properly include all configuration settings necessary for a basic faces application and that all the necessary libs are included. Also check the logging output of your web application and your container for any exceptions! If you did that and find nothing, the mistake might be due to the fact that you use some special web-containers which do not support registering context-listeners via TLD files and a context listener is not setup in your web.xml. A typical config looks like this; org.apache.myfaces.webapp.StartupServletContextListener at javax.faces.FactoryFinder.getFactory(FactoryFinder.java:90) at javax.faces.webapp.FacesServlet.init(FacesServlet.java:88) at org.mortbay.jetty.servlet.ServletHolder.initServlet(ServletHolder.java:433) at org.mortbay.jetty.servlet.ServletHolder.getServlet(ServletHolder.java :342) at org.mortbay.jetty.servlet.ServletHolder.handle(ServletHolder.java:463) at org.mortbay.jetty.servlet .ServletHandler.handle(ServletHandler.java :362) at org.mortbay.jetty.security.SecurityHandler.handle(SecurityHandler.java :216) at org.mortbay.jetty.servlet.SessionHandler.handle(SessionHandler.java:181) at org.mortbay.jetty.handler.ContextHandler.handle(ContextHandler.java :712) at org.mortbay.jetty.webapp.WebAppContext.handle(WebAppContext.java:405) at org.mortbay.jetty.handler .ContextHandlerCollection.handle( ContextHandlerCollection.java:211) at org.mortbay.jetty.handler.HandlerCollection.handle( HandlerCollection.java:114) at org.mortbay.jetty.handler.HandlerWrapper.handle( HandlerWrapper.java :139) at org.mortbay.jetty.Server.handle(Server.java:313) at org.mortbay.jetty.HttpConnection.handleRequest(HttpConnection.java :506) at org.mortbay.jetty.HttpConnection$RequestHandler.headerComple te( HttpConnection.java:830) at org.mortbay.jetty.HttpParser.parseNext(HttpParser.java:514) at org.mortbay.jetty.HttpParser.parseAvailable(HttpParser.java:211) at org.mortbay.jetty.HttpConnecti on.handle(HttpConnection.java:381) at org.mortbay.io.nio.SelectChannelEndPoint.run( SelectChannelEndPoint.java:396) at org.mortbay.thread.BoundedThreadPool$PoolThread.run( BoundedThreadPool.java :442) I am using maven-jetty-plugin 6.1.5. I don't know what stays behind this plugin, but when I try to use JBoss-4.2 I got the similar exception: [INFO] [talledLocalContainer] java.lang.IllegalStateException: Application was not properly initialized at startup, could not find Factor y
Re: Myfaces 1.2.0 setup issues (again)
Hi allThanks for the help so far guys. After yesterday's struggling, I wasn't really in the mood today to pick it up again so quickly. Will try again this WE. Short question aside: I've got nothing against facelets (quite the contrary), but I understand from previous postings the combo Tomcat6 - MF120 - Tomahawk - JSP is a dead end. I think this is a problem as I guess most users will use this combo. Tomcat6 is kinda a standard and if you don't need Tomahawk, why not just use the RI... (MF could learn smth from their easy setup -- I think there's great value in defaulting much more so that the web.xml can remain much easier than MF makes it now) Facelets is better than JSP yet most users still use JSP... Certainly as I guess what most users will forst attempt(like myself) is migrate old apps to the new MF std. Or does JSP work if you just don't use JSTL? How good are your contacts with the Apache Tomcat team to perhaps address this issue in an incremental Tomcat release? (should this be the best way to solve this decoupling) Wolf On 7/20/07, Matthias Wessendorf [EMAIL PROTECTED] wrote: Ok I just got in a correction of Matthias, as it seems I cannot confirm jetty yet. Anyway, I will do furhter testing this afternoon to circle the entire thing in a little bit (also I will try jetty personally) All I personally can say for now, is that I can confirm that the combination of Tomcat 6 MyFaces 1.2 and Facelets work as they should. please watch https://issues.apache.org/jira/browse/MYFACES-1682 for further comments on this. so, I noticed the TLD thing on ([1]) in tomcat 6.0.13 with and without tomahawk. Not in Jetty 6.1.2rc0 . -Matthias [1] https://issues.apache.org/jira/browse/MYFACES-1682 -- Matthias Wessendorf further stuff: blog: http://matthiaswessendorf.wordpress.com/ mail: matzew-at-apache-dot-org
Re: Myfaces 1.2.0 setup issues (again)
I am currently trying to nail down the bugs I am still not sure about everything, but as it seems there is lots of weird stuff going on -- I'm glad you've found that out as well. Quite frustrating if you get the impression stuff only jamms on your PC. in the various app servers (most of them unified el related so far... jetty choked on me currently by tring to push a simple example) All I can say is dont spend too much time yet to get this release running better wait for a 2.0.1 release if things do not work out quickly. -- Too bad. If simple apps don't work perhaps the release should have better been postponed a little, as releases cannot be pulled back. Does anyone has an informed idea on when this release would see the (public)light? Wolf
Re: Myfaces 1.2.0 setup issues (again)
Attaching some more infos, like stack trace or debug infos, would speed up things! -- I planned to make some time for that this WE. (I didn't forget your previous post!) I'll try to look at some of your issues over the weekend. -- Cool. And that's smth that can be said of this project: the user list is VERY responsive and to the point. If it weren't for that, I think I might have switched in the past already... (time, time) -Wolf
Myfaces 1.2.0 setup issues (again)
Hi List It's very cool MyFaces 1.2 finally got out of the door but... It's again a true pain setting MyFaces up correctly before it works... (more than it should). I remember it took me an entire week before I had MyFaces 1.x configured correctly with the Extension Filter etc. What a waste of time :-( In the mean time, other sites have helped out and put a proper Tutorial or a complete blank app online but this major new release demands renewed examples and ... is a chance for e renewed approach. Yet, with MyFaces 1.2.0 out, I see the old the same mistakes are made again: - no examples - no info on the web.xml (like: should it specify servlet container v 2.5 now?) - no info on the faces-config.xml (like: should it specify http:// java.sun.com/dtd/web-facesconfig_1_1.dtd or v.1.2?) - no info on what jars are exactly required - no compatibility matrix (like: works with Tomcat6? Can you use Tomahawk (e.g. of version 1.6) together with MyFaces1.2? ... I get the impression the jars are just dumped online and the makers have a great time looking at how users have a terrible time figuring it all out themselves... As I cannot image no one on this list has such example, could someone take the effort of posting the jar online to help all the rest of us out? My setup is: Tomcat6, MyFaces 1.2, Tomahawk(if possible in combination with MF1.2.0 - also this info is not online) I guess this setup would currently the most common one. I spent the last 2 days (starting from my old MF 1.1.5/Toma1.1.5 app on Tomcat 5) trying to migrate it to that setup but to no avail. Many thanks, Wolf
Component for OSX-ish Column View?
Hi guys, Anyone knows of a JSF component like the OSX Column view? Kinda -as far as content goes- like the Tree(2) but then of course with the important difference that itdoesn't push down all the data down once you made an element choice in a certain column, yet renders the content (subfolders/...) of the selected element on the next column... Such an element would be great for making categories and subcats etc. (lab setups, people, any biz with diff aspects really...) It surprized me even Sandbox didn't have such one. Wolf
Listernerstart woes [again!]
Hi List... I know, this is by far not the first post about MyFaces and Listenerstart woes, quite the contrary. It's a pitty - it makes people willing to try out MyFaces run away hard from their first steps. What happened? I colleague wanted to try out MyFaces. My advice: follow the advice given on the MyFaces site EXACTLY, download the jars, configure yr web.xml (following the examples), this is what he got: Dec 12, 2006 9:41:18 PM org.apache.catalina.core.StandardContext start SEVERE: Error listenerStart Dec 12, 2006 9:41:18 PM org.apache.catalina.core.StandardContext start SEVERE: Context [/Flido] startup failed due to previous errors 2006-12-12 21:41:18,621 DEBUG [org.apache.catalina.core.ContainerBase. [Catalina].[localhost].[/Flido]] - Stopping filters 2006-12-12 21:41:18,623 INFO [org.apache.catalina.core.ContainerBase. [Catalina].[localhost].[/Flido]] - Shutting down Log4J ( nothing in the Tomcat logs - Tomcat version 5.5.20 used) To try to help him out, I went trough my old MyFaces List mails. I found lots of people were having this exact same problem, yet I didn't find an answer. I looked at Jira/the MyFaces site - nothing there either... Guys, downloading the jars and trying to boot a dead simple app (he hasn't even a class - just a startup SJF page!) is really the first thing that people will try. Already the MyFaces site is a bit messy (to my taste, sorry) in helping people out (e.g. no clear list of subsequent, documented steps to follow (documented = PLUS links to complete crucial example files like the web.xml or the examples themselves. These examples are mentioned 10 times but without 1 link) New users are left in the dark too much. Compare that to the Sun RI: just throw in the jars, no dozen pars required that explode the web.xml... can we blaim frustrated people? It really should be simpler. Add to that these ever recurring Listener start troubles ... I'm starting to be afraid to recommend MyFaces myself! Despite the fine components. Which brings me back to issue: has anyone an idea how to solve it? Btw his Config = MyFaces 114, tomahawk-sandbox-snapshot115 Sanbox- snapshot115. ( no, the RI jars are not on the CP, nor do they reside somewhere in Tomcat's CP. And also the Ext. Resource Filter is not forgotten, cf. web.xml below) ___ web.xml: (...) ?xml version=1.0 encoding=UTF-8? web-app id=Flido version=2.4 xmlns=http://java.sun.com/xml/ns/j2ee; xmlns:xsi=http://www.w3.org/2001/XMLSchema-instance; xsi:schemaLocation=http://java.sun.com/xml/ns/j2ee http:// java.sun.com/xml/ns/j2ee/web-app_2_4.xsd display-nameFlido/display-name !-- First the Spring-Integration context parameters: -- context-param param-namecontextConfigLocation/param-name param-value/META-INF/applicationContext.xml/param-value /context-param context-param descriptionComma separated list of URIs of (additional) faces config files./description param-namejavax.faces.CONFIG_FILES/param-name param-value/META-INF/faces-config.xml/param-value /context-param context-param param-namelog4jConfigLocation/param-name param-value/META-INF/log4j.properties/param-value /context-param context-param descriptionState saving method: client or server (= default)/description param-namejavax.faces.STATE_SAVING_METHOD/param-name param-valueclient/param-value /context-param context-param description This parameter tells MyFaces if javascript code should be allowed in the rendered HTML output. If javascript is allowed, command_link anchors will have javascript code that submits the corresponding form. If javascript is not allowed, the state saving info and nested parameters will be added as url parameters. Defaults to true /description param-nameorg.apache.myfaces.ALLOW_JAVASCRIPT/param-name param-valuetrue/param-value /context-param context-param description /description param-nameorg.apache.myfaces.DETECT_JAVASCRIPT/param-name param-valuefalse/param-value /context-param context-param descriptionIf true, rendered HTML code will be formatted, so that it is human readable i.e. additional line separators and whitespace will be written, that do not influence the HTML code. Defaults to true /description param-nameorg.apache.myfaces.PRETTY_HTML/param-name param-valuetrue/param-value /context-param context-param description If true, a javascript function will be rendered that is able to restore the former vertical scroll on every request. Convenient feature if you have pages with long lists and you do not want the browser page to always jump to the top
Re: Tree2 keep state with client side toggle?
Well, I've had serious trouble making that work. :-) I believe that rationale is: - large trees -- serverside is faster - small trees -- client side is faster Reason is the entire tree is carried through the wire with client-side. Yesterday's experiments revealed that you have to be very careful setting the tree properties: if you choose clientside, you also have to set preserveToggle=true, otherwise it won't work. (bug in state handling) Wolf On 10 Sep 2006, at 14:36, Christopher Cudennec wrote: Hi, did anyone manage to keep the state of the tree2 with client side toggle enabled? I prefer to use client side toggling because it's much faster than the server side one. I think there must be a way by JavaScript and/or Ajax... Thanks, Christopher
Re: selectBooleanCheckbox not checked after valuechange, why?
Gerald/..., I have a recursive method for walking through a checkbox tree at once. The method is called by a command(-Button) under the tree. (Reason is I don't want a servertrip at every check but wish to process all checked nodes at once) The algoritm I use is: (selectedNodesIDs is an array of Strings for the SELECTED Node IDs) It walks recursively through the tree and adds selected nodes to this dedicated array. public void handleLeafs(TreeNodeBase node){ if(selectedNodesIDs == null)selectedNodesIDs= new ArrayListString(); // simple case first: if node is Leaf, we check whether it is checked: logger.info(Handling of the selected Nodes starts now...); if(node.isLeaf()){ logger.info(Node is a Leaf); if(((TreeNodeChecked)node).isChecked()){ getSelectedNodesIDs().add(node.getIdentifier()); logger.info(Node with this ID was gecheckt: + node.getIdentifier ()); } } // normal case: if node has kids -- we recursively get to the Leafs to check them out: else if(node.getChildCount() 0){ logger.info(Node has kids which we will start treating now...); ListTreeNodeBase childs = (ListTreeNodeBase)node.getChildren(); for (TreeNodeBase nodeSub : childs) { if(nodeSub.isLeaf()){ logger.info(Node is Leaf - is it checked?); // it is a leaf now, -- it is a TreeNodeCheked if(((TreeNodeChecked)nodeSub).isChecked()){ getSelectedNodesIDs().add(nodeSub.getIdentifier()); logger.info(Node met deze ID was gecheckt: + node.getIdentifier()); } else {logger.info(Node was not checked);} } else {handleLeafs(nodeSub);} } } else {logger.info(Node at this level has no kids... );} } The tree2 is defined like this: t:tree2 id=clientTree value=#{calmgmtbean.treeRootNode} var=node varNodeToggler=t clientSideToggle=true preserveToggle=false f:facet name=root h:panelGroup h:outputLabel value=#{labels.calMgmt_tree_rootTxt} styleClass=inhoudKolom2/ /h:panelGroup /f:facet f:facet name=calendarSet h:panelGroup t:graphicImage value=../pics/calMgmt/blue-folder-open.gif border=0 rendered=#{t.nodeExpanded}/ t:graphicImage value=../pics/calMgmt/blue-folder- closed.png border=0 rendered=#{!t.nodeExpanded}/ h:outputLabel value=#{labels.calMgmt_tree_calSetTxt} : # {node.description} styleClass=inhoudKolom2/ h:outputText value= (#{node.childCount}) styleClass=childCount rendered=#{!empty node.children}/ /h:panelGroup /f:facet f:facet name=trigger h:panelGroup h:selectBooleanCheckbox value=#{node.checked} / h:outputText value= #{node.description} style=font-size:12px;font-style:italic;color:darkgrey;font- family:verdana;/ /h:panelGroup /f:facet /t:tree2 Yet, the checked values are not retained. The method's log output always writes Node was not checked... Any idea on how to remedy this? Funny thing is: used to work in the past, but apparently broke with one of the upgrades. (Tomahawk) I moved to T115 to avoid problems with other components... Wolf On 11 Aug 2006, at 13:33, Gerald Müllan wrote: The boolean checkbox is set according to the value binding. In your case is this the expression value=#{node.checked}, but you don`t influence the checked
Re: selectBooleanCheckbox not checked after valuechange, why?
Accidentally found a solution: (poking around with the tree2 props) setting clientSideToggle=false made it slower (GUI-wise less elegant, as I always have small trees) yet it worked again. Hopefully a next release will straighten out such annoying issues. Wolf I set clientSideToggle=false On 10 Sep 2006, at 13:46, Wolf Benz wrote: Gerald/..., I have a recursive method for walking through a checkbox tree at once. The method is called by a command(-Button) under the tree. (Reason is I don't want a servertrip at every check but wish to process all checked nodes at once) The algoritm I use is: (selectedNodesIDs is an array of Strings for the SELECTED Node IDs) It walks recursively through the tree and adds selected nodes to this dedicated array. public void handleLeafs(TreeNodeBase node){ if(selectedNodesIDs == null)selectedNodesIDs= new ArrayListString(); // simple case first: if node is Leaf, we check whether it is checked: logger.info(Handling of the selected Nodes starts now...); if(node.isLeaf()){ logger.info(Node is a Leaf); if(((TreeNodeChecked)node).isChecked()){ getSelectedNodesIDs().add(node.getIdentifier()); logger.info(Node with this ID was gecheckt: + node.getIdentifier ()); } } // normal case: if node has kids -- we recursively get to the Leafs to check them out: else if(node.getChildCount() 0){ logger.info(Node has kids which we will start treating now...); ListTreeNodeBase childs = (ListTreeNodeBase)node.getChildren(); for (TreeNodeBase nodeSub : childs) { if(nodeSub.isLeaf()){ logger.info(Node is Leaf - is it checked?); // it is a leaf now, -- it is a TreeNodeCheked if(((TreeNodeChecked)nodeSub).isChecked()){ getSelectedNodesIDs().add(nodeSub.getIdentifier()); logger.info(Node met deze ID was gecheckt: + node.getIdentifier()); } else {logger.info(Node was not checked);} } else {handleLeafs(nodeSub);} } } else {logger.info(Node at this level has no kids... );} } The tree2 is defined like this: t:tree2 id=clientTree value=#{calmgmtbean.treeRootNode} var=node varNodeToggler=t clientSideToggle=true preserveToggle=false f:facet name=root h:panelGroup h:outputLabel value=#{labels.calMgmt_tree_rootTxt} styleClass=inhoudKolom2/ /h:panelGroup /f:facet f:facet name=calendarSet h:panelGroup t:graphicImage value=../pics/calMgmt/blue-folder-open.gif border=0 rendered=#{t.nodeExpanded}/ t:graphicImage value=../pics/calMgmt/blue-folder- closed.png border=0 rendered=#{!t.nodeExpanded}/ h:outputLabel value=#{labels.calMgmt_tree_calSetTxt} : # {node.description} styleClass=inhoudKolom2/ h:outputText value= (#{node.childCount}) styleClass=childCount rendered=#{!empty node.children}/ /h:panelGroup /f:facet f:facet name=trigger h:panelGroup h:selectBooleanCheckbox value=#{node.checked} / h:outputText value= #{node.description} style=font-size:12px;font-style:italic;color:darkgrey;font- family:verdana;/ /h:panelGroup /f:facet /t:tree2 Yet, the checked values are not retained. The method's log output always writes Node was not checked... Any idea on how to remedy this? Funny thing is: used to work
Re: selectBooleanCheckbox not checked after valuechange, why?
Mmmm, this tree2 component seems to have more sandbox than “tomahawk character, it's a very easy to run into issues. (suffices to do a find for tree2) I though my last problem was bypassed (clientSideToggle doesn't work), but when I try to come back at the same page a second time, I always get a NPE. So, to be clear, the scenario is: Portal page - Page with Tree - 'OK' brings one back to teh portal page // this goes fine now (only with clientSideToggle=false otherwise tree state is messed up) Then: Portal page - (same Use Case selected) Same Page with Tree // this always causes a NPE on the tree2 component. I first thought: there'll be a left-over (proper cleanup?) in the session/resquest, so have logged all request params session attributes but there wasn 't anything inside referencing a tree. (except jsf_tree_64 but that 'll be for smth else as it was already in the request in the first half of the scenario) The internal error produced is this: Anyone an idea...? 006-09-10 21:37:56,005 ERROR [org.apache.catalina.core.ContainerBase. [Catalina].[localhost].[/Mnemonica].[jsp]] - Servlet.service() for servlet jsp threw exception java.lang.NullPointerException at org.apache.myfaces.custom.tree2.UITreeData.encodeEnd (UITreeData.java:118) at javax.faces.webapp.UIComponentTag.encodeEnd(UIComponentTag.java:495) at javax.faces.webapp.UIComponentTag.doEndTag(UIComponentTag.java:363) at org.apache.jsp.resources.pages.calendarManagement_jsp._jspx_meth_t_tree2 _0(calendarManagement_jsp.java:495) at org.apache.jsp.resources.pages.calendarManagement_jsp._jspx_meth_t_div_0 (calendarManagement_jsp.java:403) at org.apache.jsp.resources.pages.calendarManagement_jsp._jspx_meth_h_form_ 0(calendarManagement_jsp.java:277) at org.apache.jsp.resources.pages.calendarManagement_jsp._jspx_meth_f_view_ 0(calendarManagement_jsp.java:166) at org.apache.jsp.resources.pages.calendarManagement_jsp._jspService (calendarManagement_jsp.java:127) at org.apache.jasper.runtime.HttpJspBase.service(HttpJspBase.java:97) at javax.servlet.http.HttpServlet.service(HttpServlet.java:802) at org.apache.jasper.servlet.JspServletWrapper.service (JspServletWrapper.java:332) at org.apache.jasper.servlet.JspServlet.serviceJspFile (JspServlet.java:314) at org.apache.jasper.servlet.JspServlet.service(JspServlet.java:264) at javax.servlet.http.HttpServlet.service(HttpServlet.java:802) at org.apache.catalina.core.ApplicationFilterChain.internalDoFilter (ApplicationFilterChain.java:252) at org.apache.catalina.core.ApplicationFilterChain.doFilter (ApplicationFilterChain.java:173) at org.apache.catalina.core.ApplicationDispatcher.invoke (ApplicationDispatcher.java:672) at org.apache.catalina.core.ApplicationDispatcher.processRequest (ApplicationDispatcher.java:463) at org.apache.catalina.core.ApplicationDispatcher.doForward (ApplicationDispatcher.java:398) at org.apache.catalina.core.ApplicationDispatcher.forward (ApplicationDispatcher.java:301) at org.apache.myfaces.context.servlet.ServletExternalContextImpl.dispatch (ServletExternalContextImpl.java:416) at org.apache.myfaces.application.jsp.JspViewHandlerImpl.renderView (JspViewHandlerImpl.java:234) at org.apache.myfaces.lifecycle.LifecycleImpl.render (LifecycleImpl.java:384) at javax.faces.webapp.FacesServlet.service(FacesServlet.java:138) at org.apache.catalina.core.ApplicationFilterChain.internalDoFilter (ApplicationFilterChain.java:252) at org.apache.catalina.core.ApplicationFilterChain.doFilter (ApplicationFilterChain.java:173) at org.apache.myfaces.webapp.filter.ExtensionsFilter.doFilter (ExtensionsFilter.java:144) at org.apache.catalina.core.ApplicationFilterChain.internalDoFilter (ApplicationFilterChain.java:202) at org.apache.catalina.core.ApplicationFilterChain.doFilter (ApplicationFilterChain.java:173) at org.apache.catalina.core.StandardWrapperValve.invoke (StandardWrapperValve.java:213) at org.apache.catalina.core.StandardContextValve.invoke (StandardContextValve.java:178) at org.apache.catalina.core.StandardHostValve.invoke (StandardHostValve.java:126) at org.apache.catalina.valves.ErrorReportValve.invoke (ErrorReportValve.java:105) at org.apache.catalina.core.StandardEngineValve.invoke (StandardEngineValve.java:107) at org.apache.catalina.connector.CoyoteAdapter.service (CoyoteAdapter.java:148) at org.apache.coyote.http11.Http11Processor.process (Http11Processor.java:869) at org.apache.coyote.http11.Http11BaseProtocol $Http11ConnectionHandler.processConnection(Http11BaseProtocol.java:664) at org.apache.tomcat.util.net.PoolTcpEndpoint.processSocket (PoolTcpEndpoint.java:527) at org.apache.tomcat.util.net.LeaderFollowerWorkerThread.runIt (LeaderFollowerWorkerThread.java:80) at org.apache.tomcat.util.threads.ThreadPool$ControlRunnable.run (ThreadPool.java:684) at java.lang.Thread.run(Thread.java:613) 2006-09-10
Tree2 with Checkboxes still working? (Tomahawk 115)
Hi All, Is Tree2 Checkbox working? (of so, could somebody provide a working example; of both how the tree2 is used in the page and the code where the node checking is done?) It used to work but upon testing again, it appears that the checked values are not passed anymore; Some code: In my page I have: t:tree2 id=clientTree value=#{calmgmtbean.treeRootNode} var=node varNodeToggler=t clientSideToggle=true preserveToggle=false f:facet name=root h:panelGroup h:outputLabel value=#{labels.calMgmt_tree_rootTxt} styleClass=inhoudKolom2/ /h:panelGroup /f:facet f:facet name=calendarSet h:panelGroup t:graphicImage value=../pics/calMgmt/blue-folder-open.gif border=0 rendered=#{t.nodeExpanded}/ t:graphicImage value=../pics/calMgmt/blue-folder-closed.png border=0 rendered=#{!t.nodeExpanded}/ h:outputLabel value=#{labels.calMgmt_tree_calSetTxt} : # {node.description} styleClass=inhoudKolom2/ h:outputText value= (#{node.childCount}) styleClass=childCount rendered=#{!empty node.children}/ /h:panelGroup /f:facet f:facet name=trigger h:panelGroup h:selectBooleanCheckbox value=#{node.checked} / h:outputText value= #{node.description} style=font-size: 12px;font-style:italic;color:darkgrey;font-family:verdana;/ /h:panelGroup /f:facet /t:tree2 h:commandButton action=#{calmgmtbean.processNodes} value=# {labels.calMgmt_processNodes} title=#{labels.calMgmt_procesNodesTitle} style=width: 6cm;/ The code processing the nodes is: public void handleLeafs(TreeNodeBase node){ if(selectedNodesIDs == null)selectedNodesIDs= new ArrayListString(); logger.info(Handling of the selected Nodes starts now...); if(node.isLeaf()){ logger.info(Node is a Leaf); if(((TreeNodeChecked)node).isChecked()==true){ getSelectedNodesIDs().add(node.getIdentifier()); logger.info(Node met deze ID was gecheckt: + node.getIdentifier ()); } } // normal case: if node has kids -- we recursively get to the Leafs to check them out: else if(node.getChildCount() 0){ logger.info(Node has kids which we will start treating now...); ListTreeNodeBase childs = (ListTreeNodeBase)node.getChildren(); for (TreeNodeBase nodeSub : childs) { if(nodeSub.isLeaf()){ logger.info(Node is Leaf - is it checked?); // it is a leaf now, -- it is a TreeNodeCheked if(((TreeNodeChecked)nodeSub).isChecked()){ getSelectedNodesIDs().add(nodeSub.getIdentifier()); logger.info(Node met deze ID was gecheckt: + node.getIdentifier()); } else {logger.info(Node was not checked);} } else {handleLeafs(nodeSub);} } } else {logger.info(Node at this level has no kids... );} } I had a look in the Tomahawk examples, but there is nog example ith CheckBox... Should I perhaps NOT take h:selectBooleanCheckbox but one of the t:checkbox/t:selectBooleanCheckbox/... ? The reason I stated it appears that the checked values are not passed anymore is by looking at the log. I am of course 100% sure I did check a Node but the logging reveals me this: Node has kids which we will start treating now... 2006-09-09 18:21:33,395 INFO - Handling of the selected Nodes starts now... 2006-09-09 18:21:33,395 INFO - Node has kids which we will start treating now... 2006-09-09 18:21:33,396 INFO - Node is Leaf - is it checked? 2006-09-09 18:21:33,396 INFO - Node was not checked 2006-09-09 18:21:33,417 INFO - Handling of the selected Nodes starts now... 2006-09-09 18:21:33,417 INFO - Node has kids which we will start treating now... 2006-09-09 18:21:33,417 INFO - Node is Leaf - is it checked? 2006-09-09 18:21:33,417 INFO - Node was not checked (= in a tree with 2 folders, each containing one event, algoritme = breath first)
Re: MyFaces failing to show JSF error page (bug)
As the subview solution didn't work either, I tried a pure and simple JSP page that should work no? :-)It gave me an exception I've never seen before:So I have in web.xml:error-page error-code404/error-code location/resources/pages/fileNotFound.jsp/location /error-page and the page is: ?xml version="1.0" encoding="UTF-8" standalone="yes" ?jsp:root xmlns:jsp="http://java.sun.com/JSP/Page" version="2.0" xmlns="http://www.w3.org/1999/xhtml" xmlns:f="http://java.sun.com/jsf/core" xmlns:h="http://java.sun.com/jsf/html" xmlns:t="http://myfaces.apache.org/tomahawk" jsp:directive.page contentType="text/html;charset=utf-8" isErrorPage="true"/html head link href="" rel="stylesheet" type="text/css"/ /head body topmargin="0" leftmargin="0" rightmargin="0" marginheight="0" marginwidth="0" class="body" jsp:include page="./header.jsp" / form id="pageNotFoundForm" action="" h3File Not Found - Error Page /h3 hr/ The URL, ijsp:_expression_request.getRequestURL()/jsp:_expression_ /i, does not exist... br/br/ table id="submitTable" align="center" width="90%" style="padding:8px;border-top-style:solid;border-top-width:1px;font-family:verdana;" tr td align="center"input type="submit" style="width:6cm;" value="Back To Portal"/ /td /tr /table /form jsp:include page="./footer.jsp" / /body/html/jsp:rootHowever, also here MyFaces throws an Exception:006-08-24 13:32:56,672 ERROR [org.apache.catalina.core.ContainerBase.[Catalina].[localhost].[/Mnemonica].[jsp]] - Servlet.service() for servlet jsp threw exceptionjava.lang.IllegalStateException: getOutputStream() has already been called for this response at org.apache.catalina.connector.Response.getWriter(Response.java:599) at org.apache.catalina.connector.ResponseFacade.getWriter(ResponseFacade.java:195) at org.apache.jasper.runtime.JspWriterImpl.initOut(JspWriterImpl.java:124) at org.apache.jasper.runtime.JspWriterImpl.flushBuffer(JspWriterImpl.java:117) at org.apache.jasper.runtime.PageContextImpl.release(PageContextImpl.java:191) at org.apache.jasper.runtime.JspFactoryImpl.internalReleasePageContext(JspFactoryImpl.java:115) at org.apache.jasper.runtime.JspFactoryImpl.releasePageContext(JspFactoryImpl.java:75) at org.apache.jsp.resources.pages.fileNotFound_jsp._jspService(fileNotFound_jsp.java:145) at org.apache.jasper.runtime.HttpJspBase.service(HttpJspBase.java:97) at javax.servlet.http.HttpServlet.service(HttpServlet.java:802) at org.apache.jasper.servlet.JspServletWrapper.service(JspServletWrapper.java:332) at org.apache.jasper.servlet.JspServlet.serviceJspFile(JspServlet.java:314) at org.apache.jasper.servlet.JspServlet.service(JspServlet.java:264) at javax.servlet.http.HttpServlet.service(HttpServlet.java:802) at org.apache.catalina.core.ApplicationFilterChain.internalDoFilter(ApplicationFilterChain.java:252) at org.apache.catalina.core.ApplicationFilterChain.doFilter(ApplicationFilterChain.java:173) at org.apache.catalina.core.ApplicationDispatcher.invoke(ApplicationDispatcher.java:672) at org.apache.catalina.core.ApplicationDispatcher.processRequest(ApplicationDispatcher.java:465) at org.apache.catalina.core.ApplicationDispatcher.doForward(ApplicationDispatcher.java:398) at org.apache.catalina.core.ApplicationDispatcher.forward(ApplicationDispatcher.java:301) at org.apache.catalina.core.StandardHostValve.custom(StandardHostValve.java:363) at org.apache.catalina.core.StandardHostValve.status(StandardHostValve.java:284) at org.apache.catalina.core.StandardHostValve.invoke(StandardHostValve.java:136) at org.apache.catalina.valves.ErrorReportValve.invoke(ErrorReportValve.java:105) at org.apache.catalina.core.StandardEngineValve.invoke(StandardEngineValve.java:107) at org.apache.catalina.connector.CoyoteAdapter.service(CoyoteAdapter.java:148) at org.apache.coyote.http11.Http11Processor.process(Http11Processor.java:869) at org.apache.coyote.http11.Http11BaseProtocol$Http11ConnectionHandler.processConnection(Http11BaseProtocol.java:664) at org.apache.tomcat.util.net.PoolTcpEndpoint.processSocket(PoolTcpEndpoint.java:527) at org.apache.tomcat.util.net.LeaderFollowerWorkerThread.runIt(LeaderFollowerWorkerThread.java:80) at org.apache.tomcat.util.threads.ThreadPool$ControlRunnable.run(ThreadPool.java:684) at java.lang.Thread.run(Thread.java:613)Aug 24, 2006 1:32:56 PM org.apache.catalina.core.StandardHostValve customSEVERE: Exception Processing ErrorPage[errorCode=404, location=/resources/pages/fileNotFound.jsp]org.apache.jasper.JasperException: getOutputStream() has already been called for this response at org.apache.jasper.servlet.JspServletWrapper.handleJspException(JspServletWrapper.java:510) at org.apache.jasper.servlet.JspServletWrapper.service(JspServletWrapper.java:387) at org.apache.jasper.servlet.JspServlet.serviceJspFile(JspServlet.java:314) at org.apache.jasper.servlet.JspServlet.service(JspServlet.java:264) at javax.servlet.http.HttpServlet.service(HttpServlet.java:802)
Re: MyFaces failing to show JSF error page (bug)
Hi Fintan, You're right, the last solution threw "Catalina" errors.(btw I didn't "configure" Tomcat, just added the docbase of the app, that's all there should be done no?)You wouldn't by any chance have an idea what the MyFaces errors are about (cf. my post from yesterday, same thread, 23.06h)I would prefer making that work (as it's a JSF solution, I would have easy access to my msg bundle etc)Any idea on how to make that "subview" solution work/remedy that error?Thx, WolfOn 24 Aug 2006, at 14:04, Conway. Fintan ((IT Solutions)) wrote: Hi Wolf, However, also here MyFaces throws an Exception: 006-08-24 13:32:56,672 ERROR [org.apache.catalina.core.ContainerBase.[Catalina].[localhost].[/Mnemonica].[jsp]] - Servlet.service() for servlet jsp threw exception ... None of these errors are thrown from MyFaces. These look like pure Tomcat errors. This might indicate that Tomcat is incorrectly configured. Regards, Fintan * ** *** ** * ** *** ** * ** *** ** * 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. Any views or opinions presented are solely those of the author, and do not necessarily represent those of ESB. If you have received this email in error please notify the sender. Although ESB scans e-mail and attachments for viruses, it does not guarantee that either are virus-free and accepts no liability for any damage sustained as a result of viruses. * ** *** ** * ** *** ** * ** *** ** *
Re: MyFaces failing to show JSF error page (bug)
Apparently It's a (documented) Tomahawk-issue: nr 579. :-(I hope this gets corrected soon; I can imagine every application needs to use such customized error-page.WolfOn 24 Aug 2006, at 14:04, Conway. Fintan ((IT Solutions)) wrote: Hi Wolf, However, also here MyFaces throws an Exception: 006-08-24 13:32:56,672 ERROR [org.apache.catalina.core.ContainerBase.[Catalina].[localhost].[/Mnemonica].[jsp]] - Servlet.service() for servlet jsp threw exception ... None of these errors are thrown from MyFaces. These look like pure Tomcat errors. This might indicate that Tomcat is incorrectly configured. Regards, Fintan * ** *** ** * ** *** ** * ** *** ** * 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. Any views or opinions presented are solely those of the author, and do not necessarily represent those of ESB. If you have received this email in error please notify the sender. Although ESB scans e-mail and attachments for viruses, it does not guarantee that either are virus-free and accepts no liability for any damage sustained as a result of viruses. * ** *** ** * ** *** ** * ** *** ** *
Re: MessageBundle: internationalization problem
Also make sure you followed the proper filename conventions. So e.g. yourApp.properties for English, and yourApp_de.properties for German. Otherwise the Framework can't figure out what file serves for what language. :-) This is also the way to slip in some jokes; you could e.g. use a weird extention never used at your place (like the one for swahili) to provide a local German dialect version of your app. (to make that work, your users would of course add that to their browser languages... ) Wolf On 24 Aug 2006, at 14:05, Dennis Klemann wrote: Hi there, I recently implemented a website using JSF and MyFaces. Almost everything works fine now. The one thing that doesn't: The messages that appear when e.g. a required text field hasn't been filled all come from the en message bundle, although the browser has another language setting (e.g. de). For now, I renamed the de message bundle to en, but I see it as a temporary solution only. Shouldn't the language setting depend on the browser preferences? Or is there another way to choose the language? I've posted this problem to the JIRA, but got forwarded to this mailing list: http://issues.apache.org/jira/browse/MYFACES-1380 Kind regard, Dennis
Re: MessageBundle: internationalization problem
It's about the standard message bundle that comes with MyFaces and contains messages such as (quoted from memory) Fill in this required field - so I don't see a problem here. :-) -- And does it follow the _de.properties filename convention? Definitely sounds interesting, especially where I work at the moment (bavaria). Unfortunately, my boss wouldn't be amused about this. ;-) -- Don't let that ruin yr fun, what are the chances your boss has Swahili set as an accepted language in his browser? Don't forget the user satisfaction aspect. Such a localised app version could have a positive effect. Wolf
Re: MessageBundle: internationalization problem
Mmm. Used like that I would say loalisation means: use it only like this on yr local computer. ;-) To the effect you wish, you can also have app_deV1.properties (old version) app_deV2.properties (more recent version) ... app_de.properties (actual one) You can rename as you see fit. Then again, this is what a version system really is supposed to do. (No need even, if you use Eclipse, you can go back to previous versions without a dedicated CVS.) That aside, I do actaully see a value for it for local dialects that didn't make it to the i18n codes. The differences are sometimes small but significant nevertheless, not to mention cultural sensitivities. (or, plain fun!) It provides a kind and nice way to ship the app with an Easter Egg. Warning: I did this onec turned out not to be a gratuit move; at every new update of the app, they insist to have an upgrade for their dialect bundle too! Their sysadmin now preinstalls every PC/browser with Swahili just for this... The other use I've had for it: the semantics of an app I had to develop were quite heavy there were frequent staff changes. So I used -again- the Swahili lang code for a version of the app with much more verbose GUI labels. This way, newcomers could have the full text untill they knew what the labels meant, to then switch to how the GUI was meant (short aesthestic) (For this however, titles seem to be, without doubt, a better candidate. I guess) Peace, Wolf On 24 Aug 2006, at 16:24, Conway. Fintan ((IT Solutions)) wrote: But seriously folks, this might be a good way to test changes to the properties file. Write the new changes in your Zulu properties file, change the locale in your browser to Zulu and check the new changes are OK. If something is wrong, you simply keep your original properties file. If the changes are OK, just change the '_zu' part of the new properties file (overwriting the original) and you are good to go. Gives a different meaning to localisation testing? -Original Message- This is also the way to slip in some jokes; you could e.g. use a weird extention never used at your place (like the one for swahili) to provide a local German dialect version of your app. (to make that work, your users would of course add that to their browser languages... ) * ** *** ** * ** *** ** * ** *** ** * 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. Any views or opinions presented are solely those of the author, and do not necessarily represent those of ESB. If you have received this email in error please notify the sender. Although ESB scans e-mail and attachments for viruses, it does not guarantee that either are virus-free and accepts no liability for any damage sustained as a result of viruses. * ** *** ** * ** *** ** * ** *** ** *
Re: How can I use a variable that this in session?
- in yr backing bean: via the External Context (FacesContext.getCurrentInstance() -- session) - in yr page: have a look here: http://wiki.apache.org/myfaces/ InvokingJsfPagesWithStandardUrls good luck, -- Wolf On 24 Aug 2006, at 18:06, Wdiaz wrote: Hi. How can I use a variable that this in session? I have this: %String estilo = 001; % I try to use the variable like that h:commandButton id=boton value=Show more action= image=../ images_#{estilo}/ico_lim.gif/ but it does not work, The html remains like that input id=frmPro:panelTabbedPane1:boton name=frmPro:panelTabbedPane1:boton type=image src=../images_/ ico_lim.gif / And it should remain like that input id=frmPro:panelTabbedPane1:boton name=frmPro:panelTabbedPane1:boton type=image src=../images_001/ ico_lim.gif / How I do? -- Cordialmente William Diaz Pabón Coordinador Técnico de Desarrollo Vicerrectoría de Gestión y Desarrollo Tecnológico Universidad de Pamplona
Re: How to get c:out working with MyFaces?
Not sure you can mix-match all of these technologies *yet* (I vaguely remember I tried that forEach stuff too, but cound't get it to work and the conclusion was all these technologies coudn't be used together - IF I remember that correctly, better double-check) -- Wolf On 24 Aug 2006, at 18:29, Chris Hane wrote: I am trying to create an array of arrays (basically a lookup) in javascript on my page. When I execute the following, I get an error that c:out is not recognized. c:out Tag Library supports namespace: http://java.sun.com/jstl/ core, but no tag was defined for name: out I am using - myfaces 1.1.3 - facelets 1.1.11 - jboss/seam (latest) - jstl (not sure how to tell which version - looks like 1.1) Here is the code: h:form id=form1 snip lots of facelets code/ script type=text/javascript language=Javascript1.1 ship = new Array( c:forEach items=#{cart.methodThatReturnsASet} var=rate new Array(c:out value=#{rate.method.id}/, c:out value=#{rate.amount}/) /c:forEach ); /script /h:form I am trying to output two properties from each item in the set. I've tried different variations on the c:out / without success (h:outputText/, straight el without a tag, and tried replacing # with $). Any thoughts on how I can output the two properties on the iterated items? Thanks, Chris
Re: How to get c:out working with MyFaces?
Thanks. I remember this now. I've not tried to combine them, so I forgot there was an issue. Until I move to JSF 1.2 -- Right indeed. That was it. Anyone an idea of the roadmap (timewise) for MyFaces to get up to par with JSF 1.2? (Martin? :-) Wolf
MyFaces failing to show JSF error page (bug)
Hi, Browsing through earlier posts, it appears that if you specify an error-page in the web.xml AND IF this page contains jsf tags (pure jsp html goes aparently fine), MyFaces throws an Exception. I've experienced this myself too. Is there a remedy/fix planned? The code:In my web.xml I have:!-- For Error Handling: for both general java exceptions and the Page Not Found case: -- error-page error-code404/error-code location/resources/pages/fileNotFound.jsp/location /error-page error-page exception-typejava.lang.Exception/exception-type location/resources/pages/generalJavaErrorPage.jsp/location /error-page E.g. the fileNotFound page features:?xml version="1.0" encoding="UTF-8" standalone="yes" ?jsp:root xmlns:jsp="http://java.sun.com/JSP/Page" version="2.0" xmlns="http://www.w3.org/1999/xhtml" xmlns:f="http://java.sun.com/jsf/core" xmlns:h="http://java.sun.com/jsf/html" xmlns:t="http://myfaces.apache.org/tomahawk" jsp:directive.page contentType="text/html;charset=utf-8"/html head link href="" rel="stylesheet" type="text/css"/ /head body topmargin="0" leftmargin="0" rightmargin="0" marginheight="0" marginwidth="0" class="body" f:view f:loadBundle basename="x.y.z" var="labels" / f:subview id="header" jsp:include page="./header.jsp" / /f:subview h:form id="pageNotFoundForm" table align="center" tr td style="vertical-align:middle;" colspan="2"h3h:outputLabel value="#{labels.error_Title}" //h3 /td /tr tr td align="center" colspan="5" h:outputLabel value="#{labels.error_BadURLTit}" / /td /tr tr td align="center" width="90%" colspan="3" valign="middle" style="error" h:outputLabel value="#{labels.error_BadURL1} "/ jsp:_expression_request.getRequestURL()/jsp:_expression_, h:outputLabel value=" #{labels.error_BadURL2}"/ /td /tr /table /h:form f:subview id="footer" jsp:include page="./footer.jsp" / /f:subview /f:view /body/html/jsp:root___The error I'm getting is: 2006-08-23 11:28:05,661 ERROR [javax.faces.webapp.UIComponentTag] - Faces context not found. getResponseWriter will fail. Check if the FacesServlet has been initialized at all in your web.xml.2006-08-23 11:28:05,697 ERROR [org.apache.catalina.core.ContainerBase.[Catalina].[localhost].[/Mnemonica].[jsp]] - Servlet.service() for servlet jsp threw exceptionjava.lang.NullPointerException at javax.faces.webapp.UIComponentTag.setupResponseWriter(UIComponentTag.java:929) at javax.faces.webapp.UIComponentTag.doStartTag(UIComponentTag.java:310) at org.apache.myfaces.taglib.core.ViewTag.doStartTag(ViewTag.java:70) at org.apache.jsp.resources.pages.fileNotFound_jsp._jspService(fileNotFound_jsp.java:80) at org.apache.jasper.runtime.HttpJspBase.service(HttpJspBase.java:97) at javax.servlet.http.HttpServlet.service(HttpServlet.java:802) at org.apache.jasper.servlet.JspServletWrapper.service(JspServletWrapper.java:332) at org.apache.jasper.servlet.JspServlet.serviceJspFile(JspServlet.java:314) at org.apache.jasper.servlet.JspServlet.service(JspServlet.java:264) at javax.servlet.http.HttpServlet.service(HttpServlet.java:802) at org.apache.catalina.core.ApplicationFilterChain.internalDoFilter(ApplicationFilterChain.java:252) at org.apache.catalina.core.ApplicationFilterChain.doFilter(ApplicationFilterChain.java:173) at org.apache.catalina.core.ApplicationDispatcher.invoke(ApplicationDispatcher.java:672) at org.apache.catalina.core.ApplicationDispatcher.processRequest(ApplicationDispatcher.java:465) at org.apache.catalina.core.ApplicationDispatcher.doForward(ApplicationDispatcher.java:398) at org.apache.catalina.core.ApplicationDispatcher.forward(ApplicationDispatcher.java:301) at org.apache.catalina.core.StandardHostValve.custom(StandardHostValve.java:363) at org.apache.catalina.core.StandardHostValve.status(StandardHostValve.java:284) at org.apache.catalina.core.StandardHostValve.invoke(StandardHostValve.java:136) at org.apache.catalina.valves.ErrorReportValve.invoke(ErrorReportValve.java:105) at org.apache.catalina.core.StandardEngineValve.invoke(StandardEngineValve.java:107) at org.apache.catalina.connector.CoyoteAdapter.service(CoyoteAdapter.java:148) at org.apache.coyote.http11.Http11Processor.process(Http11Processor.java:869) at org.apache.coyote.http11.Http11BaseProtocol$Http11ConnectionHandler.processConnection(Http11BaseProtocol.java:664) at org.apache.tomcat.util.net.PoolTcpEndpoint.processSocket(PoolTcpEndpoint.java:527) at org.apache.tomcat.util.net.LeaderFollowerWorkerThread.runIt(LeaderFollowerWorkerThread.java:80) at org.apache.tomcat.util.threads.ThreadPool$ControlRunnable.run(ThreadPool.java:684) at java.lang.Thread.run(Thread.java:613)Aug 23, 2006 11:28:05 AM org.apache.catalina.core.StandardHostValve customSEVERE: Exception Processing ErrorPage[errorCode=404, location=/resources/pages/fileNotFound.jsp]org.apache.jasper.JasperException: Exception in JSP: /resources/pages/fileNotFound.jsp:1815: 16: body
Re: MyFaces failing to show JSF error page (bug)
That's not true, it suffices to map the jsp extention to the MyFaces Servlet and it will correctly deal with the JSF tags inside. Besides, otherwise all my other pages wouldn't work either - they all have jsp extensions. No, something -I don't know what- makes the treatement of this errorpage different. Btw I'm running MyFaces 1.1.4 snapshot. (due other probs not running v.113) Wolf On 23 Aug 2006, at 13:52, Guy Coleman wrote: If your error page contains JSF then the location should use the .jsf extension (or whatever url mapping the FacesServlet is configured to use): error-page error-code404/error-code location/resources/pages/fileNotFound.jsf/location /error-page etc.
Re: JSF Life Cycle / JSF Rendering question / Spring
Hi Dhanji, Thanks for taking the time to reply. I'll reply in between yr posting. From a quick glance you have globalOnly=true in your h:messages and it looks like you're adding a message with a handle userForm:errors (non-global). Try setting globalOnly to false or creating a faces message with a null handle (to make the message global). -- True remark. I had tried this first, but to no avail. (h/ t:messages is buguous) After trying this, I added an ID(id=errors) to the h:messages and tried to add it to the component by means of the ID. (also without success though) For the second problem of using outputLabel with h:message , I don't see any code adding a faces message for component id=globalErrorMsg so likely as not it will not show anything. But I don't think Ive understood what you're trying to do here so this may not be an appropriate answer... -- What I tried there, is not adding a message, yet changing the actual value of the label itself instead of adding a msg to it. Thus (ab-)using the label as a message container... :-) PS: shouldn't it be *growl* =) -- True!! (once agin realizing I'm sitting too much behind computers ;-) Wolf -Original Message- From: Wolf Benz [mailto:[EMAIL PROTECTED] Sent: Friday, 11 August 2006 5:53 AM To: MyFaces Discussion Subject: Re: JSF Life Cycle / JSF Rendering question / Spring In the meanwhile, I'v tried someting else, without success though: Instead of woring with h:messages (which is buguous, cf earlier post), I worked with a regular label inside the form: ... h:outputLabel styleClass=error value= id=globalErrorMsg/ h:message for=globalErrorMsg styleClass=error showSummary=true / ... and coded: (in the same interceptor) FacesEvent event = new ValueChangeEvent(errComp, oldValue, newValue); event.setPhaseId(javax.faces.event.PhaseId.ANY_PHASE); errComp.decode(getFacesContext()); // apply values to this comp getFacesContext().getViewRoot().processUpdates(getFacesContext()); With this I had hoped (ANY_PHASE -- at least also the render respons phase) the outputLabel component would show newValue But it didn't! Someone to give me a hint? Grr. Wolf (hence the gr ;-) _ On 10 Aug 2006, at 20:24, Wolf Benz wrote: Hi, I have this question: I am intercepting a JSF Bean 's action method (to apply method-based security) with Spring. In it I do this (test code, hance the hard coding of a few vars) in Spring's invoke() method of the interceptor: ... getFacesContext().addMessage(usersForm:errors, new FacesMessage (Security Error!)); // add msg to comp with clint ID errors in form usersForm Iterator it3 = getFacesContext().getMessages(usersForm:errors); while(it3.hasNext()){ logger.info(This is a msg of errors: + ((FacesMessage)it3.next()).getSummary());} UIMessages errComp = (UIMessages)rootview.findComponent (usersForm:errors); if(errComp == null)logger.info(errComp is null!); errComp.decode(getFacesContext()); // apply values to this comp getFacesContext().getViewRoot().processUpdates(getFacesContext ());// force recursive (?) master refresh ... return null; (to force JSF to stay on teh same page - this works fine. (if I call return inv.proceed(); it just continues of course)) Observations: - This is a msg of errors: actually prints out the error msg again, in my Eclipse console, so the error msg WAS effectively added to the component. - errComp is null is never printed. - As the msg wasn't shown in the page, I added the 2nd paragraph, hoping to force an updated rendering this way. -- What is strange: the actual error message, is NEVER shown. In the page ,I have: ... t:messages id=errors globalOnly=true styleClass=error / /h:form ... Any ideas as to what I'm doing wrong/how to force this component being rendered after all? Thx guys, Wolf This correspondence is for the named persons only. It may contain confidential or privileged information or both. No confidentiality or privilege is waived or lost by any mis transmission. If you receive this correspondence in error please delete it from your system immediately and notify the sender. You must not disclose, copy or relay on any part of this correspondence, if you are not the intended recipient. Any opinions expressed in this message are those of the individual sender except where the sender expressly, and with the authority, states them to be the opinions of the Department of Emergency Services, Queensland.
JSF Life Cycle / JSF Rendering question / Spring
Hi, I have this question: I am intercepting a JSF Bean 's action method (to apply method-based security) with Spring. In it I do this (test code, hance the hard coding of a few vars) in Spring's invoke() method of the interceptor: ... getFacesContext().addMessage(usersForm:errors, new FacesMessage (Security Error!)); // add msg to comp with clint ID errors in form usersForm Iterator it3 = getFacesContext().getMessages(usersForm:errors); while(it3.hasNext()){ logger.info(This is a msg of errors: + ((FacesMessage)it3.next()).getSummary());} UIMessages errComp = (UIMessages)rootview.findComponent (usersForm:errors); if(errComp == null)logger.info(errComp is null!); errComp.decode(getFacesContext()); // apply values to this comp getFacesContext().getViewRoot().processUpdates(getFacesContext ()); // force recursive (?) master refresh ... return null; (to force JSF to stay on teh same page - this works fine. (if I call return inv.proceed(); it just continues of course)) Observations: - This is a msg of errors: actually prints out the error msg again, in my Eclipse console, so the error msg WAS effectively added to the component. - errComp is null is never printed. - As the msg wasn't shown in the page, I added the 2nd paragraph, hoping to force an updated rendering this way. -- What is strange: the actual error message, is NEVER shown. In the page ,I have: ... t:messages id=errors globalOnly=true styleClass=error / /h:form ... Any ideas as to what I'm doing wrong/how to force this component being rendered after all? Thx guys, Wolf
Re: JSF Life Cycle / JSF Rendering question / Spring
In the meanwhile, I'v tried someting else, without success though: Instead of woring with h:messages (which is buguous, cf earlier post), I worked with a regular label inside the form: ... h:outputLabel styleClass=error value= id=globalErrorMsg/ h:message for=globalErrorMsg styleClass=error showSummary=true / ... and coded: (in the same interceptor) FacesEvent event = new ValueChangeEvent(errComp, oldValue, newValue); event.setPhaseId(javax.faces.event.PhaseId.ANY_PHASE); errComp.decode(getFacesContext()); // apply values to this comp getFacesContext().getViewRoot().processUpdates(getFacesContext()); With this I had hoped (ANY_PHASE -- at least also the render respons phase) the outputLabel component would show newValue But it didn't! Someone to give me a hint? Grr. Wolf (hence the gr ;-) _ On 10 Aug 2006, at 20:24, Wolf Benz wrote: Hi, I have this question: I am intercepting a JSF Bean 's action method (to apply method-based security) with Spring. In it I do this (test code, hance the hard coding of a few vars) in Spring's invoke() method of the interceptor: ... getFacesContext().addMessage(usersForm:errors, new FacesMessage (Security Error!)); // add msg to comp with clint ID errors in form usersForm Iterator it3 = getFacesContext().getMessages(usersForm:errors); while(it3.hasNext()){ logger.info(This is a msg of errors: + ((FacesMessage)it3.next()).getSummary());} UIMessages errComp = (UIMessages)rootview.findComponent (usersForm:errors); if(errComp == null)logger.info(errComp is null!); errComp.decode(getFacesContext()); // apply values to this comp getFacesContext().getViewRoot().processUpdates(getFacesContext ()); // force recursive (?) master refresh ... return null; (to force JSF to stay on teh same page - this works fine. (if I call return inv.proceed(); it just continues of course)) Observations: - This is a msg of errors: actually prints out the error msg again, in my Eclipse console, so the error msg WAS effectively added to the component. - errComp is null is never printed. - As the msg wasn't shown in the page, I added the 2nd paragraph, hoping to force an updated rendering this way. -- What is strange: the actual error message, is NEVER shown. In the page ,I have: ... t:messages id=errors globalOnly=true styleClass=error / /h:form ... Any ideas as to what I'm doing wrong/how to force this component being rendered after all? Thx guys, Wolf
Re: h:messages buguous
No I hadn't. Seeing a familiar name in the admin list though ;-)I issued a bug in Jira today. Thanks, WolfOn 27 Jul 2006, at 13:12, Cagatay Civici wrote:Hi Wolf,Have you tried facestrace?It also displays the faces messages in the request,http://sourceforge.net/projects/facestraceCagatay On 7/26/06, Wolf Benz [EMAIL PROTECTED] wrote: you can put your logging level at debug to get alot more informationon whatisgoing wrong.-- This is interesting:"2006-07-26 10:48:02,296 DEBUG[org.apache.myfaces.shared_impl.util.MessageUtils] - adding message Global Security Test for clientId null"I think it means the message is indeed added (and as it deals abouth:messageS, the clientId is indeed null, it's global message)Yet, even though there is a message added to the stack, the code just follows the navigation as if nothing went wrong. (when a message isadded, the JSF automatically keeps the user at the same page right -starting to doubt even this!)A little further:"006-07-26 10:48:05,074 DEBUG [org.apache.myfaces.application.NavigationHandlerImpl] -handleNavigation fromAction=#{managerbean.submitAction}outcome=usrMgmt toViewId =userManagementChoice.jsp redirect=false"-- This is the outcome as if all went fine (although a message is added in the same method, a little sooner)Wolf
Re: stupid h:messages question
try: ctx.addMessage(null, new FacesMessage(FacesMessage.SEVERITY_ERROR,Test Summary,Test )); h:messages ... should go inside the form. you could put showSummary=true in the h:messages ... (if this isn't the default) -- I had already tried those. (different constructors, different places) To no avail. :-( you can put your logging level at debug to get alot more information on what is going wrong. -- Good idea, I'll see what that gives me concerning messages. Thx, Wolf
Re: stupid h:messages question
you can put your logging level at debug to get alot more information on what is going wrong. -- This is interesting: 2006-07-26 10:48:02,296 DEBUG [org.apache.myfaces.shared_impl.util.MessageUtils] - adding message Global Security Test for clientId null I think it means the message is indeed added (and as it deals about h:messageS, the clientId is indeed null, it's global message) Yet, even though there is a message added to the stack, the code just follows the navigation as if nothing went wrong. (when a message is added, the JSF automatically keeps the user at the same page right - starting to doubt even this!) A little further: 006-07-26 10:48:05,074 DEBUG [org.apache.myfaces.application.NavigationHandlerImpl] - handleNavigation fromAction=#{managerbean.submitAction} outcome=usrMgmt toViewId =userManagementChoice.jsp redirect=false -- This is the outcome as if all went fine (although a message is added in the same method, a little sooner) Wolf
h:messages buguous
I think it's a bug. Tried anything within reason. Wolf
Re: h:messages buguous
... and apparently a very old one too :-) (link) Perhaps a note on this page could be included some stuff doesn't work. When I look at the source of the page rendered, my h:messages id=errors styleClass=error isn 't even rendered. (which explains these msgs are added to teh stack, yet not shown in the page) But this is weird: in debug mode, the MyFaces output provides this: html.HtmlMessages id=errors forceIdIndex=true errorClass=NULL errorStyle=NULL family=javax.faces.Messages fatalClass=NULL fatalStyle=NULL globalOnly=false infoClass=NULL infoStyle=NULL layout=list rendered=true rendererType=javax.faces.Messages rendersChildren=false showDetail=false showSummary=true style=NULL styleClass=error title=NULL tooltip=false transient=false warnClass=NULL warnStyle=NULL/ Yet the show source does NOT include such element. Wolf ___ For those interested, some code source below. _ (the page:) ?xml version=1.0 encoding=UTF-8 standalone=yes ? jsp:rootxmlns:jsp=http://java.sun.com/JSP/Page; version=2.0 xmlns=http://www.w3.org/1999/xhtml; xmlns:f=http://java.sun.com/jsf/core; xmlns:h=http://java.sun.com/jsf/html; xmlns:t=http://myfaces.apache.org/tomahawk; jsp:directive.page contentType=text/html;charset=utf-8/ html head link href=../css/ss.css rel=stylesheet type=text/css/ /head body topmargin=0 leftmargin=0 rightmargin=0 marginheight=0 marginwidth=0 class=body f:view f:loadBundle basename=x.y.z.labels var=labels / f:subview id=header jsp:include page=./header.jsp / /f:subview h:form id=usersForm br / table align=center cellpadding=1 width=90% style=vertical-align:middle;background-image:url('../pics/ metal.jpg');padding:8px;border-style:outset;font-size:11pt;font- family:verdana; tr td style=vertical-align:middle; colspan=2h3img src=../pics/groenBolleke.png align=bottom border=0 / #160;h:outputLabel value=#{labels.usrMgt_Title} //h3/td /tr tr td align=center colspan=5 style=border-bottom-width: 1px;border-bottom-style:solid;border-bottom-color:black;font-size: 10px;font-style:italic; h:outputLabel value=#{labels.usrMgt_SubTitle} / /td /tr tr td colspan=5 #160; /td /tr tr td colspan=5 #160; /td /tr tr align=center !-- For the simple fields in the first table: -- td width=5%#160; /td td colspan=3 style=border-style:solid; border-width: 1px;border-color: SlateGrey align=center h:panelGrid bgcolor=SlateGrey columns=2 id=userTabelSimple cellpadding=2 cellspacing=0 width=100% align=center columnClasses=labelKolom,inhoudKolom rowClasses=rij1,rij2 h:outputLabel value=#{labels.usrMgt_firstn}/ h:inputText value=#{managerbean.currentUser.firstName} id=voornaam readonly=#{!managerbean.editableFieldMode} accesskey=f/ h:outputLabel value=#{labels.usrMgt_lastn}/ h:inputText value=#{managerbean.currentUser.lastName} id=achternaam readonly=#{!managerbean.editableFieldMode} accesskey=n/ h:outputLabel value=#{labels.usrMgt_loginn}/ h:inputText value=#{managerbean.currentUser.loginName} id=login readonly=#{!managerbean.editableFieldMode} accesskey=l/ h:outputLabel value=#{labels.usrMgt_passw}/ h:inputText value=#{managerbean.currentUser.password} id=paswoord readonly=#{!managerbean.editableFieldMode} accesskey=p / h:outputLabel value=#{labels.usrMgt_bday}/ h:inputText value=#{managerbean.currentUser.birthday} readonly=#{!managerbean.editableFieldMode} accesskey=b f:convertDateTime dateStyle=short pattern=dd/MM/ type=date/ /h:inputText h:outputLabel value=#{labels.usrMgt_mail}/ h:inputText value=#{managerbean.currentUser.email} id=mail readonly=#{!managerbean.editableFieldMode} accesskey=e/ h:outputLabel value=#{labels.usrMgt_tel}/ h:inputText
Re: h:messages buguous
The links of the former post didn't make it. -- Hence: 1/ URL reporting these bugs more than a year ago: (April 12, 2005) http://mail-archives.apache.org/mod_mbox/myfaces-users/200504.mbox/% [EMAIL PROTECTED] 2/ URL on MyFaces site ignoring these issues: http://wiki.apache.org/ myfaces/Displaying_Errors/Infos/Warnings_in_JSF_Pages Wolf On 26 Jul 2006, at 15:10, Wolf Benz wrote: ... and apparently a very old one too :-) (link) Perhaps a note on this page could be included some stuff doesn't work. When I look at the source of the page rendered, my h:messages id=errors styleClass=error isn 't even rendered. (which explains these msgs are added to teh stack, yet not shown in the page) But this is weird: in debug mode, the MyFaces output provides this: html.HtmlMessages id=errors forceIdIndex=true errorClass=NULL errorStyle=NULL family=javax.faces.Messages fatalClass=NULL fatalStyle=NULL globalOnly=false infoClass=NULL infoStyle=NULL layout=list rendered=true rendererType=javax.faces.Messages rendersChildren=false showDetail=false showSummary=true style=NULL styleClass=error title=NULL tooltip=false transient=false warnClass=NULL warnStyle=NULL/ Yet the show source does NOT include such element. Wolf ___ For those interested, some code source below. _ (the page:) ?xml version=1.0 encoding=UTF-8 standalone=yes ? jsp:rootxmlns:jsp=http://java.sun.com/JSP/Page; version=2.0 xmlns=http://www.w3.org/1999/xhtml; xmlns:f=http://java.sun.com/jsf/core; xmlns:h=http://java.sun.com/jsf/html; xmlns:t=http://myfaces.apache.org/tomahawk; jsp:directive.page contentType=text/html;charset=utf-8/ html head link href=../css/ss.css rel=stylesheet type=text/css/ /head body topmargin=0 leftmargin=0 rightmargin=0 marginheight=0 marginwidth=0 class=body f:view f:loadBundle basename=x.y.z.labels var=labels / f:subview id=header jsp:include page=./header.jsp / /f:subview h:form id=usersForm br / table align=center cellpadding=1 width=90% style=vertical-align:middle;background-image:url('../pics/ metal.jpg');padding:8px;border-style:outset;font-size:11pt;font- family:verdana; tr td style=vertical-align:middle; colspan=2h3img src=../pics/groenBolleke.png align=bottom border=0 / #160;h:outputLabel value=#{labels.usrMgt_Title} //h3/td /tr tr td align=center colspan=5 style=border-bottom-width: 1px;border-bottom-style:solid;border-bottom-color:black;font-size: 10px;font-style:italic; h:outputLabel value=#{labels.usrMgt_SubTitle} / /td /tr tr td colspan=5 #160; /td /tr tr td colspan=5 #160; /td /tr tr align=center !-- For the simple fields in the first table: -- td width=5%#160; /td td colspan=3 style=border-style:solid; border-width: 1px;border-color: SlateGrey align=center h:panelGrid bgcolor=SlateGrey columns=2 id=userTabelSimple cellpadding=2 cellspacing=0 width=100% align=center columnClasses=labelKolom,inhoudKolom rowClasses=rij1,rij2 h:outputLabel value=#{labels.usrMgt_firstn}/ h:inputText value=#{managerbean.currentUser.firstName} id=voornaam readonly=#{!managerbean.editableFieldMode} accesskey=f/ h:outputLabel value=#{labels.usrMgt_lastn}/ h:inputText value=#{managerbean.currentUser.lastName} id=achternaam readonly=#{!managerbean.editableFieldMode} accesskey=n/ h:outputLabel value=#{labels.usrMgt_loginn}/ h:inputText value=#{managerbean.currentUser.loginName} id=login readonly=#{!managerbean.editableFieldMode} accesskey=l/ h:outputLabel value=#{labels.usrMgt_passw}/ h:inputText value=#{managerbean.currentUser.password} id=paswoord readonly=#{!managerbean.editableFieldMode} accesskey=p / h:outputLabel value=#{labels.usrMgt_bday}/ h:inputText value=#{managerbean.currentUser.birthday} readonly=#{!managerbean.editableFieldMode} accesskey=b f:convertDateTime dateStyle=short pattern=dd/MM/ type=date/ /h:inputText
stupid h:messages question
Hi List, I'm afraid I have a beginner's question, but either smth's terribly wrong or I have overlooked smth trivial. I'm just trying to display a global message, yet they won't show! What I tried, is: in the bean, I've tried both the Std way and the Apache-way (with MessageUtils): FacesContext ctx = FacesContext.getCurrentInstance(); ctx.addMessage(null, new FacesMessage(Test Summary,Test )); MessageUtils.addMessage(FacesMessage.SEVERITY_ERROR,secMsg_test , null); -- In the page, I'v tried with both Std h: Apache t: ... both without effect: t:messages errorStyle=error/ /h:form h:messages errorClass=error / btw as you can see, I've also tried to put them before after the h:form-tag. Does that really matter? As I understood, from the moment you add a message, the same page is redisplayed with the message.(/s) This works fine for all h:message for=ID-of-a-component /, but I never got this h:messages to work!! Any ideas? (don't mind manners, I'm obviously missing smth basic here :-) Wolf
Re: JSF/Spring integration - managed-property problem
Wow that sounds like a mess! -- Now that's a nice thing to say about someone else's code ;-) Re: the # at the end that just means your extensions filter is probably not binding the javascript properly. All links (generally) in JSF are just to # on the current page, then javascript traps the action and converts it to a form POST (because HTML does not support anything like a href=… method=”post”). The fact that it’s not taking you anywhere (except #) means the javascript did not catch the click properly. I would guess this is something to do with the way in which you’ve setup the filters. -- I just turned the extension filters off and I got it all back to working... :-) Are you managing your backing beans with spring? Or simply trying to inject spring beans into JSF beans? Can you show more examples of your code? -- Sure. I followed the 1st approach here: http://www.jroller.com/ page/cagataycivici?entry=integrating_jsf_and_spring (nice link) It's nice. It allows for declarative wiring. I think the reason they're not injected is because Spring injects the JSF beans after their constructor has run. I call the dependency *in* the constructor. I solved this by calling (in the JSF Constructors) : if(facade == null){ logger.warn(Facade still null. Cascading to explicit Instantiation. ); facade = (WebFacade)FacesContextUtils.getWebApplicationContext (FacesContext.getCurrentInstance()).getBean(webfacade); } As for Robert Cambell’s issue—I thought of something—the order in which the listeners occur is important. Make sure ContextLoaderListener is right at the top. -- That's the case. (read that before) Bye, Wolf
Re: JSF/Spring integration - managed-property problem
You said that it never used to happen? Do you think it could be related to an upgrade in JSF, Spring, or something else?-- Hi Robert, I upgraded to Tomcat v.5.5.17 from v.5.5.12I also upgraded from MyFaces 1.1.1 to 1.1.3.So, at first sight, I'd say it's that. Apart from that, the only thing I added was a "AddResourceFilter" in the web.xml. (4 procedure: see MyFaces site)Donno if that helps you. Wolf,On 7/17/06, Wolf Benz [EMAIL PROTECTED] wrote: The variable resolver needs to go in faces-config.xml not web.xml… -- That's the case. (indeed not in web.xml)This correspondence is for the named persons only. It may contain confidential or privileged information or both. No confidentiality or privilege is waived or lost by any mis transmission. If you receive this correspondence in error please delete it from your system immediately and notify the sender. You must not disclose, copy or relay on any part of this correspondence, if you are not the intended recipient. Any opinions expressed in this message are those of the individual sender except where the sender expressly, and with the authority, states them to be the opinions of the Department of Emergency Services, Queensland.