RE : Input Suggest - Ajax Suggest
I did try the inputSuggest. It works globally well except some small issues (its in sandbox ...). Theres somes JIRA issues opened on it. Did someone try the ajaxInputSuggest ? -Message d'origine- De : Martin Marinschek [mailto:[EMAIL PROTECTED] Envoyé : vendredi 9 septembre 2005 17:14 À : MyFaces Discussion; [EMAIL PROTECTED] Objet : Re: Input Suggest - Ajax Suggest Input suggest is pure client side - ajax suggest goes back to the server to fetch its data. Choose the one you need! Currently, there are some known issues with inputSuggest afaik. As to ajaxInputSuggest, there seem to be no open issues right now, doesn't mean that there are none ;) regards, Martin On 9/9/05, Vladimir Coutinho [EMAIL PROTECTED] wrote: What is better Input Suggest or Ajax Suggest (sandbox)? They work fine? -- Vladimir M Coutinho -- http://www.irian.at Your JSF powerhouse - JSF Trainings in English and German
coupling managed bean.. is this a right aproch
Hi all I have designed my app to have a session scoped bean storing transient preferences. In others beans I need to read that preferences... I'm doing it right? Are there any ways to obtain from facesContext the instance fo the session scoped bean? thanks! -- ::SammyRulez:: http://sammyprojectz.blogspot.com
Re: coupling managed bean.. is this a right aproch
Yes, you can obtain the bean from the context using the VariableResolver, like this: FacesContext facesContext = FacesContext.getCurrentInstance(); YourBean yourBean = (YourBean) facesContext.getApplication() .getVariableResolver().resolveVariable( facesContext, yourBeanName); BTW, it's OK to store the preferences in a session bean... Regards, Bruno 2005/9/12, ::SammyRulez:: [EMAIL PROTECTED]: Hi all I have designed my app to have a session scoped bean storing transient preferences. In others beans I need to read that preferences... I'm doing it right? Are there any ways to obtain from facesContext the instance fo the session scoped bean? thanks! -- ::SammyRulez:: http://sammyprojectz.blogspot.com
Antwort: myfaces does not comply with JSF specification?
You can use this config in your web.xml, there should be no _javascript_... context-param param-nameorg.apache.myfaces.ALLOW_JAVASCRIPT/param-name param-valuefalse/param-value description This parameter tells MyFaces if _javascript_ code should be allowed in the rendered HTML output. If _javascript_ is allowed, command_link anchors will have _javascript_ code that submits the corresponding form. If _javascript_ is not allowed, the state saving info and nested parameters will be added as url parameters. Default: true /description /context-param context-param param-nameorg.apache.myfaces.DETECT_JAVASCRIPT/param-name param-valuefalse/param-value /context-param context-param param-nameorg.apache.myfaces.AUTO_SCROLL/param-name param-valuefalse/param-value description If true, a _javascript_ function will be rendered that is able to restore the former vertical scroll on every request. Convenient feature if you have pages with long lists and you do not want the browser page to always jump to the top if you trigger a link or button action that stays on the same page. Default: false /description /context-param
Event listeners and request scope problem
Hi, I have a form with 3 event listeners on selectOneMenu, my problem is that when I update one of the selects, the 3 event listeners are called ! I would have expected that only one was executed. Just to be sure, I changed my bean to session scope and now only one event listener is called. But I don't want to put the managed beans in session, I have worked harder to have my new app with beans in request ! Any solution ? Thanks, Frederic
HELP : tree2 problem ?
Although this seems to be the ordinary expanded/leaf/hasChildren problem that is normally due to the tree not being setup properly, i haven't quite figured it out yet. May be missing something. So what happens is this: -I have a tree2 with some nodes. -I also have a few checkboxes that change what is being displayed in the tree. -When i click on the checkbox, i discard the old tree and create and populate a new one. its a small tree, so it's ok. The problem is as follows: -in the new page i have a non-displayed root with 2 children folders, each one with some children items. -i expand one of the folders. -i click on the checkbox and i get an exception: 12:40:04,493 INFO [STDOUT] javax.servlet.ServletException: Encountered a node [0:0] + with an illogical state. Node is expanded but it is also considered a leaf (a leaf cannot be considered expanded. I had considered that there was a problem with my tree state when i created the new tree and added the child nodes. But that is not what it happens. It took me quite a while to understand and use effectivly tree2, as i had to develop a few custom classes for nodes and tree, but it works fine now. What happens, is this: -when i click on the checkbox, i get a getTree call BEFORE my changes are done. -That getTree call returns the OLD tree, with the old tree state, where i have a 0:0 expanded node. -The new tree is created and populated. -The 0:0 node is a leaf node, and not expanded in the tree state. -I receive several new calls to getTree, but now i have the new Tree, with the correct expanded state - none are expanded. -I get the exception From what i understand, i get this exception because the first call returned an expanded state that is not correct, because it conflicts with the new tree. Am i missing something here or is it suposed to work like this ? If so, how can i totally change the tree being displayed without getting this exception ? If i don't expand any of the nodes there is no problem, as it is to be expected. Any help would be appreciated. Regards Guilherme Gomes __ Yahoo! Mail - PC Magazine Editors' Choice 2005 http://mail.yahoo.com
Re: NullPointerException when using MyFacesGenericPortlet
Yes it does, if you use MyFacesGenericPortlet. If you want to have a default view for each portlet mode, see http://wiki.apache.org/myfaces/UsingPortletModes javaone9 wrote: Does portlet work well with JSF page navigation? Thanks. */Dave Brondsema [EMAIL PROTECTED]/* wrote: Any ideas? Or is there a better place to ask this? Dave Brondsema wrote: I'm developing a portlet using MyFaces and extending the MyFacesGenericPortlet class. After working some and doing several redeploys, I get the following NPE. I have to restart Tomcat for it to work again. Any idea why? Thanks! Aug 29, 2005 3:49:18 PM org.apache.catalina.core.ApplicationDispatcher invoke SEVERE: Servlet.service() for servlet FoodServiceMenu threw exception java.lang.NullPointerException at org.apache.myfaces.application.jsp.JspViewHandlerImpl.getServletMapping(JspViewHandlerImpl.java:354) at org.apache.myfaces.application.jsp.JspViewHandlerImpl.renderView(JspViewHandlerImpl.java:193) at org.apache.myfaces.lifecycle.LifecycleImpl.render(LifecycleImpl.java:299) at org.apache.myfaces.portlet.MyFacesGenericPortlet.nonFacesRequest(MyFacesGenericPortlet.java:304) at edu.cornerstone.portal.portlets.foodservicemenu.MyFacesModalPortlet.doEdit(MyFacesModalPortlet.java:61) at edu.cornerstone.portal.portlets.foodservicemenu.FoodServiceMenuPortlet.doEdit(FoodServiceMenuPortlet.java:24) at javax.portlet.GenericPortlet.doDispatch(GenericPortlet.java:253) at javax.portlet.GenericPortlet.render(GenericPortlet.java:178) at edu.cornerstone.portal.portlets.foodservicemenu.MyFacesModalPortlet.render(MyFacesModalPortlet.java:55) at org.apache.pluto.core.PortletServlet.dispatch(PortletServlet.java:205) at org.apache.pluto.core.PortletServlet.doGet(PortletServlet.java:145) at javax.servlet.http.HttpServlet.service(HttpServlet.java:689) at javax.servlet.http.HttpServlet.service(HttpServlet.java:802) at org.apache.pluto.core.PortletServlet.service(PortletServlet.java:140) at org.apache.catalina.core.ApplicationFilterChain.internalDoFilter(ApplicationFilterChain.java:252) at org.apache.catalina.core.ApplicationFilterChain.doFilter(ApplicationFilterChain.java:173) at org.apache.catalina.core.ApplicationDispatcher.invoke(ApplicationDispatcher.java:672) at org.apache.catalina.core.ApplicationDispatcher.doInclude(ApplicationDispatcher.java:574) at org.apache.catalina.core.ApplicationDispatcher.include(ApplicationDispatcher.java:499) at org.apache.pluto.invoker.impl.PortletInvokerImpl.invoke(PortletInvokerImpl.java:120) at org.apache.pluto.invoker.impl.PortletInvokerImpl.render(PortletInvokerImpl.java:73) at org.apache.pluto.PortletContainerImpl.renderPortlet(PortletContainerImpl.java:105) at org.jasig.portal.channels.portlet.CPortletAdapter.getMarkup(CPortletAdapter.java:574) at org.jasig.portal.channels.portlet.CPortletAdapter.renderCharacters(CPortletAdapter.java:497) at org.jasig.portal.MultithreadedCharacterChannelAdapter.renderCharacters(MultithreadedCharacterChannelAdapter.java:41) at org.jasig.portal.channels.error.CError.renderCharacters(CError.java:521) at org.jasig.portal.ChannelRenderer$Worker.execute(ChannelRenderer.java:477) at org.jasig.portal.utils.threading.BaseTask.run(BaseTask.java:27) at edu.emory.mathcs.backport.java.util.concurrent.Executors$RunnableAdapter.call(Executors.java:418) at edu.emory.mathcs.backport.java.util.concurrent.FutureTask.run(FutureTask.java:165) at edu.emory.mathcs.backport.java.util.concurrent.ThreadPoolExecutor$Worker.runTask(ThreadPoolExecutor.java:660) at edu.emory.mathcs.backport.java.util.concurrent.ThreadPoolExecutor$Worker.run(ThreadPoolExecutor.java:685) at java.lang.Thread.run(Thread.java:595) -- Dave Brondsema Software Developer Cornerstone University __ Do You Yahoo!? Tired of spam? Yahoo! Mail has the best spam protection around http://mail.yahoo.com -- Dave Brondsema Software Developer Cornerstone University signature.asc Description: OpenPGP digital signature
[ANNOUNCE] MyFaces passed the JSF TCK 1.1
The MyFaces team is very proud to announce the fact, that the current codebase has just passed *all* JSF TCK 1.1 tests! This is a great milestone (actually the greatest since MyFaces has started in 2003) and we are all looking forward to releasing the first official certified free open source JSF implementation Apache MyFaces 1.1.0 soon (after clarifying some legal and technical stuff). Thanks to every single contributor, who helped making MyFaces another open source success story. applause ... ... ... bowThank you very much!/bow /applause Let's head for the next challenges: beat ALL bugs :), JSF 1.2, JSF 2.0, ... Manfred Geiler
Re: [ANNOUNCE] MyFaces passed the JSF TCK 1.1
Hello! Wow!!! Big thanks to all for nice job! With respect, Boris
RE: [ANNOUNCE] MyFaces passed the JSF TCK 1.1
Great! We just switched to MyFaces and this makes us feel even better about it :p) Greg -Original Message- From: Mario Ivankovits [mailto:[EMAIL PROTECTED] Sent: Monday, September 12, 2005 9:16 AM To: MyFaces Discussion Subject: Re: [ANNOUNCE] MyFaces passed the JSF TCK 1.1 Manfred Geiler wrote: The MyFaces team is very proud to announce the fact, that the current codebase has just passed *all* JSF TCK 1.1 tests! Congratulation! Very good job! --- Mario
Re: [ANNOUNCE] MyFaces passed the JSF TCK 1.1
Congratulations!2005/9/12, Manfred Geiler [EMAIL PROTECTED]: The MyFaces team is very proud to announce the fact, that the currentcodebase has just passed *all* JSF TCK 1.1 tests!This is a great milestone (actually the greatest since MyFaces hasstarted in 2003) and we are all looking forward to releasing the first official certified free open source JSF implementation Apache MyFaces1.1.0 soon (after clarifying some legal and technical stuff).Thanks to every single contributor, who helped making MyFaces another open source success story.applause. bowThank you very much!/bow/applauseLet's head for the next challenges: beat ALL bugs :), JSF 1.2, JSF 2.0 , ...Manfred Geiler
Re: [ANNOUNCE] MyFaces passed the JSF TCK 1.1
On 9/12/05, Manfred Geiler [EMAIL PROTECTED] wrote: The MyFaces team is very proud to announce the fact, that the currentcodebase has just passed *all* JSF TCK 1.1 tests!This is a great milestone (actually the greatest since MyFaces hasstarted in 2003) and we are all looking forward to releasing the first official certified free open source JSF implementation Apache MyFaces1.1.0 soon (after clarifying some legal and technical stuff). Manfred and everyone on the MyFaces team, This is great news ... congratulations to all of you, who have demonstrated such a single minded commitment to being an implementation that is compatible with the specification, but does not limit itself to the letter of the law, instead focusing on providing a distinct set of value added capabilities. Keep up the great work! Craig McClanahan Thanks to every single contributor, who helped making MyFaces anotheropen source success story. applause. bowThank you very much!/bow/applauseLet's head for the next challenges: beat ALL bugs :), JSF 1.2, JSF 2.0, ...Manfred Geiler
RE : [ANNOUNCE] MyFaces passed the JSF TCK 1.1
MyFaces ROCKS :D:D:D Clément Maignien -Message d'origine- De : Manfred Geiler [mailto:[EMAIL PROTECTED] Envoyé : lundi 12 septembre 2005 15:12 À : MyFaces Development; MyFaces Discussion Objet : [ANNOUNCE] MyFaces passed the JSF TCK 1.1 The MyFaces team is very proud to announce the fact, that the current codebase has just passed *all* JSF TCK 1.1 tests! This is a great milestone (actually the greatest since MyFaces has started in 2003) and we are all looking forward to releasing the first official certified free open source JSF implementation Apache MyFaces 1.1.0 soon (after clarifying some legal and technical stuff). Thanks to every single contributor, who helped making MyFaces another open source success story. applause ... ... ... bowThank you very much!/bow /applause Let's head for the next challenges: beat ALL bugs :), JSF 1.2, JSF 2.0, ... Manfred Geiler
Re: [ANNOUNCE] MyFaces passed the JSF TCK 1.1
Quoting Manfred Geiler [EMAIL PROTECTED]: The MyFaces team is very proud to announce the fact, that the current codebase has just passed *all* JSF TCK 1.1 tests! Congratulazioni, ragazzi.. :-) -- Francesco Consumi Ufficio Sistemi informativi Istituto degli Innocenti Piazza SS.Annunziata, 12 50122 Firenze consumi at istitutodeglinnocenti.it Tel. +39 055 2037320 ICQ# 12516133
Re: [ANNOUNCE] MyFaces passed the JSF TCK 1.1
This is absolutely wonderful news... Congratulations... Someone should give the news to www.theserverside.com ( I think the honor belongs to one of the maintainers ;-) ) Werner Manfred Geiler wrote: The MyFaces team is very proud to announce the fact, that the current codebase has just passed *all* JSF TCK 1.1 tests! This is a great milestone (actually the greatest since MyFaces has started in 2003) and we are all looking forward to releasing the first official certified free open source JSF implementation Apache MyFaces 1.1.0 soon (after clarifying some legal and technical stuff). Thanks to every single contributor, who helped making MyFaces another open source success story. applause ... ... ... bowThank you very much!/bow /applause Let's head for the next challenges: beat ALL bugs :), JSF 1.2, JSF 2.0, ... Manfred Geiler
Re: x:inputCalendar - popup hidden by other elements
Hi, did you also try to add/change z-index attribute of the div containing the Calendar?? Did you also try to add a div surrounding your other components?? Normally this should work... Regards, Christian --- Ursprüngliche Nachricht --- Von: Paul Klaer [EMAIL PROTECTED] An: MyFaces Users Discussion users@myfaces.apache.org Betreff: x:inputCalendar - popup hidden by other elements Datum: Fri, 09 Sep 2005 13:47:56 +0200 Hi, I have a problem using the inputCalendar component. The popup window is shown correctly and works fine but if there are some buttons on my form the popup window is hidden by the buttons. The popup just appears in the background. How can I solve this problem? Using css and the z-index for the buttons option doesn't solve the problem. How can I set the calendar popup component to the foreground? Is it a bug of the inputCalendar component? Paul -- 5 GB Mailbox, 50 FreeSMS http://www.gmx.net/de/go/promail +++ GMX - die erste Adresse für Mail, Message, More +++
DOESN'T WORK!!! Please anyone can help me!?!
Hi, Im config myfaces library by eclipse for a new web application but when I ran it myfaces doesnt work and doesnt update my head link js tags Anyone can help me?!?! Please :--( Thank you. Davide.
Re: DOESN'T WORK!!! Please anyone can help me!?!
Maybe you don't have included the extensions filter in the web.xml file: [CODE] !-- Extensions Filter -- filter filter-nameextensionsFilter/filter-name filter-classorg.apache.myfaces.component.html.util.ExtensionsFilter/filter-class init-param param-nameuploadMaxFileSize/param-name param-value100m/param-value descriptionSet the size limit for uploaded files. Format: 10 - 10 bytes 10k - 10 KB 10m - 10 MB 1g - 1 GB /description /init-param init-param param-nameuploadThresholdSize/param-name param-value100k/param-value descriptionSet the threshold size - files below this limit are stored in memory, files above this limit are stored on disk. Format: 10 - 10 bytes 10k - 10 KB 10m - 10 MB 1g - 1 GB /description /init-param !--init-param param-nameuploadRepositoryPath/param-name param-value/temp/param-value descriptionSet the path where the intermediary files will be stored. /description /init-param-- /filter filter-mapping filter-nameextensionsFilter/filter-name url-pattern*.jsf/url-pattern /filter-mapping filter-mapping filter-nameextensionsFilter/filter-name url-pattern/faces/*/url-pattern /filter-mapping [/CODE] Hope that helps, Bruno 2005/9/12, d.venturini [EMAIL PROTECTED]: Hi, I'm config myfaces library by eclipse for a new web application… but when I ran it myfaces doesn't work and doesn't update my head link… js … tags… Anyone can help me?!?! Please… :--( Thank you. Davide.
Re: [ANNOUNCE] MyFaces passed the JSF TCK 1.1
Not yet. We don't have a binary release so let's hold of on that. sean On 9/12/05, Werner Punz [EMAIL PROTECTED] wrote: This is absolutely wonderful news... Congratulations... Someone should give the news to www.theserverside.com ( I think the honor belongs to one of the maintainers ;-) ) Werner Manfred Geiler wrote: The MyFaces team is very proud to announce the fact, that the current codebase has just passed *all* JSF TCK 1.1 tests! This is a great milestone (actually the greatest since MyFaces has started in 2003) and we are all looking forward to releasing the first official certified free open source JSF implementation Apache MyFaces 1.1.0 soon (after clarifying some legal and technical stuff). Thanks to every single contributor, who helped making MyFaces another open source success story. applause ... ... ... bowThank you very much!/bow /applause Let's head for the next challenges: beat ALL bugs :), JSF 1.2, JSF 2.0, ... Manfred Geiler
Putting Objects in SelectItems
Hi, I want to put Objects (DTOs) in my SelectItems, to be able to submit it in the Save, but i always get the Error Value is no String error from the renderer. java.lang.IllegalArgumentException: Value is no String and component userForm:groupListBox does not have a Converter at org.apache.myfaces.renderkit.RendererUtils.getConvertedStringValue(Rende rerUtils.java:670) at org.apache.myfaces.renderkit.RendererUtils.getConvertedStringValue(Rende rerUtils.java:688) at org.apache.myfaces.renderkit.html.HtmlRendererUtils.renderSelectOptions( HtmlRendererUtils.java:459) SNIP LONG TRACE javax.faces.FacesException: Value is no String and component userForm:groupListBox does not have a Converter Does anybody have any idea what could be wrong here? I thought I could put any type of object in my SelectItem... Thanks, Greg
Tree2 state problem
Hi, I have a tree2 with showRootNode=true preserveToggle=true clientSideToggle=true. I describe my problem: 1) I open a JSP popup page with a tree2 (there are many nodes under the root); 2) I expand some node; 3) I close popup; 4) I reopen the popup with anothertree2 that, in this case, has only the rootbecause the datamodel is empty.When I open the page the following error occurs: Encountered a node 0 with an illogical state. Node is expanded but it is also considered a leaf (a leaf cannot be considered expanded.) When I populate the TreeNode the newTreeNodeBase is create as Leaf, and then, if it has at least a child, I set Leaf=false. I tried to set Leaf=false but the problem is not resolved. I tried to use collapsePath(0) in the backbean but it doesn't work. I think the tree attempts to restore the previous tree node state. Please everyone help me!!! Thank you
RE: [ANNOUNCE] MyFaces passed the JSF TCK 1.1
Congragulations. Thanks for all your efforts and help to make our worklife a better place ;-) Regards Balaji -Original Message- From: Manfred Geiler [mailto:[EMAIL PROTECTED] Sent: Monday, September 12, 2005 9:12 AM To: MyFaces Development; MyFaces Discussion Subject: [ANNOUNCE] MyFaces passed the JSF TCK 1.1 The MyFaces team is very proud to announce the fact, that the current codebase has just passed *all* JSF TCK 1.1 tests! This is a great milestone (actually the greatest since MyFaces has started in 2003) and we are all looking forward to releasing the first official certified free open source JSF implementation Apache MyFaces 1.1.0 soon (after clarifying some legal and technical stuff). Thanks to every single contributor, who helped making MyFaces another open source success story. applause ... ... ... bowThank you very much!/bow /applause Let's head for the next challenges: beat ALL bugs :), JSF 1.2, JSF 2.0, ... Manfred Geiler Confidentiality Notice The information contained in this electronic message and any attachments to this message are intended for the exclusive use of the addressee(s) and may contain confidential or privileged information. If you are not the intended recipient, please notify the sender at Wipro or [EMAIL PROTECTED] immediately and destroy all copies of this message and any attachments.
RE: [ANNOUNCE] MyFaces passed the JSF TCK 1.1
Great news Manfred!!! You should be very proud. Stan Silvert JBoss, Inc. [EMAIL PROTECTED] callto://stansilvert -Original Message- From: Manfred Geiler [mailto:[EMAIL PROTECTED] Sent: Monday, September 12, 2005 9:12 AM To: MyFaces Development; MyFaces Discussion Subject: [ANNOUNCE] MyFaces passed the JSF TCK 1.1 The MyFaces team is very proud to announce the fact, that the current codebase has just passed *all* JSF TCK 1.1 tests! This is a great milestone (actually the greatest since MyFaces has started in 2003) and we are all looking forward to releasing the first official certified free open source JSF implementation Apache MyFaces 1.1.0 soon (after clarifying some legal and technical stuff). Thanks to every single contributor, who helped making MyFaces another open source success story. applause ... ... ... bowThank you very much!/bow /applause Let's head for the next challenges: beat ALL bugs :), JSF 1.2, JSF 2.0, ... Manfred Geiler
Re: Putting Objects in SelectItems
yes, but you must provide a way to convert those items in strings and vice-versa... a class implementing the Converter interface. here an example: public class ShipperConverter implements Converter{ public Object getAsObject(FacesContext facesContext, UIComponent uiComponent, String s) throws ConverterException { Dao dao = new Dao(); return dao.loadObjectShipperById.(Long.decode(s)); } public String getAsString(FacesContext facesContext, UIComponent uiComponent, Object o) throws ConverterException { if(o!= null) Log.log.debug(o.toString()); try { if((o!= null) (o instanceof Shipper)){ Shipper shipper = (Shipper) o; return +shipper.getIdShipper(); } else return 0; } catch (Exception e) { Log.log.error(e); throw new ConverterException(); } } } It is a very simplified version of the roiginal class but I think it get the point.. hope it helps 2005/9/12, [EMAIL PROTECTED] [EMAIL PROTECTED]: Hi, I want to put Objects (DTOs) in my SelectItems, to be able to submit it in the Save, but i always get the Error Value is no String error from the renderer. java.lang.IllegalArgumentException: Value is no String and component userForm:groupListBox does not have a Converter at org.apache.myfaces.renderkit.RendererUtils.getConvertedStringValue(Rende rerUtils.java:670) at org.apache.myfaces.renderkit.RendererUtils.getConvertedStringValue(Rende rerUtils.java:688) at org.apache.myfaces.renderkit.html.HtmlRendererUtils.renderSelectOptions( HtmlRendererUtils.java:459) SNIP LONG TRACE javax.faces.FacesException: Value is no String and component userForm:groupListBox does not have a Converter Does anybody have any idea what could be wrong here? I thought I could put any type of object in my SelectItem... Thanks, Greg -- ::SammyRulez:: http://sammyprojectz.blogspot.com
Re: Putting Objects in SelectItems
You can, but you have to create a converter since html only represents things as Strings. On 9/12/05, [EMAIL PROTECTED] [EMAIL PROTECTED] wrote: Hi, I want to put Objects (DTOs) in my SelectItems, to be able to submit it in the Save, but i always get the Error Value is no String error from the renderer. java.lang.IllegalArgumentException: Value is no String and component userForm:groupListBox does not have a Converter at org.apache.myfaces.renderkit.RendererUtils.getConvertedStringValue(Rende rerUtils.java:670) at org.apache.myfaces.renderkit.RendererUtils.getConvertedStringValue(Rende rerUtils.java:688) at org.apache.myfaces.renderkit.html.HtmlRendererUtils.renderSelectOptions( HtmlRendererUtils.java:459) SNIP LONG TRACE javax.faces.FacesException: Value is no String and component userForm:groupListBox does not have a Converter Does anybody have any idea what could be wrong here? I thought I could put any type of object in my SelectItem... Thanks, Greg
Re: Event listeners and request scope problem
Take a look at t:saveState. It allows you to persist a request-scoped bean longer. You'll probably want your beans to persist so long as the page doesn't change. On 9/12/05, Frederic Auge [EMAIL PROTECTED] wrote: Hi, I have a form with 3 event listeners on selectOneMenu, my problem is that when I update one of the selects, the 3 event listeners are called ! I would have expected that only one was executed. Just to be sure, I changed my bean to session scope and now only one event listener is called. But I don't want to put the managed beans in session, I have worked harder to have my new app with beans in request ! Any solution ? Thanks, Frederic
Re: x:saveState assign a new value
You could use it to copy a value from one bean to another, but since t:saveState doesn't allow you to specify a value, but only allows you to move it into and out of the component tree state holder, I can't see how you'd use it as a general purpose assigner. On 9/10/05, Dave [EMAIL PROTECTED] wrote: Can I use x:saveState to assign a new value that will be picked up by backing bean of next page? I saw usage: x:saveState value=#{backingBean.XYZ} This way I can not assign a new value to XYZ. Thanks, Dave __ Do You Yahoo!? Tired of spam? Yahoo! Mail has the best spam protection around http://mail.yahoo.com
Re: x:saveState assign a new value
You could use it to copy a value from one bean to another Can I assign value from one bean to another different bean? I am trying to find the documentation for x:saveState. Mike Kienenberger [EMAIL PROTECTED] wrote: You could use it to copy a value from one bean to another, but sincet:saveState doesn't allow you to specify a value, but only allows youto move it into and out of the component tree state holder, I can'tsee how you'd use it as a general purpose assigner.On 9/10/05, Dave <[EMAIL PROTECTED]>wrote: Can I use to assign a new value that will be picked up by backing bean of next page? I saw usage: This way I can not assign a new value to XYZ. Thanks, Dave __ Do You Yahoo!? Tired of spam? Yahoo! Mail has the best spam protection around http://mail.yahoo.com__Do Y ou Yahoo!?Tired of spam? Yahoo! Mail has the best spam protection around http://mail.yahoo.com
How to set the width of just one column in dataTable
Say I have 10 columns in a table. I need to set the width of just the 5 column. It seems like I'd have to make up classes for each column (or at least the first 4) just so that I can define a style for the 5th column to give it a width? Shouldn't h:column except a style attribute so I can manually set a particular column's style? According to the spec for columnClasses on dataTable: Comma-delimited list of CSS style classes that will be applied to the columns of this table. A space separated list of classes may also be specified for any individual column. If the number of elements in this list is less than the number of columns specified in the columns attribute, no class attribute is output for each column greater than the number of elements in the list. If the number of elements in the list is greater than the number of columns specified in the columns attribute, the elements at the posisiton in the list after the value of the columns attribute are ignored. -- Rick
RE: [ANNOUNCE] MyFaces passed the JSF TCK 1.1
Which revision/nightly build was tested? -Original Message- From: Manfred Geiler [mailto:[EMAIL PROTECTED] Sent: Monday, September 12, 2005 9:12 AM To: MyFaces Development; MyFaces Discussion Subject: [ANNOUNCE] MyFaces passed the JSF TCK 1.1 The MyFaces team is very proud to announce the fact, that the current codebase has just passed *all* JSF TCK 1.1 tests! This is a great milestone (actually the greatest since MyFaces has started in 2003) and we are all looking forward to releasing the first official certified free open source JSF implementation Apache MyFaces 1.1.0 soon (after clarifying some legal and technical stuff). Thanks to every single contributor, who helped making MyFaces another open source success story. applause ... ... ... bowThank you very much!/bow /applause Let's head for the next challenges: beat ALL bugs :), JSF 1.2, JSF 2.0, ... Manfred Geiler
Tree 2 Dynamic Example
Title: Tree 2 Dynamic Example Hope this helps all Tree2 users to create a dynamic (lazy loading) tree. Modified from Sean's Simple tree2 example: - In Faces-Config.xml - !-- Managed Beans for tree2.jsp -- managed-bean managed-bean-nametreeBacker/managed-bean-name managed-bean-classorg.apache.myfaces.examples.tree.TreeBacker/managed-bean-class managed-bean-scopesession/managed-bean-scope /managed-bean - package org.apache.myfaces.examples.tree; - public class TreeBacker implements Serializable { private TreeModelBase _treeModel = null; public TreeModel getTreeData() { // Create tree if TreeModel is null If (_treeModel == null) { TreeNode treeData = new TreeNodeBase(foo-folder, Inbox, false); // construct a set of fake data (normally your data would come from a database) // populate Frank's portion of the tree TreeNodeBase personNode = new TreeNodeBase(person, Frank Foo, false); personNode.getChildren().add(new TreeNodeBase(foo-folder, Requires Foo, false)); TreeNodeBase folderNode = new TreeNodeBase(foo-folder, Requires Foo Reviewer, false); folderNode.getChildren().add(new TreeNodeBase(document, X050001, true)); folderNode.getChildren().add(new TreeNodeBase(document, X050002, true)); folderNode.getChildren().add(new TreeNodeBase(document, X050003, true)); personNode.getChildren().add(folderNode); personNode.getChildren().add(new TreeNodeBase(foo-folder, Requires Foo Recommendation, false)); folderNode = new TreeNodeBase(foo-folder, Requires Foo Approval, false); folderNode.getChildren().add(new TreeNodeBase(document, J050001, true)); folderNode.getChildren().add(new TreeNodeBase(document, J050002, true)); folderNode.getChildren().add(new TreeNodeBase(document, J050003, true)); folderNode.getChildren().add(new TreeNodeBase(document, E050011, true)); folderNode.getChildren().add(new TreeNodeBase(document, R050002, true)); folderNode.getChildren().add(new TreeNodeBase(document, C050003, true)); personNode.getChildren().add(folderNode); folderNode = new TreeNodeBase(bar-folder, Requires Bar Processing, false); folderNode.getChildren().add(new TreeNodeBase(document, X050003, true)); folderNode.getChildren().add(new TreeNodeBase(document, X050011, true)); folderNode.getChildren().add(new TreeNodeBase(document, F050002, true)); folderNode.getChildren().add(new TreeNodeBase(document, G050003, true)); personNode.getChildren().add(folderNode); folderNode = new TreeNodeBase(bar-folder, Requires Bar Approval, false); folderNode.getChildren().add(new TreeNodeBase(document, J050006, true)); folderNode.getChildren().add(new TreeNodeBase(document, J050007, true)); personNode.getChildren().add(folderNode); treeData.getChildren().add(personNode); // populate Betty's portion of the tree personNode = new TreeNodeBase(person, Betty Bar, false); personNode.getChildren().add(new TreeNodeBase(foo-folder, Requires Foo, false)); folderNode = new TreeNodeBase(foo-folder, Requires Foo Reviewer, false); folderNode.getChildren().add(new TreeNodeBase(document, X012000, true)); folderNode.getChildren().add(new TreeNodeBase(document, X013000, true)); folderNode.getChildren().add(new TreeNodeBase(document, X014000, true)); personNode.getChildren().add(folderNode); folderNode = new TreeNodeBase(foo-folder, Requires Foo Recommendation, false); folderNode.getChildren().add(new TreeNodeBase(document, J010026, true)); folderNode.getChildren().add(new TreeNodeBase(document, J020002, true)); folderNode.getChildren().add(new TreeNodeBase(document, J030103, true)); folderNode.getChildren().add(new TreeNodeBase(document, E030214, true)); folderNode.getChildren().add(new TreeNodeBase(document, R020444, true)); folderNode.getChildren().add(new TreeNodeBase(document, C01, true)); personNode.getChildren().add(folderNode); personNode.getChildren().add(new TreeNodeBase(foo-folder, Requires Foo Approval, false)); folderNode = new TreeNodeBase(bar-folder, Requires Bar Processing, false); folderNode.getChildren().add(new TreeNodeBase(document, T052003, true)); folderNode.getChildren().add(new TreeNodeBase(document, T020011, true)); personNode.getChildren().add(folderNode); folderNode = new TreeNodeBase(bar-folder, Requires Bar Approval, false); folderNode.getChildren().add(new TreeNodeBase(document, J010002, true)); folderNode.getChildren().add(new TreeNodeBase(document, J030047, true)); folderNode.getChildren().add(new TreeNodeBase(document, F030112, true)); personNode.getChildren().add(folderNode); treeData.getChildren().add(personNode); // populate Dynamic Portion of tree personNode = new TreeNodeBase(dynamic-person, Dynamic Joe, false); treeData.getChildren().add(personNode); _treeModel = new TreeModelBase(treeData); return _treeModel; } public void expandDynamicPerson(ActionEvent event) { UIComponent component =
Re: How to set the width of just one column in dataTable
Use t:datatable and a for the 5th column t:column width=xyz You have to use the latest nightly to work with t:column. You can also define style or styleClass for t:column Regards, Mathias 2005/9/12, Rick Reumann [EMAIL PROTECTED]: Say I have 10 columns in a table. I need to set the width of just the 5 column. It seems like I'd have to make up classes for each column (or at least the first 4) just so that I can define a style for the 5th column to give it a width? Shouldn't h:column except a style attribute so I can manually set a particular column's style? According to the spec for columnClasses on dataTable: Comma-delimited list of CSS style classes that will be applied to the columns of this table. A space separated list of classes may also be specified for any individual column. If the number of elements in this list is less than the number of columns specified in the columns attribute, no class attribute is output for each column greater than the number of elements in the list. If the number of elements in the list is greater than the number of columns specified in the columns attribute, the elements at the posisiton in the list after the value of the columns attribute are ignored. -- Rick -- Mathias
Re: SimpleTag instances as JSF
Have a look at the jsf api and spec. AFAIK you have to sublcass javax.faces.webapp.UIComponentTag which implements Tag and JspTag. 2005/9/9, Dennis Byrne [EMAIL PROTECTED]: Do custom tag developers have to use the classic tag model for JSF components? Dennis Byrne
how set or remove a f:param ?
I have a f:param into a button... this parameter is getted for a BackBean... If i want remove o change the value of this param... I try FacesContext ctx = FacesContext.getCurrentInstance(); Map map = ctx.getExternalContext().getRequestParameterMap(); map.remove(myKey); But an Exception is fired... You can't remove in the RequestParameterMap :(! How do that? -- Mariano G. Petrakovsky Programmer · Software Factory AXG Tecnonexo - www.tecnonexo.com Development facilities:Av. Maipú 1252 8º (C1006ACT) · Buenos Aires · Argentina. Tel.: (54-11) 4878-0005 - Fax: (54-11) 4878-0065. Headquarters: 1604 Spring Hill Road, Suite 160 Vienna · VA 22182 · USA. Tel.: (202) 986-7541 - Fax: (202) 787-3891. · · · · · · · · · · · · · · · · · · · · · · · · · · · · · · · · · · · · · · · · · · · · · · · · · · · · · · · · · · · · · · · · · · · · · · · · · · · · · · · ·
Re: How to set the width of just one column in dataTable
Mathias Brökelmann wrote the following on 9/12/2005 4:47 PM: Use t:datatable and a for the 5th column t:column width=xyz You have to use the latest nightly to work with t:column. You can also define style or styleClass for t:column Awesome Mathias! Exactly what I was hoping to be able to do. Be great when this make into the release build as well. -- Rick
RE: [ANNOUNCE] MyFaces passed the JSF TCK 1.1
YIPPIIEH G R E A T congrats to the team Alexander -Original Message- From: Manfred Geiler [mailto:[EMAIL PROTECTED] Sent: Monday, September 12, 2005 3:12 PM To: MyFaces Development; MyFaces Discussion Subject: [ANNOUNCE] MyFaces passed the JSF TCK 1.1 The MyFaces team is very proud to announce the fact, that the current codebase has just passed *all* JSF TCK 1.1 tests! This is a great milestone (actually the greatest since MyFaces has started in 2003) and we are all looking forward to releasing the first official certified free open source JSF implementation Apache MyFaces 1.1.0 soon (after clarifying some legal and technical stuff). Thanks to every single contributor, who helped making MyFaces another open source success story. applause ... ... ... bowThank you very much!/bow /applause Let's head for the next challenges: beat ALL bugs :), JSF 1.2, JSF 2.0, ... Manfred Geiler
Re: how set or remove a f:param ?
The map is immutable. If you want to use something dynamic, use getRequestMap() instead.Mariano Petrakovsky [EMAIL PROTECTED] wrote: I have a f:param into a button... this parameter is getted for aBackBean...If i want remove o change the value of this param... I tryFacesContext ctx = FacesContext.getCurrentInstance();Map map = ctx.getExternalContext().getRequestParameterMap();map.remove("myKey");But an Exception is fired... You can't remove in the RequestParameterMap:(!How do that?--Mariano G. PetrakovskyProgrammer ?Software FactoryAXG Tecnonexo - www.tecnonexo.comDevelopment facilities:Av. Maip?1252 8?(C1006ACT) ?Buenos Aires ?lt;brArgentina.Tel.: (54-11) 4878-0005 - Fax: (54-11) 4878-0065.Headquarters: 1604 Spring Hill Road, Suite 160 Vienna ?VA 22182 ?USA.Tel.: (202) 986-7541 - Fax: (202) 787-3891.??lt;br??lt;brlt;br__Do You Yahoo!?Tired of spam? Yahoo! Mail has the best spam protection around http://mail.yahoo.com
Hibernate: 1-to-many -- struggling
I am struggling with Hibernate 1-to-many mapping(collection). Could someone tell me how to manage the collection of one-to-many mapping? a little code will be very helpful.I have a very simple one-to-many relationship: an Item has many Picture(s). ENTITY -- Item @... public class item { private Collection pictures; private Integer id; // getter/setter for id and @Id(...) @OneToMany(cascade = {CascadeType.MERGE}, fetch = FetchType.EAGER, mappedBy="item") public Collection getPictures() { return pictures; } public void setPictures(Collection pictures) { this.pictures = pictures; } public void addPicture(Picture p) { if (pictures == null) pictures = new ArrayList(); pictures.add(p); } } ENTITY Picture -- @ public class Picture { private Item item; private Integer id; // constructor public Picture(Item item, ) { this.item = item; } // getter/setter for id and @Id(...) @ManyToOne @JoinColumn(name="itemId") public Item getItem() { return item; } public void setItem(Item item) { this.item = item; } } I create an Item in persistence without any pictures. Then use a session bean to add pictures to the item. Session Bean -- @Stateless public class ItemManagerBean implements ItemManager { public void addPictureToItem(Item item, Picture p) { item.addPicture(p); em.merge(item); } } The merge() ignores those pictures that are already in persistence. Add picture P1: --- persistence: P1, ( great!) Add picture P2 --- persistence: P1, P1, P2 (P1 duplicated) Add picture P3 --- persistence: P1, P1, P2, P1, P2, P3 Obviously, the merge() ignored what are already in persistence. All pictures has Id. EM.merge() should be able to know P1 is already in persistence when adding P2. I f I do not call merge(), nothing will be persisted. I do this from Web GUI. Transaction is thread-based.(default) Do I miss anything? or Is this a Hibernate bug ? - I tried one thing: Create a picture in persistence using another session bean. Then use em.refresh(item). First time it works, and I can see the picture from item.getPictures(). Then I create another picture the same way, and call em.refresh(item) again, but this time item.getPictures() does not have the second picture. Not that I have changed the Cascade type to REFRESH. Basically what is the way to manage the collection in one-to-many mapping? I am using JBoss 4.0.3RC1 on XP. Please help! Thank you. Dave __Do You Yahoo!?Tired of spam? Yahoo! Mail has the best spam protection around http://mail.yahoo.com
Re: Hibernate: 1-to-many -- struggling
I'm not an expert in this, but I think if you use another type of collection, like a Set or a List, this behavior won't occur. I usually use Sets to many to many and Lists to bidirecional relations. Hope that it helps Rafael Mauricio Nami 2005/9/12, Dave [EMAIL PROTECTED]: I am struggling with Hibernate 1-to-many mapping(collection). Could someone tell me how to manage the collection of one-to-many mapping? a little code will be very helpful. I have a very simple one-to-many relationship: an Item has many Picture(s). ENTITY -- Item @... public class item { private Collection pictures; private Integer id; // getter/setter for id and @Id(...) @OneToMany(cascade = {CascadeType.MERGE}, fetch = FetchType.EAGER, mappedBy=item) public Collection getPictures() { return pictures; } public void setPictures(Collection pictures) { this.pictures = pictures; } public void addPicture(Picture p) { if (pictures == null) pictures = new ArrayList(); pictures.add(p); } } ENTITY Picture -- @ public class Picture { private Item item; private Integer id; // constructor public Picture(Item item, ) { this.item = item; } // getter/setter for id and @Id(...) @ManyToOne @JoinColumn(name=itemId) public Item getItem() { return item; } public void setItem(Item item) { this.item = item; } } I create an Item in persistence without any pictures. Then use a session bean to add pictures to the item. Session Bean -- @Stateless public class ItemManagerBean implements ItemManager { public void addPictureToItem(Item item, Picture p) { item.addPicture(p); em.merge(item); } } The merge() ignores those pictures that are already in persistence. Add picture P1: --- persistence: P1, ( great!) Add picture P2 --- persistence: P1, P1, P2 (P1 duplicated) Add picture P3 --- persistence: P1, P1, P2, P1, P2, P3 Obviously, the merge() ignored what are already in persistence. All pictures has Id. EM.merge() should be able to know P1 is already in persistence when adding P2. I f I do not call merge(), nothing will be persisted. I do this from Web GUI. Transaction is thread-based.(default) Do I miss anything? or Is this a Hibernate bug ? - I tried one thing: Create a picture in persistence using another session bean. Then use em.refresh(item). First time it works, and I can see the picture from item.getPictures(). Then I create another picture the same way, and call em.refresh(item) again, but this time item.getPictures() does not have the second picture. Not that I have changed the Cascade type to REFRESH. Basically what is the way to manage the collection in one-to-many mapping? I am using JBoss 4.0.3RC1 on XP. Please help! Thank you. Dave __ Do You Yahoo!? Tired of spam? Yahoo! Mail has the best spam protection around http://mail.yahoo.com -- Java - Assim no Server como no Palm iJava - thus in the Server as it is in Palm