Re: Clustering MyFaces application with Tomcat
Binding to jsf components should be done using request scoped beans only (with session scope bean you don't allow jsf to clear the tree after the request is processed). 2007/8/27, Svilen Ivanov [EMAIL PROTECTED]: I'm trying to cluster a certain MyFaces (1.1.5, tomahawk 1.1.6) application in Tomcat 5.5.20. The applications heavily relies on session beans which use ListDataModel and HtmlDataScroller as properties. When I setup Tomcat to replicate sessions I got NotSerializableException for HtmlDataScroller. As far as I understood from MyFaces FAQ [2] list data model is not serializable and may be marked transient. Some guys recommend to build new data model out of a list [1] each time data model is requested. However I couldn't find how to solve the problem with HtmlDataScroller. My initial idea is to subclass MyFaces classes I use in the session beans and make them implement Serializable interface. How does this sound? Also I have bindings of input controls (HtmlInputText, HtmlSelectOneRadio) in these session beans. Are they also stateless as ListDataModel? I would really appreciate if you share your experience with clustering MyFaces application as well or if you point me towards resources on the Internet that might help Regards, Svilen [1] http://www.mail-archive.com/users@myfaces.apache.org/msg38166.html [2] http://wiki.apache.org/myfaces/FAQ -- Svilen Ivanov http://svilen-online.blogspot.com There is no dark side of the moon really. Matter of fact it's all dark.
AW: Search Highlighting
Hi How are you doing the search? Is it a database search, or are u using lucene, for instance? With lucene, you can use she search result highlighter to generate html, and then output it in your jsp/jsf page... Regards Mirko -Ursprüngliche Nachricht- Von: kewldude [mailto:[EMAIL PROTECTED] Gesendet: Dienstag, 28. August 2007 07:13 An: users@myfaces.apache.org Betreff: Search Highlighting I know this is a little bit off topic here, but I need to ask it here because I'm using MyFaces in this project, so here it goes... I need to present a dataTable that represents search results coming from a search query (query of books, articles,documents etc. ). Lets say I have 4 columns to display (KeyNumber,Author,Title,Subject), within those columns I need to highlight the exact words that the user used in querying/searching. Lets say the user searched for Bert Bates. The dataTable will be presented somewhat like this: KeyNumber Author Title Subject 1Eric Freeman, Bert Bates, Elisabeth Freeman Head First Design Pattern Certifications,Java 2Kathy Sierra, Bert Bates Head First Java Java, OOP As you can see, the column where the search query has a match is not highlighted completely. Only the words that match up with the search string itself. Can this be done using MyFaces? I hope you can provide some ideas and suggestions as to what approach I can use or investigate. -- View this message in context: http://www.nabble.com/Search-Highlighting-tf4339753.html#a12362158 Sent from the MyFaces - Users mailing list archive at Nabble.com.
Re: AW: Search Highlighting
Yeah I've come across that Lucene capability. Unfortunately, we are doing the search using database search. U have any more suggestions or ideas? Thanks for the reply. Sertic Mirko, Bedag wrote: Hi How are you doing the search? Is it a database search, or are u using lucene, for instance? With lucene, you can use she search result highlighter to generate html, and then output it in your jsp/jsf page... Regards Mirko -Ursprüngliche Nachricht- Von: kewldude [mailto:[EMAIL PROTECTED] Gesendet: Dienstag, 28. August 2007 07:13 An: users@myfaces.apache.org Betreff: Search Highlighting I know this is a little bit off topic here, but I need to ask it here because I'm using MyFaces in this project, so here it goes... I need to present a dataTable that represents search results coming from a search query (query of books, articles,documents etc. ). Lets say I have 4 columns to display (KeyNumber,Author,Title,Subject), within those columns I need to highlight the exact words that the user used in querying/searching. Lets say the user searched for Bert Bates. The dataTable will be presented somewhat like this: KeyNumber Author Title Subject 1Eric Freeman, Bert Bates, Elisabeth Freeman Head First Design Pattern Certifications,Java 2Kathy Sierra, Bert Bates Head First Java Java, OOP As you can see, the column where the search query has a match is not highlighted completely. Only the words that match up with the search string itself. Can this be done using MyFaces? I hope you can provide some ideas and suggestions as to what approach I can use or investigate. -- View this message in context: http://www.nabble.com/Search-Highlighting-tf4339753.html#a12362158 Sent from the MyFaces - Users mailing list archive at Nabble.com. -- View this message in context: http://www.nabble.com/Search-Highlighting-tf4339753.html#a12363190 Sent from the MyFaces - Users mailing list archive at Nabble.com.
Re: Clustering MyFaces application with Tomcat
Adrian, Thank you for your reply. Do you mean by you don't allow jsf to clear the tree - the tree of UI components or the values stored in the UI components that are bound? In the latter case I noticed that bound components in session bean persist their input values until I manually reset them (as described here [1]. Am I understanding you correctly? Regards, Svi [1] http://www.mail-archive.com/users@myfaces.apache.org/msg40105.html 2007/8/28, Adrian Mitev [EMAIL PROTECTED]: Binding to jsf components should be done using request scoped beans only (with session scope bean you don't allow jsf to clear the tree after the request is processed). 2007/8/27, Svilen Ivanov [EMAIL PROTECTED]: I'm trying to cluster a certain MyFaces ( 1.1.5, tomahawk 1.1.6) application in Tomcat 5.5.20. The applications heavily relies on session beans which use ListDataModel and HtmlDataScroller as properties. When I setup Tomcat to replicate sessions I got NotSerializableException for HtmlDataScroller. As far as I understood from MyFaces FAQ [2] list data model is not serializable and may be marked transient. Some guys recommend to build new data model out of a list [1] each time data model is requested. However I couldn't find how to solve the problem with HtmlDataScroller. My initial idea is to subclass MyFaces classes I use in the session beans and make them implement Serializable interface. How does this sound? Also I have bindings of input controls (HtmlInputText, HtmlSelectOneRadio) in these session beans. Are they also stateless as ListDataModel? I would really appreciate if you share your experience with clustering MyFaces application as well or if you point me towards resources on the Internet that might help Regards, Svilen [1] http://www.mail-archive.com/users@myfaces.apache.org/msg38166.html [2] http://wiki.apache.org/myfaces/FAQ -- Svilen Ivanov http://svilen-online.blogspot.com There is no dark side of the moon really. Matter of fact it's all dark. -- Svilen Ivanov http://svilen-online.blogspot.com There is no dark side of the moon really. Matter of fact it's all dark.
AW: AW: Search Highlighting
Ok, are you using hibernate? Hibernate Search is beta, i know, but it can build a fulltext index across your object entities, and there is your search engine... There are also other possibilities to link hibernate with lucene... Regards Mirko -Ursprüngliche Nachricht- Von: kewldude [mailto:[EMAIL PROTECTED] Gesendet: Dienstag, 28. August 2007 09:09 An: users@myfaces.apache.org Betreff: Re: AW: Search Highlighting Yeah I've come across that Lucene capability. Unfortunately, we are doing the search using database search. U have any more suggestions or ideas? Thanks for the reply. Sertic Mirko, Bedag wrote: Hi How are you doing the search? Is it a database search, or are u using lucene, for instance? With lucene, you can use she search result highlighter to generate html, and then output it in your jsp/jsf page... Regards Mirko -Ursprüngliche Nachricht- Von: kewldude [mailto:[EMAIL PROTECTED] Gesendet: Dienstag, 28. August 2007 07:13 An: users@myfaces.apache.org Betreff: Search Highlighting I know this is a little bit off topic here, but I need to ask it here because I'm using MyFaces in this project, so here it goes... I need to present a dataTable that represents search results coming from a search query (query of books, articles,documents etc. ). Lets say I have 4 columns to display (KeyNumber,Author,Title,Subject), within those columns I need to highlight the exact words that the user used in querying/searching. Lets say the user searched for Bert Bates. The dataTable will be presented somewhat like this: KeyNumber Author Title Subject 1Eric Freeman, Bert Bates, Elisabeth Freeman Head First Design Pattern Certifications,Java 2Kathy Sierra, Bert Bates Head First Java Java, OOP As you can see, the column where the search query has a match is not highlighted completely. Only the words that match up with the search string itself. Can this be done using MyFaces? I hope you can provide some ideas and suggestions as to what approach I can use or investigate. -- View this message in context: http://www.nabble.com/Search-Highlighting-tf4339753.html#a12362158 Sent from the MyFaces - Users mailing list archive at Nabble.com. -- View this message in context: http://www.nabble.com/Search-Highlighting-tf4339753.html#a12363190 Sent from the MyFaces - Users mailing list archive at Nabble.com.
Re: cambo list with multiple choice
ok it looks better,thanks! it seems impossible with a standard component.to have a multiple select rendered like h:selectOneMenu/ .. I try to add another component to display the selected items with a simple combo list.. Andrew Robinson-5 wrote: That looks right. If you want it to look better, try: h:selectManyMenu value=#{queryBean.test} style=width: 150px; height: 150px; ... Modify to get the effect you want -Andrew On 8/27/07, lmk [EMAIL PROTECTED] wrote: it's weird!! here the code i use: h:selectManyMenu value=#{queryBean.test} f:selectItem itemLabel=allo itemValue=allo/ f:selectItem itemLabel=ballo itemValue=ballo/ f:selectItem itemLabel=allo itemValue=allo/ f:selectItem itemLabel=ballo itemValue=ballo/ f:selectItem itemLabel=allo itemValue=allo/ f:selectItem itemLabel=ballo itemValue=ballo/ /h:selectManyMenu and the page is like : http://www.nabble.com/file/p12352867/manymenu.jpg do you see the problem ..? lmk wrote: ok but i have a long list, and it's not eazy to have all choices..i thinks that it exists a select box like h:selectOneMenu/ with possibility to selet many items with the CTRL key.. Andrew Robinson-5 wrote: That is what h:selectManyMenu is. What HTML control are you trying to produce? A select box with multiple selection enabled is just a control with a border with one line per option tag, so it looks like a text area. On 8/27/07, lmk [EMAIL PROTECTED] wrote: But I'd like to a get multiple select .. Andrew Robinson-5 wrote: h:selectOneMenu / On 8/27/07, lmk [EMAIL PROTECTED] wrote: sorry i talk about combo list .. I'd like to use standard components but i dont have the render that i want.. with h:selectManyMenu/ i dont get a select box but thing like text area with values to select.. Bruno Aranda wrote: Sorry, then I do not know what a cambo list is. I was thinking that you were refering to a combo list, which for me is what the selectManyMenu does - a drop down list that allows multiple selection. Can you explain what a cambo list is? Cheers, Bruno On 27/08/07, lmk [EMAIL PROTECTED] wrote: the standard selectManyMenu render is not like a cambo list.. see the render ont the right selectManyMenu, on the left selectManyListBox http://www.nabble.com/file/p12350965/debug.jpg Bruno Aranda wrote: What about the standard h:selectManyMenu? Cheers, Bruno On 27/08/07, lmk [EMAIL PROTECTED] wrote: helloo guys; Im struggled to find a useful JSF component that looks like a cambo but with a multiple choice possibility; the myfaces or tomawahk selectManyListbox can' be rendered as well as a cambo list.. Im using myfaces,facelets,rich faces and rcFaces.. do you have any solution for select many choice on a cambo list..? thanks a lot.. -- View this message in context: http://www.nabble.com/cambo-list-with-multiple-choice-tf4334822.html#a12345542 Sent from the MyFaces - Users mailing list archive at Nabble.com. -- View this message in context: http://www.nabble.com/cambo-list-with-multiple-choice-tf4334822.html#a12350965 Sent from the MyFaces - Users mailing list archive at Nabble.com. -- View this message in context: http://www.nabble.com/cambo-list-with-multiple-choice-tf4334822.html#a12351663 Sent from the MyFaces - Users mailing list archive at Nabble.com. -- View this message in context: http://www.nabble.com/cambo-list-with-multiple-choice-tf4334822.html#a12352009 Sent from the MyFaces - Users mailing list archive at Nabble.com. -- View this message in context: http://www.nabble.com/cambo-list-with-multiple-choice-tf4334822.html#a12352867 Sent from the MyFaces - Users mailing list archive at Nabble.com. -- View this message in context: http://www.nabble.com/cambo-list-with-multiple-choice-tf4334822.html#a12363544 Sent from the MyFaces - Users mailing list archive at Nabble.com.
Security role question
Hi everyone, I'm trying to implement passive security on my application. Let me explain, although a user has logged in the application there are many pages where he couldn't enter (url navigation). I have worked with Struts and the way to manage the problem is setting a role in action definition. Then when you invoke this action, ControllerManager (method call previous to every action) checks if logged user can access to this specific page (DB relations user/role/page). What I want is to prevent logged user to url navigation. Is there any way to implements this behaviour with JSF tech? I think it is a basic functionality. Thanks so much!!! Sé un Mejor Amante del Cine ¿Quieres saber cómo? ¡Deja que otras personas te ayuden! http://advision.webevents.yahoo.com/reto/entretenimiento.html
AW: AW: AW: Search Highlighting
Maybe oracle text can help you http://www.oracle.com/technology/products/text/index.html -Ursprüngliche Nachricht- Von: kewldude [mailto:[EMAIL PROTECTED] Gesendet: Dienstag, 28. August 2007 09:48 An: users@myfaces.apache.org Betreff: Re: AW: AW: Search Highlighting No im not using Hibernate, Im using plain DAOs via Oracle. Sertic Mirko, Bedag wrote: Ok, are you using hibernate? Hibernate Search is beta, i know, but it can build a fulltext index across your object entities, and there is your search engine... There are also other possibilities to link hibernate with lucene... Regards Mirko -Ursprüngliche Nachricht- Von: kewldude [mailto:[EMAIL PROTECTED] Gesendet: Dienstag, 28. August 2007 09:09 An: users@myfaces.apache.org Betreff: Re: AW: Search Highlighting Yeah I've come across that Lucene capability. Unfortunately, we are doing the search using database search. U have any more suggestions or ideas? Thanks for the reply. Sertic Mirko, Bedag wrote: Hi How are you doing the search? Is it a database search, or are u using lucene, for instance? With lucene, you can use she search result highlighter to generate html, and then output it in your jsp/jsf page... Regards Mirko -Ursprüngliche Nachricht- Von: kewldude [mailto:[EMAIL PROTECTED] Gesendet: Dienstag, 28. August 2007 07:13 An: users@myfaces.apache.org Betreff: Search Highlighting I know this is a little bit off topic here, but I need to ask it here because I'm using MyFaces in this project, so here it goes... I need to present a dataTable that represents search results coming from a search query (query of books, articles,documents etc. ). Lets say I have 4 columns to display (KeyNumber,Author,Title,Subject), within those columns I need to highlight the exact words that the user used in querying/searching. Lets say the user searched for Bert Bates. The dataTable will be presented somewhat like this: KeyNumber Author Title Subject 1Eric Freeman, Bert Bates, Elisabeth Freeman Head First Design Pattern Certifications,Java 2Kathy Sierra, Bert Bates Head First Java Java, OOP As you can see, the column where the search query has a match is not highlighted completely. Only the words that match up with the search string itself. Can this be done using MyFaces? I hope you can provide some ideas and suggestions as to what approach I can use or investigate. -- View this message in context: http://www.nabble.com/Search-Highlighting-tf4339753.html#a12362158 Sent from the MyFaces - Users mailing list archive at Nabble.com. -- View this message in context: http://www.nabble.com/Search-Highlighting-tf4339753.html#a12363190 Sent from the MyFaces - Users mailing list archive at Nabble.com. -- View this message in context: http://www.nabble.com/Search-Highlighting-tf4339753.html#a12363589 Sent from the MyFaces - Users mailing list archive at Nabble.com.
Re: AW: AW: Search Highlighting
No im not using Hibernate, Im using plain DAOs via Oracle. Sertic Mirko, Bedag wrote: Ok, are you using hibernate? Hibernate Search is beta, i know, but it can build a fulltext index across your object entities, and there is your search engine... There are also other possibilities to link hibernate with lucene... Regards Mirko -Ursprüngliche Nachricht- Von: kewldude [mailto:[EMAIL PROTECTED] Gesendet: Dienstag, 28. August 2007 09:09 An: users@myfaces.apache.org Betreff: Re: AW: Search Highlighting Yeah I've come across that Lucene capability. Unfortunately, we are doing the search using database search. U have any more suggestions or ideas? Thanks for the reply. Sertic Mirko, Bedag wrote: Hi How are you doing the search? Is it a database search, or are u using lucene, for instance? With lucene, you can use she search result highlighter to generate html, and then output it in your jsp/jsf page... Regards Mirko -Ursprüngliche Nachricht- Von: kewldude [mailto:[EMAIL PROTECTED] Gesendet: Dienstag, 28. August 2007 07:13 An: users@myfaces.apache.org Betreff: Search Highlighting I know this is a little bit off topic here, but I need to ask it here because I'm using MyFaces in this project, so here it goes... I need to present a dataTable that represents search results coming from a search query (query of books, articles,documents etc. ). Lets say I have 4 columns to display (KeyNumber,Author,Title,Subject), within those columns I need to highlight the exact words that the user used in querying/searching. Lets say the user searched for Bert Bates. The dataTable will be presented somewhat like this: KeyNumber Author Title Subject 1Eric Freeman, Bert Bates, Elisabeth Freeman Head First Design Pattern Certifications,Java 2Kathy Sierra, Bert Bates Head First Java Java, OOP As you can see, the column where the search query has a match is not highlighted completely. Only the words that match up with the search string itself. Can this be done using MyFaces? I hope you can provide some ideas and suggestions as to what approach I can use or investigate. -- View this message in context: http://www.nabble.com/Search-Highlighting-tf4339753.html#a12362158 Sent from the MyFaces - Users mailing list archive at Nabble.com. -- View this message in context: http://www.nabble.com/Search-Highlighting-tf4339753.html#a12363190 Sent from the MyFaces - Users mailing list archive at Nabble.com. -- View this message in context: http://www.nabble.com/Search-Highlighting-tf4339753.html#a12363589 Sent from the MyFaces - Users mailing list archive at Nabble.com.
Re: AW: AW: AW: Search Highlighting
My concern is how do I do it using JSF. What would be the logic behind highlighting specific text located in a column inside a datatable. Sertic Mirko, Bedag wrote: Maybe oracle text can help you http://www.oracle.com/technology/products/text/index.html -Ursprüngliche Nachricht- Von: kewldude [mailto:[EMAIL PROTECTED] Gesendet: Dienstag, 28. August 2007 09:48 An: users@myfaces.apache.org Betreff: Re: AW: AW: Search Highlighting No im not using Hibernate, Im using plain DAOs via Oracle. Sertic Mirko, Bedag wrote: Ok, are you using hibernate? Hibernate Search is beta, i know, but it can build a fulltext index across your object entities, and there is your search engine... There are also other possibilities to link hibernate with lucene... Regards Mirko -Ursprüngliche Nachricht- Von: kewldude [mailto:[EMAIL PROTECTED] Gesendet: Dienstag, 28. August 2007 09:09 An: users@myfaces.apache.org Betreff: Re: AW: Search Highlighting Yeah I've come across that Lucene capability. Unfortunately, we are doing the search using database search. U have any more suggestions or ideas? Thanks for the reply. Sertic Mirko, Bedag wrote: Hi How are you doing the search? Is it a database search, or are u using lucene, for instance? With lucene, you can use she search result highlighter to generate html, and then output it in your jsp/jsf page... Regards Mirko -Ursprüngliche Nachricht- Von: kewldude [mailto:[EMAIL PROTECTED] Gesendet: Dienstag, 28. August 2007 07:13 An: users@myfaces.apache.org Betreff: Search Highlighting I know this is a little bit off topic here, but I need to ask it here because I'm using MyFaces in this project, so here it goes... I need to present a dataTable that represents search results coming from a search query (query of books, articles,documents etc. ). Lets say I have 4 columns to display (KeyNumber,Author,Title,Subject), within those columns I need to highlight the exact words that the user used in querying/searching. Lets say the user searched for Bert Bates. The dataTable will be presented somewhat like this: KeyNumber Author Title Subject 1Eric Freeman, Bert Bates, Elisabeth Freeman Head First Design Pattern Certifications,Java 2Kathy Sierra, Bert Bates Head First Java Java, OOP As you can see, the column where the search query has a match is not highlighted completely. Only the words that match up with the search string itself. Can this be done using MyFaces? I hope you can provide some ideas and suggestions as to what approach I can use or investigate. -- View this message in context: http://www.nabble.com/Search-Highlighting-tf4339753.html#a12362158 Sent from the MyFaces - Users mailing list archive at Nabble.com. -- View this message in context: http://www.nabble.com/Search-Highlighting-tf4339753.html#a12363190 Sent from the MyFaces - Users mailing list archive at Nabble.com. -- View this message in context: http://www.nabble.com/Search-Highlighting-tf4339753.html#a12363589 Sent from the MyFaces - Users mailing list archive at Nabble.com. -- View this message in context: http://www.nabble.com/Search-Highlighting-tf4339753.html#a12363746 Sent from the MyFaces - Users mailing list archive at Nabble.com.
AW: AW: AW: AW: Search Highlighting
Are you using special characters for your search, a % or an *, AND or OR matching, or are you doing a simple exact match? -Ursprüngliche Nachricht- Von: kewldude [mailto:[EMAIL PROTECTED] Gesendet: Dienstag, 28. August 2007 10:05 An: users@myfaces.apache.org Betreff: Re: AW: AW: AW: Search Highlighting My concern is how do I do it using JSF. What would be the logic behind highlighting specific text located in a column inside a datatable. Sertic Mirko, Bedag wrote: Maybe oracle text can help you http://www.oracle.com/technology/products/text/index.html -Ursprüngliche Nachricht- Von: kewldude [mailto:[EMAIL PROTECTED] Gesendet: Dienstag, 28. August 2007 09:48 An: users@myfaces.apache.org Betreff: Re: AW: AW: Search Highlighting No im not using Hibernate, Im using plain DAOs via Oracle. Sertic Mirko, Bedag wrote: Ok, are you using hibernate? Hibernate Search is beta, i know, but it can build a fulltext index across your object entities, and there is your search engine... There are also other possibilities to link hibernate with lucene... Regards Mirko -Ursprüngliche Nachricht- Von: kewldude [mailto:[EMAIL PROTECTED] Gesendet: Dienstag, 28. August 2007 09:09 An: users@myfaces.apache.org Betreff: Re: AW: Search Highlighting Yeah I've come across that Lucene capability. Unfortunately, we are doing the search using database search. U have any more suggestions or ideas? Thanks for the reply. Sertic Mirko, Bedag wrote: Hi How are you doing the search? Is it a database search, or are u using lucene, for instance? With lucene, you can use she search result highlighter to generate html, and then output it in your jsp/jsf page... Regards Mirko -Ursprüngliche Nachricht- Von: kewldude [mailto:[EMAIL PROTECTED] Gesendet: Dienstag, 28. August 2007 07:13 An: users@myfaces.apache.org Betreff: Search Highlighting I know this is a little bit off topic here, but I need to ask it here because I'm using MyFaces in this project, so here it goes... I need to present a dataTable that represents search results coming from a search query (query of books, articles,documents etc. ). Lets say I have 4 columns to display (KeyNumber,Author,Title,Subject), within those columns I need to highlight the exact words that the user used in querying/searching. Lets say the user searched for Bert Bates. The dataTable will be presented somewhat like this: KeyNumber Author Title Subject 1Eric Freeman, Bert Bates, Elisabeth Freeman Head First Design Pattern Certifications,Java 2Kathy Sierra, Bert Bates Head First Java Java, OOP As you can see, the column where the search query has a match is not highlighted completely. Only the words that match up with the search string itself. Can this be done using MyFaces? I hope you can provide some ideas and suggestions as to what approach I can use or investigate. -- View this message in context: http://www.nabble.com/Search-Highlighting-tf4339753.html#a12362158 Sent from the MyFaces - Users mailing list archive at Nabble.com. -- View this message in context: http://www.nabble.com/Search-Highlighting-tf4339753.html#a12363190 Sent from the MyFaces - Users mailing list archive at Nabble.com. -- View this message in context: http://www.nabble.com/Search-Highlighting-tf4339753.html#a12363589 Sent from the MyFaces - Users mailing list archive at Nabble.com. -- View this message in context: http://www.nabble.com/Search-Highlighting-tf4339753.html#a12363746 Sent from the MyFaces - Users mailing list archive at Nabble.com.
[Trinidad] General question: development 1.0.x vs. 1.2.x
Hi, I am new to Trinidad and have a general question regarding the Trinidad development process: Development seems to be done for two versions: 1.0.x and 1.2.x. I suppose the development going on for 1.0.x is only done for downward compatibility regarding JSF 1.1. So the 1.2.x versions already have all the stuff working where in 1.0.x there is still work being done. Is my understanding correct? Thanks for clarifying! Best, Wolfgang.
Re: [Trinidad] General question: development 1.0.x vs. 1.2.x
Hi, yes. Trinidad 1.0.x is designed to work in a JSF 1.1 environment and Trinidad 1.2.x is the JSF 1.2 counterpart. The main development (like fixing bugs) goes to trunk (Trinidad 1.0.x). Time by time, we (Adam) creates a special 1.2.x branches to get the latest/greates 1.0.x features to be available in Trinidad 1.2.x as well. JSF 1.2 specific bugs, for instance, will be fixed directly on the particular Trinidad 1.2.x branch. HTH, Matthias On 8/28/07, [EMAIL PROTECTED] [EMAIL PROTECTED] wrote: Hi, I am new to Trinidad and have a general question regarding the Trinidad development process: Development seems to be done for two versions: 1.0.x and 1.2.x. I suppose the development going on for 1.0.x is only done for downward compatibility regarding JSF 1.1. So the 1.2.x versions already have all the stuff working where in 1.0.x there is still work being done. Is my understanding correct? Thanks for clarifying! Best, Wolfgang. -- Matthias Wessendorf further stuff: blog: http://matthiaswessendorf.wordpress.com/ mail: matzew-at-apache-dot-org
[TRINIDAD] commandButton with empty text has strange offset in Firefox
Hi everyone, we sometimes need buttons without a text (in their disabled state we don't want to show the text, just an icon in its disabled form). A code snippet might look like this (ignoring icons...): tr:panelBorderLayout f:facet name=bottom tr:panelHorizontalLayout halign=right tr:commandButton text= disabled=true / tr:spacer width=5 / tr:commandButton text=Some button / /tr:panelHorizontalLayout /f:facet /tr:panelBorderLayout This gets rendered strangely in Firefox (I'm on Firefox 2.0.0.6): The button with empty text (it doesn't seem to matter, if you have a blank in it or don't define the attribute text at all) is shifted 1px downwards compared to the button with text (or 2px for disabled=false). These are the rendered buttons (no differences in the surrounding td's, so I omitted them here) are : button class=af_commandButton p_AFDisabled disabled= type=button /button and button class=af_commandButton onclick=submitForm('_id5',1,{source:'_id18:_id25:_id130'});return false; type=buttonSome button/button Using Firebug and inspecting the CSS (tab Style in Firebug) I can't find anything that would cause this downshift. However, when examining the layout (tab Layout in Firebug) I detect a top offset of 1px (or 2px for enabled buttons without text) which isn't there when a text is defined. In IE6, everything is rendered as expected (without those offsets). Any ideas? Is this a bug (and if yes, a Trinidad bug or a Firefox bug)? Thanks in advance, Carsten -- View this message in context: http://www.nabble.com/-TRINIDAD--commandButton-with-empty-text-has-strange-offset-in-Firefox-tf4340799.html#a12365130 Sent from the MyFaces - Users mailing list archive at Nabble.com.
Re: Dynamic tabs in panelTabbedPane
I see, That is an option I considered but I don't like it because it makes the page more difficult to maintain. Is it possible to do this and create a sort of jsp:include from the java code? that way the backing bean will control the dynamic tabs yet the content of the tabs will be rendered by a jsp? Shane Petroff wrote: I don't know if it is doable with the declarative syntax via jsp/facelets, but it would be easy to use a parent panel's binding, then build your tabs in java code. Shane geirgp wrote: Hi, Is it possible for the panelTabbedPane to iterate over a java.util.List and create one tab for each entry in the list? I tried enclosing the panelTabs in a dataList (see below) but then no tabs were created and all information from all objects in the list were printed on the same panel. t:panelTabbedPane serverSideTabSwitch=false t:dataList var=segment value=#{queryBean.result.segments} h:column t:panelTab label=#{segment.name} h:outputText value=#{segment.name}/h:outputText /t:panelTab /h:column /t:dataList /t:panelTabbedPane -- Shane -- View this message in context: http://www.nabble.com/Dynamic-tabs-in-panelTabbedPane-tf4335321.html#a12365684 Sent from the MyFaces - Users mailing list archive at Nabble.com.
[Fwd: Re: [Fwd: Re: [Trinidad] XMLMenuModel bug]]
Original Message Subject:Re: [Fwd: Re: [Trinidad] XMLMenuModel bug] Date: Mon, 27 Aug 2007 10:03:14 -0700 From: Jeanne Waldman [EMAIL PROTECTED] To: Gary Kind [EMAIL PROTECTED] References: [EMAIL PROTECTED] [EMAIL PROTECTED] Hey, don't tell me, tell the list. :) Gary Kind wrote: This is not a bug. The action attribute does not perform navigation. The value, or the value returned by an EL expression, for the action attribute must be a string that matches a navigation-case from-outcome in your faces-config.xml. THAT is what does the navigation. Actually, the XMLMenuModel, although it can work for Menus, was meant for tabbed navigation. It really is a navigation model. Here is what Luka has done: WorkingTaskAdmin: public String addNewWorkingTask(){ sessionBean.addNewWorkingTask(); return *service:workingTaskWizard; -- invoking in tr:commandMenuItem act as where return null;* } menu-model.xml: itemNode id=menu241 label=#{mnl.newWorkingTask} action=*#{WorkingTaskAdmin.addNewWorkingTask}* focusViewId=/service/workingTaskWizard.xhtml / The string returned (in bold) is certainly NOT a navigation-case from-outcome. Luka should have a navigation-case in his faces-config.xml that resembles this: navigation-rule navigation-case from-outcomegoToWorkingWizard/from-outcome to-view-id/service/workingTaskWizard.*jspx*/to-view-id /navigation-case . . . /navigation-rule His Bean should look like this: WorkingTaskAdmin: public String addNewWorkingTask() { sessionBean.addNewWorkingTask(); return goToWorkingWizard; } and his menu-model.xml itemNode should look like this: itemNode id=menu241 label=#{mnl.newWorkingTask} action=#{WorkingTaskAdmin.addNewWorkingTask} focusViewId=/service/workingTaskWizard.*jspx* / Jeanne Waldman wrote: FYI, in case you missed it. Original Message Subject:Re: [Trinidad] XMLMenuModel bug Date: Fri, 24 Aug 2007 13:03:54 +0200 From: Luka Surija [EMAIL PROTECTED] mailto:[EMAIL PROTECTED] Reply-To: MyFaces Discussion users@myfaces.apache.org mailto:users@myfaces.apache.org To: MyFaces Discussion users@myfaces.apache.org mailto:users@myfaces.apache.org References: [EMAIL PROTECTED] mailto:[EMAIL PROTECTED] Actually nothing happens, I've found that Firebug is displaying this error message: validatorArray has no properties: _multiValidate(form#j_id1 index.xhtml, j_id5:0:j_id6, [j_id28, 0, undefined, 17 more...])Common1_0_3.js (line 5248) _validateInline(form#j_id1 index.xhtml, j_id5:0:j_id6, [j_id28, 0, undefined, 17 more...])Common1_0_3.js (line 4589) _j_id1Validator(form#j_id1 index.xhtml, j_id5:0:j_id6)index.xhtml (line 245) _validateForm(form#j_id1 index.xhtml, j_id5:0:j_id6)Common1_0_3.js (line 4508) submitForm(form#j_id1 index.xhtml, 1, Object source=j_id5:0:j_id6, undefined)Common1_0_3.js (line 4765) onclick(click clientX=0, clientY=0)index.xhtml (line 1) for(var j=0;jvalidatorArray.length;j=j+1) Luka Surija wrote: If found pretty dummy bug in XMLMenuModel. If I call an action method trough XMLMenuModel then the method is executed, but no navigation is executed. WorkingTaskAdmin: public String addNewWorkingTask(){ sessionBean.addNewWorkingTask(); return service:workingTaskWizard; -- invoking in tr:commandMenuItem act as where return null; } menu-model.xml: itemNode id=menu241 label=#{mnl.newWorkingTask} action=#{WorkingTaskAdmin.addNewWorkingTask} focusViewId=/service/workingTaskWizard.xhtml / but if i press this button then everything works as expected. tr:commandButton text=#{msg.new_label} action=#{WorkingTaskAdmin.addNewWorkingTask} / I'm using trinidad 1.0.3-core trunk.
Problem with Trinidad maven repository...
Hello, I am having problems with Trinidad and Maven. Can anyone please help? Thanks in advance, Julien. I get this from the console: C:\dev\calyonfinancial\ProtideWebmvn -e install + Error stacktraces are turned on. [INFO] Scanning for projects... [INFO] [INFO] Building ProtideWeb [INFO]task-segment: [install] [INFO] [INFO] [resources:resources] [INFO] Using default encoding to copy filtered resources. Downloading: http://cvs/repository/org/apache/myfaces/trinidad/trinidad-impl/1.0.2/trinidad-impl-1.0.2.pom [WARNING] Unable to get resource from repository calyonRepository ( http://cvs/repository) Downloading: http://repo1.maven.org/maven2/org/apache/myfaces/trinidad/trinidad-impl/1.0.2/trinidad-impl-1.0.2.pom 7K downloaded Downloading: http://cvs/repository/org/apache/myfaces/trinidad/trinidad/1.0.2/trinidad-1.0.2.pom [WARNING] Unable to get resource from repository calyonRepository ( http://cvs/repository) Downloading: http://repo1.maven.org/maven2/org/apache/myfaces/trinidad/trinidad/1.0.2/trinidad-1.0.2.pom 17K downloaded Downloading: https://maven-repository.dev.java.net/nonav/repository//org.apache/poms/apache-4.pom [INFO] [ERROR] BUILD ERROR [INFO] [INFO] Error building POM (may not be this project's POM). Project ID: org.apache.myfaces.trinidad:trinidad:pom:1.0.2 Reason: Cannot find parent: org.apache:apache for project: org.apache.myfaces.trinidad:trinidad:pom:1.0.2 [INFO] [INFO] Trace org.apache.maven.lifecycle.LifecycleExecutionException: Unable to get dependency information: Unable to read the metadata file for artifact ' org.apach e.myfaces.trinidad:trinidad-impl:jar': Cannot find parent: org.apache:apachefor project: org.apache.myfaces.trinidad:trinidad:pom:1.0.2 org.apache.myfaces.trinidad:trinidad-impl:jar:1.0.2 from the specified remote repositories: central ( http://repo1.maven.org/maven2), calyonRepository (http://cvs/repository), jboss repo (http://repository.jboss.com/maven2), maven2 repo (http://repo1.maven.org/maven2) Path to dependency: 1) com.calyonfinancial:protide:war:1.0-SNAPSHOT at org.apache.maven.lifecycle.DefaultLifecycleExecutor.executeGoals( DefaultLifecycleExecutor.java:551) at org.apache.maven.lifecycle.DefaultLifecycleExecutor.executeGoalWithLifecycle (DefaultLifecycleExecutor.java:475) at org.apache.maven.lifecycle.DefaultLifecycleExecutor.executeGoal ( DefaultLifecycleExecutor.java:454) at org.apache.maven.lifecycle.DefaultLifecycleExecutor.executeGoalAndHandleFailures (DefaultLifecycleExecutor.java:306) at org.apache.maven.lifecycle.DefaultLifecycleExecutor.executeTaskSegments ( DefaultLifecycleExecutor.java:273) at org.apache.maven.lifecycle.DefaultLifecycleExecutor.execute( DefaultLifecycleExecutor.java:140) at org.apache.maven.DefaultMaven.doExecute(DefaultMaven.java:322) at org.apache.maven.DefaultMaven.execute(DefaultMaven.java:115) at org.apache.maven.cli.MavenCli.main(MavenCli.java:256) 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.codehaus.classworlds.Launcher.launchEnhanced(Launcher.java :315) at org.codehaus.classworlds.Launcher.launch(Launcher.java:255) at org.codehaus.classworlds.Launcher.mainWithExitCode (Launcher.java :430) at org.codehaus.classworlds.Launcher.main(Launcher.java:375) Caused by: org.apache.maven.artifact.resolver.ArtifactResolutionException: Unable to get dependency information: Unable to read the metadata file for artifact 'org.apache.myfaces.trinidad:trinidad-impl:jar': Cannot find parent: org.apache:apache for project: org.apache.myfaces.trinidad:trinidad:pom: 1.0.2 org.apache.myfaces.trinidad:trinidad-impl:jar:1.0.2 from the specified remote repositories: central (http://repo1.maven.org/maven2), calyonRepository (http://cvs/repository), jboss repo (http://repository.jboss.com/maven2), maven2 repo (http://repo1.maven.org/maven2) Path to dependency: 1) com.calyonfinancial:protide:war:1.0-SNAPSHOT at org.apache.maven.artifact.resolver.DefaultArtifactCollector.recurse( DefaultArtifactCollector.java:297) at org.apache.maven.artifact.resolver.DefaultArtifactCollector.collect ( DefaultArtifactCollector.java:67) at org.apache.maven.artifact.resolver.DefaultArtifactResolver.resolveTransitively
RE: ForceId=true not working continuously on one page
Umar Zubair a 飲it : Even forceid=true is not working for each second click. I just did following change in forceId.jsp page included in myfaces-example-simple-1.1.6. But it is not working t:dataList layout=unorderedList value=#{forceIdBean.choices} var=choice id=testId forceId=true t:commandLink action=#{user.update} h:outputText value=#{choice} / /t:commandLink /t:dataList I am using tomcat 5.5. Any idea? Regards, Umar Zubair What id do you get in generated page instead of testId? What do you except it to be? What do you mean by not working for each second click? When I browse that page first time, I get following html output ul id=testId lia href=# onclick=return oamSubmitForm('dataTable','testId_0:_idJsp9'); id=testId_0:_idJsp9foo/a/li lia href=# onclick=return oamSubmitForm('dataTable','testId_1:_idJsp9'); id=testId_1:_idJsp9bar/a/li lia href=# onclick=return oamSubmitForm('dataTable','testId_2:_idJsp9'); id=testId_2:_idJsp9buzz/a/li /ul When I click any of these link to come back on same page I get following html code ul id=dataTable:testId lia href=# onclick=return oamSubmitForm('dataTable','dataTable:testId: 0:_idJsp9'); id=dataTable:testId:0:_idJsp9foo/a/li lia href=# onclick=return oamSubmitForm('dataTable','dataTable:testId: 1:_idJsp9'); id=dataTable:testId:1:_idJsp9bar/a/li lia href=# onclick=return oamSubmitForm('dataTable','dataTable:testId: 2:_idJsp9'); id=dataTable:testId:2:_idJsp9buzz/a/li /ul Now if I click any of these links, I get following exception javax.faces.el.PropertyNotFoundException: Base is null: user at org.apache.myfaces.el.ValueBindingImpl.resolveToBaseAndProperty(ValueBinding Impl.java:463) Obviously 'dataTable' is id of form.
Re: AW: AW: AW: AW: Search Highlighting
Just a simple exact match for the meantime will do. Sertic Mirko, Bedag wrote: Are you using special characters for your search, a % or an *, AND or OR matching, or are you doing a simple exact match? -Ursprüngliche Nachricht- Von: kewldude [mailto:[EMAIL PROTECTED] Gesendet: Dienstag, 28. August 2007 10:05 An: users@myfaces.apache.org Betreff: Re: AW: AW: AW: Search Highlighting My concern is how do I do it using JSF. What would be the logic behind highlighting specific text located in a column inside a datatable. Sertic Mirko, Bedag wrote: Maybe oracle text can help you http://www.oracle.com/technology/products/text/index.html -Ursprüngliche Nachricht- Von: kewldude [mailto:[EMAIL PROTECTED] Gesendet: Dienstag, 28. August 2007 09:48 An: users@myfaces.apache.org Betreff: Re: AW: AW: Search Highlighting No im not using Hibernate, Im using plain DAOs via Oracle. Sertic Mirko, Bedag wrote: Ok, are you using hibernate? Hibernate Search is beta, i know, but it can build a fulltext index across your object entities, and there is your search engine... There are also other possibilities to link hibernate with lucene... Regards Mirko -Ursprüngliche Nachricht- Von: kewldude [mailto:[EMAIL PROTECTED] Gesendet: Dienstag, 28. August 2007 09:09 An: users@myfaces.apache.org Betreff: Re: AW: Search Highlighting Yeah I've come across that Lucene capability. Unfortunately, we are doing the search using database search. U have any more suggestions or ideas? Thanks for the reply. Sertic Mirko, Bedag wrote: Hi How are you doing the search? Is it a database search, or are u using lucene, for instance? With lucene, you can use she search result highlighter to generate html, and then output it in your jsp/jsf page... Regards Mirko -Ursprüngliche Nachricht- Von: kewldude [mailto:[EMAIL PROTECTED] Gesendet: Dienstag, 28. August 2007 07:13 An: users@myfaces.apache.org Betreff: Search Highlighting I know this is a little bit off topic here, but I need to ask it here because I'm using MyFaces in this project, so here it goes... I need to present a dataTable that represents search results coming from a search query (query of books, articles,documents etc. ). Lets say I have 4 columns to display (KeyNumber,Author,Title,Subject), within those columns I need to highlight the exact words that the user used in querying/searching. Lets say the user searched for Bert Bates. The dataTable will be presented somewhat like this: KeyNumber Author Title Subject 1Eric Freeman, Bert Bates, Elisabeth Freeman Head First Design Pattern Certifications,Java 2Kathy Sierra, Bert Bates Head First Java Java, OOP As you can see, the column where the search query has a match is not highlighted completely. Only the words that match up with the search string itself. Can this be done using MyFaces? I hope you can provide some ideas and suggestions as to what approach I can use or investigate. -- View this message in context: http://www.nabble.com/Search-Highlighting-tf4339753.html#a12362158 Sent from the MyFaces - Users mailing list archive at Nabble.com. -- View this message in context: http://www.nabble.com/Search-Highlighting-tf4339753.html#a12363190 Sent from the MyFaces - Users mailing list archive at Nabble.com. -- View this message in context: http://www.nabble.com/Search-Highlighting-tf4339753.html#a12363589 Sent from the MyFaces - Users mailing list archive at Nabble.com. -- View this message in context: http://www.nabble.com/Search-Highlighting-tf4339753.html#a12363746 Sent from the MyFaces - Users mailing list archive at Nabble.com. -- View this message in context: http://www.nabble.com/Search-Highlighting-tf4339753.html#a12366277 Sent from the MyFaces - Users mailing list archive at Nabble.com.
JSF Newbie needs help with selectOneMenu and valueChangeListener
Hello, I'm using MyFaces 1.1. I'm trying to update controls on a page when the user changes the selection in a dropdown list. I can't quite seem to get it to work as expected. Changes in the dropdown list do not seem to be firing the value change event. When my dropdown list is populated with simple strings, things seem to work just fine. I tried to simplify the problem by reducing it down to just a single control on the page. For example, I have the following JSP: h:selectOneMenu id=colorsDDL value=#{TestBean.colorValue} immediate=true valueChangeListener=#{TestBean.processColorChange} onchange=this.form.submit(); f:selectItems id=colorItems value=#{TestBean.colorItems} / /h:selectOneMenu My TestBean is a session scoped bean and the code is straightforward: import java.util.Date; import javax.faces.application.FacesMessage; import javax.faces.component.UIComponent; import javax.faces.component.UIInput; import javax.faces.context.FacesContext; import javax.faces.event.ValueChangeEvent; import javax.faces.model.SelectItem; import javax.faces.validator.ValidatorException; public class TestBean { public TestBean() { } private String colorValue = Red; public String getColorValue() { return colorValue; } public void setColorValue(String value) { this.colorValue = value; } private SelectItem[] colorItems = null; public SelectItem[] getColorItems() { if (colorItems == null) { colorItems = new SelectItem[3]; colorItems[0] = new SelectItem(Red); colorItems[1] = new SelectItem(Green); colorItems[2] = new SelectItem(Blue); } return colorItems; } public void setColorItems(SelectItem[] items) { this.colorItems = items; } public void processColorChange(ValueChangeEvent evt) { System.out.println(Event source: + ((UIInput) evt.getSource()).getId()); System.out.println(Old value: + evt.getOldValue()); System.out.println(New Value: + evt.getNewValue()); } } In this case, everything seems to work fine. The processColorChange method is invoked when the dropdown list is changed, and the TestBean.setColorValue method is invoked to update the model with the new value. Now comes the problem. I change my JSP as follows: h:selectOneMenu id=employeeDDL value=#{TestBean.employeeValue} immediate=true valueChangeListener=#{TestBean.processEmployeeChange} onchange=this.form.submit(); converter=EmployeeConverter validator=#{TestBean.validateEmployee} f:selectItems id=employeeItems value=#{TestBean.employeeItems} / /h:selectOneMenu Note, that I am now using a converter and a validator. This is because my dropdown list is being populated with object instances of the Employee class, which looks like the following: public class Employee implements Serializable { String name=null; Integer id=null; Date dateOfHire=null; /** Creates a new instance of Employee */ public Employee() { } public Employee(String _name, Integer _id, Date _dateOfHire) { this.name=_name; this.id=_id; this.dateOfHire=_dateOfHire; } public String getName() { return name; } public void setName(String _name) { this.name=_name; } public Integer getId() { return id; } public void setId(Integer _id) { this.id=_id; } public Date getDateOfHire() { return dateOfHire; } public void setDateOfHire(Date _dateOfHire) { this.dateOfHire=_dateOfHire; } public String toString() { return new String(name + ; + id + ; + dateOfHire); } } I have written a Converter that looks like the following: import java.util.Date; import javax.faces.component.UIComponent; import javax.faces.context.FacesContext; import javax.faces.convert.Converter; public class EmployeeConverter implements Converter { /** Creates a new instance of EmployeeConverter */ public EmployeeConverter() { } public String getAsString(FacesContext context, UIComponent component, Object value) { String empString = null; if (value != null) { empString = value.toString(); } return empString; } public Object getAsObject(FacesContext context, UIComponent component, String value) { Employee empObject = null; String[] fields = value.split(;); empObject = new Employee(); empObject.setName(fields[0]); empObject.setId(new Integer(fields[1])); empObject.setDateOfHire(new Date(fields[2])); return empObject; } } I have also written a validation method that basically does nothing other than return, as long as the value passed to the validate method is an instance of Employee. I've modified
Re: [Trinidad] ppr: partialTriggers doesn't work if there are validation messages?
Hello Andrew, To my knowledge, this is the desired behavior since PPR requests does not use a different lifecycle than a normal requests. However, since I had to deal with that with every single ADF Faces/Trinidad projects I was on, I made a new lifecycle that alter the behavior with PPR request by skipping required check validations and running validation and update model phases only on the PPR source then I restore the model value after the render to make sure the model does not stay polluted. Finally, I have to save all values that were pushed from PPR that way so that in further PPR requests (in case there's more than one PPR active element in the page), I push the value back to the model from the previous PPR requests. This last part is the source of most of the complexity but is required when populating a selectOneMenu's list of values from the value of two other fields for example. Regards, ~ Simon On 8/27/07, Andrew Robinson [EMAIL PROTECTED] wrote: I have a login form with a login command link. The form is a panelFormLayout with panelLabelAndMessage components with inputText components (username and password). I have: tr:panelFormLayout partialTriggers=login ... f:facet name=footer tr:group tr:commandLink id=login partialSubmit=true action=#{identity.login} text=#{messages.page_login_login} / ... Now the panel is not updated because the code to trigger the PPR is in the broadcast method of the UIXCommand (parent of the command link). The validation error causes the ActionEvent to not be broadcast, and thus the PPR is not properly triggered. Should this be considered a bug? Should the adfContext.partialUpdateNotify(component); call be made from the queueEvent method rather than the broadcast method? Or is there a different way to do this that I am missing? Another nice feature would be to automatically have the panelLabelAndMessage and panelFormLayout components automatically get re-rendered if there is a validation or conversion error in one of their nested children components. Thanks, Andrew
Re: [Trinidad] Howto enable scollbars on tr:table
Created a JIRA issue: https://issues.apache.org/jira/browse/TRINIDAD-656 which would I think resolve this problem. -- Adam On 8/27/07, Christian Klocker [EMAIL PROTECTED] wrote: actually i simple use a css-style like (height:400px;overflow:auto) to get a vertical scrollbar on tr:table. the problem withit is, that now the header is also scrolling ... at http://www.oracle.com/technology/products/adf/adffaces/11/doc/multiproject/adf-richclient-api/enhanced-tagdoc.html i saw the table-component with scollbars ... is there a solution for trinidad? thanks christian
Re: Clustering MyFaces application with Tomcat
When the reponse is rendered jsf serializes the components tree state in order to be restored on postback and releases the uicomponent tree to free the memory. If you have session scoped reference to the tree jsf releases it but it cannot be cleared by the GC because you hold it in your session scoped bean. 2007/8/28, Svilen Ivanov [EMAIL PROTECTED]: Adrian, Thank you for your reply. Do you mean by you don't allow jsf to clear the tree - the tree of UI components or the values stored in the UI components that are bound? In the latter case I noticed that bound components in session bean persist their input values until I manually reset them (as described here [1]. Am I understanding you correctly? Regards, Svi [1] http://www.mail-archive.com/users@myfaces.apache.org/msg40105.html 2007/8/28, Adrian Mitev [EMAIL PROTECTED]: Binding to jsf components should be done using request scoped beans only (with session scope bean you don't allow jsf to clear the tree after the request is processed). 2007/8/27, Svilen Ivanov [EMAIL PROTECTED]: I'm trying to cluster a certain MyFaces ( 1.1.5, tomahawk 1.1.6) application in Tomcat 5.5.20. The applications heavily relies on session beans which use ListDataModel and HtmlDataScroller as properties. When I setup Tomcat to replicate sessions I got NotSerializableException for HtmlDataScroller. As far as I understood from MyFaces FAQ [2] list data model is not serializable and may be marked transient. Some guys recommend to build new data model out of a list [1] each time data model is requested. However I couldn't find how to solve the problem with HtmlDataScroller. My initial idea is to subclass MyFaces classes I use in the session beans and make them implement Serializable interface. How does this sound? Also I have bindings of input controls (HtmlInputText, HtmlSelectOneRadio) in these session beans. Are they also stateless as ListDataModel? I would really appreciate if you share your experience with clustering MyFaces application as well or if you point me towards resources on the Internet that might help Regards, Svilen [1] http://www.mail-archive.com/users@myfaces.apache.org/msg38166.html [2] http://wiki.apache.org/myfaces/FAQ -- Svilen Ivanov http://svilen-online.blogspot.com There is no dark side of the moon really. Matter of fact it's all dark. -- Svilen Ivanov http://svilen-online.blogspot.com There is no dark side of the moon really. Matter of fact it's all dark.
Re: [Trinidad] ppr: partialTriggers doesn't work if there are validation messages?
I got it to work with a custom component. I created a component that doesn't render, that simply houses children. In the queueEvent method of that component, if the type of the event is ActionEvent, I then use it to add components as partial targets. It just would be nice to have this supported by Trinidad out of the box. A4J creates AjaxEvents that have their phase ID set to ANY, so they fire almost immediately, and thus work regardless of what phases are run. I'm just wondering if there would be any harm to moving the code from the broadcast method to the queue method. On 8/28/07, Simon Lessard [EMAIL PROTECTED] wrote: Hello Andrew, To my knowledge, this is the desired behavior since PPR requests does not use a different lifecycle than a normal requests. However, since I had to deal with that with every single ADF Faces/Trinidad projects I was on, I made a new lifecycle that alter the behavior with PPR request by skipping required check validations and running validation and update model phases only on the PPR source then I restore the model value after the render to make sure the model does not stay polluted. Finally, I have to save all values that were pushed from PPR that way so that in further PPR requests (in case there's more than one PPR active element in the page), I push the value back to the model from the previous PPR requests. This last part is the source of most of the complexity but is required when populating a selectOneMenu's list of values from the value of two other fields for example. Regards, ~ Simon On 8/27/07, Andrew Robinson [EMAIL PROTECTED] wrote: I have a login form with a login command link. The form is a panelFormLayout with panelLabelAndMessage components with inputText components (username and password). I have: tr:panelFormLayout partialTriggers=login ... f:facet name=footer tr:group tr:commandLink id=login partialSubmit=true action=#{identity.login} text=#{messages.page_login_login} / ... Now the panel is not updated because the code to trigger the PPR is in the broadcast method of the UIXCommand (parent of the command link). The validation error causes the ActionEvent to not be broadcast, and thus the PPR is not properly triggered. Should this be considered a bug? Should the adfContext.partialUpdateNotify(component); call be made from the queueEvent method rather than the broadcast method? Or is there a different way to do this that I am missing? Another nice feature would be to automatically have the panelLabelAndMessage and panelFormLayout components automatically get re-rendered if there is a validation or conversion error in one of their nested children components. Thanks, Andrew
RE: [Trinidad] Upgrading to 1.0.2
https://issues.apache.org/jira/browse/TRINIDAD-658 Here is the JIRA ticket. I have to be honest and say that I don't know how to create a patch for it. Nate Perkins 480-441-3667 [EMAIL PROTECTED] This email message is for the sole use of the intended recipient(s) and may contain GDC4S confidential or privileged information. Any unauthorized review, use, disclosure or distribution is prohibited. If you are not an intended recipient, please contact the sender by reply email and destroy all copies of the original message. -Original Message- From: Adam Winer [mailto:[EMAIL PROTECTED] Sent: Monday, August 27, 2007 8:48 PM To: MyFaces Discussion Subject: Re: [Trinidad] Upgrading to 1.0.2 A JIRA issue + a patch would make it more likely. :) -- Adam On 8/27/07, Perkins, Nate-P63196 [EMAIL PROTECTED] wrote: Can this be expected in 1.0.3? Nate Perkins 480-441-3667 [EMAIL PROTECTED] This email message is for the sole use of the intended recipient(s) and may contain GDC4S confidential or privileged information. Any unauthorized review, use, disclosure or distribution is prohibited. If you are not an intended recipient, please contact the sender by reply email and destroy all copies of the original message. -Original Message- From: Adam Winer [mailto:[EMAIL PROTECTED] Sent: Thursday, August 23, 2007 8:00 PM To: MyFaces Discussion Subject: Re: [Trinidad] Upgrading to 1.0.2 I'm getting the feeling that we really need to add a flag to at least trh:html or both trh:html and tr:document that supports forcing quirks mode. Thoughts? -- Adam On 8/23/07, Andrew Robinson [EMAIL PROTECTED] wrote: You can use IE6 in quirks mode and firefox in standards mode by subclassing the tr:document renderer. If a comment appears before the doc type, IE will not go into standards mode. Here is some code if you want to do it this way to force only IE into quirks mode while using tr:document: public class DocumentRenderer extends org.apache.myfaces.trinidadinternal.renderkit.core.xhtml.DocumentRendere r { /** * */ public DocumentRenderer() {} /** * @param type */ public DocumentRenderer(Type type) { super(type); } /** * @see org.apache.myfaces.trinidadinternal.renderkit.core.xhtml.DocumentRendere r#encodeAll(javax.faces.context.FacesContext, org.apache.myfaces.trinidad.context.RenderingContext, javax.faces.component.UIComponent, org.apache.myfaces.trinidad.bean.FacesBean) */ @Override protected void encodeAll(FacesContext context, RenderingContext arc, UIComponent component, FacesBean bean) throws IOException { if (Agent.AGENT_IE.equals(arc.getAgent().getAgentName())) { context.getResponseWriter().write(!-- force quirks mode --); } super.encodeAll(context, arc, component, bean); } } On 8/23/07, Perkins, Nate-P63196 [EMAIL PROTECTED] wrote: I put a lot of time into this problem, albeit a while ago, but I could not find a way to satisfy my requirements for IE6 in standard mode, I would love to be able to, but I have not found a way. I'll post the general structure and the css and perhaps you can help? The basic structure is this: div id=top_bar spanSome necessary banner text/span /div div id=main_content Whatever the particular page requires /div div id=bottom_bar spanAgain, some necessary banner text/span /div The requirement is that the top_bar and the bottom_bar are always visible and in the same position (at the top and the bottom, respectively :) ) but not covering the main_content while main_content can scroll as necessary. Here's the css that I used to accomplish this, this works properly in Firefox regardless of the doc-type, but again, in IE6 it only works in quirks mode. body { border: 0pt none; margin: 0; padding 0; height: 100%; max-height: 100%; width: 100%; max-width: 100%; overflow: hidden; } * html body { padding: 5px 0pt 55px; } #main_content { bottom: 30px; left: 0px; overflow: auto; position: fixed; right: 0; top: 25px; } * html #main_content { height: 100%; position: relative; width: 100%; } #top_bar { height: 25px; position: absolute;left: 0; top: 0; width: 100%; } #bottom_bar { height: 25px; position: absolute;left: 0; bottom: 0; width: 100%; } Nate Perkins 480-441-3667 [EMAIL PROTECTED] This email message is for the sole use of the intended recipient(s) and may contain GDC4S confidential or privileged information. Any unauthorized review, use, disclosure or distribution is prohibited. If you are not an intended recipient, please contact the sender by reply email and destroy all copies of the original
Re: [Trinidad] Label positioning
hi dave, I'm working on skinning my application and am trying to figure out the best way to reposition component labels. The default skin places labels to the left of their associated UI elements, but our site design requires them to appear above the elements in some cases. Our current workaround solution is to not use the component label, but to place our own label by hand above the component. i had the same problem recently ... i also solved it by using outputlabel. the problem here is the generated html-output (placement is done via html-tables). so i turned on attribte simple on the input-components (so the table doesn't get written) an created a facelet-tag-source-file for reuse. ... elements (e.g. the error icon, required icon, and error message---what are all of them anyway?) maybe this helps: http://myfaces.apache.org/trinidad/devguide/skinning.html christian
[Trinidad] Label positioning
Hi all, I'm working on skinning my application and am trying to figure out the best way to reposition component labels. The default skin places labels to the left of their associated UI elements, but our site design requires them to appear above the elements in some cases. Our current workaround solution is to not use the component label, but to place our own label by hand above the component. Is there a better way to do this using CSS selectors and the skinning framework? The same question applies to the other default components associated with UI elements (e.g. the error icon, required icon, and error message---what are all of them anyway?) Thanks for your help, --Dave Shape Yahoo! in your own image. Join our Network Research Panel today! http://surveylink.yahoo.com/gmrs/yahoo_panel_invite.asp?a=7
Displaying BLOB in JSF page
Hi Experts, I am having trouble displaying BLOB data in my page. My requirement is that I must be able to show some predefined types(PDF, HTML, GIF, JPEG, DOC, XLS) of BLOB data in my page. This page must have the header of my application. I tried to use the example given at http://www.irian.at/myfaces/fileupload.jsf. I tried that example and it seemed to work for Images. But after I incorporated it in my app, I am getting the exception. Upload works, but problem is with displaying the content of the BLOB data. We have a field in the table where we set what type of data is in the BLOB, so I set the ContentType from that. I am using Myfaces 1.1.5, Tomahawk 1.1.3, Ajax4Jsf 1.1.1. server is WLS8.1 sp6. I understand that it is a problem with the page encoding/ content type set for the page.I tried it with UTF-8 and ISO-8859-1, but neither of them worked. Any help is appreciated. below is my jsp file and the exception I am getting. the jsp file is included in a tile. Thanks, Sushma ===JSP File== showFile.jsp == %@ page session=false % % String contentType = (String)application.getAttribute(fileupload_type); String fileName = (String)application.getAttribute(fileupload_name); String allowCache = request.getParameter(allowCache); String openDirectly = request.getParameter(openDirectly); System.out.print(\n\n*** allowCache + allowCache); if(allowCache == null || allowCache.equalsIgnoreCase(false)) { response.setHeader(pragma, no-cache); response.setHeader(Cache-control, no-cache, no-store, must-revalidate); response.setHeader(Expires, 01 Apr 1995 01:10:10 GMT); } if(contentType!=null) { System.out.print(\n\n*** contentType + contentType); response.setContentType(contentType); } if(fileName != null) { System.out.print(\n\n*** fileName + fileName); fileName = fileName.substring(fileName.lastIndexOf('\\')+1); fileName = fileName.substring(fileName.lastIndexOf('/')+1); StringBuffer contentDisposition = new StringBuffer(); System.out.print(\n\n*** openDirectly + openDirectly); if(openDirectly==null || openDirectly.equalsIgnoreCase(false)) { contentDisposition.append(attachment;); } contentDisposition.append(filename=\); contentDisposition.append(fileName); contentDisposition.append(\); response.setHeader (Content-Disposition, contentDisposition.toString()); } byte[] bytes = (byte[])application.getAttribute(fileupload_bytes); System.out.print(\n\n*** fileupload_bytes ); if (bytes != null) { System.out.print( = + bytes); response.getOutputStream().write(bytes); } % ---Exception - Can't insert page '/pages/cannedEmail/showFile.jsp' : null sun.io.MalformedInputException at sun.io.ByteToCharUTF8.convert(ByteToCharUTF8.java:149) at weblogic.servlet.internal.CharChunkOutput.write(CharChunkOutput.java:111) at weblogic.servlet.internal.ChunkOutputWrapper.write(ChunkOutputWrapper.java:125) at weblogic.servlet.jsp.BodyOutputStream.write(NestedBodyResponse.java:65) at java.io.OutputStream.write(OutputStream.java:58) at jsp_servlet._pages._cannedemail.__showfile._jspService(__showfile.java:168) at weblogic.servlet.jsp.JspBase.service(JspBase.java:33) at weblogic.servlet.internal.ServletStubImpl$ServletInvocationAction.run (ServletStubImpl.java:1077) at weblogic.servlet.internal.ServletStubImpl.invokeServlet (ServletStubImpl.java:465) at weblogic.servlet.internal.ServletStubImpl.invokeServlet (ServletStubImpl.java:526) at weblogic.servlet.internal.TailFilter.doFilter(TailFilter.java:28) at weblogic.servlet.internal.FilterChainImpl.doFilter(FilterChainImpl.java:27) at org.apache.myfaces.webapp.filter.ExtensionsFilter.doFilter(ExtensionsFilter.java:97) at weblogic.servlet.internal.FilterChainImpl.doFilter(FilterChainImpl.java:27) at weblogic.servlet.internal.RequestDispatcherImpl.include(RequestDispatcherImpl.java:652) at weblogic.servlet.internal.RequestDispatcherImpl.include(RequestDispatcherImpl.java:431) at weblogic.servlet.jsp.PageContextImpl.include(PageContextImpl.java:154) at org.apache.struts.tiles.TilesUtilImpl.doInclude(TilesUtilImpl.java:137) at org.apache.struts.tiles.TilesUtil.doInclude(TilesUtil.java:177) at org.apache.struts.taglib.tiles.InsertTag.doInclude(InsertTag.java:756) at org.apache.struts.taglib.tiles.InsertTag$InsertHandler.doEndTag(InsertTag.java:881) at org.apache.struts.taglib.tiles.InsertTag.doEndTag(InsertTag.java:473) at jsp_servlet.__layout._jspService(__layout.java:260) at weblogic.servlet.jsp.JspBase.service (JspBase.java:33) at
Re: Displaying BLOB in JSF page
The answer is quite explicit: Can't insert page '/pages/cannedEmail/showFile.jsp' You are trying to *include* showFile.jsp inside another jsp file. The other jsp file expect the included file to generate a text output. But you are generating binary output, which can't be converted to html. I suppose you know that, in html, you never include the binary content inside the html document, you always create a link that points to the document to show. In case of pictures man use img src=.../ tag, in case of pdf, doc, xls man use an object.../object tag. If you look at myface example source, you should clearly notice this: h:graphicImage url=fileupload_showimg.jsf/ which is quite different from this jsp:include src=fileupload_showimg.jsf/ PS: i also notice, though you omitted to tell us about this in question, that you are mixing JSF with tiles. Ensure tiles does not do any text output pior ti binary output as it will give a corrupted response (padding before start of file). sushma sharma a écrit : Hi Experts, I am having trouble displaying BLOB data in my page. My requirement is that I must be able to show some predefined types(PDF, HTML, GIF, JPEG, DOC, XLS) of BLOB data in my page. This page must have the header of my application. I tried to use the example given at http://www.irian.at/myfaces/fileupload.jsf. I tried that example and it seemed to work for Images. But after I incorporated it in my app, I am getting the exception. Upload works, but problem is with displaying the content of the BLOB data. We have a field in the table where we set what type of data is in the BLOB, so I set the ContentType from that. I am using Myfaces 1.1.5, Tomahawk 1.1.3, Ajax4Jsf 1.1.1. server is WLS8.1 sp6. I understand that it is a problem with the page encoding/ content type set for the page.I tried it with UTF-8 and ISO-8859-1, but neither of them worked. Any help is appreciated. below is my jsp file and the exception I am getting. the jsp file is included in a tile. Thanks, Sushma ===JSP File== showFile.jsp == %@ page session=false % % String contentType = (String)application.getAttribute(fileupload_type); String fileName = (String)application.getAttribute(fileupload_name); String allowCache = request.getParameter(allowCache); String openDirectly = request.getParameter(openDirectly); System.out.print(\n\n*** allowCache + allowCache); if(allowCache == null || allowCache.equalsIgnoreCase(false)) { response.setHeader(pragma, no-cache); response.setHeader(Cache-control, no-cache, no-store, must-revalidate); response.setHeader(Expires, 01 Apr 1995 01:10:10 GMT); } if(contentType!=null) { System.out.print(\n\n*** contentType + contentType); response.setContentType(contentType); } if(fileName != null) { System.out.print(\n\n*** fileName + fileName); fileName = fileName.substring(fileName.lastIndexOf('\\')+1); fileName = fileName.substring(fileName.lastIndexOf('/')+1); StringBuffer contentDisposition = new StringBuffer(); System.out.print(\n\n*** openDirectly + openDirectly); if(openDirectly==null || openDirectly.equalsIgnoreCase(false)) { contentDisposition.append(attachment;); } contentDisposition.append(filename=\); contentDisposition.append(fileName); contentDisposition.append(\); response.setHeader (Content-Disposition, contentDisposition.toString()); } byte[] bytes = (byte[])application.getAttribute(fileupload_bytes); System.out.print(\n\n*** fileupload_bytes ); if (bytes != null) { System.out.print( = + bytes); response.getOutputStream().write(bytes); } % ---Exception - Can't insert page '/pages/cannedEmail/showFile.jsp' : null sun.io.MalformedInputException at sun.io.ByteToCharUTF8.convert(ByteToCharUTF8.java:149) at weblogic.servlet.internal.CharChunkOutput.write(CharChunkOutput.java:111) at weblogic.servlet.internal.ChunkOutputWrapper.write(ChunkOutputWrapper.java:125) at weblogicservlet.jsp.BodyOutputStream.write(NestedBodyResponse.java:65) at java.io.OutputStream.write(OutputStream.java:58) at jsp_servlet._pages._cannedemail.__showfile._jspService(__showfile.java:168) at weblogic.servlet.jsp.JspBase.service(JspBase.java:33) at weblogic.servlet.internal.ServletStubImpl$ServletInvocationAction.run (ServletStubImpl.java:1077) at weblogic.servlet.internalServletStubImpl.invokeServlet (ServletStubImpl.java:465) at weblogic.servlet.internal.ServletStubImpl.invokeServlet (ServletStubImpl.java:526) at weblogic.servlet.internal.TailFilter.doFilter(TailFilter.java:28) at
t:inputText help
Hi , I have a requirement where I need to show a field in readonly state, very much like how t:outPutText will show a field. There will be a small edit icon beside that field which will make the field editable, essetially an t:inputText will come up. I know I can do this by going to bean and toggling from t:outPutText to t:inputText on click of edit. But I was curious about displayValueOnly attribute of t:inputText. Can this attribute really work for above purpose? Actually it will good if I wouldnt have to go to bean for this small thing. Any pointers will be a big help. Thanks! -- View this message in context: http://www.nabble.com/t%3AinputText-help-tf4342915.html#a12371851 Sent from the MyFaces - Users mailing list archive at Nabble.com.
Re: [Trinidad] Label positioning
Thanks for your input, Christian. That is definitely a feasible solution to the problem, I was just wondering if there were a skinning approach that could use the existing label. If the only method available for repositioning the label / other attachments to trinidad components is to build them by hand, I guess my follow-up question would be: How do I reconstruct trinidad components by hand? In other words, I'd like to know how to translate something like: tr:inputText label=Test value=#{bean.testValue} ... / into more explicit markup like: tr:panelGroupLayout layout=horizontal ... tr:inputText value=#{bean.testValue} simple=true / ... /tr:panelGroupLayout of course it would be most useful to do this for all of the trinidad components, since I might want to reposition their messages, labels, error icons and required icons as well. Thanks, --Dave --- Christian Klocker [EMAIL PROTECTED] wrote: hi dave, I'm working on skinning my application and am trying to figure out the best way to reposition component labels. The default skin places labels to the left of their associated UI elements, but our site design requires them to appear above the elements in some cases. Our current workaround solution is to not use the component label, but to place our own label by hand above the component. i had the same problem recently ... i also solved it by using outputlabel. the problem here is the generated html-output (placement is done via html-tables). so i turned on attribte simple on the input-components (so the table doesn't get written) an created a facelet-tag-source-file for reuse. ... elements (e.g. the error icon, required icon, and error message---what are all of them anyway?) maybe this helps: http://myfaces.apache.org/trinidad/devguide/skinning.html christian Fussy? Opinionated? Impossible to please? Perfect. Join Yahoo!'s user panel and lay it on us. http://surveylink.yahoo.com/gmrs/yahoo_panel_invite.asp?a=7
Re: t:inputText help
I'll try the options you suggested. Thanks a lot for replying! David Delbecq-2 wrote: use t:inputText value=... displayValueOnly=#{not bean.inEditMode} You switch action can then simply change the value of bean.inEditMode to true. It can even be made with h:selectOneBoolean immediate=true value=#{bean.inEditMode}/ If you have heavy requirement for a text output with a side icon to edit and don't want the trouble of having to create a boolean property bean for each input text, you can create your own custom component that does it. Creating custom component is not very difficult in jsf. (A bit more if you use jsp view handler because you will also have to write the taglib :p) rosanil a écrit : Hi , I have a requirement where I need to show a field in readonly state, very much like how t:outPutText will show a field. There will be a small edit icon beside that field which will make the field editable, essetially an t:inputText will come up. I know I can do this by going to bean and toggling from t:outPutText to t:inputText on click of edit. But I was curious about displayValueOnly attribute of t:inputText. Can this attribute really work for above purpose? Actually it will good if I wouldnt have to go to bean for this small thing. Any pointers will be a big help. Thanks! -- View this message in context: http://www.nabble.com/t%3AinputText-help-tf4342915.html#a12372346 Sent from the MyFaces - Users mailing list archive at Nabble.com.
Re: t:inputText help
use t:inputText value=... displayValueOnly=#{not bean.inEditMode} You switch action can then simply change the value of bean.inEditMode to true. It can even be made with h:selectOneBoolean immediate=true value=#{bean.inEditMode}/ If you have heavy requirement for a text output with a side icon to edit and don't want the trouble of having to create a boolean property bean for each input text, you can create your own custom component that does it. Creating custom component is not very difficult in jsf. (A bit more if you use jsp view handler because you will also have to write the taglib :p) rosanil a écrit : Hi , I have a requirement where I need to show a field in readonly state, very much like how t:outPutText will show a field. There will be a small edit icon beside that field which will make the field editable, essetially an t:inputText will come up. I know I can do this by going to bean and toggling from t:outPutText to t:inputText on click of edit. But I was curious about displayValueOnly attribute of t:inputText. Can this attribute really work for above purpose? Actually it will good if I wouldnt have to go to bean for this small thing. Any pointers will be a big help. Thanks!
[TRINIDAD] - IMPORTANT - Custom Skin Developers
In the hope of pre-empting some emails, be aware that the trunk has switched to now use the following config setting for disabling skin compression. org.apache.myfaces.trinidadinternal.DISABLE_CONTENT_COMPRESSION became org.apache.myfaces.trinidad.DISABLE_CONTENT_COMPRESSION The docs and release notes in trunk also mention this. Thanks, Danny -- Chordiant Software Inc. www.chordiant.com
Re: Re: Displaying BLOB in JSF page
Thanks alot for the reply... I had totally forgotten about the img src= / in the example. that makes a lot of sense. I did write in my previous post that the jsp file is included in a tile and thanks for telling me that it will give me a corrupted output if I had text before the binary output in the tile. Actually, before I got this exception, I was having this corrupted output problem and I thought that this is some content type mismatch problem in the tile and the included page. so, if I want the included page to have a header, I can't use tile, instead will have to use a jsp with header content in it, right? Thanks a lot for the reply, Sushma On Tue, 28 Aug 2007 David Delbecq wrote : The answer is quite explicit: Can't insert page '/pages/cannedEmail/showFile.jsp' You are trying to *include* showFile.jsp inside another jsp file. The other jsp file expect the included file to generate a text output. But you are generating binary output, which can't be converted to html. I suppose you know that, in html, you never include the binary content inside the html document, you always create a link that points to the document to show. In case of pictures man use img src=.../ tag, in case of pdf, doc, xls man use an object.../object tag. If you look at myface example source, you should clearly notice this: h:graphicImage url=fileupload_showimg.jsf/ which is quite different from this jsp:include src=fileupload_showimg.jsf/ PS: i also notice, though you omitted to tell us about this in question, that you are mixing JSF with tiles. Ensure tiles does not do any text output pior ti binary output as it will give a corrupted response (padding before start of file). sushma sharma a écrit : Hi Experts, I am having trouble displaying BLOB data in my page. My requirement is that I must be able to show some predefined types(PDF, HTML, GIF, JPEG, DOC, XLS) of BLOB data in my page. This page must have the header of my application. I tried to use the example given at http://www.irian.at/myfaces/fileupload.jsf. I tried that example and it seemed to work for Images. But after I incorporated it in my app, I am getting the exception. Upload works, but problem is with displaying the content of the BLOB data. We have a field in the table where we set what type of data is in the BLOB, so I set the ContentType from that. I am using Myfaces 1.1.5, Tomahawk 1.1.3, Ajax4Jsf 1.1.1. server is WLS8.1 sp6. I understand that it is a problem with the page encoding/ content type set for the page.I tried it with UTF-8 and ISO-8859-1, but neither of them worked. Any help is appreciated. below is my jsp file and the exception I am getting. the jsp file is included in a tile. Thanks, Sushma ===JSP File== showFile.jsp == %@ page session=false % % String contentType = (String)application.getAttribute(fileupload_type); String fileName = (String)application.getAttribute(fileupload_name); String allowCache = request.getParameter(allowCache); String openDirectly = request.getParameter(openDirectly); System.out.print(\n\n*** allowCache + allowCache); if(allowCache == null || allowCache.equalsIgnoreCase(false)) { response.setHeader(pragma, no-cache); response.setHeader(Cache-control, no-cache, no-store, must-revalidate); response.setHeader(Expires, 01 Apr 1995 01:10:10 GMT); } if(contentType!=null) { System.out.print(\n\n*** contentType + contentType); response.setContentType(contentType); } if(fileName != null) { System.out.print(\n\n*** fileName + fileName); fileName = fileName.substring(fileName.lastIndexOf('\\')+1); fileName = fileName.substring(fileName.lastIndexOf('/')+1); StringBuffer contentDisposition = new StringBuffer(); System.out.print(\n\n*** openDirectly + openDirectly); if(openDirectly==null || openDirectly.equalsIgnoreCase(false)) { contentDisposition.append(attachment;); } contentDisposition.append(filename=\); contentDisposition.append(fileName); contentDisposition.append(\); response.setHeader (Content-Disposition, contentDisposition.toString()); } byte[] bytes = (byte[])application.getAttribute(fileupload_bytes); System.out.print(\n\n*** fileupload_bytes ); if (bytes != null) { System.out.print( = + bytes); response.getOutputStream().write(bytes); } % ---Exception - Can't insert page '/pages/cannedEmail/showFile.jsp' : null sun.io.MalformedInputException at sun.io.ByteToCharUTF8.convert(ByteToCharUTF8.java:149) at weblogic.servlet.internal.CharChunkOutput.write(CharChunkOutput.java:111) at
Re: tomahawk panelTabbedPane with multiple dataTable and dataScroller
somebody can help about this one ? I really appreciate it Érico Teixeira [EMAIL PROTECTED] wrote: I have a panelTabbedPane and 4 panelTabs declared int it : t:panelTab id=tab1 label=Tab1 rendered=true ui:insert name=sub1 ui:include src=tab1.xhtml / /ui:insert /t:panelTab ... In all my four tabs I would like to use dataTable and dataScroller It works ok for the dataTable in my first tab but when I try to paginate through scroller in tab1 dataTable it affects the state from the dataTable in my second tab For example in my first tab dataTable1 I have 10 records and in my second tab another dataTable contains only one record When I use the dataScroller in my first tab the dataTable in my second tab gets two more elements like the first one ... All dataTables point to diferent DataModels and all dataScrollers have diferent actionListeners Can I do that ? I mean to use dataTables and dataScrollers in diferents xhtml files and each one of these files be added in panelTabbedPane ? - Choose the right car based on your needs. Check out Yahoo! Autos new Car Finder tool. - Be a better Heartthrob. Get better relationship answers from someone who knows. Yahoo! Answers - Check it out.
[Trinidad] Bug in XMLMenuModel / ItemNode ?
Seems to me an action attribute is mistakenly interpreted as containing a property rather than an action method: I am trying to convert from lots of hard coded navigation items like this: tr:commandNavigationItem id=users action=#{_userList.go} text=#{Output.USER} / to a single tr:commandNavigationItem text=#{node.label} action=#{node.doAction}/ using a menu model containing definitions like this: itemNode id=users action=#{_userList.go} label=#{Output.USER} focusViewId=/benutzer.jsf/ My _userList bean has this method: public String go() { ... The navigation bar displays just fine, but when I click on the link/button all I get is this exception: 23:15:56,234 ERROR [STDERR] 28.08.2007 23:15:56 org.apache.myfaces.trinidadinternal.menu.MenuUtils getBoundValue SEVERE: javax.el.PropertyNotFoundException: Property 'go' not found on type com.fortis.texas.client.UserList_$$_javassist_13 at javax.el.BeanELResolver$BeanProperties.get(BeanELResolver.java:193) at javax.el.BeanELResolver.property(BeanELResolver.java:267) at javax.el.BeanELResolver.getValue(BeanELResolver.java:60) at javax.el.CompositeELResolver.getValue(CompositeELResolver.java:53) at com.sun.faces.el.FacesCompositeELResolver.getValue(FacesCompositeELResolver.java:64) at org.jboss.el.parser.AstPropertySuffix.getValue(AstPropertySuffix.java:53) Adding this method to _userList makes it work, but is an ugly workaround: public String getGo() { return go(); } Is it a bug or am I using something incorrectly here? (Trinidad 1.2.1, JBoss Seam 2.0.0-Beta)
SEVERE: No RenderingContext has been created.
I would greatly appreciate any advice on how to correct this or at least what might be causing it. Environment is MyFaces 1.1.5, Trinidad 1.0.2, Tomahawk 1.1.6, Struts Tiles 1.3.5, JDK 1.5.0_11 Thank you, Ed Aug 28, 2007 7:04:25 PM org.apache.myfaces.trinidadinternal.renderkit.core.CoreRenderKitcreateResponseWriter SEVERE: No RenderingContext has been created. Aug 28, 2007 7:04:25 PM org.apache.catalina.core.ApplicationDispatcherinvoke SEVERE: Servlet.service() for servlet jsp threw exception java.lang.IllegalStateException: No RenderingContext at org.apache.myfaces.trinidad.render.CoreRenderer.encodeEnd( CoreRenderer.java:214) at org.apache.myfaces.trinidad.component.UIXComponentBase.encodeEnd( UIXComponentBase.java:710) at javax.faces.webapp.UIComponentTag.encodeEnd(UIComponentTag.java:498) at javax.faces.webapp.UIComponentTag.doEndTag(UIComponentTag.java:366) at org.apache.myfaces.trinidad.webapp.UIXComponentTag.doEndTag( UIXComponentTag.java:118) at org.apache.jsp.page.layout_jspx._jspx_meth_tr_005fdocument_005f0 (layout_jspx.java:159) at org.apache.jsp.page.layout_jspx._jspx_meth_f_005fview_005f0 (layout_jspx.java:126) at org.apache.jsp.page.layout_jspx._jspService(layout_jspx.java:77) at org.apache.jasper.runtime.HttpJspBase.service(HttpJspBase.java:70) at javax.servlet.http.HttpServlet.service(HttpServlet.java:803) at org.apache.jasper.servlet.JspServletWrapper.service( JspServletWrapper.java:393) at org.apache.jasper.servlet.JspServlet.serviceJspFile(JspServlet.java :320) at org.apache.jasper.servlet.JspServlet.service(JspServlet.java:266) at javax.servlet.http.HttpServlet.service(HttpServlet.java:803) 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:445) at org.apache.catalina.core.ApplicationDispatcher.doForward( ApplicationDispatcher.java:379) at org.apache.catalina.core.ApplicationDispatcher.forward( ApplicationDispatcher.java:292) at org.apache.myfaces.context.servlet.ServletExternalContextImpl.dispatch( ServletExternalContextImpl.java:419) at org.apache.myfaces.trinidad.context.ExternalContextDecorator.dispatch (ExternalContextDecorator.java:43) at org.apache.myfaces.trinidad.context.ExternalContextDecorator.dispatch (ExternalContextDecorator.java:43) at org.apache.myfaces.trinidadinternal.context.FacesContextFactoryImpl$OverrideDispatch.dispatch (FacesContextFactoryImpl.java:260) at org.apache.myfaces.trinidad.context.ExternalContextDecorator.dispatch (ExternalContextDecorator.java:43) at org.apache.myfaces.trinidadinternal.context.FacesContextFactoryImpl$OverrideDispatch.dispatch (FacesContextFactoryImpl.java:260) at org.apache.myfaces.tomahawk.application.jsp.JspTilesViewHandlerImpl.dispatch (JspTilesViewHandlerImpl.java:236) at org.apache.myfaces.tomahawk.application.jsp.JspTilesViewHandlerImpl.renderView (JspTilesViewHandlerImpl.java:222) 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:140) 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.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:595)
Re: [Trinidad] Bug in XMLMenuModel / ItemNode ?
Stephen, You're correct. The bug is in ItemNode.doAction(), which calls a MenuUtils.getBoundValue() function, which in turn tries to process this as a ValueBinding/ValueExpression. It's not - it's a MethodBinding/MethodExpression. -- Adam On 8/28/07, Stephen Friedrich [EMAIL PROTECTED] wrote: Seems to me an action attribute is mistakenly interpreted as containing a property rather than an action method: I am trying to convert from lots of hard coded navigation items like this: tr:commandNavigationItem id=users action=#{_userList.go} text=#{Output.USER} / to a single tr:commandNavigationItem text=#{node.label} action=#{node.doAction}/ using a menu model containing definitions like this: itemNode id=users action=#{_userList.go} label=#{Output.USER} focusViewId=/benutzer.jsf/ My _userList bean has this method: public String go() { ... The navigation bar displays just fine, but when I click on the link/button all I get is this exception: 23:15:56,234 ERROR [STDERR] 28.08.2007 23:15:56 org.apache.myfaces.trinidadinternal.menu.MenuUtils getBoundValue SEVERE: javax.el.PropertyNotFoundException: Property 'go' not found on type com.fortis.texas.client.UserList_$$_javassist_13 at javax.el.BeanELResolver$BeanProperties.get(BeanELResolver.java:193) at javax.el.BeanELResolver.property(BeanELResolver.java:267) at javax.el.BeanELResolver.getValue(BeanELResolver.java:60) at javax.el.CompositeELResolver.getValue(CompositeELResolver.java:53) at com.sun.faces.el.FacesCompositeELResolver.getValue(FacesCompositeELResolver.java:64) at org.jboss.el.parser.AstPropertySuffix.getValue(AstPropertySuffix.java:53) Adding this method to _userList makes it work, but is an ugly workaround: public String getGo() { return go(); } Is it a bug or am I using something incorrectly here? (Trinidad 1.2.1, JBoss Seam 2.0.0-Beta)
Re: SEVERE: No RenderingContext has been created.
The problem is that the JspTilesViewHandlerImpl is running without the TrinidadViewHandlerImpl ever getting a chance. See http://www.nabble.com/-Trinidad--Integration-with-Tiles-t4244805.html where pdt_p answered this question. -- Adam On 8/28/07, Edward Dowgiallo [EMAIL PROTECTED] wrote: I would greatly appreciate any advice on how to correct this or at least what might be causing it. Environment is MyFaces 1.1.5, Trinidad 1.0.2, Tomahawk 1.1.6, Struts Tiles 1.3.5, JDK 1.5.0_11 Thank you, Ed Aug 28, 2007 7:04:25 PM org.apache.myfaces.trinidadinternal.renderkit.core.CoreRenderKit createResponseWriter SEVERE: No RenderingContext has been created. Aug 28, 2007 7:04:25 PM org.apache.catalina.core.ApplicationDispatcher invoke SEVERE: Servlet.service() for servlet jsp threw exception java.lang.IllegalStateException: No RenderingContext at org.apache.myfaces.trinidad.render.CoreRenderer.encodeEnd(CoreRenderer.java:214) at org.apache.myfaces.trinidad.component.UIXComponentBase.encodeEnd(UIXComponentBase.java:710) at javax.faces.webapp.UIComponentTag.encodeEnd(UIComponentTag.java:498) at javax.faces.webapp.UIComponentTag.doEndTag (UIComponentTag.java:366) at org.apache.myfaces.trinidad.webapp.UIXComponentTag.doEndTag(UIXComponentTag.java:118) at org.apache.jsp.page.layout_jspx._jspx_meth_tr_005fdocument_005f0(layout_jspx.java:159) at org.apache.jsp.page.layout_jspx._jspx_meth_f_005fview_005f0(layout_jspx.java:126) at org.apache.jsp.page.layout_jspx._jspService(layout_jspx.java:77) at org.apache.jasper.runtime.HttpJspBase.service(HttpJspBase.java :70) at javax.servlet.http.HttpServlet.service(HttpServlet.java:803) at org.apache.jasper.servlet.JspServletWrapper.service(JspServletWrapper.java:393) at org.apache.jasper.servlet.JspServlet.serviceJspFile (JspServlet.java:320) at org.apache.jasper.servlet.JspServlet.service(JspServlet.java:266) at javax.servlet.http.HttpServlet.service(HttpServlet.java:803) 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:445) at org.apache.catalina.core.ApplicationDispatcher.doForward(ApplicationDispatcher.java:379) at org.apache.catalina.core.ApplicationDispatcher.forward (ApplicationDispatcher.java:292) at org.apache.myfaces.context.servlet.ServletExternalContextImpl.dispatch(ServletExternalContextImpl.java:419) at org.apache.myfaces.trinidad.context.ExternalContextDecorator.dispatch (ExternalContextDecorator.java:43) at org.apache.myfaces.trinidad.context.ExternalContextDecorator.dispatch(ExternalContextDecorator.java:43) at org.apache.myfaces.trinidadinternal.context.FacesContextFactoryImpl$OverrideDispatch.dispatch (FacesContextFactoryImpl.java:260) at org.apache.myfaces.trinidad.context.ExternalContextDecorator.dispatch(ExternalContextDecorator.java:43) at org.apache.myfaces.trinidadinternal.context.FacesContextFactoryImpl$OverrideDispatch.dispatch (FacesContextFactoryImpl.java:260) at org.apache.myfaces.tomahawk.application.jsp.JspTilesViewHandlerImpl.dispatch(JspTilesViewHandlerImpl.java:236) at org.apache.myfaces.tomahawk.application.jsp.JspTilesViewHandlerImpl.renderView (JspTilesViewHandlerImpl.java:222) 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:140) 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.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:595)
Re: [Trinidad] ppr: partialTriggers doesn't work if there are validation messages?
On 8/28/07, Andrew Robinson [EMAIL PROTECTED] wrote: I got it to work with a custom component. I created a component that doesn't render, that simply houses children. In the queueEvent method of that component, if the type of the event is ActionEvent, I then use it to add components as partial targets. It just would be nice to have this supported by Trinidad out of the box. A4J creates AjaxEvents that have their phase ID set to ANY, so they fire almost immediately, and thus work regardless of what phases are run. I'm just wondering if there would be any harm to moving the code from the broadcast method to the queue method. Yes, there would be! It'd break the semantics of partialTriggers. If you want your action event to fire in the ANY phase, just set immediate=true. -- Adam On 8/28/07, Simon Lessard [EMAIL PROTECTED] wrote: Hello Andrew, To my knowledge, this is the desired behavior since PPR requests does not use a different lifecycle than a normal requests. However, since I had to deal with that with every single ADF Faces/Trinidad projects I was on, I made a new lifecycle that alter the behavior with PPR request by skipping required check validations and running validation and update model phases only on the PPR source then I restore the model value after the render to make sure the model does not stay polluted. Finally, I have to save all values that were pushed from PPR that way so that in further PPR requests (in case there's more than one PPR active element in the page), I push the value back to the model from the previous PPR requests. This last part is the source of most of the complexity but is required when populating a selectOneMenu's list of values from the value of two other fields for example. Regards, ~ Simon On 8/27/07, Andrew Robinson [EMAIL PROTECTED] wrote: I have a login form with a login command link. The form is a panelFormLayout with panelLabelAndMessage components with inputText components (username and password). I have: tr:panelFormLayout partialTriggers=login ... f:facet name=footer tr:group tr:commandLink id=login partialSubmit=true action=#{identity.login} text=#{messages.page_login_login} / ... Now the panel is not updated because the code to trigger the PPR is in the broadcast method of the UIXCommand (parent of the command link). The validation error causes the ActionEvent to not be broadcast, and thus the PPR is not properly triggered. Should this be considered a bug? Should the adfContext.partialUpdateNotify(component); call be made from the queueEvent method rather than the broadcast method? Or is there a different way to do this that I am missing? Another nice feature would be to automatically have the panelLabelAndMessage and panelFormLayout components automatically get re-rendered if there is a validation or conversion error in one of their nested children components. Thanks, Andrew
Re: SEVERE: No RenderingContext has been created.
Thank you Adam. This now has the Tiles 1.3.5 partially functioning. layout.jspx is now being processed correctly. The contents of body.jspf, however, appear unprocessed at the beginning of the response. Do I need a servlet or filter mapping for *.jspf? tiles-defs.xml: tiles-definitions definitionname=/test.tilespath=/page/layout.jspx putname=bodyvalue=/tile/body.jspf/ /definition /tiles-definitions layout.jspx: jsp:rootversion=2.0 xmlns:f=http://java.sun.com/jsf/core; xmlns:jsp=http://java.sun.com/JSP/Page; xmlns:tiles=http://struts.apache.org/tags-tiles; xmlns:tr=http://myfaces.apache.org/trinidad; jsp:directive.page contentType=text/html;charset=UTF-8 / tiles:importAttributescope=request / f:view tr:document title=Library Home Page tr:form tr:panelPageid=library-home-page f:verbatimdivhtml/div/f:verbatim tr:outputTextvalue=Before... / tiles:insertattribute=bodyflush=false/ tr:outputTextvalue=...After / /tr:panelPage /tr:form /tr:document /f:view /jsp:root body.jspf: jsp:rootversion=2.0 xmlns:f=http://java.sun.com/jsf/core; xmlns:jsp=http://java.sun.com/JSP/Page; xmlns:tiles=http://struts.apache.org/tags-tiles; xmlns:tr=http://myfaces.apache.org/trinidad; f:verbatimdivAlpha/div/f:verbatim tr:panelBorderLayout tr:outputText value=Tiles 101 body content. / /tr:panelBorderLayout /jsp:root On 8/28/07, Adam Winer [EMAIL PROTECTED] wrote: The problem is that the JspTilesViewHandlerImpl is running without the TrinidadViewHandlerImpl ever getting a chance. See http://www.nabble.com/-Trinidad--Integration-with-Tiles-t4244805.html where pdt_p answered this question. -- Adam On 8/28/07, Edward Dowgiallo [EMAIL PROTECTED] wrote: I would greatly appreciate any advice on how to correct this or at least what might be causing it. Environment is MyFaces 1.1.5, Trinidad 1.0.2, Tomahawk 1.1.6, Struts Tiles 1.3.5, JDK 1.5.0_11 Thank you, Ed Aug 28, 2007 7:04:25 PM org.apache.myfaces.trinidadinternal.renderkit.core.CoreRenderKit createResponseWriter SEVERE: No RenderingContext has been created. Aug 28, 2007 7:04:25 PM org.apache.catalina.core.ApplicationDispatcher invoke SEVERE: Servlet.service() for servlet jsp threw exception java.lang.IllegalStateException: No RenderingContext at org.apache.myfaces.trinidad.render.CoreRenderer.encodeEnd( CoreRenderer.java:214) at org.apache.myfaces.trinidad.component.UIXComponentBase.encodeEnd( UIXComponentBase.java:710) at javax.faces.webapp.UIComponentTag.encodeEnd(UIComponentTag.java:498) at javax.faces.webapp.UIComponentTag.doEndTag (UIComponentTag.java:366) at org.apache.myfaces.trinidad.webapp.UIXComponentTag.doEndTag( UIXComponentTag.java:118) at org.apache.jsp.page.layout_jspx._jspx_meth_tr_005fdocument_005f0 (layout_jspx.java:159) at org.apache.jsp.page.layout_jspx._jspx_meth_f_005fview_005f0 (layout_jspx.java:126) at org.apache.jsp.page.layout_jspx._jspService(layout_jspx.java:77) at org.apache.jasper.runtime.HttpJspBase.service(HttpJspBase.java :70) at javax.servlet.http.HttpServlet.service(HttpServlet.java:803) at org.apache.jasper.servlet.JspServletWrapper.service( JspServletWrapper.java:393) at org.apache.jasper.servlet.JspServlet.serviceJspFile (JspServlet.java:320) at org.apache.jasper.servlet.JspServlet.service(JspServlet.java:266) at javax.servlet.http.HttpServlet.service(HttpServlet.java:803) 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:445) at org.apache.catalina.core.ApplicationDispatcher.doForward( ApplicationDispatcher.java:379) at org.apache.catalina.core.ApplicationDispatcher.forward (ApplicationDispatcher.java:292) at org.apache.myfaces.context.servlet.ServletExternalContextImpl.dispatch( ServletExternalContextImpl.java:419) at org.apache.myfaces.trinidad.context.ExternalContextDecorator.dispatch (ExternalContextDecorator.java:43) at org.apache.myfaces.trinidad.context.ExternalContextDecorator.dispatch( ExternalContextDecorator.java:43) at org.apache.myfaces.trinidadinternal.context.FacesContextFactoryImpl$OverrideDispatch.dispatch (FacesContextFactoryImpl.java:260) at
TObago
Hi all; I've a strange problem with tobago jsp; happens sometimes and I can't reproduce - java.lang.NullPointerException at org.apache.myfaces.tobago.component.UIPopup.isRendered(UIPopup.java:73) at org.apache.myfaces.tobago.renderkit.RenderUtil.encode(RenderUtil.java:66) at org.apache.myfaces.tobago.renderkit.html.scarborough.standard.tag.PageRenderer.encodeEnd(PageRenderer.java:138) .. -- I've 3 popup in the page; all off in page load time. Please help -- View this message in context: http://www.nabble.com/TObago-tf4345120.html#a12379088 Sent from the MyFaces - Users mailing list archive at Nabble.com.
Re: [Trinidad] ppr: partialTriggers doesn't work if there are validation messages?
But the action should not be immediate, only the effect of the re-rendering On 8/28/07, Adam Winer [EMAIL PROTECTED] wrote: On 8/28/07, Andrew Robinson [EMAIL PROTECTED] wrote: I got it to work with a custom component. I created a component that doesn't render, that simply houses children. In the queueEvent method of that component, if the type of the event is ActionEvent, I then use it to add components as partial targets. It just would be nice to have this supported by Trinidad out of the box. A4J creates AjaxEvents that have their phase ID set to ANY, so they fire almost immediately, and thus work regardless of what phases are run. I'm just wondering if there would be any harm to moving the code from the broadcast method to the queue method. Yes, there would be! It'd break the semantics of partialTriggers. If you want your action event to fire in the ANY phase, just set immediate=true. -- Adam On 8/28/07, Simon Lessard [EMAIL PROTECTED] wrote: Hello Andrew, To my knowledge, this is the desired behavior since PPR requests does not use a different lifecycle than a normal requests. However, since I had to deal with that with every single ADF Faces/Trinidad projects I was on, I made a new lifecycle that alter the behavior with PPR request by skipping required check validations and running validation and update model phases only on the PPR source then I restore the model value after the render to make sure the model does not stay polluted. Finally, I have to save all values that were pushed from PPR that way so that in further PPR requests (in case there's more than one PPR active element in the page), I push the value back to the model from the previous PPR requests. This last part is the source of most of the complexity but is required when populating a selectOneMenu's list of values from the value of two other fields for example. Regards, ~ Simon On 8/27/07, Andrew Robinson [EMAIL PROTECTED] wrote: I have a login form with a login command link. The form is a panelFormLayout with panelLabelAndMessage components with inputText components (username and password). I have: tr:panelFormLayout partialTriggers=login ... f:facet name=footer tr:group tr:commandLink id=login partialSubmit=true action=#{identity.login} text=#{messages.page_login_login} / ... Now the panel is not updated because the code to trigger the PPR is in the broadcast method of the UIXCommand (parent of the command link). The validation error causes the ActionEvent to not be broadcast, and thus the PPR is not properly triggered. Should this be considered a bug? Should the adfContext.partialUpdateNotify(component); call be made from the queueEvent method rather than the broadcast method? Or is there a different way to do this that I am missing? Another nice feature would be to automatically have the panelLabelAndMessage and panelFormLayout components automatically get re-rendered if there is a validation or conversion error in one of their nested children components. Thanks, Andrew
Re: [Trinidad] Looking for client-side partial page validation
I think your issue is mixing components outside of the subform. Instead, just use multiple subforms. Try something like this, which works fine for me. : tr:document tr:messages/ tr:form tr:subform tr:inputText required=true label=Sub 1:/ tr:commandButton text=Submit 1/ /tr:subform tr:subform tr:inputText required=true label=Sub 2:/ tr:commandButton text=Submit 2/ /tr:subform tr:subform default=true tr:inputText required=true label=Sub Default:/ tr:commandButton text=Submit Default/ /tr:subform tr:commandButton text=Submit Outside/ /tr:form /tr:document On 8/28/07, Vadim Dmitriev [EMAIL PROTECTED] wrote: Hi! As far as I know ADF had some limitation regarding client-side validation with subforms. Suppose we have following block in a page: tr:form tr:inputText required=true / tr:subform tr:inputText / tr:commandButton / /tr:subform /tr:form In that case if we will try to submit that page via commandButton with outer input field empty - validation error will occur on client, while with client-side validation disabled this request will be absolutely valid (i.e. no server-side validation exceptions will be thrown). Yesterday i faced that problem with trinidad. Maybe there is some quick workaround? I really don't want to take immediate/binding/submitted value way. Not to mention that that method leads to skipping subform validation :) I took a quick look into trinidad's client-side validation implementation and found interesting block of code in the _multiValidation() function related to skipping all subform's fields validators if user submitted outer form. Maybe it will be easier for me (if at all possible) to modify that filtering process to skip outer form validators if subform is submitted? Thank you in advance! P.S. I understand that AJAX-enabled server-side validation is actually fast and consumes very little of traffic, but my boss stands for if we can do it on client-side - we'll do it on client. So I have choice of either fixing said problem in trinidad itself or writing all client-side validation from scratch. -- Chordiant Software Inc. www.chordiant.com
Tobago overview and frameset
I all; I' need to use a frameset in tobago overview (from demo). Cause when I click on any button the whole page is refreshed. Please help; -- View this message in context: http://www.nabble.com/Tobago-overview-and-frameset-tf4345187.html#a12379281 Sent from the MyFaces - Users mailing list archive at Nabble.com.
Re: [Trinidad] Looking for client-side partial page validation
On 8/28/07, Vadim Dmitriev [EMAIL PROTECTED] wrote: Hi! As far as I know ADF had some limitation regarding client-side validation with subforms. Suppose we have following block in a page: tr:form tr:inputText required=true / tr:subform tr:inputText / tr:commandButton / /tr:subform /tr:form In that case if we will try to submit that page via commandButton with outer input field empty - validation error will occur on client, while with client-side validation disabled this request will be absolutely valid (i.e. no server-side validation exceptions will be thrown). In fact, that's false. Server-side validation will fire for the inputText, as components outside subforms always execute. There should be no cases whatsoever where client-side validation is stricter than server-side. Any such cases are major bugs, as they open security holes in any application that relies on the client-side validation. -- Adam Yesterday i faced that problem with trinidad. Maybe there is some quick workaround? I really don't want to take immediate/binding/submitted value way. Not to mention that that method leads to skipping subform validation :) I took a quick look into trinidad's client-side validation implementation and found interesting block of code in the _multiValidation() function related to skipping all subform's fields validators if user submitted outer form. Maybe it will be easier for me (if at all possible) to modify that filtering process to skip outer form validators if subform is submitted? Thank you in advance! P.S. I understand that AJAX-enabled server-side validation is actually fast and consumes very little of traffic, but my boss stands for if we can do it on client-side - we'll do it on client. So I have choice of either fixing said problem in trinidad itself or writing all client-side validation from scratch.
Re: [Trinidad] ppr: partialTriggers doesn't work if there are validation messages?
I don't understand that sentence... You're saying that you *do* want validation to fire, but want the components to re-render just the same? This seems odd... If validation fails, what state has changed such that you need updated content? -- Adam On 8/28/07, Andrew Robinson [EMAIL PROTECTED] wrote: But the action should not be immediate, only the effect of the re-rendering On 8/28/07, Adam Winer [EMAIL PROTECTED] wrote: On 8/28/07, Andrew Robinson [EMAIL PROTECTED] wrote: I got it to work with a custom component. I created a component that doesn't render, that simply houses children. In the queueEvent method of that component, if the type of the event is ActionEvent, I then use it to add components as partial targets. It just would be nice to have this supported by Trinidad out of the box. A4J creates AjaxEvents that have their phase ID set to ANY, so they fire almost immediately, and thus work regardless of what phases are run. I'm just wondering if there would be any harm to moving the code from the broadcast method to the queue method. Yes, there would be! It'd break the semantics of partialTriggers. If you want your action event to fire in the ANY phase, just set immediate=true. -- Adam On 8/28/07, Simon Lessard [EMAIL PROTECTED] wrote: Hello Andrew, To my knowledge, this is the desired behavior since PPR requests does not use a different lifecycle than a normal requests. However, since I had to deal with that with every single ADF Faces/Trinidad projects I was on, I made a new lifecycle that alter the behavior with PPR request by skipping required check validations and running validation and update model phases only on the PPR source then I restore the model value after the render to make sure the model does not stay polluted. Finally, I have to save all values that were pushed from PPR that way so that in further PPR requests (in case there's more than one PPR active element in the page), I push the value back to the model from the previous PPR requests. This last part is the source of most of the complexity but is required when populating a selectOneMenu's list of values from the value of two other fields for example. Regards, ~ Simon On 8/27/07, Andrew Robinson [EMAIL PROTECTED] wrote: I have a login form with a login command link. The form is a panelFormLayout with panelLabelAndMessage components with inputText components (username and password). I have: tr:panelFormLayout partialTriggers=login ... f:facet name=footer tr:group tr:commandLink id=login partialSubmit=true action=#{identity.login} text=#{messages.page_login_login} / ... Now the panel is not updated because the code to trigger the PPR is in the broadcast method of the UIXCommand (parent of the command link). The validation error causes the ActionEvent to not be broadcast, and thus the PPR is not properly triggered. Should this be considered a bug? Should the adfContext.partialUpdateNotify(component); call be made from the queueEvent method rather than the broadcast method? Or is there a different way to do this that I am missing? Another nice feature would be to automatically have the panelLabelAndMessage and panelFormLayout components automatically get re-rendered if there is a validation or conversion error in one of their nested children components. Thanks, Andrew
Re: SEVERE: No RenderingContext has been created.
I can't really say. I've never recommended the use of Tiles with JSF at all - Trinidad, Tomahawk, A4J, standard spec components, none of them really work that well with Tiles. I'd recommend getting jsp:include working first. *Then* try mixing in Tiles if you really must. -- Adam On 8/28/07, Edward Dowgiallo [EMAIL PROTECTED] wrote: Thank you Adam. This now has the Tiles 1.3.5 partially functioning. layout.jspx is now being processed correctly. The contents of body.jspf, however, appear unprocessed at the beginning of the response. Do I need a servlet or filter mapping for *.jspf? tiles-defs.xml: tiles-definitions definitionname=/test.tilespath=/page/layout.jspx putname=bodyvalue=/tile/body.jspf/ /definition /tiles-definitions layout.jspx: jsp:rootversion=2.0 xmlns:f=http://java.sun.com/jsf/core xmlns:jsp=http://java.sun.com/JSP/Page; xmlns:tiles=http://struts.apache.org/tags-tiles xmlns:tr=http://myfaces.apache.org/trinidad; jsp:directive.page contentType=text/html;charset=UTF-8 / tiles:importAttributescope=request / f:view tr:document title=Library Home Page tr:form tr:panelPageid=library-home-page f:verbatimdivhtml/div/f:verbatim tr:outputTextvalue=Before... / tiles:insertattribute=bodyflush=false/ tr:outputTextvalue=...After / /tr:panelPage /tr:form /tr:document /f:view /jsp:root body.jspf: jsp:rootversion=2.0 xmlns:f=http://java.sun.com/jsf/core; xmlns:jsp= http://java.sun.com/JSP/Page; xmlns:tiles=http://struts.apache.org/tags-tiles; xmlns:tr= http://myfaces.apache.org/trinidad; f:verbatimdivAlpha/div/f:verbatim tr:panelBorderLayout tr:outputText value=Tiles 101 body content. / /tr:panelBorderLayout /jsp:root On 8/28/07, Adam Winer [EMAIL PROTECTED] wrote: The problem is that the JspTilesViewHandlerImpl is running without the TrinidadViewHandlerImpl ever getting a chance. See http://www.nabble.com/-Trinidad--Integration-with-Tiles-t4244805.html where pdt_p answered this question. -- Adam On 8/28/07, Edward Dowgiallo [EMAIL PROTECTED] wrote: I would greatly appreciate any advice on how to correct this or at least what might be causing it. Environment is MyFaces 1.1.5, Trinidad 1.0.2, Tomahawk 1.1.6, Struts Tiles 1.3.5, JDK 1.5.0_11 Thank you, Ed Aug 28, 2007 7:04:25 PM org.apache.myfaces.trinidadinternal.renderkit.core.CoreRenderKit createResponseWriter SEVERE: No RenderingContext has been created. Aug 28, 2007 7:04:25 PM org.apache.catalina.core.ApplicationDispatcher invoke SEVERE: Servlet.service() for servlet jsp threw exception java.lang.IllegalStateException: No RenderingContext at org.apache.myfaces.trinidad.render.CoreRenderer.encodeEnd(CoreRenderer.java:214) at org.apache.myfaces.trinidad.component.UIXComponentBase.encodeEnd (UIXComponentBase.java:710) at javax.faces.webapp.UIComponentTag.encodeEnd(UIComponentTag.java:498) at javax.faces.webapp.UIComponentTag.doEndTag (UIComponentTag.java:366) at org.apache.myfaces.trinidad.webapp.UIXComponentTag.doEndTag(UIXComponentTag.java:118) at org.apache.jsp.page.layout_jspx._jspx_meth_tr_005fdocument_005f0(layout_jspx.java:159) at org.apache.jsp.page.layout_jspx._jspx_meth_f_005fview_005f0(layout_jspx.java:126) at org.apache.jsp.page.layout_jspx._jspService(layout_jspx.java:77) at org.apache.jasper.runtime.HttpJspBase.service (HttpJspBase.java :70) at javax.servlet.http.HttpServlet.service(HttpServlet.java:803) at org.apache.jasper.servlet.JspServletWrapper.service(JspServletWrapper.java:393) at org.apache.jasper.servlet.JspServlet.serviceJspFile (JspServlet.java:320) at org.apache.jasper.servlet.JspServlet.service(JspServlet.java:266) at javax.servlet.http.HttpServlet.service (HttpServlet.java:803) 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:445) at org.apache.catalina.core.ApplicationDispatcher.doForward(ApplicationDispatcher.java:379) at org.apache.catalina.core.ApplicationDispatcher.forward (ApplicationDispatcher.java:292) at
Re: [Trinidad] Looking for client-side partial page validation
Adam Winer wrote: On 8/28/07, Vadim Dmitriev [EMAIL PROTECTED] wrote: Hi! As far as I know ADF had some limitation regarding client-side validation with subforms. Suppose we have following block in a page: tr:form tr:inputText required=true / tr:subform tr:inputText / tr:commandButton / /tr:subform /tr:form In that case if we will try to submit that page via commandButton with outer input field empty - validation error will occur on client, while with client-side validation disabled this request will be absolutely valid (i.e. no server-side validation exceptions will be thrown). In fact, that's false. Server-side validation will fire for the inputText, as components outside subforms always execute. There should be no cases whatsoever where client-side validation is stricter than server-side. Any such cases are major bugs, as they open security holes in any application that relies on the client-side validation. -- Adam Seems I misunderstood tr:subform description. As written in [1]: The CoreSubform represents an independently submittable region of a page. The contents of a subform will only be validated (or otherwise processed) if a component inside of the subform is responsible for submitting the page. Maybe it worth to mention there, that subform's parent form will also be validated and processed? However thanks for clearing that for me, Adam! [1] - http://myfaces.apache.org/trinidad/trinidad-api/tagdoc/tr_subform.html Yesterday i faced that problem with trinidad. Maybe there is some quick workaround? I really don't want to take immediate/binding/submitted value way. Not to mention that that method leads to skipping subform validation :) I took a quick look into trinidad's client-side validation implementation and found interesting block of code in the _multiValidation() function related to skipping all subform's fields validators if user submitted outer form. Maybe it will be easier for me (if at all possible) to modify that filtering process to skip outer form validators if subform is submitted? Thank you in advance! P.S. I understand that AJAX-enabled server-side validation is actually fast and consumes very little of traffic, but my boss stands for if we can do it on client-side - we'll do it on client. So I have choice of either fixing said problem in trinidad itself or writing all client-side validation from scratch.
Re: [Trinidad] Looking for client-side partial page validation
Solution simple enough not to be obvious :) Thanks, you saved me a lot of time. Danny Robinson wrote: I think your issue is mixing components outside of the subform. Instead, just use multiple subforms. Try something like this, which works fine for me. : tr:document tr:messages/ tr:form tr:subform tr:inputText required=true label=Sub 1:/ tr:commandButton text=Submit 1/ /tr:subform tr:subform tr:inputText required=true label=Sub 2:/ tr:commandButton text=Submit 2/ /tr:subform tr:subform default=true tr:inputText required=true label=Sub Default:/ tr:commandButton text=Submit Default/ /tr:subform tr:commandButton text=Submit Outside/ /tr:form /tr:document On 8/28/07, *Vadim Dmitriev* [EMAIL PROTECTED] mailto:[EMAIL PROTECTED] wrote: Hi! As far as I know ADF had some limitation regarding client-side validation with subforms. Suppose we have following block in a page: tr:form tr:inputText required=true / tr:subform tr:inputText / tr:commandButton / /tr:subform /tr:form In that case if we will try to submit that page via commandButton with outer input field empty - validation error will occur on client, while with client-side validation disabled this request will be absolutely valid (i.e. no server-side validation exceptions will be thrown). Yesterday i faced that problem with trinidad. Maybe there is some quick workaround? I really don't want to take immediate/binding/submitted value way. Not to mention that that method leads to skipping subform validation :) I took a quick look into trinidad's client-side validation implementation and found interesting block of code in the _multiValidation() function related to skipping all subform's fields validators if user submitted outer form. Maybe it will be easier for me (if at all possible) to modify that filtering process to skip outer form validators if subform is submitted? Thank you in advance! P.S. I understand that AJAX-enabled server-side validation is actually fast and consumes very little of traffic, but my boss stands for if we can do it on client-side - we'll do it on client. So I have choice of either fixing said problem in trinidad itself or writing all client-side validation from scratch. -- Chordiant Software Inc. www.chordiant.com http://www.chordiant.com
Re: [Trinidad] ppr: partialTriggers doesn't work if there are validation messages?
It is a simple case of showing the effects of the failed validation. Take the following use case as an example: User clicks on a register button to create a user account for a web site. The user enters a username that is already in use and hits the register/save button A unique validator on the username field fails its validation and adds a validation message to the faces context using the component. All message components that are for this component as well as any messages components that are not global have to be re-rendered to show the user the validation error. This is just one use case to illustrate the fact that at the very least, message and messages components need to be re-rendered when validation errors and conversion errors are thrown on the server. This doesn't include any components that need to be re-rendered as a result. For example, the panelLabelAndMessage component renders an error icon in the label when there is an error message for the input component. It is also common for people to style components different (red border for example) when their validation fails. The way Trinidad components are written, there is no way out of the box to accomplish this. The commandLink and commandButton will only run the partial trigger functionality if the action event is broadcast. Therefore, there is a large gap in the PPR functionality to allow code to trigger rendering when the renderResponse method is called before the broadcasting of the event. Now, doesn't it make sense for a message component to be triggered on the fact that the command was executed (meaning the button was clicked, form was submitted) but not necessarily that the JSF action was run? Even if you don't agree, you have to realize that the PPR currently makes re-rendering impossible if renderResponse is called, shortening the JSF lifecycle. I realize that many people use client side validation with Trinidad and therefore are less likely to have this issue, but there are several reasons that client side validation is not a complete solution. With custom components and integration with the Tridindad APIs this functionality is definitely possible, but it really should be provided out of the box. So to answer your question, there is absolutely no point in re-rendering a message component if there isn't a validation error or conversion error. -Andrew On 8/28/07, Adam Winer [EMAIL PROTECTED] wrote: I don't understand that sentence... You're saying that you *do* want validation to fire, but want the components to re-render just the same? This seems odd... If validation fails, what state has changed such that you need updated content? -- Adam On 8/28/07, Andrew Robinson [EMAIL PROTECTED] wrote: But the action should not be immediate, only the effect of the re-rendering On 8/28/07, Adam Winer [EMAIL PROTECTED] wrote: On 8/28/07, Andrew Robinson [EMAIL PROTECTED] wrote: I got it to work with a custom component. I created a component that doesn't render, that simply houses children. In the queueEvent method of that component, if the type of the event is ActionEvent, I then use it to add components as partial targets. It just would be nice to have this supported by Trinidad out of the box. A4J creates AjaxEvents that have their phase ID set to ANY, so they fire almost immediately, and thus work regardless of what phases are run. I'm just wondering if there would be any harm to moving the code from the broadcast method to the queue method. Yes, there would be! It'd break the semantics of partialTriggers. If you want your action event to fire in the ANY phase, just set immediate=true. -- Adam On 8/28/07, Simon Lessard [EMAIL PROTECTED] wrote: Hello Andrew, To my knowledge, this is the desired behavior since PPR requests does not use a different lifecycle than a normal requests. However, since I had to deal with that with every single ADF Faces/Trinidad projects I was on, I made a new lifecycle that alter the behavior with PPR request by skipping required check validations and running validation and update model phases only on the PPR source then I restore the model value after the render to make sure the model does not stay polluted. Finally, I have to save all values that were pushed from PPR that way so that in further PPR requests (in case there's more than one PPR active element in the page), I push the value back to the model from the previous PPR requests. This last part is the source of most of the complexity but is required when populating a selectOneMenu's list of values from the value of two other fields for example. Regards, ~ Simon On 8/27/07, Andrew Robinson [EMAIL PROTECTED] wrote: I have a login form with a login command link. The form is
Re: [Trinidad] ppr: partialTriggers doesn't work if there are validation messages?
From: Andrew Robinson [EMAIL PROTECTED] It is a simple case of showing the effects of the failed validation. Take the following use case as an example: User clicks on a register button to create a user account for a web site. The user enters a username that is already in use and hits the register/save button A unique validator on the username field fails its validation and adds a validation message to the faces context using the component. All message components that are for this component as well as any messages components that are not global have to be re-rendered to show the user the validation error. This is just one use case to illustrate the fact that at the very least, message and messages components need to be re-rendered when validation errors and conversion errors are thrown on the server. This doesn't include any components that need to be re-rendered as a result. For example, the panelLabelAndMessage component renders an error icon in the label when there is an error message for the input component. It is also common for people to style components different (red border for example) when their validation fails. The way Trinidad components are written, there is no way out of the box to accomplish this. The commandLink and commandButton will only run the partial trigger functionality if the action event is broadcast. Therefore, there is a large gap in the PPR functionality to allow code to trigger rendering when the renderResponse method is called before the broadcasting of the event. My take on it is that Trinidad uses the JSF lifecycle to achieve PPR. In the JSF Lifecycle, the UIViewRoot processes queued events for each phase by calling the broadcast on the source component for all phases except render response. The components queue events in the decode (apply request values) and can specify the phase they should be invoked in. I believe the default phaseId for the FacesEvent is ANY. In all of these cases, events are processed prior to checking if the response is completed or render response has be set to true. Take a look at the following methods in the UIViewRoot [1]. processDecodes - apply request values processValidators - process validators processUpdates- update model processApplication - invoke application [1] http://svn.apache.org/viewvc/myfaces/core/branches/1_1_5/api/src/main/java/javax/faces/component/UIViewRoot.java?view=markup Now, doesn't it make sense for a message component to be triggered on the fact that the command was executed (meaning the button was clicked, form was submitted) but not necessarily that the JSF action was run? Even if you don't agree, you have to realize that the PPR currently makes re-rendering impossible if renderResponse is called, shortening the JSF lifecycle. I realize that many people use client side validation with Trinidad and therefore are less likely to have this issue, but there are several reasons that client side validation is not a complete solution. With custom components and integration with the Tridindad APIs this functionality is definitely possible, but it really should be provided out of the box. So to answer your question, there is absolutely no point in re-rendering a message component if there isn't a validation error or conversion error. -Andrew Gary On 8/28/07, Adam Winer wrote: I don't understand that sentence... You're saying that you *do* want validation to fire, but want the components to re-render just the same? This seems odd... If validation fails, what state has changed such that you need updated content? -- Adam On 8/28/07, Andrew Robinson wrote: But the action should not be immediate, only the effect of the re-rendering On 8/28/07, Adam Winer wrote: On 8/28/07, Andrew Robinson wrote: I got it to work with a custom component. I created a component that doesn't render, that simply houses children. In the queueEvent method of that component, if the type of the event is ActionEvent, I then use it to add components as partial targets. It just would be nice to have this supported by Trinidad out of the box. A4J creates AjaxEvents that have their phase ID set to ANY, so they fire almost immediately, and thus work regardless of what phases are run. I'm just wondering if there would be any harm to moving the code from the broadcast method to the queue method. Yes, there would be! It'd break the semantics of partialTriggers. If you want your action event to fire in the ANY phase, just set immediate=true. -- Adam On 8/28/07, Simon Lessard wrote: Hello Andrew, To my knowledge, this is the desired behavior since PPR requests does not use a different lifecycle than a normal
Re: [Trinidad] ppr: partialTriggers doesn't work if there are validation messages?
Yes, I fully understand the JSF lifecycle, but that doesn't address my problem. The problem is that the partialTriggers functionality of the UIXCommand components depends on the broadcasting of the ActionEvent. This event's phase cannot be changed without drastically affecting the application. The question is this: How can an web application developer re-render a component as a result of a validation or conversion error during a partial submission of a UIXCommand component without writing a custom component or custom renderer? -Andrew On 8/28/07, Gary VanMatre [EMAIL PROTECTED] wrote: From: Andrew Robinson [EMAIL PROTECTED] It is a simple case of showing the effects of the failed validation. Take the following use case as an example: User clicks on a register button to create a user account for a web site. The user enters a username that is already in use and hits the register/save button A unique validator on the username field fails its validation and adds a validation message to the faces context using the component. All message components that are for this component as well as any messages components that are not global have to be re-rendered to show the user the validation error. This is just one use case to illustrate the fact that at the very least, message and messages components need to be re-rendered when validation errors and conversion errors are thrown on the se rver. This doesn't include any components that need to be re-rendered as a result. For example, the panelLabelAndMessage component renders an error icon in the label when there is an error message for the input component. It is also common for people to style components different (red border for example) when their validation fails. The way Trinidad components are written, there is no way out of the box to accomplish this. The commandLink and commandButton will only run the partial trigger functionality if the action event is broadcast. Therefore, there is a large gap in the PPR functionality to allow code to trigger rendering when the renderResponse method is called before the broadcasting of the event. My take on it is that Trinidad uses the JSF lifecycle to achieve PPR. In the JSF Lifecycle, the UIViewRoot processes queued events for each phase by calling the broadcast on the source component for all phases except render response. The components queue events in the decode (apply request values) and can specify the phase they should be invoked in. I believe the default phaseId for the FacesEvent is ANY. In all of these cases, events are processed prior to checking if the response is completed or render response has be set to true. Take a look at the following methods in the UIViewRoot [1]. processDecodes - apply request values processValidators - process validators processUpdates- update model processApplication - invoke application [1] http://svn.apache.org/viewvc/myfaces/core/branches/1_1_5/api/src/main/java/javax/faces/component/UIViewRoot.java?view=markup Now, doesn't it make sense for a message component to be triggered on the fact that the command was executed (meaning the button was clicked, form was submitted) but not necessarily that the JSF action was run? Even if you don't agree, you have to realize that the PPR currently makes re-rendering impossible if renderResponse is called, shortening the JSF lifecycle. I realize that many people use client side validation with Trinidad and therefore are less likely to have this issue, but there are several reasons that client side validation is not a complete solution. With custom components and integration with the Tridindad APIs this functionality is definitely possible, but it really should be provided out of the box. So to answer your question, there is absolutely no point in re-rendering a message component if there isn't a validation error or conversion error. -Andrew Gary On 8/28/07, Adam Winer wrote: I don't understand that sentence... You're saying that you *do* want validation to fire, but want the components to re-render just the same? This seems odd... If validation fails, what state has changed such that you need updated content? -- Adam On 8/28/07, Andrew Robinson wrote: But the action should not be immediate, only the effect of the re-rendering On 8/28/07, Adam Winer wrote: On 8/28/07, Andrew Robinson wrote: I got it to work with a custom component. I created a component that doesn't render, that simply houses children. In the queueEvent me thod BR of that component, if the type of the event is ActionEvent, I then use it to add components as partial targets. It just would be nice to have this supported by Trinidad out of the box. A4J creates AjaxEvents that have their phase ID set to ANY, so they fire almost
tree2 row styles
How to apply style class to the tree2 node rows? Node rows, I mean that all rows have the same width from left to right of the tree2 display area. ABC- ---EFG-- WXY Thanks, Dave - Need a vacation? Get great deals to amazing places on Yahoo! Travel.