Re: necessary libraries for 1.1.2 snapshot
Hi Pierre,You need to add the web-facesconfig_1_0.dtd and web-facesconfig_1_1.dtd in org.apache.myfaces.resource package in myfaces-impl-1.1.2-SNAPSHOT.jar. Because you must be under proxy, and Digester goes on Net and tries to find out the DTD from the sun.com url which fails and throws the below exceptionjava.lang.IllegalStateException: No Factories configured for this Application. This happens if the faces-initialization does not work at all - make sure that you properly include all configuration settings necessary for a basic faces application and that all the necessary libs are included. Also check the logging output of your web application and your container for any ex ceptions!If you did that and find nothing, the mistake might be due to the fact that you use some special web-containers which do not support registering context-listeners via TLD files and a context listener is not setup in your web.xml.A typical config looks like this;listener listener-classorg.apache.myfaces.webapp.StartupServletContextListener/listener-class/listenerIn older version of myfaces-all this dtds were present, so I guess its a problem with new build process.Regards,Ketan.Pierre Moermans [EMAIL PROTECTED]02/02/2006 02:50 CSTPlease respond toMyFaces Discussion To users@myfaces.apache.org cc bcc Subject necessary libraries for 1.1.2 snapshot Hello,To use the 1.1.2 snapshot instead of the 1.1.1 libraries of MyFaces, Ijust replaced myfaces-all.jar with the 3 following jar files I got fromthe nightly snapshot:myfaces-api-1.1.2-SNAPSHOT.jarmyfaces-commons-1.1.2-SNAPSHOT.jarmyfaces-impl-1.1.2-SNAPSHOT.jarBut then, I get the IllegalStateException (No Factories for...).Is this change of jar files correct ?What else do I need to change for it to work ?In case it has an inpact, I use Tomcat 5.5.15Many thanks,PierreForwardSourceID:NTDC0A Notice: The information contained in this e-mail message and/or attachments to it may contain confidential or privileged information. If you are not the intended recipient, any dissemination, use, review, distribution, printing or copying of the information contained in this e-mail message and/or attachments to it are strictly prohibited. If you have received this communication in error, please notify us by reply e-mail or telephone and immediately and permanently delete the message and any attachments. Thank you
Tabbed Pane Limitations
Hi all, I have an anoyingproblem with the Tabbed Pane component, if someone could help me Here is my case : A request can be of three type. Each request type share common fields with the others, only a few fields are are request specific. Instead of developping three forms i decided to put the specific fields into separate panels in a t:panelTabbedPane component. The component works fine except that forpost-processing purpouses I need to know which panel has been selected by the user. I already tried several things, including onClick _javascript_ events on the panel tab but I noticed that the panel tab was rendered as an input button (which is also anoying when customizing tabs with css because it forces the user to create an ".ActiveTab input" css class) which turn events inefficient. I also noticed another problem which is reproducible on the examples. Each tab "seems" to represent a separate form. Except that when i submit the form on the Tab3, a required value error is thrown on the Tab1. It would be nice to be able to bind an "ActiveTabIndex" property to a managed bean. This would allow to create true "per tab" forms and also to hide required components on the inactive tabs. Fred
AW: How to update fields from ValueChangeEvent
Title: How to update fields from ValueChangeEvent No one an idea? I don't unterstand, why the fields stay empty when I use value binding expressions. It seems to be a display problem, because in the backing bean the value is set correctly... Is there any other chance to display the data for the fields? I would bevery grateful, if you could help me!!! THX, regards Andy -Ursprüngliche Nachricht-Von: Mitter Andreas, ISX Gesendet: Donnerstag, 2. Februar 2006 12:42An: users@myfaces.apache.orgBetreff: How to update fields from ValueChangeEvent Hi! This question seems to be very stupid, but I can't achieve to update inputText Components within a ValueChangeEvent when this inputTextComponents have a binding attribute. If I remove the binding attribute, then the fields are updated... In the ValueChangeMethod I get records from Database depending on the Input of the first inputtext component and write the records into the other inputtext COmponents with their setter Methods. Then the page is loaded new but the inputtextfields arenot updated What can I do to achieve this? Here is my JSF Page: t:htmlTag value="td" rendered="#{showTags.showLfnr}" h:inputText binding="#{beziehungsDto.ITlfnr}" id="lfnr" value="#{beziehungsDto.lfnr}" styleClass="mustfield" required="true" size="35" rendered="#{showTags.showLfnr}" immediate="true" valueChangeListener="#{querySelectHelper.selectSamData}" >"submit()" f:validateLength maximum="35"/f:validateLength /h:inputText/t:htmlTagIn this second field some data should be written. If I remove the binding attribute, it works, if I leave it, the field isn't updated...t:htmlTag value="td" h:inputText binding="#{beziehungsDto.ITpartnername}" id="partnernameneu" value="#{beziehungsDto.namepartner}" styleClass="mustfield" required="true" size="35" f:validateLength maximum="35"/f:validateLength /h:inputText/t:htmlTag Regards, Andy __ This email and any files transmitted with it are confidential and intended solely for the use of the individual or entity to whom they are addressed. If you have received this email in error please notify your system manager. This footnote also confirms that this email message has been swept for the presence of computer viruses. __ __ This email and any files transmitted with it are confidential and intended solely for the use of the individual or entity to whom they are addressed. If you have received this email in error please notify your system manager. This footnote also confirms that this email message has been swept for the presence of computer viruses. __
Re: ajax
AjaxAnywhere is at http://ajaxanywhere.sourceforge.net Emmanuel On 2/3/06, Matthias Wessendorf [EMAIL PROTECTED] wrote: http://java.sun.com/blueprints/ajax.htmlMyFaces' Sandbox also contains ajax components -MatthiasOn 2/3/06, Dave [EMAIL PROTECTED] wrote: I ggled, but did not find good links about Ajax. can someone recommend article/tutorials to start with?I like to use Ajax with JSF. website for ajaxanywhere?ajaxanywhere.com/org does not work. Thanks. Brings words and photos together (easily) with PhotoMail - it's free and works with Yahoo! Mail.--Matthias WessendorfZülpicher Wall 12, 23950674 Kölnhttp://www.wessendorf.net mwessendorf-at-gmail-dot-com
Base is Null
Hi friends!Another day, another problem...Now I'm working in a Tiles + JSF application, and there's a strange situation: the main page have a Tree2 component and before de Tiles inclusion this tree works fine. But after Tiles my managed bean with the TreeModel simply not instantiate, or something else. When using a inputDate with a simply bean that have only an accessor to a Date object it works... So, I think the Tiles integration is Ok. I'm learning to like JSF, but... it's hard to understand these problems. ThanksCristofer
multipart/form-data request filter
Hello, i use a portal Jetspeed with a webapp Portlet in JSF. So i want to use the inputfilupload component in a jsp. I have a multipart/form-data enctype form. I have the multipart/form-data filter in the web.xml. But it seems that the filter isn't execute and i just have a refresh of my page. The upload function of my bean isn't execute... Hox can i do? Thank a lot for your help. Cordialement, Sébastien MARIN.
Making datatable header fixed
Hi I am trying to create a JSF DataTable with a Scroll Bar Option (instead of Pagination Control). If i place the datatable in between div tag for example DIV style=overflow:auto; width:100%; height:200px datatable/datatable /div tags it supports scrolling. But I am unable to fix the table header and scroll only through the data rows in the table. I have tried to use CSS style for table header, but it has not worked either. I have made sure that an html table can scroll such that it s header stays fixed. It can be done through setting style attribute of tbody element (style=overflow:auto; width:100%; height:200px). But how would it work with datatable is unclear. Using the scroll bar is critical user requirement for me Anyhelp would be highly appreciated. __ Do You Yahoo!? Tired of spam? Yahoo! Mail has the best spam protection around http://mail.yahoo.com
Re: Base is Null
HiI'm not familiar with Tiles but in the last days I had a problem with a tree2 component and other components in combination. Nothing worked after I added an other MyFaces component. So, first I was wondering than I found out during a big debugging session that I had a null issue. I also saw that MyFaces wrote a message because of this problem but I couldn't see it because I didn't use a message tag on this side and also saw in the logs an exception. So I would propose to check first the logs from your server and then to add a message tab maybe you have a similiar problem. I hope this will help.best regards Hans2006/2/3, Cristofer Weber [EMAIL PROTECTED]:Hi friends! Another day, another problem...Now I'm working in a Tiles + JSF application, and there's a strange situation: the main page have a Tree2 component and before de Tiles inclusion this tree works fine. But after Tiles my managed bean with the TreeModel simply not instantiate, or something else. When using a inputDate with a simply bean that have only an accessor to a Date object it works... So, I think the Tiles integration is Ok. I'm learning to like JSF, but... it's hard to understand these problems. ThanksCristofer -- mfg Hans Sowamailto:[EMAIL PROTECTED]
AW: How to update fields from ValueChangeEvent
Thx, that solved my problem!! Regards, Andy -Ursprungliche Nachricht- Von: Jana Parvanova [mailto:[EMAIL PROTECTED] Gesendet: Freitag, 3. Februar 2006 09:54 An: MyFaces Discussion Betreff: Re: How to update fields from ValueChangeEvent How do you set fields values? You should use setSubmiittedValue instead of setValue when 'immediate' is true... (If I understood properly your problem.) - Original Message - From: [EMAIL PROTECTED] To: users@myfaces.apache.org Sent: Friday, February 03, 2006 10:30 AM Subject: AW: How to update fields from ValueChangeEvent No one an idea? I don't unterstand, why the fields stay empty when I use value binding expressions. It seems to be a display problem, because in the backing bean the value is set correctly... Is there any other chance to display the data for the fields? I would be very grateful, if you could help me!!! THX, regards Andy -Ursprьngliche Nachricht- Von: Mitter Andreas, ISX Gesendet: Donnerstag, 2. Februar 2006 12:42 An: users@myfaces.apache.org Betreff: How to update fields from ValueChangeEvent Hi! This question seems to be very stupid, but I can't achieve to update inputText Components within a ValueChangeEvent when this inputTextComponents have a binding attribute. If I remove the binding attribute, then the fields are updated... In the ValueChangeMethod I get records from Database depending on the Input of the first inputtext component and write the records into the other inputtext COmponents with their setter Methods. Then the page is loaded new but the inputtextfields arenot updated What can I do to achieve this? Here is my JSF Page: t:htmlTag value=td rendered=#{showTags.showLfnr} h:inputText binding=#{beziehungsDto.ITlfnr} id=lfnr value=#{beziehungsDto.lfnr} styleClass=mustfield required=true size=35 rendered=#{showTags.showLfnr} immediate=true valueChangeListener=#{querySelectHelper.selectSamData} onchange=submit() f:validateLength maximum=35/f:validateLength /h:inputText /t:htmlTag In this second field some data should be written. If I remove the binding attribute, it works, if I leave it, the field isn't updated... t:htmlTag value=td h:inputText binding=#{beziehungsDto.ITpartnername} id=partnernameneu value=#{beziehungsDto.namepartner} styleClass=mustfield required=true size=35 f:validateLength maximum=35/f:validateLength /h:inputText /t:htmlTag Regards, Andy __ This email and any files transmitted with it are confidential and intended solely for the use of the individual or entity to whom they are addressed. If you have received this email in error please notify your system manager. This footnote also confirms that this email message has been swept for the presence of computer viruses. __ __ This email and any files transmitted with it are confidential and intended solely for the use of the individual or entity to whom they are addressed. If you have received this email in error please notify your system manager. This footnote also confirms that this email message has been swept for the presence of computer viruses. __ __ This email and any files transmitted with it are confidential and intended solely for the use of the individual or entity to whom they are addressed. If you have received this email in error please notify your system manager. This footnote also confirms that this email message has been swept for the presence of computer viruses. __
AW: Panel Grid custom component
Hi Volker, do you know how to programmatically add a table header to the HtmlPanelGrid for each column? Regards, Matthias -Ursprüngliche Nachricht- Von: [EMAIL PROTECTED] [mailto:[EMAIL PROTECTED] Auftrag von Volker Weber Gesendet: Freitag, 3. Februar 2006 12:14 An: MyFaces Discussion Betreff: Re: Panel Grid custom component Hi Ali, there are some things you made wrong: First, and this seems to be a popular error: you can't add a component to another by setting the parent of the child! use parent.getChildren().add(child) instead. Than: You dont neet to invoke encoding on every component, just create then component tree and let jsf do the rest. Try this : public void encodeBegin( FacesContext context ) { HtmlPanelGrid panelGrid = new HtmlPanelGrid(); panelGrid.setColumns(2); List children = panelGrid.getChildren(); UIOutput labelName = new UIOutput(); labelName.setValue(Enter name: ); labelName.setId(nameId); children.add(labelName); UIInput inputName = new UIInput(); inputName.setId(inputNameId); // UIInput needs a valueBinding children.add(inputName); UIOutput labelAge = new UIOutput(); labelAge.setValue(Enter age: ); labelName.setId(ageId); children.add(labelAge); UIInput inputAge = new UIInput(); inputAge.setId(inputAgeId); // UIInput needs a valueBinding children.add(inputAge); this.getChildren.add(panelGrid); super.encodeBegin(context); } Regards, Volker Ali Raza wrote: Greetings again, Instead of adding components by rendering the htl myself i am adding chilid components and calling their encode methods as following: public void encodeBegin( FacesContext context ) { try { ResponseWriter writer = context.getResponseWriter(); writer.writeComment(* THIS IS THE START OF COMPONENT **); HtmlPanelGrid panelGrid = new HtmlPanelGrid(); panelGrid.setColumns(2); panelGrid.encodeChildren(context); addComponentBegin(context, panelGridId, this, panelGrid); addComponentEnd(context, panelGrid); UIOutput labelName = new UIOutput(); labelName.setValue(Enter name: ); addComponentBegin(context, nameId, panelGrid, labelName); addComponentEnd(context, labelName); UIInput inputName = new UIInput(); addComponentBegin(context, inputNameId, panelGrid, inputName); addComponentEnd(context, inputName); UIOutput labelAge = new UIOutput(); labelAge.setValue(Enter age: ); addComponentBegin(context, ageId, panelGrid, labelAge); addComponentEnd(context, labelAge); UIInput inputAge = new UIInput(); addComponentBegin(context, inputAgeId, panelGrid, inputAge); addComponentEnd(context, inputAge); writer.writeComment(* THIS IS THE END OF COMPONENT **); } catch( IOException e ) { } } public static void addComponentBegin( FacesContext context, String componentId, UIComponent parentComponent, UIComponent childComponent ) throws IOException { if( componentId != null ) { childComponent.setId( componentId ); } childComponent.setParent( parentComponent ); childComponent.encodeBegin ( context ); } public static void addComponentEnd( FacesContext context, UIComponent childComponent ) throws IOException { childComponent.encodeEnd( context ); } My problem is that the layout of the panel grid (2 columns) that i have added is not maintained and all encoded children get rendered ina straight line quite like flowlayout in swing. can i use column wise layout without having to encode the html myself ??? Thanx a lot, Ali -- A sixteenth century inventor called Wan Hu designed a rocket-propelled chair on which he planned to ascend into heaven. He built an open cabin, to which he fitted 47 rockets underneath and above, and two kites to keep him aloft. Wan Hu disappeared in flame and smoke and was never seen again. A crater on the moon is now named after him, so in one sense he made it to the heavens after all. This is the first recorded design of something approximating to a manned space rocket. The Chinese Space Programme. From Conception to Future Capabilities. Brian Harvey -- Don't answer to From: address! Mail to this account are droped if not recieved via mailinglist. To contact me direct create the mail address by concatenating my forename to my senders domain.
Making datatable header fixed
HiI am trying to create a JSF DataTable with a Scroll Bar Option (instead of Pagination Control). IfI place the datatable in between div tag for example DIV style=overflow:auto; width:100%; height:200px datatable/datatable/divtags it supports scrolling. But I am unable to fix thetable header and scroll only through the data rows inthe table.I have tried to use CSS style for table header, but ithas not workedeither.I have made sure that an html table can scroll suchthat it s header stays fixed. It can be done throughsetting style attribute of tbody element(style=overflow:auto; width:100%; height:200px). Buthow would it work with datatable is unclear.Using the scroll bar is critical user requirement forme Anyhelp would be highly appreciated. Best Regards Hassnain Badami Prytania Services LLP Warwick Court, 5 Paternoster Square, London EC4M 7BP Tel: +44 20 74895120 Fax: +44 20 74895121 ---This e-mail may contain confidential and/or privileged information. If you are not the intended recipient (or have received this e-mail in error) please notify the sender immediately and destroy this e-mail. Any unauthorised copying, disclosure or distribution of the material in this e-mail is strictly forbidden. The Prytania Group has taken every reasonable precaution to ensure that any attachment to this e-mail has been swept for viruses. However, we cannot accept liability for any damage sustained as a result of software viruses and would advise that you carry out your own virus checks before opening any attachment.
Using datapanel to request another resource
HiI am using tomahawk paneltabbedpane with panel tabs.My code has the formcontents of portfoliosummary.jspt:panelTabbedPane selectedIndex=0 width=100% t:panelTablabel=#{messages['portfolio_summary']} some JSF components /t:panelTab t:panelTab label=#{messages['portfolio_detail']}/ t:panelTab label=#{messages['portfolio_statistics']}/ /t:panelTabbedPane What I want to achieve is that on clicking the portfolio_detail panel I could request some other resource for example a JSP page(portfoliodetail.jsp) This would mean that clicking on any of my panel Tabs would load a different jsp for me. Is there any possible way to do that? Are there any alternatives to achieve it? Best Regards Hassnain Badami Prytania Services LLP Warwick Court, 5 Paternoster Square, London EC4M 7BP Tel: +44 20 74895120 Fax: +44 20 74895121 ---This e-mail may contain confidential and/or privileged information. If you are not the intended recipient (or have received this e-mail in error) please notify the sender immediately and destroy this e-mail. Any unauthorised copying, disclosure or distribution of the material in this e-mail is strictly forbidden. The Prytania Group has taken every reasonable precaution to ensure that any attachment to this e-mail has been swept for viruses. However, we cannot accept liability for any damage sustained as a result of software viruses and would advise that you carry out your own virus checks before opening any attachment.
Re: Working with large tables
The jsp page is just a regular jsf page containing a t:dataTable tag where the value attribute of the dataTable tag points to a DataModel property of a backing bean. f.e. t:dataTable value=#{myBean.myDataModel}. This is no different from the normal case using the default DataModel. Look at crossDataTable.jsp inside the examples that comes with myFaces for an example of how to use tables in jsf. Greetings Jan On Thu, 02 Feb 2006 22:55:40 +0100, Michael Huber [EMAIL PROTECTED] wrote: Hi, I am trying to implement the example from the myfaces wiki Working with large tables http://wiki.apache.org/myfaces/WorkingWithLargeTables The problem is, I really don't know, what the jsp has to look like. Can somebody help me? The wiki says, the jsp pages are then trivial, but I am trying to get this working for a week now... Thanks in advance Michael [EMAIL PROTECTED] [EMAIL PROTECTED] http://www.ivpv.UGent.be
AW: AW: Panel Grid custom component
Thanks Volker, you can take a look at the following example: http://www.irian.at/myfaces/masterDetail.jsf When you look at the source code, you can see that the f:facet name=header ... /f:facet element is used in more than one column. Regards, Matthias -Ursprüngliche Nachricht- Von: [EMAIL PROTECTED] [mailto:[EMAIL PROTECTED] Auftrag von Volker Weber Gesendet: Freitag, 3. Februar 2006 13:03 An: MyFaces Discussion Betreff: Re: AW: Panel Grid custom component Hi Matthias, no i don't know. according to the sun spec this is not possible for h:panelGrid: http://java.sun.com/j2ee/javaserverfaces/1.1_01/docs/tlddocs/h/pan elGrid.html and i don't find any hint to such an addition in the tomahawk version at: http://myfaces.apache.org/tlddoc/tomahawk/t/panelGrid.html But if you point me to a working example, and i can take a look at the jsp sources i can figure out how to build it programatically. Regards Volker Matthias Kahlau wrote: Hi Volker, do you know how to programmatically add a table header to the HtmlPanelGrid for each column? Regards, Matthias -- Don't answer to From: address! Mail to this account are droped if not recieved via mailinglist. To contact me direct create the mail address by concatenating my forename to my senders domain.
Re[2]: Tobago sheet sorting
HI, I tried using construction like this: t:link action=somepage t:label value=blabla /t:link In this case the links are not displayed, just labels instead (not clickable). Please help Hi Olexandr, First: please don't use SortableByApplication, this will be removed. We are thinking about to allow applications to register a eventListener to recieve sort events and do the sorting there. Now to your problem: Currently sorting of links should work if you use a t:label tag inside the t:link instead of the label attribute. I think the sorting code is older than the label attibute on the link tag. Please oben a jira issue to support this. Regards, Volker Olexandr Zakordonskyy wrote: Hi Tobago Team. Help me with sorting column which contains t:link component. In sorter there is a todo: // TODO: locale / comparator parameter? // don't compare numbers with Collator.getInstance() comparator //Comparator comparator = Collator.getInstance(); // comparator = new RowComparator(ascending, method); It may be possible to use SortableByApplication, but Line 156 is commented Please, help. Thanks, Olexandr. -- Best regards, Iryna mailto:[EMAIL PROTECTED] ICQ #: 150867790
Re: JSF+Hibernate
Mario Ivankovits schrieb: Hi! session.lock(object, LockMode.NONE) This might also fail if the object already exists in the current session, no? You can safely reattach the object using object = session.merge(object) Though, you really should discard the old object then and work further with the new one. Just to add additional comments. Session merge is a convenience method introduced in Hiberante 3.1 (and EJB3) due to the fact that the having an object coming in over session boundaries and doing a simple save or update simply caused to many problems (constantly clashes with objects already loaded by predecessing queries) Thus session.merge und session.persist were introduced.
Re: AW: AW: Panel Grid custom component
Hi, the masterDetail example uses dataTable not panelGrid. Matthias Kahlau wrote: Thanks Volker, you can take a look at the following example: http://www.irian.at/myfaces/masterDetail.jsf When you look at the source code, you can see that the f:facet name=header ... /f:facet element is used in more than one column. Regards, Matthias -Ursprüngliche Nachricht- Von: [EMAIL PROTECTED] [mailto:[EMAIL PROTECTED] Auftrag von Volker Weber Gesendet: Freitag, 3. Februar 2006 13:03 An: MyFaces Discussion Betreff: Re: AW: Panel Grid custom component Hi Matthias, no i don't know. according to the sun spec this is not possible for h:panelGrid: http://java.sun.com/j2ee/javaserverfaces/1.1_01/docs/tlddocs/h/pan elGrid.html and i don't find any hint to such an addition in the tomahawk version at: http://myfaces.apache.org/tlddoc/tomahawk/t/panelGrid.html But if you point me to a working example, and i can take a look at the jsp sources i can figure out how to build it programatically. Regards Volker Matthias Kahlau wrote: Hi Volker, do you know how to programmatically add a table header to the HtmlPanelGrid for each column? Regards, Matthias -- Don't answer to From: address! Mail to this account are droped if not recieved via mailinglist. To contact me direct create the mail address by concatenating my forename to my senders domain. -- Don't answer to From: address! Mail to this account are droped if not recieved via mailinglist. To contact me direct create the mail address by concatenating my forename to my senders domain.
RE: grey out a jscookmenu item?
Here's one way to hack it: 1) Copy the following to WEB-INF/include/jscookmenu org.apache.myfaces.custom.navmenu.jscookmenu.resource - JSCookMenu.js, MyFacesHack.js org.apache.myfaces.custom.navmenu.jscookmenu.resource.ThemeOffice - theme.css, theme.js 2) Add the following to the copied theme.css .ThemeOfficeMenuItemTextDisabled { padding-top: 2px; padding-bottom: 2px; padding-left: 5px; padding-right: 5px; border-top: 1px solid #3169C6; border-bottom: 1px solid #3169C6; background-color: inherit; white-space: nowrap; } 3) Insert into JSCookMenu,js, function cmDrawSubMenu (starts at line 190 in the version I have) if (item[0] != null) str += item[0]; else str += hasChild ? nodeProperties.folderLeft : nodeProperties.itemLeft; i // 2005/11/01 caw add style to non-clickable items to make them appear disabled (gray out) i if (item[2] != null) // item[2] is the link url str += 'td class=' + classStr + 'Text' + item[1]; i else i str += 'td class=' + classStr + 'TextDisabled' + item[1]; str += 'td class=' + classStr + 'Right'; 4) The jscookMenu tag x:jscookMenu layout=hbr theme=ThemeOffice styleLocation=include/jscookmenu javascriptLocation=include/jscookmenu HTH, Dan On 2/2/06, Thomas Spiegl [EMAIL PROTECTED] wrote: hi tony, JSCookMenu does not support this feature, but it would be a nice enhancement. If you could implement it and send us a patch, this woudl be greait! cheers Thomas On 2/2/06, tony kerz [EMAIL PROTECTED] wrote: anyone aware of a way to grey out a jscook menu item dynamically? Disclaimer: This e-mail message is intended only for the personal use of the recipient(s) named above. If you are not an intended recipient, you may not review, copy or distribute this message. If you have received this communication in error, please notify us immediately by e-mail and delete the original message. This e-mail expresses views only of the sender, which are not to be attributed to Rite Aid Corporation and may not be copied or distributed without this statement.
AW: AW: AW: Panel Grid custom component
Ok, but with a dataTable, there's a similar problem. Both HtmlDataTable and HtmlPanelGrid are subclasses of UIComponentBase, and facet related methods are defined in this superclass (e. g. getFacets()). UIData does additionally provide convenience methods for setting the header and the footer, as you can read in the API doc of UIData: public void setHeader(javax.faces.component.UIComponent header) Set the header facet of this component. A convenience method for getFacets().put(header, header). http://java.sun.com/j2ee/javaserverfaces/1.1_01/docs/api/javax/faces/compone nt/UIData.html#setHeader(javax.faces.component.UIComponent) That looks to me like the facet thing of HtmlPanelGrid and HtmlDataTable is the same... Regards, Matthias -Ursprüngliche Nachricht- Von: [EMAIL PROTECTED] [mailto:[EMAIL PROTECTED] Auftrag von Volker Weber Gesendet: Freitag, 3. Februar 2006 16:04 An: MyFaces Discussion Betreff: Re: AW: AW: Panel Grid custom component Hi, the masterDetail example uses dataTable not panelGrid. Matthias Kahlau wrote: Thanks Volker, you can take a look at the following example: http://www.irian.at/myfaces/masterDetail.jsf When you look at the source code, you can see that the f:facet name=header ... /f:facet element is used in more than one column. Regards, Matthias -Ursprüngliche Nachricht- Von: [EMAIL PROTECTED] [mailto:[EMAIL PROTECTED] Auftrag von Volker Weber Gesendet: Freitag, 3. Februar 2006 13:03 An: MyFaces Discussion Betreff: Re: AW: Panel Grid custom component Hi Matthias, no i don't know. according to the sun spec this is not possible for h:panelGrid: http://java.sun.com/j2ee/javaserverfaces/1.1_01/docs/tlddocs/h/pan elGrid.html and i don't find any hint to such an addition in the tomahawk version at: http://myfaces.apache.org/tlddoc/tomahawk/t/panelGrid.html But if you point me to a working example, and i can take a look at the jsp sources i can figure out how to build it programatically. Regards Volker Matthias Kahlau wrote: Hi Volker, do you know how to programmatically add a table header to the HtmlPanelGrid for each column? Regards, Matthias -- Don't answer to From: address! Mail to this account are droped if not recieved via mailinglist. To contact me direct create the mail address by concatenating my forename to my senders domain. -- Don't answer to From: address! Mail to this account are droped if not recieved via mailinglist. To contact me direct create the mail address by concatenating my forename to my senders domain.
document.getElementById(jsf_tree_64) has no properties
Hi Lists, I want to test the simple sandbox example for inputSuggestAjax. But when I input sth. in the input field, an error occurs in the web page in firefox: document.getElementById("jsf_tree_64") has no properties. Any ideas or comment why it happens? I am using myfaces 1.1.1, Jboss 3.2.6 and Pluto for portlet my view.jsp is used to call the inputSuggestAjax: %@ taglib uri="http://java.sun.com/jsf/html" prefix="h"%%@ taglib uri="http://java.sun.com/jsf/core" prefix="f"%%@ taglib uri="http://myfaces.apache.org/extensions" prefix="t"%%@ taglib uri="http://myfaces.apache.org/sandbox" prefix="s"% f:view h:form style type="text/css" .ajaxListItem {} .ajaxList {} /style h:panelGrid columns="2" h:outputText value="default suggest"/ s:inputSuggestAjax suggestedItemsMethod="#{myInputSuggestAjax.getItems}" styleLocation="" / /h:panelGrid /h:form /f:view and my bean is written in MyInputSuggestAjaxBean.java: package com.seeburger.portlet.processoverview; import java.util.List;import java.util.ArrayList; /*** @jsf.bean name = "myInputSuggestAjax"* scope = "request" * */public class MyInputSuggestAjaxBean{ public List getItems(String prefix) { List li = new ArrayList(); li.add(prefix+1); li.add(prefix+2); li.add(prefix+3); li.add(prefix+4); li.add(prefix+5); li.add(prefix+6); return li; } public List getItems(String prefix, Integer maxSize) { List li = new ArrayList(); for(int i = 0; i maxSize.intValue(); i++) { li.add(prefix+ " " +(i+1)); } return li; }} Thank you so much! Haihua
Re: AW: AW: AW: Panel Grid custom component
Hi, the header facet of a UIData renders a common header over all columns, To render a header for each column you must set a header facet on the column component. See: http://java.sun.com/j2ee/javaserverfaces/1.1_01/docs/tlddocs/h/dataTable.html So you are right, in this point UIData and panelGrid are similar, but i think this are not the headers you want. Regards, Volker Matthias Kahlau wrote: Ok, but with a dataTable, there's a similar problem. Both HtmlDataTable and HtmlPanelGrid are subclasses of UIComponentBase, and facet related methods are defined in this superclass (e. g. getFacets()). UIData does additionally provide convenience methods for setting the header and the footer, as you can read in the API doc of UIData: public void setHeader(javax.faces.component.UIComponent header) Set the header facet of this component. A convenience method for getFacets().put(header, header). http://java.sun.com/j2ee/javaserverfaces/1.1_01/docs/api/javax/faces/compone nt/UIData.html#setHeader(javax.faces.component.UIComponent) That looks to me like the facet thing of HtmlPanelGrid and HtmlDataTable is the same... Regards, Matthias -Ursprüngliche Nachricht- Von: [EMAIL PROTECTED] [mailto:[EMAIL PROTECTED] Auftrag von Volker Weber Gesendet: Freitag, 3. Februar 2006 16:04 An: MyFaces Discussion Betreff: Re: AW: AW: Panel Grid custom component Hi, the masterDetail example uses dataTable not panelGrid. Matthias Kahlau wrote: Thanks Volker, you can take a look at the following example: http://www.irian.at/myfaces/masterDetail.jsf When you look at the source code, you can see that the f:facet name=header ... /f:facet element is used in more than one column. Regards, Matthias -Ursprüngliche Nachricht- Von: [EMAIL PROTECTED] [mailto:[EMAIL PROTECTED] Auftrag von Volker Weber Gesendet: Freitag, 3. Februar 2006 13:03 An: MyFaces Discussion Betreff: Re: AW: Panel Grid custom component Hi Matthias, no i don't know. according to the sun spec this is not possible for h:panelGrid: http://java.sun.com/j2ee/javaserverfaces/1.1_01/docs/tlddocs/h/pan elGrid.html and i don't find any hint to such an addition in the tomahawk version at: http://myfaces.apache.org/tlddoc/tomahawk/t/panelGrid.html But if you point me to a working example, and i can take a look at the jsp sources i can figure out how to build it programatically. Regards Volker Matthias Kahlau wrote: Hi Volker, do you know how to programmatically add a table header to the HtmlPanelGrid for each column? Regards, Matthias -- Don't answer to From: address! Mail to this account are droped if not recieved via mailinglist. To contact me direct create the mail address by concatenating my forename to my senders domain. -- Don't answer to From: address! Mail to this account are droped if not recieved via mailinglist. To contact me direct create the mail address by concatenating my forename to my senders domain. -- Don't answer to From: address! Mail to this account are droped if not recieved via mailinglist. To contact me direct create the mail address by concatenating my forename to my senders domain.
Re: AW: AW: Panel Grid custom component
A facet is an arbitrary generic attribute (container, really) of a component. Just because one component supports a header facet doesn't mean that another one will. Each facet's meaning is unique to each component, and the same facet name can mean different things to different components. Think of facets as component variable names. On 2/3/06, Matthias Kahlau [EMAIL PROTECTED] wrote: Ok, but with a dataTable, there's a similar problem. Both HtmlDataTable and HtmlPanelGrid are subclasses of UIComponentBase, and facet related methods are defined in this superclass (e. g. getFacets()). UIData does additionally provide convenience methods for setting the header and the footer, as you can read in the API doc of UIData: public void setHeader(javax.faces.component.UIComponent header) Set the header facet of this component. A convenience method for getFacets().put(header, header). http://java.sun.com/j2ee/javaserverfaces/1.1_01/docs/api/javax/faces/compone nt/UIData.html#setHeader(javax.faces.component.UIComponent) That looks to me like the facet thing of HtmlPanelGrid and HtmlDataTable is the same... Regards, Matthias -Ursprüngliche Nachricht- Von: [EMAIL PROTECTED] [mailto:[EMAIL PROTECTED] Auftrag von Volker Weber Gesendet: Freitag, 3. Februar 2006 16:04 An: MyFaces Discussion Betreff: Re: AW: AW: Panel Grid custom component Hi, the masterDetail example uses dataTable not panelGrid. Matthias Kahlau wrote: Thanks Volker, you can take a look at the following example: http://www.irian.at/myfaces/masterDetail.jsf When you look at the source code, you can see that the f:facet name=header ... /f:facet element is used in more than one column. Regards, Matthias -Ursprüngliche Nachricht- Von: [EMAIL PROTECTED] [mailto:[EMAIL PROTECTED] Auftrag von Volker Weber Gesendet: Freitag, 3. Februar 2006 13:03 An: MyFaces Discussion Betreff: Re: AW: Panel Grid custom component Hi Matthias, no i don't know. according to the sun spec this is not possible for h:panelGrid: http://java.sun.com/j2ee/javaserverfaces/1.1_01/docs/tlddocs/h/pan elGrid.html and i don't find any hint to such an addition in the tomahawk version at: http://myfaces.apache.org/tlddoc/tomahawk/t/panelGrid.html But if you point me to a working example, and i can take a look at the jsp sources i can figure out how to build it programatically. Regards Volker Matthias Kahlau wrote: Hi Volker, do you know how to programmatically add a table header to the HtmlPanelGrid for each column? Regards, Matthias -- Don't answer to From: address! Mail to this account are droped if not recieved via mailinglist. To contact me direct create the mail address by concatenating my forename to my senders domain. -- Don't answer to From: address! Mail to this account are droped if not recieved via mailinglist. To contact me direct create the mail address by concatenating my forename to my senders domain.
How to set the width of columns in a panelGrid?
Hi! Is there a way to define the width of columns when using a panelGrid element? Regards, Matthias
Re: How to set the width of columns in a panelGrid?
Take a look at @columnClasses , then just use CSS ;) Dennis Byrne -Original Message- From: Matthias Kahlau [mailto:[EMAIL PROTECTED] Sent: Friday, February 3, 2006 11:45 AM To: 'Users MyFaces' Subject: How to set the width of columns in a panelGrid? Hi! Is there a way to define the width of columns when using a panelGrid element? Regards, Matthias
Re: Dojo integration (was Re: 'Simulating' commandLink from Javascript')
Martin Marinschek wrote: Our final goal is to get rid of prototype and use dojo instead as our base-library for AJAX. So we want to further AJAXify our component set with the help of dojo, and replace the existing implementations with dojo-functionality. Fantastic, thanks for the clarification Martin. Sounds like Dojo will be used under the covers, then. At some point, it might be useful to expose which Dojo components are being loaded into the page, so developers can know which ones they're getting for free and don't need to load.
AW: AW: AW: AW: Panel Grid custom component
Hi! So you are right, in this point UIData and panelGrid are similar, but i think this are not the headers you want. No, I see. I don't explicitely use columns in a panelGrid, so I can't add facets as children of column components, neither in JSP nor programmatically. It seems like I have to use HtmlDataTable, but this will be more complex than using a simple HtmlPanelGrid... Regards, Matthias -Ursprüngliche Nachricht- Von: [EMAIL PROTECTED] [mailto:[EMAIL PROTECTED] Auftrag von Volker Weber Gesendet: Freitag, 3. Februar 2006 17:40 An: MyFaces Discussion Betreff: Re: AW: AW: AW: Panel Grid custom component Hi, the header facet of a UIData renders a common header over all columns, To render a header for each column you must set a header facet on the column component. See: http://java.sun.com/j2ee/javaserverfaces/1.1_01/docs/tlddocs/h/dat aTable.html So you are right, in this point UIData and panelGrid are similar, but i think this are not the headers you want. Regards, Volker Matthias Kahlau wrote: Ok, but with a dataTable, there's a similar problem. Both HtmlDataTable and HtmlPanelGrid are subclasses of UIComponentBase, and facet related methods are defined in this superclass (e. g. getFacets()). UIData does additionally provide convenience methods for setting the header and the footer, as you can read in the API doc of UIData: public void setHeader(javax.faces.component.UIComponent header) Set the header facet of this component. A convenience method for getFacets().put(header, header). http://java.sun.com/j2ee/javaserverfaces/1.1_01/docs/api/javax/fac es/compone nt/UIData.html#setHeader(javax.faces.component.UIComponent) That looks to me like the facet thing of HtmlPanelGrid and HtmlDataTable is the same... Regards, Matthias -Ursprüngliche Nachricht- Von: [EMAIL PROTECTED] [mailto:[EMAIL PROTECTED] Auftrag von Volker Weber Gesendet: Freitag, 3. Februar 2006 16:04 An: MyFaces Discussion Betreff: Re: AW: AW: Panel Grid custom component Hi, the masterDetail example uses dataTable not panelGrid. Matthias Kahlau wrote: Thanks Volker, you can take a look at the following example: http://www.irian.at/myfaces/masterDetail.jsf When you look at the source code, you can see that the f:facet name=header ... /f:facet element is used in more than one column. Regards, Matthias -Ursprüngliche Nachricht- Von: [EMAIL PROTECTED] [mailto:[EMAIL PROTECTED] m Auftrag von Volker Weber Gesendet: Freitag, 3. Februar 2006 13:03 An: MyFaces Discussion Betreff: Re: AW: Panel Grid custom component Hi Matthias, no i don't know. according to the sun spec this is not possible for h:panelGrid: http://java.sun.com/j2ee/javaserverfaces/1.1_01/docs/tlddocs/h/pan elGrid.html and i don't find any hint to such an addition in the tomahawk version at: http://myfaces.apache.org/tlddoc/tomahawk/t/panelGrid.html But if you point me to a working example, and i can take a look at the jsp sources i can figure out how to build it programatically. Regards Volker Matthias Kahlau wrote: Hi Volker, do you know how to programmatically add a table header to the HtmlPanelGrid for each column? Regards, Matthias -- Don't answer to From: address! Mail to this account are droped if not recieved via mailinglist. To contact me direct create the mail address by concatenating my forename to my senders domain. -- Don't answer to From: address! Mail to this account are droped if not recieved via mailinglist. To contact me direct create the mail address by concatenating my forename to my senders domain. -- Don't answer to From: address! Mail to this account are droped if not recieved via mailinglist. To contact me direct create the mail address by concatenating my forename to my senders domain.
Re: Tobago sheet sorting
Hi, i just test it in the demo examples sheet page, it works in firefox (i'm on a linux box, so i just can't test on IE), but it's produces illegal html, and looks different because of the label style. The label element is rendred (in HTML) nested in an as anchor tag (A ...label ... labelText /label/A) which results, when inside a link, in nested anchors, which may not work. Use t:out instead, this looks better, but even different from standard links, and should work also on any browser. Regards, Volker Iryna Stetska wrote: HI, I tried using construction like this: t:link action=somepage t:label value=blabla /t:link In this case the links are not displayed, just labels instead (not clickable). Please help Hi Olexandr, First: please don't use SortableByApplication, this will be removed. We are thinking about to allow applications to register a eventListener to recieve sort events and do the sorting there. Now to your problem: Currently sorting of links should work if you use a t:label tag inside the t:link instead of the label attribute. I think the sorting code is older than the label attibute on the link tag. Please oben a jira issue to support this. Regards, Volker Olexandr Zakordonskyy wrote: Hi Tobago Team. Help me with sorting column which contains t:link component. In sorter there is a todo: // TODO: locale / comparator parameter? // don't compare numbers with Collator.getInstance() comparator //Comparator comparator = Collator.getInstance(); // comparator = new RowComparator(ascending, method); It may be possible to use SortableByApplication, but Line 156 is commented Please, help. Thanks, Olexandr. -- Don't answer to From: address! Mail to this account are droped if not recieved via mailinglist. To contact me direct create the mail address by concatenating my forename to my senders domain.
Re: Dojo integration (was Re: 'Simulating' commandLink from Javascript')
Yes, but that is all really in the beginning, currently. We well be working over the next few months on that. regards, Martin On 2/3/06, Rogers Reilly [EMAIL PROTECTED] wrote: Martin Marinschek wrote: Our final goal is to get rid of prototype and use dojo instead as our base-library for AJAX. So we want to further AJAXify our component set with the help of dojo, and replace the existing implementations with dojo-functionality. Fantastic, thanks for the clarification Martin. Sounds like Dojo will be used under the covers, then. At some point, it might be useful to expose which Dojo components are being loaded into the page, so developers can know which ones they're getting for free and don't need to load. -- http://www.irian.at Your JSF powerhouse - JSF Consulting, Development and Courses in English and German Professional Support for Apache MyFaces
Re: AW: AW: AW: Panel Grid custom component
Hi, You can add as many 'header' components as you need (ie number of columns) as the first children, and use css to format them visualy as headers. Regards, Volker Matthias Kahlau wrote: Hi Volker, as I read in Bergsten's JSF book, JSF distinguishes between a table header facet and column header facets. - table header facet: rendered as one th element (with a colspan attribute set to the number of children) within a tr element - column header facets: rendered as th elements within a separate tr element - a thead element encloses both header tr elements Looks like the column header facets are what I searched for, and the facet elements are used as children of the column elements. But columns are not explicitely used with a panelGrid... and column header facets are not supported, as you already mentioned: according to the sun spec this is not possible for h:panelGrid: http://java.sun.com/j2ee/javaserverfaces/1.1_01/docs/tlddocs/h/panelGrid.h tml Is there any way out when programmatically creating the UI? Maybe I can use a HtmlDataTable, but I don't know if this is possible because I don't have a simple list of objects to iterate over. I need to add a HtmlOutputText component in the first column (it's value may be fetched from an object of the data set) and radiobuttons (with spread layout) in the remaining columns. Regards, Matthias -Ursprüngliche Nachricht- Von: [EMAIL PROTECTED] [mailto:[EMAIL PROTECTED] Auftrag von Matthias Kahlau Gesendet: Freitag, 3. Februar 2006 16:24 An: MyFaces Discussion Betreff: AW: AW: AW: Panel Grid custom component Ok, but with a dataTable, there's a similar problem. Both HtmlDataTable and HtmlPanelGrid are subclasses of UIComponentBase, and facet related methods are defined in this superclass (e. g. getFacets()). UIData does additionally provide convenience methods for setting the header and the footer, as you can read in the API doc of UIData: public void setHeader(javax.faces.component.UIComponent header) Set the header facet of this component. A convenience method for getFacets().put(header, header). http://java.sun.com/j2ee/javaserverfaces/1.1_01/docs/api/javax/fac es/compone nt/UIData.html#setHeader(javax.faces.component.UIComponent) That looks to me like the facet thing of HtmlPanelGrid and HtmlDataTable is the same... Regards, Matthias -Ursprüngliche Nachricht- Von: [EMAIL PROTECTED] [mailto:[EMAIL PROTECTED] Auftrag von Volker Weber Gesendet: Freitag, 3. Februar 2006 16:04 An: MyFaces Discussion Betreff: Re: AW: AW: Panel Grid custom component Hi, the masterDetail example uses dataTable not panelGrid. Matthias Kahlau wrote: Thanks Volker, you can take a look at the following example: http://www.irian.at/myfaces/masterDetail.jsf When you look at the source code, you can see that the f:facet name=header ... /f:facet element is used in more than one column. Regards, Matthias -Ursprüngliche Nachricht- Von: [EMAIL PROTECTED] [mailto:[EMAIL PROTECTED] Auftrag von Volker Weber Gesendet: Freitag, 3. Februar 2006 13:03 An: MyFaces Discussion Betreff: Re: AW: Panel Grid custom component Hi Matthias, no i don't know. according to the sun spec this is not possible for h:panelGrid: http://java.sun.com/j2ee/javaserverfaces/1.1_01/docs/tlddocs/h/pan elGrid.html and i don't find any hint to such an addition in the tomahawk version at: http://myfaces.apache.org/tlddoc/tomahawk/t/panelGrid.html But if you point me to a working example, and i can take a look at the jsp sources i can figure out how to build it programatically. Regards Volker Matthias Kahlau wrote: Hi Volker, do you know how to programmatically add a table header to the HtmlPanelGrid for each column? Regards, Matthias -- Don't answer to From: address! Mail to this account are droped if not recieved via mailinglist. To contact me direct create the mail address by concatenating my forename to my senders domain. -- Don't answer to From: address! Mail to this account are droped if not recieved via mailinglist. To contact me direct create the mail address by concatenating my forename to my senders domain. -- Don't answer to From: address! Mail to this account are droped if not recieved via mailinglist. To contact me direct create the mail address by concatenating my forename to my senders domain.
Re: AW: AW: AW: Panel Grid custom component
This is actually something for which a patch would be willingly accepted ;) regards, Martin On 2/3/06, Matthias Kahlau [EMAIL PROTECTED] wrote: Hi! So you are right, in this point UIData and panelGrid are similar, but i think this are not the headers you want. No, I see. I don't explicitely use columns in a panelGrid, so I can't add facets as children of column components, neither in JSP nor programmatically. It seems like I have to use HtmlDataTable, but this will be more complex than using a simple HtmlPanelGrid... Regards, Matthias -Ursprüngliche Nachricht- Von: [EMAIL PROTECTED] [mailto:[EMAIL PROTECTED] Auftrag von Volker Weber Gesendet: Freitag, 3. Februar 2006 17:40 An: MyFaces Discussion Betreff: Re: AW: AW: AW: Panel Grid custom component Hi, the header facet of a UIData renders a common header over all columns, To render a header for each column you must set a header facet on the column component. See: http://java.sun.com/j2ee/javaserverfaces/1.1_01/docs/tlddocs/h/dat aTable.html So you are right, in this point UIData and panelGrid are similar, but i think this are not the headers you want. Regards, Volker Matthias Kahlau wrote: Ok, but with a dataTable, there's a similar problem. Both HtmlDataTable and HtmlPanelGrid are subclasses of UIComponentBase, and facet related methods are defined in this superclass (e. g. getFacets()). UIData does additionally provide convenience methods for setting the header and the footer, as you can read in the API doc of UIData: public void setHeader(javax.faces.component.UIComponent header) Set the header facet of this component. A convenience method for getFacets().put(header, header). http://java.sun.com/j2ee/javaserverfaces/1.1_01/docs/api/javax/fac es/compone nt/UIData.html#setHeader(javax.faces.component.UIComponent) That looks to me like the facet thing of HtmlPanelGrid and HtmlDataTable is the same... Regards, Matthias -Ursprüngliche Nachricht- Von: [EMAIL PROTECTED] [mailto:[EMAIL PROTECTED] Auftrag von Volker Weber Gesendet: Freitag, 3. Februar 2006 16:04 An: MyFaces Discussion Betreff: Re: AW: AW: Panel Grid custom component Hi, the masterDetail example uses dataTable not panelGrid. Matthias Kahlau wrote: Thanks Volker, you can take a look at the following example: http://www.irian.at/myfaces/masterDetail.jsf When you look at the source code, you can see that the f:facet name=header ... /f:facet element is used in more than one column. Regards, Matthias -Ursprüngliche Nachricht- Von: [EMAIL PROTECTED] [mailto:[EMAIL PROTECTED] m Auftrag von Volker Weber Gesendet: Freitag, 3. Februar 2006 13:03 An: MyFaces Discussion Betreff: Re: AW: Panel Grid custom component Hi Matthias, no i don't know. according to the sun spec this is not possible for h:panelGrid: http://java.sun.com/j2ee/javaserverfaces/1.1_01/docs/tlddocs/h/pan elGrid.html and i don't find any hint to such an addition in the tomahawk version at: http://myfaces.apache.org/tlddoc/tomahawk/t/panelGrid.html But if you point me to a working example, and i can take a look at the jsp sources i can figure out how to build it programatically. Regards Volker Matthias Kahlau wrote: Hi Volker, do you know how to programmatically add a table header to the HtmlPanelGrid for each column? Regards, Matthias -- Don't answer to From: address! Mail to this account are droped if not recieved via mailinglist. To contact me direct create the mail address by concatenating my forename to my senders domain. -- Don't answer to From: address! Mail to this account are droped if not recieved via mailinglist. To contact me direct create the mail address by concatenating my forename to my senders domain. -- Don't answer to From: address! Mail to this account are droped if not recieved via mailinglist. To contact me direct create the mail address by concatenating my forename to my senders domain. -- http://www.irian.at Your JSF powerhouse - JSF Consulting, Development and Courses in English and German Professional Support for Apache MyFaces
Re: What is different between a jsf portlet and plain jsf application
Legolas Woodland wrote: Hi Thank you for reading my post. I want to know what is different betweena jsf portlet and a plain jsf web application. imagine that i made a web application using myfaces components , now i wannt to deploy that web application into some portlet container like JetSpeed . if i do not need any information from the portal (user name , portal session ...) then how i much works it needs ? Probably not much will have to change to run it as a portlet. You need some initial setup by using the MyFacesGenericPortlet. The documentation for this is not currently on the website (it will be next time the site is updated, I think). You can read the doc at http://svn.apache.org/viewcvs.cgi/myfaces/site/trunk/src/site/xdoc/docs/portlet.xml?view=markup Redirects in your navigation are bad (I think, I've never used them actually). Also see the differences between servlet portlet in the ExternalContext methods at http://java.sun.com/j2ee/javaserverfaces/1.1_01/docs/api/javax/faces/context/ExternalContext.html If you use any of those methods, you need to understand the difference to know if it'll work in portlets or if you have to change your code. another question is : what is internal technical differences between a jsf portlet and a jsf web application ? See http://www.onjava.com/pub/a/onjava/2005/09/14/what-is-a-portlet.html and http://www.onjava.com/pub/a/onjava/2006/02/01/what-is-a-portlet-2.html for good starters on what portlets are. -- Dave Brondsema Software Developer Cornerstone University signature.asc Description: OpenPGP digital signature
Re: document.getElementById(jsf_tree_64) has no properties
Hi, this may be a portlet problem? I don't know mutch about portlets, but afaik the portlet rewrites the ids to ensure they are unique. When using client-side state saving (which is the default) there are two hidden input fields jsf_tree_64 and jsf_state_64 in which the state is stored. Try server-side state saving if you can. Regards, Volker Haihua Luo wrote: Hi Lists, I want to test the simple sandbox example for inputSuggestAjax. But when I input sth. in the input field, an error occurs in the web page in firefox: document.getElementById(jsf_tree_64) has no properties. Any ideas or comment why it happens? I am using myfaces 1.1.1, Jboss 3.2.6 and Pluto for portlet my view.jsp is used to call the inputSuggestAjax: %@ taglib uri=http://java.sun.com/jsf/html; prefix=h% %@ taglib uri=http://java.sun.com/jsf/core; prefix=f% %@ taglib uri=http://myfaces.apache.org/extensions; prefix=t% %@ taglib uri=http://myfaces.apache.org/sandbox; prefix=s% f:view h:form style type=text/css .ajaxListItem {} .ajaxList {} /style h:panelGrid columns=2 h:outputText value=default suggest/ s:inputSuggestAjax suggestedItemsMethod=#{myInputSuggestAjax.getItems} styleLocation= / /h:panelGrid /h:form /f:view and my bean is written in MyInputSuggestAjaxBean.java: package com.seeburger.portlet.processoverview; import java.util.List; import java.util.ArrayList; /** * @jsf.bean name = myInputSuggestAjax *scope = request * */ public class MyInputSuggestAjaxBean { public List getItems(String prefix) { List li = new ArrayList(); li.add(prefix+1); li.add(prefix+2); li.add(prefix+3); li.add(prefix+4); li.add(prefix+5); li.add(prefix+6); return li; } public List getItems(String prefix, Integer maxSize) { List li = new ArrayList(); for(int i = 0; i maxSize.intValue(); i++) { li.add(prefix+ +(i+1)); } return li; } } Thank you so much! Haihua -- Don't answer to From: address! Mail to this account are droped if not recieved via mailinglist. To contact me direct create the mail address by concatenating my forename to my senders domain.
Re: TabbedPane question: update backing beans when changing tabs
In the future, you need to ask your questions on the myfaces-user mailing list. I'll cc my response to [EMAIL PROTECTED] Unfortunately, I'm not really that knowledgeable about using tabbedpane. My usage of it is very basic at this point. You might be able to do this with a jsp include if you're using raw jsp, maybe with an aliasBean component. I don't use jsp, though. Under facelets, I'd use a ui:include. Hopefully someone else on the mailing list can help you. On 2/3/06, Hassnain Badami [EMAIL PROTECTED] wrote: Hi I was going through the mail-archive for my faces and was impressed by your command on tabbedpane. I have a query and I shall be highly obliged if you can respond. I am using tomahawk paneltabbedpane with panel tabs. My code has the form contents of portfoliosummary.jsp t:panelTabbedPane selectedIndex=0 width=100% t:panelTab label=#{messages['portfolio_summary']} some JSF components /t:panelTab t:panelTab label=#{messages['portfolio_detail']}/ t:panelTab label=#{messages['portfolio_statistics']}/ /t:panelTabbedPane What I want to achieve is that on clicking the portfolio_detail panel I could request some other resource for example a JSP page(portfoliodetail.jsp) This would mean that clicking on any of my panel Tabs would load a different jsp for me. Is there any possible way to do that? Are there any alternatives to achieve it? Best Regards Hassnain Badami --- This e-mail may contain confidential and/or privileged information. If you are not the intended recipient (or have received this e-mail in error) please notify the sender immediately and destroy this e-mail. Any unauthorised copying, disclosure or distribution of the material in this e-mail is strictly forbidden. The Prytania Group has taken every reasonable precaution to ensure that any attachment to this e-mail has been swept for viruses. However, we cannot accept liability for any damage sustained as a result of software viruses and would advise that you carry out your own virus checks before opening any attachment.
Re: JSF Chart Creator and JSF Client Side Validators
I just tried out your charting library with the sample pie chart and managed to work together a bar chart too. Nice work! You've made it very simple. We currently use the cewolf jsp taglib for jfreechart mixed with JSF at ecommStats.com, but this should make our lives much easier. TravisOn 1/2/06, Cagatay Civici [EMAIL PROTECTED] wrote:Hi,I have created a series of free components for JSF. All I want is to share them with you. JSF Chart Creator This component is used for creating charts in JSF applications, there are currently 27 types of charts supported. Component's feature include fully customizable charts, 3d charts, anti-aliasing and etc. JSF Client Side Validation ComponentsJSF has no built in support for client side validation, these component series include; - Required Field Validator- Compare Validator- Range Validator- Regular _expression_ Validator- Validator SummaryThis JSF client validators also has support for field highlighting, customizable error messages and etc. These two component series may help you in your development, they are completely free and open source. These components are currently referenced by jsftutorials.com, jsfcentral.com, jfree.org, javatoolbox.com.You can have a detailed look and have free download at; http://www.jroller.com/page/cagataycivici?entry=jsf_chart_creator http://www.jroller.com/page/cagataycivici?entry=jsf_client_side_validators Regards,Cagatay Civici
Re: multipart/form-data request filter
I extended MyFaces to upload work. As I've seen in org.apache.myfaces.custom.fileupload.HtmlFileUploadRenderer.java decode method there is only decode of MultipartRequestWrapper. When using portlets with MyFacesGenericPortlet, an ActionRequest is passed in FacesContext. So the decode of this object is not done. To solve this problem I've extended HtmlFileUploadRenderer in CustomHtmlFileUploadRenderer.java attached to these email. In these extension, the decode is made based on MultipartActionRequest class that is part of cocoon library and is a wrapper of ActionRequest. So, I had to extend MyFacesGenericPortlet to wrap the action request in an MultipartActionRequest object. How my extension of MyFacesGenericPortlet includes many other functionalities I did not attached to these email. But the implementation is simply to override the processAction like these: public void processAction(ActionRequest request, ActionResponse response) throws PortletException, IOException { if(contentType!=null){ if(contentType.startsWith(multipart/form-data)){ try{ request = (MultipartActionRequest) rf.getServletRequest(request); }catch(Exception e){ e.printStackTrace(); } } } super.processAction(request, response); } With these done, configure faces-config.xml to use the renderer created, like this: render-kit renderer component-familyjavax.faces.Input/component-family renderer-typeorg.apache.myfaces.FileUpload/renderer-type renderer-classbr.gov.trf2.jfes.intranet.faces.renderer.CustomHtmlFileUploadRenderer/renderer-class /renderer /render-kit Now, the tag inputfileupload works. I would like to see this implemented in next releases of myfaces. Sébastien Marin wrote: Hello, i use a portal Jetspeed with a webapp Portlet in JSF. So i want to use the inputfilupload component in a jsp. I have a multipart/form-data enctype form. I have the multipart/form-data filter in the web.xml. But it seems that the filter isn't execute and i just have a refresh of my page. The upload function of my bean isn't execute... Hox can i do? Thank a lot for your help. Cordialement, Sébastien MARIN. package br.gov.trf2.jfes.intranet.faces.renderer; import java.io.IOException; import java.util.Iterator; import java.util.List; import javax.faces.component.UIComponent; import javax.faces.context.FacesContext; import javax.portlet.ActionRequest; import org.apache.cocoon.portlet.multipart.MultipartActionRequest; import org.apache.cocoon.servlet.multipart.PartOnDisk; import org.apache.commons.fileupload.FileItem; import org.apache.commons.fileupload.disk.DiskFileItem; import org.apache.commons.fileupload.disk.DiskFileItemFactory; import org.apache.commons.fileupload.portlet.PortletFileUpload; import org.apache.myfaces.custom.fileupload.HtmlFileUploadRenderer; import org.apache.myfaces.custom.fileupload.HtmlInputFileUpload; import org.apache.myfaces.custom.fileupload.UploadedFile; import org.apache.myfaces.custom.fileupload.UploadedFileDefaultFileImpl; import org.apache.myfaces.custom.fileupload.UploadedFileDefaultMemoryImpl; import br.gov.trf2.jfes.intranet.fileupload.MultipartActionRequestFileItemFactory; public class CustomHtmlFileUploadRenderer extends HtmlFileUploadRenderer { @Override public void decode(FacesContext facesContext, UIComponent uiComponent) { System.out.println(decoding); super.decode(facesContext, uiComponent); if(facesContext.getExternalContext().getRequest() instanceof MultipartActionRequest){ MultipartActionRequest mpReq = (MultipartActionRequest) facesContext.getExternalContext().getRequest(); String paramName = uiComponent.getClientId(facesContext); PartOnDisk p = (PartOnDisk) mpReq.get(paramName); FileItem fileItem = null; if(p!=null){ MultipartActionRequestFileItemFactory factory = new MultipartActionRequestFileItemFactory(mpReq); fileItem = (FileItem) factory.createItem(paramName, p.getMimeType(), true, p.getFile().getAbsolutePath()); } if (fileItem != null) { try{ UploadedFile upFile; upFile = new UploadedFileDefaultFileImpl( fileItem ); ((HtmlInputFileUpload)uiComponent).setSubmittedValue(upFile); ((HtmlInputFileUpload)uiComponent).setValid(true); }catch(IOException ioe){ ioe.printStackTrace(); } } } } }
[ANNOUNCE] Inside Facelets - Part 3: Templating and Re-Use
Hello, I'm pleased announce the third installment in the series on Facelets: Inside Facelets - Part 3: Templating and Re-Use. Here's an excerpt: For any view technology to succeed, it must have some aspect of templating and re-use that's both easy to use and understand. Facelets technology solves this issue in a way that is ideal for JavaServer Faces while keeping that sense of familiarity to traditional, tag-based user interfaces. This article covers the possible ways to increase re-use and simplify maintenance on your JavaServer Faces project. When people first start creating web pages, they often find themselves repeating content across multiple files. As a developer, this can be frustrating when your object-oriented tendencies kick in. Wouldn't it be nice to simply maintain that content in one spot? You can find the article here: http://www.jsfcentral.com/articles/facelets_3.html. ~~~ Kito D. Mann ([EMAIL PROTECTED]) Principal Consultant, Virtua, Inc. (http://www.virtua.com) Author, JavaServer Faces in Action http://www.JSFCentral.com - JavaServer Faces FAQ, news, and info
AW: AW: AW: AW: Panel Grid custom component
Thanks, but only formatting some components as headers is not sufficient in my case, because the HTML output needs to contain structural header elements to comply to accessibility requirements... Regards, Matthias -Ursprüngliche Nachricht- Von: [EMAIL PROTECTED] [mailto:[EMAIL PROTECTED] Auftrag von Volker Weber Gesendet: Freitag, 3. Februar 2006 18:36 An: MyFaces Discussion Betreff: Re: AW: AW: AW: Panel Grid custom component Hi, You can add as many 'header' components as you need (ie number of columns) as the first children, and use css to format them visualy as headers. Regards, Volker Matthias Kahlau wrote: Hi Volker, as I read in Bergsten's JSF book, JSF distinguishes between a table header facet and column header facets. - table header facet: rendered as one th element (with a colspan attribute set to the number of children) within a tr element - column header facets: rendered as th elements within a separate tr element - a thead element encloses both header tr elements Looks like the column header facets are what I searched for, and the facet elements are used as children of the column elements. But columns are not explicitely used with a panelGrid... and column header facets are not supported, as you already mentioned: according to the sun spec this is not possible for h:panelGrid: http://java.sun.com/j2ee/javaserverfaces/1.1_01/docs/tlddocs/h/ panelGrid.h tml Is there any way out when programmatically creating the UI? Maybe I can use a HtmlDataTable, but I don't know if this is possible because I don't have a simple list of objects to iterate over. I need to add a HtmlOutputText component in the first column (it's value may be fetched from an object of the data set) and radiobuttons (with spread layout) in the remaining columns. Regards, Matthias -Ursprüngliche Nachricht- Von: [EMAIL PROTECTED] [mailto:[EMAIL PROTECTED] Auftrag von Matthias Kahlau Gesendet: Freitag, 3. Februar 2006 16:24 An: MyFaces Discussion Betreff: AW: AW: AW: Panel Grid custom component Ok, but with a dataTable, there's a similar problem. Both HtmlDataTable and HtmlPanelGrid are subclasses of UIComponentBase, and facet related methods are defined in this superclass (e. g. getFacets()). UIData does additionally provide convenience methods for setting the header and the footer, as you can read in the API doc of UIData: public void setHeader(javax.faces.component.UIComponent header) Set the header facet of this component. A convenience method for getFacets().put(header, header). http://java.sun.com/j2ee/javaserverfaces/1.1_01/docs/api/javax/fac es/compone nt/UIData.html#setHeader(javax.faces.component.UIComponent) That looks to me like the facet thing of HtmlPanelGrid and HtmlDataTable is the same... Regards, Matthias -Ursprüngliche Nachricht- Von: [EMAIL PROTECTED] [mailto:[EMAIL PROTECTED] Auftrag von Volker Weber Gesendet: Freitag, 3. Februar 2006 16:04 An: MyFaces Discussion Betreff: Re: AW: AW: Panel Grid custom component Hi, the masterDetail example uses dataTable not panelGrid. Matthias Kahlau wrote: Thanks Volker, you can take a look at the following example: http://www.irian.at/myfaces/masterDetail.jsf When you look at the source code, you can see that the f:facet name=header ... /f:facet element is used in more than one column. Regards, Matthias -Ursprüngliche Nachricht- Von: [EMAIL PROTECTED] [mailto:[EMAIL PROTECTED] Auftrag von Volker Weber Gesendet: Freitag, 3. Februar 2006 13:03 An: MyFaces Discussion Betreff: Re: AW: Panel Grid custom component Hi Matthias, no i don't know. according to the sun spec this is not possible for h:panelGrid: http://java.sun.com/j2ee/javaserverfaces/1.1_01/docs/tlddocs/h/pan elGrid.html and i don't find any hint to such an addition in the tomahawk version at: http://myfaces.apache.org/tlddoc/tomahawk/t/panelGrid.html But if you point me to a working example, and i can take a look at the jsp sources i can figure out how to build it programatically. Regards Volker Matthias Kahlau wrote: Hi Volker, do you know how to programmatically add a table header to the HtmlPanelGrid for each column? Regards, Matthias -- Don't answer to From: address! Mail to this account are droped if not recieved via mailinglist. To contact me direct create the mail address by concatenating my forename to my senders domain. -- Don't answer to From: address! Mail to this account are droped if not recieved via mailinglist. To contact me direct create the mail address by concatenating my forename to my senders domain. -- Don't answer to From: address! Mail to this account are droped if not recieved via mailinglist. To contact me direct create the mail address by
Re: JSF Chart Creator and JSF Client Side Validators
Hi Travis,I'm glad that you appreciate the component. If you are using JSF in your project, this component should be a good choice rather than a JSP solution.Cagatay Civici, On 2/3/06, Travis Reeder [EMAIL PROTECTED] wrote: I just tried out your charting library with the sample pie chart and managed to work together a bar chart too. Nice work! You've made it very simple. We currently use the cewolf jsp taglib for jfreechart mixed with JSF at ecommStats.com, but this should make our lives much easier. TravisOn 1/2/06, Cagatay Civici [EMAIL PROTECTED] wrote:Hi,I have created a series of free components for JSF. All I want is to share them with you. JSF Chart Creator This component is used for creating charts in JSF applications, there are currently 27 types of charts supported. Component's feature include fully customizable charts, 3d charts, anti-aliasing and etc. JSF Client Side Validation ComponentsJSF has no built in support for client side validation, these component series include; - Required Field Validator- Compare Validator- Range Validator- Regular _expression_ Validator- Validator SummaryThis JSF client validators also has support for field highlighting, customizable error messages and etc. These two component series may help you in your development, they are completely free and open source. These components are currently referenced by jsftutorials.com, jsfcentral.com, jfree.org, javatoolbox.com.You can have a detailed look and have free download at; http://www.jroller.com/page/cagataycivici?entry=jsf_chart_creator http://www.jroller.com/page/cagataycivici?entry=jsf_client_side_validators Regards,Cagatay Civici
Re: AW: AW: AW: Panel Grid custom component
Ok, I tell you how it would work - maybe you want to try to provide that to MyFaces: You'll need to create a new, custom tag and component (let's call it t:header) which you can add to the (t:)panel-grid. (t:header cause it will be used in t:panelGrid, and so we cannot add it to the sandbox. We'd do it with a facet, but facets accept only one child, and that's not enough in this case ;) regards, Martin On 2/3/06, Matthias Kahlau [EMAIL PROTECTED] wrote: Thanks, but only formatting some components as headers is not sufficient in my case, because the HTML output needs to contain structural header elements to comply to accessibility requirements... Regards, Matthias -Ursprüngliche Nachricht- Von: [EMAIL PROTECTED] [mailto:[EMAIL PROTECTED] Auftrag von Volker Weber Gesendet: Freitag, 3. Februar 2006 18:36 An: MyFaces Discussion Betreff: Re: AW: AW: AW: Panel Grid custom component Hi, You can add as many 'header' components as you need (ie number of columns) as the first children, and use css to format them visualy as headers. Regards, Volker Matthias Kahlau wrote: Hi Volker, as I read in Bergsten's JSF book, JSF distinguishes between a table header facet and column header facets. - table header facet: rendered as one th element (with a colspan attribute set to the number of children) within a tr element - column header facets: rendered as th elements within a separate tr element - a thead element encloses both header tr elements Looks like the column header facets are what I searched for, and the facet elements are used as children of the column elements. But columns are not explicitely used with a panelGrid... and column header facets are not supported, as you already mentioned: according to the sun spec this is not possible for h:panelGrid: http://java.sun.com/j2ee/javaserverfaces/1.1_01/docs/tlddocs/h/ panelGrid.h tml Is there any way out when programmatically creating the UI? Maybe I can use a HtmlDataTable, but I don't know if this is possible because I don't have a simple list of objects to iterate over. I need to add a HtmlOutputText component in the first column (it's value may be fetched from an object of the data set) and radiobuttons (with spread layout) in the remaining columns. Regards, Matthias -Ursprüngliche Nachricht- Von: [EMAIL PROTECTED] [mailto:[EMAIL PROTECTED] Auftrag von Matthias Kahlau Gesendet: Freitag, 3. Februar 2006 16:24 An: MyFaces Discussion Betreff: AW: AW: AW: Panel Grid custom component Ok, but with a dataTable, there's a similar problem. Both HtmlDataTable and HtmlPanelGrid are subclasses of UIComponentBase, and facet related methods are defined in this superclass (e. g. getFacets()). UIData does additionally provide convenience methods for setting the header and the footer, as you can read in the API doc of UIData: public void setHeader(javax.faces.component.UIComponent header) Set the header facet of this component. A convenience method for getFacets().put(header, header). http://java.sun.com/j2ee/javaserverfaces/1.1_01/docs/api/javax/fac es/compone nt/UIData.html#setHeader(javax.faces.component.UIComponent) That looks to me like the facet thing of HtmlPanelGrid and HtmlDataTable is the same... Regards, Matthias -Ursprüngliche Nachricht- Von: [EMAIL PROTECTED] [mailto:[EMAIL PROTECTED] Auftrag von Volker Weber Gesendet: Freitag, 3. Februar 2006 16:04 An: MyFaces Discussion Betreff: Re: AW: AW: Panel Grid custom component Hi, the masterDetail example uses dataTable not panelGrid. Matthias Kahlau wrote: Thanks Volker, you can take a look at the following example: http://www.irian.at/myfaces/masterDetail.jsf When you look at the source code, you can see that the f:facet name=header ... /f:facet element is used in more than one column. Regards, Matthias -Ursprüngliche Nachricht- Von: [EMAIL PROTECTED] [mailto:[EMAIL PROTECTED] Auftrag von Volker Weber Gesendet: Freitag, 3. Februar 2006 13:03 An: MyFaces Discussion Betreff: Re: AW: Panel Grid custom component Hi Matthias, no i don't know. according to the sun spec this is not possible for h:panelGrid: http://java.sun.com/j2ee/javaserverfaces/1.1_01/docs/tlddocs/h/pan elGrid.html and i don't find any hint to such an addition in the tomahawk version at: http://myfaces.apache.org/tlddoc/tomahawk/t/panelGrid.html But if you point me to a working example, and i can take a look at the jsp sources i can figure out how to build it programatically. Regards Volker Matthias Kahlau wrote: Hi Volker, do you know how to programmatically add a table
AW: AW: AW: AW: Panel Grid custom component
Thanks Martin, this sounds good and helpful, but I'm pressed for time because of working for my diploma thesis in the context of JSF ;) I think I have to try the HtmlDataTable... Regards, Matthias -Ursprüngliche Nachricht- Von: [EMAIL PROTECTED] [mailto:[EMAIL PROTECTED] Auftrag von Martin Marinschek Gesendet: Freitag, 3. Februar 2006 19:43 An: MyFaces Discussion Betreff: Re: AW: AW: AW: Panel Grid custom component Ok, I tell you how it would work - maybe you want to try to provide that to MyFaces: You'll need to create a new, custom tag and component (let's call it t:header) which you can add to the (t:)panel-grid. (t:header cause it will be used in t:panelGrid, and so we cannot add it to the sandbox. We'd do it with a facet, but facets accept only one child, and that's not enough in this case ;) regards, Martin On 2/3/06, Matthias Kahlau [EMAIL PROTECTED] wrote: Thanks, but only formatting some components as headers is not sufficient in my case, because the HTML output needs to contain structural header elements to comply to accessibility requirements... Regards, Matthias -Ursprüngliche Nachricht- Von: [EMAIL PROTECTED] [mailto:[EMAIL PROTECTED] Auftrag von Volker Weber Gesendet: Freitag, 3. Februar 2006 18:36 An: MyFaces Discussion Betreff: Re: AW: AW: AW: Panel Grid custom component Hi, You can add as many 'header' components as you need (ie number of columns) as the first children, and use css to format them visualy as headers. Regards, Volker Matthias Kahlau wrote: Hi Volker, as I read in Bergsten's JSF book, JSF distinguishes between a table header facet and column header facets. - table header facet: rendered as one th element (with a colspan attribute set to the number of children) within a tr element - column header facets: rendered as th elements within a separate tr element - a thead element encloses both header tr elements Looks like the column header facets are what I searched for, and the facet elements are used as children of the column elements. But columns are not explicitely used with a panelGrid... and column header facets are not supported, as you already mentioned: according to the sun spec this is not possible for h:panelGrid: http://java.sun.com/j2ee/javaserverfaces/1.1_01/docs/tlddocs/h/ panelGrid.h tml Is there any way out when programmatically creating the UI? Maybe I can use a HtmlDataTable, but I don't know if this is possible because I don't have a simple list of objects to iterate over. I need to add a HtmlOutputText component in the first column (it's value may be fetched from an object of the data set) and radiobuttons (with spread layout) in the remaining columns. Regards, Matthias -Ursprüngliche Nachricht- Von: [EMAIL PROTECTED] [mailto:[EMAIL PROTECTED] Auftrag von Matthias Kahlau Gesendet: Freitag, 3. Februar 2006 16:24 An: MyFaces Discussion Betreff: AW: AW: AW: Panel Grid custom component Ok, but with a dataTable, there's a similar problem. Both HtmlDataTable and HtmlPanelGrid are subclasses of UIComponentBase, and facet related methods are defined in this superclass (e. g. getFacets()). UIData does additionally provide convenience methods for setting the header and the footer, as you can read in the API doc of UIData: public void setHeader(javax.faces.component.UIComponent header) Set the header facet of this component. A convenience method for getFacets().put(header, header). http://java.sun.com/j2ee/javaserverfaces/1.1_01/docs/api/javax/fac es/compone nt/UIData.html#setHeader(javax.faces.component.UIComponent) That looks to me like the facet thing of HtmlPanelGrid and HtmlDataTable is the same... Regards, Matthias -Ursprüngliche Nachricht- Von: [EMAIL PROTECTED] [mailto:[EMAIL PROTECTED] Auftrag von Volker Weber Gesendet: Freitag, 3. Februar 2006 16:04 An: MyFaces Discussion Betreff: Re: AW: AW: Panel Grid custom component Hi, the masterDetail example uses dataTable not panelGrid. Matthias Kahlau wrote: Thanks Volker, you can take a look at the following example: http://www.irian.at/myfaces/masterDetail.jsf When you look at the source code, you can see that the f:facet name=header ... /f:facet element is used in more than one column. Regards, Matthias -Ursprüngliche Nachricht- Von: [EMAIL PROTECTED] [mailto:[EMAIL PROTECTED] Auftrag von Volker Weber Gesendet: Freitag, 3. Februar 2006 13:03 An: MyFaces Discussion Betreff: Re: AW: Panel Grid
Sandbox jar causes application startup problem
I have a JSF application I built using Sun JSF RI 1.1. I needed the file upload component and dropped tomahawk.jar into my application lib directory and magically I could avail of that functionality. I now need the s:selectManyPicklist component and so dropped an additional jar file: tomahawk-sandbox-1.1.2-SNAPSHOT.jar into my application. But when I do so the application gets the following startup error. What gives? TIA. Jan 31, 2006 4:11:42 PM org.apache.coyote.http11.Http11Protocol init INFO: Initializing Coyote HTTP/1.1 on http-8080 Jan 31, 2006 4:11:42 PM org.apache.catalina.startup.Catalina load INFO: Initialization processed in 688 ms Jan 31, 2006 4:11:43 PM org.apache.catalina.core.StandardService start INFO: Starting service Catalina Jan 31, 2006 4:11:43 PM org.apache.catalina.core.StandardEngine start INFO: Starting Servlet Engine: Apache Tomcat/5.5.7 Jan 31, 2006 4:11:43 PM org.apache.catalina.core.StandardHost start INFO: XML validation disabled - Unable to find config file. Creating new servlet engine config file: /WEB-INF /server-config.wsdd - Unable to find required classes (javax.activation.DataHandler and javax.mail.i nternet.MimeMultipart). Attachment support is disabled. Jan 31, 2006 4:11:44 PM org.apache.catalina.core.ApplicationContext log INFO: org.apache.webapp.balancer.BalancerFilter: init(): ruleChain: [org.apache. webapp.balancer.RuleChain: [org.apache.webapp.balancer.rules.URLStringMatchRule: Target string: News / Redirect URL: http://www.cnn.com], [org.apache.webapp.bal ancer.rules.RequestParameterRule: Target param name: paramName / Target param va lue: paramValue / Redirect URL: http://www.yahoo.com], [org.apache.webapp.balanc er.rules.AcceptEverythingRule: Redirect URL: http://jakarta.apache.org]] Jan 31, 2006 4:11:45 PM com.sun.faces.config.rules.ConverterRule end WARNING: [ConverterRule]{faces-config/converter} Merge(null,java.math.BigDecimal ) Jan 31, 2006 4:11:45 PM com.sun.faces.config.rules.ConverterRule end WARNING: [ConverterRule]{faces-config/converter} Merge(null,java.math.BigInteger ) Jan 31, 2006 4:11:45 PM com.sun.faces.config.rules.NavigationRuleRule end WARNING: [NavigationRuleRule]{faces-config/navigation-rule} Merge(*) Jan 31, 2006 4:11:45 PM org.apache.catalina.core.ApplicationContext log SEVERE: Exception sending context initialized event to listener instance of clas s com.sun.faces.config.ConfigureListener java.lang.NoClassDefFoundError: org/apache/myfaces/application/ComponentNotFound Exception at java.lang.Class.getDeclaredConstructors0(Native Method) at java.lang.Class.privateGetDeclaredConstructors(Class.java:2328) at java.lang.Class.getConstructor0(Class.java:2640) at java.lang.Class.newInstance0(Class.java:321) at java.lang.Class.newInstance(Class.java:303) at com.sun.faces.config.ConfigureListener.configure(ConfigureListener.ja va:711) at com.sun.faces.config.ConfigureListener.configure(ConfigureListener.ja va:398) at com.sun.faces.config.ConfigureListener.contextInitialized(ConfigureLi stener.java:328) at org.apache.catalina.core.StandardContext.listenerStart(StandardContex t.java:3637) at org.apache.catalina.core.StandardContext.start(StandardContext.java:4 073) at org.apache.catalina.core.ContainerBase.addChildInternal(ContainerBase .java:759) at org.apache.catalina.core.ContainerBase.addChild(ContainerBase.java:73 9) at org.apache.catalina.core.StandardHost.addChild(StandardHost.java:524) at org.apache.catalina.startup.HostConfig.deployDirectory(HostConfig.jav a:909) at org.apache.catalina.startup.HostConfig.deployDirectories(HostConfig.j ava:872) at org.apache.catalina.startup.HostConfig.deployApps(HostConfig.java:474 ) at org.apache.catalina.startup.HostConfig.start(HostConfig.java:1106) at org.apache.catalina.startup.HostConfig.lifecycleEvent(HostConfig.java :310) at org.apache.catalina.util.LifecycleSupport.fireLifecycleEvent(Lifecycl eSupport.java:119) at org.apache.catalina.core.ContainerBase.start(ContainerBase.java:1019) at org.apache.catalina.core.StandardHost.start(StandardHost.java:718) at org.apache.catalina.core.ContainerBase.start(ContainerBase.java:1011) at org.apache.catalina.core.StandardEngine.start(StandardEngine.java:440 ) at org.apache.catalina.core.StandardService.start(StandardService.java:4 50) at org.apache.catalina.core.StandardServer.start(StandardServer.java:683 ) at org.apache.catalina.startup.Catalina.start(Catalina.java:537) at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method) at sun.reflect.NativeMethodAccessorImpl.invoke(NativeMethodAccessorImpl. java:39) at sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAcces sorImpl.java:25) at java.lang.reflect.Method.invoke(Method.java:585) at
Scheduled release for 1.1.2 yet?
There are a couple of major issues for us here with the JSCookMenu and the action method binding. I see it was fixed in the nightly build but we'd prefer to use the release if possible. Any ideas when it might be ready for RC, etc? Thanks! int myName() { cout -Matt Fury \n; return 0; }
Re: Scheduled release for 1.1.2 yet?
I've bugged Manfred today about that... I'd really love to have a release out pretty soon, and I've promised one by the end of february to a client. But there remains a lot to do, so I hope we'll be able to do it ;) regards, Martin On 2/3/06, Matt Fury [EMAIL PROTECTED] wrote: There are a couple of major issues for us here with the JSCookMenu and the action method binding. I see it was fixed in the nightly build but we'd prefer to use the release if possible. Any ideas when it might be ready for RC, etc? Thanks! int myName() { cout -Matt Fury \n; return 0; } -- http://www.irian.at Your JSF powerhouse - JSF Consulting, Development and Courses in English and German Professional Support for Apache MyFaces
Re: Scheduled release for 1.1.2 yet?
Hey Martin, Thanks for the quick response. We'll look forward to it! -Matt --- Martin Marinschek [EMAIL PROTECTED] wrote: I've bugged Manfred today about that... I'd really love to have a release out pretty soon, and I've promised one by the end of february to a client. But there remains a lot to do, so I hope we'll be able to do it ;) regards, Martin On 2/3/06, Matt Fury [EMAIL PROTECTED] wrote: There are a couple of major issues for us here with the JSCookMenu and the action method binding. I see it was fixed in the nightly build but we'd prefer to use the release if possible. Any ideas when it might be ready for RC, etc? Thanks! int myName() { cout -Matt Fury \n; return 0; } -- http://www.irian.at Your JSF powerhouse - JSF Consulting, Development and Courses in English and German Professional Support for Apache MyFaces
Re: JSF+Hibernate
session.merge is not very smart. Hibernate will update all properties and association table. For association, delete all related rows, and thenadd, even if the association(such as colllection)is not changed. Is there a better way other than merge?Thanks.Werner Punz [EMAIL PROTECTED] wrote: Mario Ivankovits schrieb: Hi! session.lock(object, LockMode.NONE) This might also fail if the object already exists in the current session, no? You can safely reattach the object using object = session.merge(object) Though, you really should discard the old object then and work further with the new one. Just to add additional comments.Session merge is a convenience method introduced in Hiberante 3.1 (andEJB3) due to the fact that the having an object coming in over sessionboundaries and doing a simple save or update simply caused to manyproblems (constantly clashes with objects already loaded by predecessingqueries)Thus session.merge und session.persist were introduced. Relax. Yahoo! Mail virus scanning helps detect nasty viruses!
Re: Sandbox jar causes application startup problem
Something in the sandbox triggers a call into activation.jar and javamail.jar (very likely due to a call into the RI which then triggers both) both can be obtained from the Sun site. Note that the sandbox is a testing ground for new components and ideas so things like that can happen due to the fact that the components often are not tested very strongly (see the sandbox sort of as a Tomahawk unstable) Neeraj Vora schrieb: I have a JSF application I built using Sun JSF RI 1.1. I needed the file upload component and dropped tomahawk.jar into my application lib directory and magically I could avail of that functionality. I now need the s:selectManyPicklist component and so dropped an additional jar file: tomahawk-sandbox-1.1.2-SNAPSHOT.jar into my application. But when I do so the application gets the following startup error. What gives? TIA. Jan 31, 2006 4:11:42 PM org.apache.coyote.http11.Http11Protocol init INFO: Initializing Coyote HTTP/1.1 on http-8080 Jan 31, 2006 4:11:42 PM org.apache.catalina.startup.Catalina load INFO: Initialization processed in 688 ms Jan 31, 2006 4:11:43 PM org.apache.catalina.core.StandardService start INFO: Starting service Catalina Jan 31, 2006 4:11:43 PM org.apache.catalina.core.StandardEngine start INFO: Starting Servlet Engine: Apache Tomcat/5.5.7 Jan 31, 2006 4:11:43 PM org.apache.catalina.core.StandardHost start INFO: XML validation disabled - Unable to find config file. Creating new servlet engine config file: /WEB-INF /server-config.wsdd - Unable to find required classes (javax.activation.DataHandler and javax.mail.i nternet.MimeMultipart). Attachment support is disabled. Jan 31, 2006 4:11:44 PM org.apache.catalina.core.ApplicationContext log INFO: org.apache.webapp.balancer.BalancerFilter: init(): ruleChain: [org.apache. webapp.balancer.RuleChain: [org.apache.webapp.balancer.rules.URLStringMatchRule: Target string: News / Redirect URL: http://www.cnn.com], [org.apache.webapp.bal ancer.rules.RequestParameterRule: Target param name: paramName / Target param va lue: paramValue / Redirect URL: http://www.yahoo.com], [org.apache.webapp.balanc er.rules.AcceptEverythingRule: Redirect URL: http://jakarta.apache.org]] Jan 31, 2006 4:11:45 PM com.sun.faces.config.rules.ConverterRule end WARNING: [ConverterRule]{faces-config/converter} Merge(null,java.math.BigDecimal ) Jan 31, 2006 4:11:45 PM com.sun.faces.config.rules.ConverterRule end WARNING: [ConverterRule]{faces-config/converter} Merge(null,java.math.BigInteger ) Jan 31, 2006 4:11:45 PM com.sun.faces.config.rules.NavigationRuleRule end WARNING: [NavigationRuleRule]{faces-config/navigation-rule} Merge(*) Jan 31, 2006 4:11:45 PM org.apache.catalina.core.ApplicationContext log SEVERE: Exception sending context initialized event to listener instance of clas s com.sun.faces.config.ConfigureListener java.lang.NoClassDefFoundError: org/apache/myfaces/application/ComponentNotFound Exception at java.lang.Class.getDeclaredConstructors0(Native Method) at java.lang.Class.privateGetDeclaredConstructors(Class.java:2328) at java.lang.Class.getConstructor0(Class.java:2640) at java.lang.Class.newInstance0(Class.java:321) at java.lang.Class.newInstance(Class.java:303) at com.sun.faces.config.ConfigureListener.configure(ConfigureListener.ja va:711) at com.sun.faces.config.ConfigureListener.configure(ConfigureListener.ja va:398) at com.sun.faces.config.ConfigureListener.contextInitialized(ConfigureLi stener.java:328) at org.apache.catalina.core.StandardContext.listenerStart(StandardContex t.java:3637) at org.apache.catalina.core.StandardContext.start(StandardContext.java:4 073) at org.apache.catalina.core.ContainerBase.addChildInternal(ContainerBase .java:759) at org.apache.catalina.core.ContainerBase.addChild(ContainerBase.java:73 9) at org.apache.catalina.core.StandardHost.addChild(StandardHost.java:524) at org.apache.catalina.startup.HostConfig.deployDirectory(HostConfig.jav a:909) at org.apache.catalina.startup.HostConfig.deployDirectories(HostConfig.j ava:872) at org.apache.catalina.startup.HostConfig.deployApps(HostConfig.java:474 ) at org.apache.catalina.startup.HostConfig.start(HostConfig.java:1106) at org.apache.catalina.startup.HostConfig.lifecycleEvent(HostConfig.java :310) at org.apache.catalina.util.LifecycleSupport.fireLifecycleEvent(Lifecycl eSupport.java:119) at org.apache.catalina.core.ContainerBase.start(ContainerBase.java:1019) at org.apache.catalina.core.StandardHost.start(StandardHost.java:718) at org.apache.catalina.core.ContainerBase.start(ContainerBase.java:1011) at org.apache.catalina.core.StandardEngine.start(StandardEngine.java:440 ) at org.apache.catalina.core.StandardService.start(StandardService.java:4 50) at
Re: Sandbox jar causes application startup problem
Thanks for the reply. I do have both activation.jar and mail.jar in the lib folder. I understand about the nature and purpose of sandbox but needed the additional component. Bruno was kind enough to mail me the sandbox snapshot jar so I didn't have to spend time just for building one, but unfortunately I can't get it to work and without going into source files how do I tell what's missing? From: Werner Punz [EMAIL PROTECTED] Reply-To: MyFaces Discussion users@myfaces.apache.org To: users@myfaces.apache.org Subject: Re: Sandbox jar causes application startup problem Date: Fri, 03 Feb 2006 23:51:54 +0100 Something in the sandbox triggers a call into activation.jar and javamail.jar (very likely due to a call into the RI which then triggers both) both can be obtained from the Sun site. Note that the sandbox is a testing ground for new components and ideas so things like that can happen due to the fact that the components often are not tested very strongly (see the sandbox sort of as a Tomahawk unstable) Neeraj Vora schrieb: I have a JSF application I built using Sun JSF RI 1.1. I needed the file upload component and dropped tomahawk.jar into my application lib directory and magically I could avail of that functionality. I now need the s:selectManyPicklist component and so dropped an additional jar file: tomahawk-sandbox-1.1.2-SNAPSHOT.jar into my application. But when I do so the application gets the following startup error. What gives? TIA. Jan 31, 2006 4:11:42 PM org.apache.coyote.http11.Http11Protocol init INFO: Initializing Coyote HTTP/1.1 on http-8080 Jan 31, 2006 4:11:42 PM org.apache.catalina.startup.Catalina load INFO: Initialization processed in 688 ms Jan 31, 2006 4:11:43 PM org.apache.catalina.core.StandardService start INFO: Starting service Catalina Jan 31, 2006 4:11:43 PM org.apache.catalina.core.StandardEngine start INFO: Starting Servlet Engine: Apache Tomcat/5.5.7 Jan 31, 2006 4:11:43 PM org.apache.catalina.core.StandardHost start INFO: XML validation disabled - Unable to find config file. Creating new servlet engine config file: /WEB-INF /server-config.wsdd - Unable to find required classes (javax.activation.DataHandler and javax.mail.i nternet.MimeMultipart). Attachment support is disabled. Jan 31, 2006 4:11:44 PM org.apache.catalina.core.ApplicationContext log INFO: org.apache.webapp.balancer.BalancerFilter: init(): ruleChain: [org.apache. webapp.balancer.RuleChain: [org.apache.webapp.balancer.rules.URLStringMatchRule: Target string: News / Redirect URL: http://www.cnn.com], [org.apache.webapp.bal ancer.rules.RequestParameterRule: Target param name: paramName / Target param va lue: paramValue / Redirect URL: http://www.yahoo.com], [org.apache.webapp.balanc er.rules.AcceptEverythingRule: Redirect URL: http://jakarta.apache.org]] Jan 31, 2006 4:11:45 PM com.sun.faces.config.rules.ConverterRule end WARNING: [ConverterRule]{faces-config/converter} Merge(null,java.math.BigDecimal ) Jan 31, 2006 4:11:45 PM com.sun.faces.config.rules.ConverterRule end WARNING: [ConverterRule]{faces-config/converter} Merge(null,java.math.BigInteger ) Jan 31, 2006 4:11:45 PM com.sun.faces.config.rules.NavigationRuleRule end WARNING: [NavigationRuleRule]{faces-config/navigation-rule} Merge(*) Jan 31, 2006 4:11:45 PM org.apache.catalina.core.ApplicationContext log SEVERE: Exception sending context initialized event to listener instance of clas s com.sun.faces.config.ConfigureListener java.lang.NoClassDefFoundError: org/apache/myfaces/application/ComponentNotFound Exception at java.lang.Class.getDeclaredConstructors0(Native Method) at java.lang.Class.privateGetDeclaredConstructors(Class.java:2328) at java.lang.Class.getConstructor0(Class.java:2640) at java.lang.Class.newInstance0(Class.java:321) at java.lang.Class.newInstance(Class.java:303) at com.sun.faces.config.ConfigureListener.configure(ConfigureListener.ja va:711) at com.sun.faces.config.ConfigureListener.configure(ConfigureListener.ja va:398) at com.sun.faces.config.ConfigureListener.contextInitialized(ConfigureLi stener.java:328) at org.apache.catalina.core.StandardContext.listenerStart(StandardContex t.java:3637) at org.apache.catalina.core.StandardContext.start(StandardContext.java:4 073) at org.apache.catalina.core.ContainerBase.addChildInternal(ContainerBase .java:759) at org.apache.catalina.core.ContainerBase.addChild(ContainerBase.java:73 9) at org.apache.catalina.core.StandardHost.addChild(StandardHost.java:524) at org.apache.catalina.startup.HostConfig.deployDirectory(HostConfig.jav a:909) at org.apache.catalina.startup.HostConfig.deployDirectories(HostConfig.j ava:872) at org.apache.catalina.startup.HostConfig.deployApps(HostConfig.java:474 ) at org.apache.catalina.startup.HostConfig.start(HostConfig.java:1106) at
RE: Working with large tables
t:dataTable id=events value=#{eventDataList.dataModel} var=event rows=#{eventDataList.recordsPerPage} preserveDataModel=false forceIdIndexFormula=#{event.eventId} renderedIfEmpty=true rowIndexVar=rIndex style=width:100%; is an example of a DataTable in the JSP that using the WIKI method of large data. The Key is the value is a getter that returns the DataModel from the WIKI -Original Message- From: Michael Huber [mailto:[EMAIL PROTECTED] Sent: Thursday, February 02, 2006 7:38 PM To: users@myfaces.apache.org Subject: Working with large tables Hi, I am trying to implement the example from the myfaces wiki Working with large tables http://wiki.apache.org/myfaces/WorkingWithLargeTables The problem is, I really don't know, what the jsp has to look like. Can somebody help me? The wiki says, the jsp pages are then trivial, but I am trying to get this working for a week now... Thanks in advance Michael NOTICE: This message, including all attachments transmitted with it, is for the use of the addressee only. It may contain proprietary, confidential and/or legally privileged information belonging to Litle Co. No confidentiality or privilege is waived or lost by any mistransmission. If you are not the intended recipient, you must not, directly or indirectly, use, disclose, distribute, print or copy any part of this message. If you believe you have received this message in error, please delete it and all copies of it from your system and notify the sender immediately by reply e-mail. Thank you.
need help - t:savestate not saving datamodel values
Im having trouble getting t:savestate to save the datamodel contents: 1. Master View page snippet search page displays results in a datatable f:view // searchisp bean is backing bean in request scope; dm_searchresults is datamodel property on bean t:saveState id=savsearchispbean value=#{searchispbean.dm_searchresults} / // search form h:formh:commandButton action="" value=Search //h:form // display search results in data table h:form t:dataTable id=data value=#{searchispbean.dm_searchresults} preserveDataModel=false .. // when user clicks item, they link to a detail page t:commandLink action="" immediate=true 2. Detail View page displays details for one of the items from the datatable. The issue is that when I link back to the original Master page, the datatable is empty although I have used t:saveState? // return to search page in faces-config this takes user back to master view page above h:commandButton action=search value=Return to Search / Since the backing bean is in the request scope, and I am using t:savestate to save the datamodel property of that backing bean, is there anything I need to do on the backing bean to prevent re-initialization of the datamodel property (I dont re-initalize it in the constructor though)? This is basically a shopping cart application (master view are products, detail view adds item to shopping cart, and I am trying to return back to the master view of items) are there any examples available I can look at. Note Im trying to keep the backing bean in the request scope to preserve memory. thanks
Collision of session object and h:dataTable internal variable
Hi there,I'm having a problem of the wrong bean being resolved on an h:dataTable... I'm building a JSF application to augment a legacy JSP application (in other words, there are still a lot of plain-jsp pages still left). In the h:dataTable I have the following statement: h:dataTable var=attribute value=#{productTypeBrowse.selectedProductType.attributes} h:column rendered=#{attribute.hasProperties}...I tested it all separately and it worked fine. However, when I integrated with the previous system ( i.e., put it into QA and the QA navigated through the legacy pages), I got an error message saying that it could not find the method hasProperties in the bean. When I paid more attention to the error message, it was looking for the bean in a legacy data type. I then went through the legacy code and found the following call:pageContext.setAttribute( attribute, oldObject, PageContext.SESSION_SCOPE);And what it looks like is that when it is running, instead of resolving to the dataTable-set local variable it is resolving to the session object. Is this an expected behavior? Is the only way of going around this to rename my dataTable variables to something that does not collide with any set session variables? Thank you,Michel
Re: t:message and summaryFormat
So, am I way off base on what the summaryFormat attribute for t:message is supposed to be? Is there another way to have per input field error messages? Rich Richard Wallace wrote: Hello all, I'm trying to use the summaryFormat attribute of the tomahawk message component with the following: h:form id=form onsubmit=return validateForm(this); h:panelGroup h:outputLabel for=textInput value=Input / h:inputText id=textInput required=true / t:message for=textInput summaryFormat=You must enter a value for {1}. If you don't, you'll be sorry! / /h:panelGroup br / h:commandButton action=doIt / /h:form According to the web site, this should display the error message Your must enter a value for Input. If you don't, you'll be sorry! Instead, I'm seeing the plain old Input: Value is required. I'm using myfaces and tomahawk 1.1.1, do I need to be using a snapshot version? Thanks, Rich
Best Way to Get Request Parameters
I have an h:outputLink tags that contains one or more f:param tags; this of course creates an html href with request parameters. I want to pick up the request parameters in the backing bean for the page referenced in the h:outputLink tag (i.e., the page the user is going to). Is getting the HttpServletRequest through the Faces external context the best way to do this? HttpServletRequest request = (HttpServletRequest)FacesContext.getCurrentInstance().getExternalContext().getRequest(); String someParameterValue = request.getParameter(Constants.SOME_PARAMETER_KEY); I have a feeling that this is not the best way. Is there some methodology in JSF that allows me to hide the HttpServletRequest? Any suggestions? Thx. Mike __ Do You Yahoo!? Tired of spam? Yahoo! Mail has the best spam protection around http://mail.yahoo.com