Re: [Tobago] valueChangeListener not called
Hello Bernd, thank you for your hints. I implemented the converter class IntegerConverter (hopefully I did choose the right Interface (javax.faces.convert.Converter) My IDE already tells me that converter-id and converter-class are not allowed here. Thus the converter does not work in Tomcat. I pasted the error output from Tomcat further down. A verbatim tag ist suggested. However that did not help either. You also mentioned a message tag (tc:messages /). Can I place it anywhere in the file? What is wrong with my converter tag? tc:selectOneChoice value=#{myBean.userOption} valueChangeListener=#{maintenance.changeUserSelectedStatus} id=userGroupChoice f:selectItems value=#{maintenance.userOptionItems} id=userChoiceItems/ converter converter-idcom.test.converter.IntegerConverter/converter-id converter-classcom.test.converter.IntegerConverter/converter-class /converter f:facet name=change tc:command / /f:facet /tc:selectOneChoice -- the converter class: package com.test.converter; import javax.faces.component.UIComponent; import javax.faces.context.FacesContext; import javax.faces.convert.ConverterException; import javax.faces.convert.Converter; import org.apache.log4j.Logger; public class IntegerConverter implements Converter { /** Log4j-Protokolierer */ private Logger log = Logger.getLogger(this.getClass().getName()); public Object getAsObject(FacesContext context, UIComponent component, String value) throws ConverterException { log.info(getAsObject + value); return new Integer(value); } public String getAsString(FacesContext context, UIComponent component, Object value) throws ConverterException { log.info(getAsString + value); return value.toString(); } } Tomcat output: 17.01.2007 08:48:06 BodyContent should be empty. Component with id _idJsp67 clas s org.apache.myfaces.tobago.component.UIPanel content converter converter-idcom.test.converter.IntegerConverter/converter-id converter-classcom.test.converter.IntegerConverter/converter-class /converter Please use the f:verbatim tag for nested content! Regards Clemens Hello Clemens, I think you get a Validation Error : Value is not a valid option. Can you add a message tag to your page? Please change the type of your Constants to String or add a converter to your selectOneChoice tag on the page for example f:converter converterId=org.apache.myfaces.tobago.example.reference.IntegerConverter / converter converter-idorg.apache.myfaces.tobago.example.reference.IntegerConverter/converter-id converter-classorg.apache.myfaces.tobago.example.reference.IntegerConverter/converter-class /converter public class IntegerConverter implements Converter { private static final Log LOG = LogFactory.getLog(OnOffConverter.class); public Object getAsObject(FacesContext context, UIComponent component, String value) throws ConverterException { LOG.info(getAsObject + value); return new Integer(value); } public String getAsString(FacesContext context, UIComponent component, Object value) throws ConverterException { LOG.info(getAsString + value); return value.toString(); } } Regards Bernd Clemens Sietas wrote: Hello, I have read a long thread on the valueChangeListener from November 2006 in this mailing-list. I adapted my code to the help in the tread, however, the valueChangeListener still is not called. I just subscribed to ask for further help. Here is my code: tc:loadBundle basename=overview var=overviewBundle/ layout:overview jsp:body f:view tc:form tc:panel ... ... tc:panel tc:selectOneChoice value=#{myBean.userOption} valueChangeListener=#{myBean.changeUserSelectedStatus} id=userChoice f:selectItems value=#{myBean.userOptionItems} id=userChoiceItems/ f:facet name=change tc:command / /f:facet /tc:selectOneChoice /tc:panel ... ... /tc:panel /tc:form /f:view /jsp:body /layout:overview public class ProcessChangeController { /** Log4j-Protokolierer */ private Logger log = Logger.getLogger(this.getClass().getName()); private int userOption; private static SelectItem[] userOptionItems = new SelectItem[]{ new SelectItem(new Integer(SEARCH_OPT_USER), for User), new SelectItem(new Integer(SEARCH_OPT_ADMI), for Admin)}; public int getUserOption() { return userOption; } public void setUserOption(int userOption) { this.userOption = userOption; } public void changeUserSelectedStatus(ValueChangeEvent event) { log.info(PrChgCtrl_cls::changeUserSelectedStatus(ValueChangeEvent) pressed); userOption = (Integer) userOptionItems[1].getValue();
Re: [tobago] Upgrading from 1.0.8 to 1.0.9 breaks tc:link
Hello Stefan, 1.0.9 has to many changes. May be you get a validation or conversion error. Can you send the page, please. There are some issue with the popup. I hope we sort this out with the 1.0.10 release. So far I know there is an problem with the required marker and autofill values from the browser like password field. Can you describe your case? Regards Bernd Stefan Hedtfeld wrote: Hi, when upgrading my application from tobago 1.0.8 to 1.0.9 all my tc:link ... tags fail to work. I didn't find any release notes where any issues regarding upgrading from older versions are described. I'm running on JBoss 4.0.5 with JDK 1.5.0_10 and Firefox 2.0. I also noticed that the markers rendered to signal required fields keep displayed when editing the fields (I recognised this with tx:in fields, maybe it's also true for other controls). Regards, Stefan.
Re: JSTL and JSF
well, with facelets or jsf 1.2 that can be done ;) On 1/17/07, Joost Schouten [EMAIL PROTECTED] wrote: Thanks Simon! That did the trick. And no more c:xxx/ tags for me ;-) Cheers, Joost -Original Message- From: Simon Kitching [mailto:[EMAIL PROTECTED] Sent: Wednesday, January 17, 2007 4:14 PM To: MyFaces Discussion Subject: Re: JSTL and JSF Joost Schouten wrote: Hi, I have the below code trying to print a dataTable when the backing bean found entries, or no results when none are found. But my JSTL tags don't seem to have access to my JSF backing beans. What is the best way to combine JSTL and JSF, or are the other JSF tags/attributes I should use for this purpose? My table gets printed nicely without the JSTL c:if and c:choose tags Thank you, joost h:form id=searchResults onsubmit=return validateForm(this); c:if test=#{jsp$searchResults.query!=null c:choose c:when test=${jsp$searchResults.hits 0 !-- only show the dataTable if there is a query -- t:dataTable Combining JSTL conditional tags (or loops) with JSF+JSP1.1 is a very bad idea; it can result in very weird behaviour. Instead, do: t:dataTable rendered=#{searchResults.hits 0} /t:dataTable t:outputText rendered=#{searchResults.hits == 0} value=No results/ Regards, Simon -- Matthias Wessendorf http://tinyurl.com/fmywh further stuff: blog: http://jroller.com/page/mwessendorf mail: mwessendorf-at-gmail-dot-com
Re: submittedEntry null in scheduler component
Hi, The submittedEntry property of the schedule component is there for internal use: you should be using the schedule.getModel().getSelectedEntry() in your action, actionListener or mouseListener methods. Jurgen Op maandag 08-01-2007 om 07:56 uur [tijdzone -0800], schreef anoe: Hi, i don't understand why i have access to the submitted entry from the mouse listener method in my backing bean and then trying to access the same entry from the action method returns null. ¿Any idea? Tx -- Jurgen Lust email: [EMAIL PROTECTED] blog: http://jroller.com/page/jurgenlust
Re: [Tobago] valueChangeListener not called
Sorry, the section f:converter converterId=org.apache.myfaces.tobago.example.reference.IntegerConverter / should be included in the tc:selectOneChoice This belongs to the faces-config.xml converter converter-idorg.apache.myfaces.tobago.example.reference.IntegerConverter/converter-id converter-classorg.apache.myfaces.tobago.example.reference.IntegerConverter/converter-class /converter But I revisit my testPage I forgot to set the valuebinding for the property value. In my example I don't need a Converter anymore. I would suggest you put a messages tag on your page anywhere (where it made sense) Just added my example code to the gendoc example webapp of tobago https://svn.apache.org/repos/asf/myfaces/tobago/trunk/tobago-tool/gendoc/src/main/webapp/screenshot/selectOneChoice.jsp https://svn.apache.org/repos/asf/myfaces/tobago/trunk/tobago-tool/gendoc/src/main/java/org/apache/myfaces/tobago/example/reference/Controller.java If you get a validation error from an other element you can surround the tc:selecetOneChoice with a tc:form to enable partial validation for this field. Regards Bernd Clemens Sietas wrote: Hello Bernd, thank you for your hints. I implemented the converter class IntegerConverter (hopefully I did choose the right Interface (javax.faces.convert.Converter) My IDE already tells me that converter-id and converter-class are not allowed here. Thus the converter does not work in Tomcat. I pasted the error output from Tomcat further down. A verbatim tag ist suggested. However that did not help either. You also mentioned a message tag (tc:messages /). Can I place it anywhere in the file? What is wrong with my converter tag? tc:selectOneChoice value=#{myBean.userOption} valueChangeListener=#{maintenance.changeUserSelectedStatus} id=userGroupChoice f:selectItems value=#{maintenance.userOptionItems} id=userChoiceItems/ converter converter-idcom.test.converter.IntegerConverter/converter-id converter-classcom.test.converter.IntegerConverter/converter-class /converter f:facet name=change tc:command / /f:facet /tc:selectOneChoice -- the converter class: package com.test.converter; import javax.faces.component.UIComponent; import javax.faces.context.FacesContext; import javax.faces.convert.ConverterException; import javax.faces.convert.Converter; import org.apache.log4j.Logger; public class IntegerConverter implements Converter { /** Log4j-Protokolierer */ private Logger log = Logger.getLogger(this.getClass().getName()); public Object getAsObject(FacesContext context, UIComponent component, String value) throws ConverterException { log.info(getAsObject + value); return new Integer(value); } public String getAsString(FacesContext context, UIComponent component, Object value) throws ConverterException { log.info(getAsString + value); return value.toString(); } } Tomcat output: 17.01.2007 08:48:06 BodyContent should be empty. Component with id _idJsp67 clas s org.apache.myfaces.tobago.component.UIPanel content converter converter-idcom.test.converter.IntegerConverter/converter-id converter-classcom.test.converter.IntegerConverter/converter-class /converter Please use the f:verbatim tag for nested content! Regards Clemens Hello Clemens, I think you get a Validation Error : Value is not a valid option. Can you add a message tag to your page? Please change the type of your Constants to String or add a converter to your selectOneChoice tag on the page for example f:converter converterId=org.apache.myfaces.tobago.example.reference.IntegerConverter / converter converter-idorg.apache.myfaces.tobago.example.reference.IntegerConverter/converter-id converter-classorg.apache.myfaces.tobago.example.reference.IntegerConverter/converter-class /converter public class IntegerConverter implements Converter { private static final Log LOG = LogFactory.getLog(OnOffConverter.class); public Object getAsObject(FacesContext context, UIComponent component, String value) throws ConverterException { LOG.info(getAsObject + value); return new Integer(value); } public String getAsString(FacesContext context, UIComponent component, Object value) throws ConverterException { LOG.info(getAsString + value); return value.toString(); } } Regards Bernd Clemens Sietas wrote: Hello, I have read a long thread on the valueChangeListener from November 2006 in this mailing-list. I adapted my code to the help in the tread, however, the valueChangeListener still is not called. I just subscribed to ask for further help. Here is my code: tc:loadBundle basename=overview var=overviewBundle/ layout:overview jsp:body f:view tc:form tc:panel ... ... tc:panel tc:selectOneChoice value=#{myBean.userOption} valueChangeListener=#{myBean.changeUserSelectedStatus}
Re: [ABOT] Sending pdf file from webserver to browser?
Bjørn T Johansen skrev den 16-01-2007 14:42: I have a myfaces webapp that uses a report component to generate a pdf file on the server. This file is sent to the browser and the user then get a choice of saving the file or opening the file, eg. in Acrobat. And I was wondering, it is possible to skip the opening og saving dialog and go straight to printing the pdf file? As far as I can tell, this isn't possible.. I don't think so, unless you can print to the users printer from the server. -- Thorbjørn smime.p7s Description: S/MIME Cryptographic Signature
JSF app optimizations
Hi all, I have noticed that my application performace is reduced very much by calling ViewHandler.renderView() method. I wonder if there are any optimizations to perform (for Tomcat or my own app's web.xml) to increase my app performance? Please have a look on the attached image with JProfiler's Call Tree and Hotspots: http://www.nabble.com/file/5678/JProfiler_Trace.png Thanks in advance, Sergiy -- View this message in context: http://www.nabble.com/JSF-app-optimizations-tf3026075.html#a8406961 Sent from the MyFaces - Users mailing list archive at Nabble.com.
RE: [ABOT] Sending pdf file from webserver to browser?
Hi Are you setting the content-type on the response? Hermod -Original Message- From: Thorbjørn Ravn Andersen [mailto:[EMAIL PROTECTED] Sent: Wednesday, January 17, 2007 10:13 AM To: MyFaces Discussion Subject: Re: [ABOT] Sending pdf file from webserver to browser? Bjørn T Johansen skrev den 16-01-2007 14:42: I have a myfaces webapp that uses a report component to generate a pdf file on the server. This file is sent to the browser and the user then get a choice of saving the file or opening the file, eg. in Acrobat. And I was wondering, it is possible to skip the opening og saving dialog and go straight to printing the pdf file? As far as I can tell, this isn't possible.. I don't think so, unless you can print to the users printer from the server. -- Thorbjørn * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * This email with attachments is solely for the use of the individual or entity to whom it is addressed. Please also be aware that DnB NOR cannot accept any payment orders or other legally binding correspondence with customers as a part of an email. This email message has been virus checked by the anti virus programs used in the DnB NOR Group. * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * *
Re: [ABOT] Sending pdf file from webserver to browser?
Yes, I am setting it to application/pdf... Why? BTJ On Wed, 17 Jan 2007 10:30:38 +0100 [EMAIL PROTECTED] wrote: Hi Are you setting the content-type on the response? Hermod -Original Message- From: Thorbjørn Ravn Andersen [mailto:[EMAIL PROTECTED] Sent: Wednesday, January 17, 2007 10:13 AM To: MyFaces Discussion Subject: Re: [ABOT] Sending pdf file from webserver to browser? Bjørn T Johansen skrev den 16-01-2007 14:42: I have a myfaces webapp that uses a report component to generate a pdf file on the server. This file is sent to the browser and the user then get a choice of saving the file or opening the file, eg. in Acrobat. And I was wondering, it is possible to skip the opening og saving dialog and go straight to printing the pdf file? As far as I can tell, this isn't possible.. I don't think so, unless you can print to the users printer from the server.
RE: [ABOT] Sending pdf file from webserver to browser?
Hi This content type is handled differently by various browsers. Some browser will give a choice saving or opening, while others will open it directly using its pdf plugin. I seem to remember a solution for was described on the struts mailing list a while back. Try googling for it. Hermod -Original Message- From: Bjørn T Johansen [mailto:[EMAIL PROTECTED] Sent: Wednesday, January 17, 2007 10:37 AM To: users@myfaces.apache.org Subject: Re: [ABOT] Sending pdf file from webserver to browser? Yes, I am setting it to application/pdf... Why? BTJ On Wed, 17 Jan 2007 10:30:38 +0100 [EMAIL PROTECTED] wrote: Hi Are you setting the content-type on the response? Hermod -Original Message- From: Thorbjørn Ravn Andersen [mailto:[EMAIL PROTECTED] Sent: Wednesday, January 17, 2007 10:13 AM To: MyFaces Discussion Subject: Re: [ABOT] Sending pdf file from webserver to browser? Bjørn T Johansen skrev den 16-01-2007 14:42: I have a myfaces webapp that uses a report component to generate a pdf file on the server. This file is sent to the browser and the user then get a choice of saving the file or opening the file, eg. in Acrobat. And I was wondering, it is possible to skip the opening og saving dialog and go straight to printing the pdf file? As far as I can tell, this isn't possible.. I don't think so, unless you can print to the users printer from the server. * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * This email with attachments is solely for the use of the individual or entity to whom it is addressed. Please also be aware that the DnB NOR Group cannot accept any payment orders or other legally binding correspondence with customers as a part of an email. This email message has been virus checked by the anti virus programs used in the DnB NOR Group. * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * *
RE: [ABOT] Sending pdf file from webserver to browser?
Hi Looked into some of the old code I had lying around, and remembered that I did this: response.setContentType(application/pdf); response.setHeader(Expires, 0); response.setHeader(Cache-Control, must-revalidate, post-check=0, pre-check=0); response.setHeader(Pragma, public); Hermod -Original Message- From: [EMAIL PROTECTED] [mailto:[EMAIL PROTECTED] Sent: Wednesday, January 17, 2007 10:43 AM To: users@myfaces.apache.org Subject: RE: [ABOT] Sending pdf file from webserver to browser? Hi This content type is handled differently by various browsers. Some browser will give a choice saving or opening, while others will open it directly using its pdf plugin. I seem to remember a solution for was described on the struts mailing list a while back. Try googling for it. Hermod -Original Message- From: Bjørn T Johansen [mailto:[EMAIL PROTECTED] Sent: Wednesday, January 17, 2007 10:37 AM To: users@myfaces.apache.org Subject: Re: [ABOT] Sending pdf file from webserver to browser? Yes, I am setting it to application/pdf... Why? BTJ On Wed, 17 Jan 2007 10:30:38 +0100 [EMAIL PROTECTED] wrote: Hi Are you setting the content-type on the response? Hermod -Original Message- From: Thorbjørn Ravn Andersen [mailto:[EMAIL PROTECTED] Sent: Wednesday, January 17, 2007 10:13 AM To: MyFaces Discussion Subject: Re: [ABOT] Sending pdf file from webserver to browser? Bjørn T Johansen skrev den 16-01-2007 14:42: I have a myfaces webapp that uses a report component to generate a pdf file on the server. This file is sent to the browser and the user then get a choice of saving the file or opening the file, eg. in Acrobat. And I was wondering, it is possible to skip the opening og saving dialog and go straight to printing the pdf file? As far as I can tell, this isn't possible.. I don't think so, unless you can print to the users printer from the server. * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * This email with attachments is solely for the use of the individual or entity to whom it is addressed. Please also be aware that the DnB NOR Group cannot accept any payment orders or other legally binding correspondence with customers as a part of an email. This email message has been virus checked by the anti virus programs used in the DnB NOR Group. * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * *
RE: [ABOT] Sending pdf file from webserver to browser?
Hello Bjørn T Johansen, In order to achieve what you want, you've got two problems. 1) A printer is considered as a local devices, which isn't directly accessible from a loaded page in browser. A browser can request a page to be printed, but the security model of a browser enforces the required 'Print dialog'. 2) Your are not trying to print an HTML-page but a .pdf-file, which can't invoke the print-command onLoad. For the first problem there are some (IE-only) solutions like ScriptX: http://www.meadroid.com/scriptx/index.asp, but the second will remain. By setting the correct response header you could get the pdf to open correctly in a browser, but the user will have to choose to print it themselves. IMHO: It can't be done. If you ever fid a way around these problems, please let me know! With kind regards, Marco -Original Message- From: Bjørn T Johansen [mailto:[EMAIL PROTECTED] Sent: woensdag 17 januari 2007 10:37 To: users@myfaces.apache.org Subject: Re: [ABOT] Sending pdf file from webserver to browser? Yes, I am setting it to application/pdf... Why? BTJ On Wed, 17 Jan 2007 10:30:38 +0100 [EMAIL PROTECTED] wrote: Hi Are you setting the content-type on the response? Hermod -Original Message- From: Thorbjørn Ravn Andersen [mailto:[EMAIL PROTECTED] Sent: Wednesday, January 17, 2007 10:13 AM To: MyFaces Discussion Subject: Re: [ABOT] Sending pdf file from webserver to browser? Bjørn T Johansen skrev den 16-01-2007 14:42: I have a myfaces webapp that uses a report component to generate a pdf file on the server. This file is sent to the browser and the user then get a choice of saving the file or opening the file, eg. in Acrobat. And I was wondering, it is possible to skip the opening og saving dialog and go straight to printing the pdf file? As far as I can tell, this isn't possible.. I don't think so, unless you can print to the users printer from the server. -- Notice: This e-mail message, together with any attachments, contains information of Merck Co., Inc. (One Merck Drive, Whitehouse Station, New Jersey, USA 08889), and/or its affiliates (which may be known outside the United States as Merck Frosst, Merck Sharp Dohme or MSD and in Japan, as Banyu - direct contact information for affiliates is available at http://www.merck.com/contact/contacts.html) that may be confidential, proprietary copyrighted and/or legally privileged. It is intended solely for the use of the individual or entity named on this message. If you are not the intended recipient, and have received this message in error, please notify us immediately by reply e-mail and then delete it from your system. --
RE: [ABOT] Sending pdf file from webserver to browser?
Hi Is he talking about printing to a printer or to the screen? Hermod -Original Message- From: Beelen, Marco [mailto:[EMAIL PROTECTED] Sent: Wednesday, January 17, 2007 10:50 AM To: MyFaces Discussion Subject: RE: [ABOT] Sending pdf file from webserver to browser? Hello Bjørn T Johansen, In order to achieve what you want, you've got two problems. 1) A printer is considered as a local devices, which isn't directly accessible from a loaded page in browser. A browser can request a page to be printed, but the security model of a browser enforces the required 'Print dialog'. 2) Your are not trying to print an HTML-page but a .pdf-file, which can't invoke the print-command onLoad. For the first problem there are some (IE-only) solutions like ScriptX: http://www.meadroid.com/scriptx/index.asp, but the second will remain. By setting the correct response header you could get the pdf to open correctly in a browser, but the user will have to choose to print it themselves. IMHO: It can't be done. If you ever fid a way around these problems, please let me know! With kind regards, Marco -Original Message- From: Bjørn T Johansen [mailto:[EMAIL PROTECTED] Sent: woensdag 17 januari 2007 10:37 To: users@myfaces.apache.org Subject: Re: [ABOT] Sending pdf file from webserver to browser? Yes, I am setting it to application/pdf... Why? BTJ On Wed, 17 Jan 2007 10:30:38 +0100 [EMAIL PROTECTED] wrote: Hi Are you setting the content-type on the response? Hermod -Original Message- From: Thorbjørn Ravn Andersen [mailto:[EMAIL PROTECTED] Sent: Wednesday, January 17, 2007 10:13 AM To: MyFaces Discussion Subject: Re: [ABOT] Sending pdf file from webserver to browser? Bjørn T Johansen skrev den 16-01-2007 14:42: I have a myfaces webapp that uses a report component to generate a pdf file on the server. This file is sent to the browser and the user then get a choice of saving the file or opening the file, eg. in Acrobat. And I was wondering, it is possible to skip the opening og saving dialog and go straight to printing the pdf file? As far as I can tell, this isn't possible.. I don't think so, unless you can print to the users printer from the server. -- Notice: This e-mail message, together with any attachments, contains information of Merck Co., Inc. (One Merck Drive, Whitehouse Station, New Jersey, USA 08889), and/or its affiliates (which may be known outside the United States as Merck Frosst, Merck Sharp Dohme or MSD and in Japan, as Banyu - direct contact information for affiliates is available at http://www.merck.com/contact/contacts.html) that may be confidential, proprietary copyrighted and/or legally privileged. It is intended solely for the use of the individual or entity named on this message. If you are not the intended recipient, and have received this message in error, please notify us immediately by reply e-mail and then delete it from your system. -- * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * This email with attachments is solely for the use of the individual or entity to whom it is addressed. Please also be aware that the DnB NOR Group cannot accept any payment orders or other legally binding correspondence with customers as a part of an email. This email message has been virus checked by the anti virus programs used in the DnB NOR Group. * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * *
Re: [ABOT] Sending pdf file from webserver to browser?
I am talking about printing to a printer... :) But thanks for the suggestion on how to go around the open/save as dialog box... :) BTJ On Wed, 17 Jan 2007 10:59:41 +0100 [EMAIL PROTECTED] wrote: Hi Is he talking about printing to a printer or to the screen? Hermod -Original Message- From: Beelen, Marco [mailto:[EMAIL PROTECTED] Sent: Wednesday, January 17, 2007 10:50 AM To: MyFaces Discussion Subject: RE: [ABOT] Sending pdf file from webserver to browser? Hello Bjørn T Johansen, In order to achieve what you want, you've got two problems. 1) A printer is considered as a local devices, which isn't directly accessible from a loaded page in browser. A browser can request a page to be printed, but the security model of a browser enforces the required 'Print dialog'. 2) Your are not trying to print an HTML-page but a .pdf-file, which can't invoke the print-command onLoad. For the first problem there are some (IE-only) solutions like ScriptX: http://www.meadroid.com/scriptx/index.asp, but the second will remain. By setting the correct response header you could get the pdf to open correctly in a browser, but the user will have to choose to print it themselves. IMHO: It can't be done. If you ever fid a way around these problems, please let me know! With kind regards, Marco -Original Message- From: Bjørn T Johansen [mailto:[EMAIL PROTECTED] Sent: woensdag 17 januari 2007 10:37 To: users@myfaces.apache.org Subject: Re: [ABOT] Sending pdf file from webserver to browser? Yes, I am setting it to application/pdf... Why? BTJ On Wed, 17 Jan 2007 10:30:38 +0100 [EMAIL PROTECTED] wrote: Hi Are you setting the content-type on the response? Hermod -Original Message- From: Thorbjørn Ravn Andersen [mailto:[EMAIL PROTECTED] Sent: Wednesday, January 17, 2007 10:13 AM To: MyFaces Discussion Subject: Re: [ABOT] Sending pdf file from webserver to browser? Bjørn T Johansen skrev den 16-01-2007 14:42: I have a myfaces webapp that uses a report component to generate a pdf file on the server. This file is sent to the browser and the user then get a choice of saving the file or opening the file, eg. in Acrobat. And I was wondering, it is possible to skip the opening og saving dialog and go straight to printing the pdf file? As far as I can tell, this isn't possible.. I don't think so, unless you can print to the users printer from the server. -- Notice: This e-mail message, together with any attachments, contains information of Merck Co., Inc. (One Merck Drive, Whitehouse Station, New Jersey, USA 08889), and/or its affiliates (which may be known outside the United States as Merck Frosst, Merck Sharp Dohme or MSD and in Japan, as Banyu - direct contact information for affiliates is available at http://www.merck.com/contact/contacts.html) that may be confidential, proprietary copyrighted and/or legally privileged. It is intended solely for the use of the individual or entity named on this message. If you are not the intended recipient, and have received this message in error, please notify us immediately by reply e-mail and then delete it from your system. -- * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * This email with attachments is solely for the use of the individual or entity to whom it is addressed. Please also be aware that the DnB NOR Group cannot accept any payment orders or other legally binding correspondence with customers as a part of an email. This email message has been virus checked by the anti virus programs used in the DnB NOR Group. * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * *
Re: JSF app optimizations
Hi, am not sure to read this graph propertly, by it seems that, out of the 62.4% time spent in renderView, 12,4% are spend rendering the Ajax Container (and all it's child components). The Most important part, 50%, are not shown in your diagram. Also, because the renderView will, in the end, call your backing beans to display datas, you should check that the backing beans code are not your slowing part. Last but not least, you did not give background informations on what your app is doing. Are there lenghtly process that should take more CPU than the rendering in your design? (Remind yourself that picking datas to display from bean, is part of the execution of renderView) If most of the job of your app is to display datas, it's quite normal that the renderView take most of the time spend by your application. Hi all, I have noticed that my application performace is reduced very much by calling ViewHandler.renderView() method. I wonder if there are any optimizations to perform (for Tomcat or my own app's web.xml) to increase my app performance? Please have a look on the attached image with JProfiler's Call Tree and Hotspots: http://www.nabble.com/file/5678/JProfiler_Trace.png Thanks in advance, Sergiy
Date AND time chooser?
Hi, does anyone have a suggestion for a nice date AND time chooser? As far as I can see, you can only choose the date by using the inputCalendar. Thanks, Christopher
RE: JSF app optimizations
My own tests (last year) showed that a huge amount of time is spent in JSP-rendering. Facelets (using a SAX-Compiler) seems to be faster than JSP's... So this would be a first tuning-possibility. regards Alexander -Original Message- From: David Delbecq [mailto:[EMAIL PROTECTED] Sent: Wednesday, January 17, 2007 11:40 AM To: MyFaces Discussion Subject: Re: JSF app optimizations Hi, am not sure to read this graph propertly, by it seems that, out of the 62.4% time spent in renderView, 12,4% are spend rendering the Ajax Container (and all it's child components). The Most important part, 50%, are not shown in your diagram. Also, because the renderView will, in the end, call your backing beans to display datas, you should check that the backing beans code are not your slowing part. Last but not least, you did not give background informations on what your app is doing. Are there lenghtly process that should take more CPU than the rendering in your design? (Remind yourself that picking datas to display from bean, is part of the execution of renderView) If most of the job of your app is to display datas, it's quite normal that the renderView take most of the time spend by your application. Hi all, I have noticed that my application performace is reduced very much by calling ViewHandler.renderView() method. I wonder if there are any optimizations to perform (for Tomcat or my own app's web.xml) to increase my app performance? Please have a look on the attached image with JProfiler's Call Tree and Hotspots: http://www.nabble.com/file/5678/JProfiler_Trace.png Thanks in advance, Sergiy
Re: JSF app optimizations
In addition to using Facelets; http://wiki.apache.org/myfaces/Performance Cagatay On 1/17/07, Jesse Alexander (KSFD 121) [EMAIL PROTECTED] wrote: My own tests (last year) showed that a huge amount of time is spent in JSP-rendering. Facelets (using a SAX-Compiler) seems to be faster than JSP's... So this would be a first tuning-possibility. regards Alexander -Original Message- From: David Delbecq [mailto:[EMAIL PROTECTED] Sent: Wednesday, January 17, 2007 11:40 AM To: MyFaces Discussion Subject: Re: JSF app optimizations Hi, am not sure to read this graph propertly, by it seems that, out of the 62.4% time spent in renderView, 12,4% are spend rendering the Ajax Container (and all it's child components). The Most important part, 50%, are not shown in your diagram. Also, because the renderView will, in the end, call your backing beans to display datas, you should check that the backing beans code are not your slowing part. Last but not least, you did not give background informations on what your app is doing. Are there lenghtly process that should take more CPU than the rendering in your design? (Remind yourself that picking datas to display from bean, is part of the execution of renderView) If most of the job of your app is to display datas, it's quite normal that the renderView take most of the time spend by your application. Hi all, I have noticed that my application performace is reduced very much by calling ViewHandler.renderView() method. I wonder if there are any optimizations to perform (for Tomcat or my own app's web.xml) to increase my app performance? Please have a look on the attached image with JProfiler's Call Tree and Hotspots: http://www.nabble.com/file/5678/JProfiler_Trace.png Thanks in advance, Sergiy
RE: GET on page with h:form handled like form submission
From: Simon Kitching [mailto:[EMAIL PROTECTED] Giampaolo Tomassoni wrote: Dears, Ciao Bella ;) Yuhuuu :) I'm facing a problem with myfaces-1.4 in a framed web app under JBoss Seam (http://labs.jboss.com/portal/jbossseam) and it seems that the problem needs upstream support (you). The problem is the following. When a page with parameters and an h:form in it is first displayed through a GET, myfaces correctly issues the phase events RESTORE_VIEW, then RENDER_RESPONSE. However, when a subsequent GET attempts showing the very same page, possibly with different parameters, myfaces invokes the following phases instead: RESTORE_VIEW, APPLY_REQUEST_VALUES, PROCESS_VALIDATIONS, UPDATE_MODEL_VALUES, INVOKE_APPLICATION and RENDER_RESPONSE. This basicly means that myfaces handles the subsequent GET as a form submission, which may not always be the case. In my case, in example, the GET parameters are used to specify an item in a table. The h:form is then used to edit some of the fields in that item. When the h:form is submitted through a POST, the GET parameters which are used to identify the edited item are not supplied in the form content: they are instead automatically otained by a per-conversation context handled by JBoss Seam. So, handling a GET with parameters as a form submission drives Seam to simply ignore the parameters and apply the values stored in the conversation context. The net effect is that once a page with parameters is displayed, it is not anymore possible to switch to the same page with different parameters. GET isn't handled any differently from POST in MyFaces, and as far as I know that's the correct behaviour. GET and POST are just two different ways of encoding the parameters. In plain html, a form's method can be set to GET or POST. form method=get action=/my/postback/url input name=data size=10 /form So I don't believe it's a myfaces bug. I did suspect something like this. What you are seeing in terms of JSF phases is expected; if view X is requested by the browser and there is a component tree to restore for that view, then the phases APPLY_REQUEST_VALUES, PROCESS_VALIDATIONS, UPDATE_MODEL_VALUES, INVOKE_APPLICATION happen. If there is no existing component tree for that view, then RESTORE_VIEW does not succeed so processing skips straight to RENDER_RESPONSE. When using client-side state saving, the behaviour you want happens automatically, because the POST will include a hidden field that contains a serialized component tree (hence RESTORE_VIEW can be performed). The GET command will not contain that hidden field, so RESTORE_VIEW will not be possible and myfaces will move directly to RENDER_RESPONSE. However when using server-side state saving, the component tree can be found regardless of whether GET or POST is used, so RESTORE_VIEW succeeds. Well, right. But even in server-side state saving I see an h:form is encoded in a form with some hidden fields. So, I guess that a GET would need to supply the values of these hiddens in order to be identified as a postback. This may mean that there are ways to better identify a GET as a postback, but actually myfaces doesn't seem to pay too much attention to them. As it happens, in the application I'm working on we have what seems to be a similar problem to you (though we don't use Seam); we are using server-side state saving and want GET requests to show a fresh view of the page even when the GET refers to the same view we recently rendered. Right. Exactly my case. Please note that the same doesn't hold when a page with h:form is invoked by a GET without parameters: it always gets a RESTORE_VIEW followed by a RENDER_RESPONSE cycle. I'm surprised by that; are you quite sure? Either the component tree can be found or it can't, and a few random parameters aren't going to change that... I confirm this behaviour. Maybe this is due to some kind of optimization in myfaces: when a get doesn't supply parameters, then it possibly can't be any (usefull) form submission. As written above, this may not cause problems to empty h:forms: they anyway get hiddens in them which must probably cause some kind of parameter values to be carried by a postback GET. Is there any way to circumvent this problem? Is the way myfaces handles GET with parameters a by-design behaviour? Is so, which is the purpouse? Is there a way (maybe by mean of some init param) to instruct facelets to handle GETs always with a RESTORE_VIEW and RENDER_RESPONSE cycle, and not as a form submission? Our solution is a custom PhaseListener that checks the method property of the request, and discards any component tree that may have been retrieved during RESTORE_VIEW (thus forcing a jump to RENDER_RESPONSE). public void afterPhase(PhaseEvent event) { if
Re: [Tobago] valueChangeListener not called
Hello Bernd, thank you for adding example code to the gendoc pages. I got no error messages anymore. The converter is configured in the faces-config.xml. However, the valueChangeListener is still not invoked. (No log entry in my logfile). I can already detect the change from one option to the other option by reading the value of the binding. However, I still like to know why the Listner is not invoked. It is the only Listener I have so far. Is it possible that something else prevents the listener from being invoked. Some wrong tag definition (view, subvie, panel,...) on the page. I took the tags more or less from the Tobago blank project. The converter (you mentioned - you need no converter anymore): When I switch the Options from 1 to 2 I get the following logging: 17.01.2007 12:43:11 getAsObject 2 ... 17.01.2007 12:43:11 getAsString 1 17.01.2007 12:43:11 getAsString 2 The process has oviously invoked the converter. I am bothering why getAsString is also called, because I like to get an Integer. The message tag seems to make no difference (no additional info). tc:selectOneChoice value=#{myBean.userOption} valueChangeListener=#{myBean.changeUserSelectedStatus} id=userGroupChoice converter=integerConverterId f:selectItems value=#{myBean.userOptionItems} id=userChoiceItems/ f:facet name=change tc:command / /f:facet /tc:selectOneChoice tc:messages/tc:messages Do you have any further suggestions? Thank you in advance. Clemens -- Clemens Sietas email: [EMAIL PROTECTED]
Re: How to use inputSuggest(Ajax)
Hi, you can find any information about inputSuggestAjax on the corresponding wiki site: http://wiki.apache.org/myfaces/InputSuggestAjax You should use this component if you need something like autoSuggest functionality. The typed string into the input is passed to the suggestedItems method. It was designed to give the user a dynamically retrieved list of suggested Strings back. If you need something like the selectItems approach, it is not the right choice for you. cheers, Gerald On 1/16/07, Beelen, Marco [EMAIL PROTECTED] wrote: Hello, I would like to use some inputSuggest functionality in my application, but can't get the inputSuggest or inputSuggestAjax component working properly. What I can't appair to get correct is return types on the methods on my managed-bean which provided the available options and the handling of a submitted value. In my application I have a class Product with an id and a name and my DAO provides me with a ListProduct. Prior to my attempts to use inputSuggest I was using: h:selectOneMenu value=#{managedBean.selectedProductId} t:selectItems value=#{managedBean.products} var=product itemLabel=#{product.name} itemValue=#{p.id} / /h:selectOneMenu And during the handling of the form I would lookup the proper Product by it's id. My assumption was that s:inputSuggest also could work with t:selectItems so I wrote the xhtml like this: s:inputSuggest value=#{managedBean.name} required=true t:selectItems value=#{managedBean.products} var=product itemLabel=#{product.description} itemValue=#{product.description} / /s:inputSuggest But that causes a ClassCastException during rendering. java.lang.ClassCastException: [Ljavax.faces.model.SelectItem; at org.apache.myfaces.custom.suggest.InputSuggestRenderer.getChoices(InputSuggestRenderer.java:224) at org.apache.myfaces.custom.suggest.InputSuggestRenderer.encodeBegin(InputSuggestRenderer.java:100) at javax.faces.component.UIComponentBase.encodeBegin(UIComponentBase.java:512) at com.sun.facelets.tag.jsf.ComponentSupport.encodeRecursive(ComponentSupport.java:232) at .. So I switched to: s:inputSuggest value=#{mangedBean.name} required=true f:selectItems value=#{managedBean.productSuggests}/ /s:inputSuggest Where the managedBean.getProductSuggests() returns a MapString, String Now the page get rendered and I can enter a product name with suggestion. ( Although with some style issues with the suggestions being underneath other form elements, but that a minor issue for later. ) In method called by the action of my commandButton on the from I would like to get the appropreate Product-object, so I wanted to perform a lookup based upon the field name of the managedBean. Only the value of that field wasn't the exact value of the suggestion but something like m:_id100_choicePRODUCTNAME I don't know where the prefix 'm:_id100_choice comes from, but I don't suppose mu managedBean should be responsible for stripping it. Is this a bug or am I doing something wrong? As an alternative I was looking at s:inputSuggestAjax so I changed the xhtml to: s:inputSuggestAjax suggestedItemsMethod=#{managedBean.productSuggests} value=#{mangedBean.name} charset=utf-8 / I tried to implement productSuggests-method with returning: MapString, String, ListString, ListSelectItem, but nothing worked. In all cases the page does get rendered, but no inputSuggest is available due to JavaScript-errors. ('Can't move focus to the control because it is invisible, not enalbed or of a type that doesn't accept focus) Any (input)suggestion on how to work with these components is greatly appreciated. With kind regards, Marco Beelen -- Notice: This e-mail message, together with any attachments, contains information of Merck Co., Inc. (One Merck Drive, Whitehouse Station, New Jersey, USA 08889), and/or its affiliates (which may be known outside the United States as Merck Frosst, Merck Sharp Dohme or MSD and in Japan, as Banyu - direct contact information for affiliates is available at http://www.merck.com/contact/contacts.html) that may be confidential, proprietary copyrighted and/or legally privileged. It is intended solely for the use of the individual or entity named on this message. If you are not the intended recipient, and have received this message in error, please notify us immediately by reply e-mail and then delete it from your system. -- -- http://www.irian.at Your JSF powerhouse - JSF Consulting, Development and Courses in English and German Professional Support for Apache MyFaces
Re: How to use inputSuggest(Ajax)
Hi, i have implemented a few weeks ago, a value/label pair approach as an addition to the component. You can find the behaviour on the wiki site under the topic Advanced Usage. I think this will meet your requirements in a more adequate way. cheers, Gerald On 1/17/07, Gerald Müllan [EMAIL PROTECTED] wrote: Hi, you can find any information about inputSuggestAjax on the corresponding wiki site: http://wiki.apache.org/myfaces/InputSuggestAjax You should use this component if you need something like autoSuggest functionality. The typed string into the input is passed to the suggestedItems method. It was designed to give the user a dynamically retrieved list of suggested Strings back. If you need something like the selectItems approach, it is not the right choice for you. cheers, Gerald On 1/16/07, Beelen, Marco [EMAIL PROTECTED] wrote: Hello, I would like to use some inputSuggest functionality in my application, but can't get the inputSuggest or inputSuggestAjax component working properly. What I can't appair to get correct is return types on the methods on my managed-bean which provided the available options and the handling of a submitted value. In my application I have a class Product with an id and a name and my DAO provides me with a ListProduct. Prior to my attempts to use inputSuggest I was using: h:selectOneMenu value=#{managedBean.selectedProductId} t:selectItems value=#{managedBean.products} var=product itemLabel=#{product.name} itemValue=#{p.id} / /h:selectOneMenu And during the handling of the form I would lookup the proper Product by it's id. My assumption was that s:inputSuggest also could work with t:selectItems so I wrote the xhtml like this: s:inputSuggest value=#{managedBean.name} required=true t:selectItems value=#{managedBean.products} var=product itemLabel=#{product.description} itemValue=#{product.description} / /s:inputSuggest But that causes a ClassCastException during rendering. java.lang.ClassCastException: [Ljavax.faces.model.SelectItem; at org.apache.myfaces.custom.suggest.InputSuggestRenderer.getChoices(InputSuggestRenderer.java:224) at org.apache.myfaces.custom.suggest.InputSuggestRenderer.encodeBegin(InputSuggestRenderer.java:100) at javax.faces.component.UIComponentBase.encodeBegin(UIComponentBase.java:512) at com.sun.facelets.tag.jsf.ComponentSupport.encodeRecursive(ComponentSupport.java:232) at .. So I switched to: s:inputSuggest value=#{mangedBean.name} required=true f:selectItems value=#{managedBean.productSuggests}/ /s:inputSuggest Where the managedBean.getProductSuggests() returns a MapString, String Now the page get rendered and I can enter a product name with suggestion. ( Although with some style issues with the suggestions being underneath other form elements, but that a minor issue for later. ) In method called by the action of my commandButton on the from I would like to get the appropreate Product-object, so I wanted to perform a lookup based upon the field name of the managedBean. Only the value of that field wasn't the exact value of the suggestion but something like m:_id100_choicePRODUCTNAME I don't know where the prefix 'm:_id100_choice comes from, but I don't suppose mu managedBean should be responsible for stripping it. Is this a bug or am I doing something wrong? As an alternative I was looking at s:inputSuggestAjax so I changed the xhtml to: s:inputSuggestAjax suggestedItemsMethod=#{managedBean.productSuggests} value=#{mangedBean.name} charset=utf-8 / I tried to implement productSuggests-method with returning: MapString, String, ListString, ListSelectItem, but nothing worked. In all cases the page does get rendered, but no inputSuggest is available due to JavaScript-errors. ('Can't move focus to the control because it is invisible, not enalbed or of a type that doesn't accept focus) Any (input)suggestion on how to work with these components is greatly appreciated. With kind regards, Marco Beelen -- Notice: This e-mail message, together with any attachments, contains information of Merck Co., Inc. (One Merck Drive, Whitehouse Station, New Jersey, USA 08889), and/or its affiliates (which may be known outside the United States as Merck Frosst, Merck Sharp Dohme or MSD and in Japan, as Banyu - direct contact information for affiliates is available at http://www.merck.com/contact/contacts.html) that may be confidential, proprietary copyrighted and/or legally privileged. It is intended solely for the use of the individual or entity named on this message. If you are not the intended recipient, and have
RE: How to use inputSuggest(Ajax)
Hi Gerard, Thanks for you pointer to the wiki. I must have overlooked the documentation in wiki, because indeed with that information I will be able to get it working. With kind regards, Marco -Original Message- From: Gerald Müllan [mailto:[EMAIL PROTECTED] Sent: woensdag 17 januari 2007 13:57 To: MyFaces Discussion Subject: Re: How to use inputSuggest(Ajax) Hi, you can find any information about inputSuggestAjax on the corresponding wiki site: http://wiki.apache.org/myfaces/InputSuggestAjax You should use this component if you need something like autoSuggest functionality. The typed string into the input is passed to the suggestedItems method. It was designed to give the user a dynamically retrieved list of suggested Strings back. If you need something like the selectItems approach, it is not the right choice for you. cheers, Gerald On 1/16/07, Beelen, Marco [EMAIL PROTECTED] wrote: Hello, I would like to use some inputSuggest functionality in my application, but can't get the inputSuggest or inputSuggestAjax component working properly. What I can't appair to get correct is return types on the methods on my managed-bean which provided the available options and the handling of a submitted value. In my application I have a class Product with an id and a name and my DAO provides me with a ListProduct. Prior to my attempts to use inputSuggest I was using: h:selectOneMenu value=#{managedBean.selectedProductId} t:selectItems value=#{managedBean.products} var=product itemLabel=#{product.name} itemValue=#{p.id} / /h:selectOneMenu And during the handling of the form I would lookup the proper Product by it's id. My assumption was that s:inputSuggest also could work with t:selectItems so I wrote the xhtml like this: s:inputSuggest value=#{managedBean.name} required=true t:selectItems value=#{managedBean.products} var=product itemLabel=#{product.description} itemValue=#{product.description} / /s:inputSuggest But that causes a ClassCastException during rendering. java.lang.ClassCastException: [Ljavax.faces.model.SelectItem; at org.apache.myfaces.custom.suggest.InputSuggestRenderer.getChoices(InputSuggestRenderer.java:224) at org.apache.myfaces.custom.suggest.InputSuggestRenderer.encodeBegin(InputSuggestRenderer.java:100) at javax.faces.component.UIComponentBase.encodeBegin(UIComponentBase.java:512) at com.sun.facelets.tag.jsf.ComponentSupport.encodeRecursive(ComponentSupport.java:232) at .. So I switched to: s:inputSuggest value=#{mangedBean.name} required=true f:selectItems value=#{managedBean.productSuggests}/ /s:inputSuggest Where the managedBean.getProductSuggests() returns a MapString, String Now the page get rendered and I can enter a product name with suggestion. ( Although with some style issues with the suggestions being underneath other form elements, but that a minor issue for later. ) In method called by the action of my commandButton on the from I would like to get the appropreate Product-object, so I wanted to perform a lookup based upon the field name of the managedBean. Only the value of that field wasn't the exact value of the suggestion but something like m:_id100_choicePRODUCTNAME I don't know where the prefix 'm:_id100_choice comes from, but I don't suppose mu managedBean should be responsible for stripping it. Is this a bug or am I doing something wrong? As an alternative I was looking at s:inputSuggestAjax so I changed the xhtml to: s:inputSuggestAjax suggestedItemsMethod=#{managedBean.productSuggests} value=#{mangedBean.name} charset=utf-8 / I tried to implement productSuggests-method with returning: MapString, String, ListString, ListSelectItem, but nothing worked. In all cases the page does get rendered, but no inputSuggest is available due to JavaScript-errors. ('Can't move focus to the control because it is invisible, not enalbed or of a type that doesn't accept focus) Any (input)suggestion on how to work with these components is greatly appreciated. With kind regards, Marco Beelen -- Notice: This e-mail message, together with any attachments, contains information of Merck Co., Inc. (One Merck Drive, Whitehouse Station, New Jersey, USA 08889), and/or its affiliates (which may be known outside the United States as Merck Frosst, Merck Sharp Dohme or MSD and in Japan, as Banyu - direct contact information for affiliates is available at http://www.merck.com/contact/contacts.html) that may be confidential, proprietary copyrighted and/or legally privileged. It is intended solely for the use of the individual or entity named on this
[Tobago] f:verbatim in tc:tabGroup
Hello, I want to display a horizontal line on a tab in tabGroup with switchType=realodTab. I used this line from the tobago demo: f:verbatimhr//f:verbatim But the line is not shown, when I switch to this tab. But it appears, when I reload the whole page. So it looks like f:verbatim (or hr) doesn't work with Ajax reloading. Regards Helmut
Re: Date AND time chooser?
Hi, when using t:inputCalendar, you can specify the attribute popupDateFormat=... For example, with the datePattern MM/dd/ hh:mm you also get time into the input field. I don`t know the default behaviour, but this should do the job. cheers, Gerald On 1/17/07, Christopher Cudennec [EMAIL PROTECTED] wrote: Hi, does anyone have a suggestion for a nice date AND time chooser? As far as I can see, you can only choose the date by using the inputCalendar. Thanks, Christopher -- http://www.irian.at Your JSF powerhouse - JSF Consulting, Development and Courses in English and German Professional Support for Apache MyFaces
Re: Fisheye tomahawk-sandbox 1.1.4
Hi Werner, FYI, I did give a try to 1.1.5 version of myfaces/tomahawk/sandbox but of no use , on the contrary gave me some inconsistent behaviour pertaining to rendering of icons of menu item. Thanks, Ajit -- View this message in context: http://www.nabble.com/Fisheye--tomahawk-sandbox-1.1.4-tf3015049.html#a8412129 Sent from the MyFaces - Users mailing list archive at Nabble.com.
Re: [ABOT] Sending pdf file from webserver to browser?
I believe you also want to make sure to set it as attachment. If I'm not mistaken it defaults to inline which will render the pdf in the browser. On 1/17/07, Bjørn T Johansen [EMAIL PROTECTED] wrote: I am talking about printing to a printer... :) But thanks for the suggestion on how to go around the open/save as dialog box... :) BTJ On Wed, 17 Jan 2007 10:59:41 +0100 [EMAIL PROTECTED] wrote: Hi Is he talking about printing to a printer or to the screen? Hermod -Original Message- From: Beelen, Marco [mailto:[EMAIL PROTECTED] Sent: Wednesday, January 17, 2007 10:50 AM To: MyFaces Discussion Subject: RE: [ABOT] Sending pdf file from webserver to browser? Hello Bjørn T Johansen, In order to achieve what you want, you've got two problems. 1) A printer is considered as a local devices, which isn't directly accessible from a loaded page in browser. A browser can request a page to be printed, but the security model of a browser enforces the required 'Print dialog'. 2) Your are not trying to print an HTML-page but a .pdf-file, which can't invoke the print-command onLoad. For the first problem there are some (IE-only) solutions like ScriptX: http://www.meadroid.com/scriptx/index.asp, but the second will remain. By setting the correct response header you could get the pdf to open correctly in a browser, but the user will have to choose to print it themselves. IMHO: It can't be done. If you ever fid a way around these problems, please let me know! With kind regards, Marco -Original Message- From: Bjørn T Johansen [mailto:[EMAIL PROTECTED] Sent: woensdag 17 januari 2007 10:37 To: users@myfaces.apache.org Subject: Re: [ABOT] Sending pdf file from webserver to browser? Yes, I am setting it to application/pdf... Why? BTJ On Wed, 17 Jan 2007 10:30:38 +0100 [EMAIL PROTECTED] wrote: Hi Are you setting the content-type on the response? Hermod -Original Message- From: Thorbjørn Ravn Andersen [mailto:[EMAIL PROTECTED] Sent: Wednesday, January 17, 2007 10:13 AM To: MyFaces Discussion Subject: Re: [ABOT] Sending pdf file from webserver to browser? Bjørn T Johansen skrev den 16-01-2007 14:42: I have a myfaces webapp that uses a report component to generate a pdf file on the server. This file is sent to the browser and the user then get a choice of saving the file or opening the file, eg. in Acrobat. And I was wondering, it is possible to skip the opening og saving dialog and go straight to printing the pdf file? As far as I can tell, this isn't possible.. I don't think so, unless you can print to the users printer from the server. -- Notice: This e-mail message, together with any attachments, contains information of Merck Co., Inc. (One Merck Drive, Whitehouse Station, New Jersey, USA 08889), and/or its affiliates (which may be known outside the United States as Merck Frosst, Merck Sharp Dohme or MSD and in Japan, as Banyu - direct contact information for affiliates is available at http://www.merck.com/contact/contacts.html) that may be confidential, proprietary copyrighted and/or legally privileged. It is intended solely for the use of the individual or entity named on this message. If you are not the intended recipient, and have received this message in error, please notify us immediately by reply e-mail and then delete it from your system. -- * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * This email with attachments is solely for the use of the individual or entity to whom it is addressed. Please also be aware that the DnB NOR Group cannot accept any payment orders or other legally binding correspondence with customers as a part of an email. This email message has been virus checked by the anti virus programs used in the DnB NOR Group. * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * *
Div tag and action
Hello, Is there somewhere a JSF div component available that can be used like t:commandLink? The component should provide the definition of different style classes for diefferent mouse events (over, clicked,..) and also the action and actionListener methods like in the case of the commandLink component. Is there a way to solve this issue by using div + Javascript + t:commandLink ? Regards Frank -- This message, including attachments, is confidential and may be privileged. If you are not an intended recipient, please notify the sender then delete and destroy the original message and all copies. You should not copy, forward and/or disclose this message, in whole or in part, without permission of the sender. --
RE: Div tag and action
Sure. Add the onclick attribute to your div and execute the commandLink via JS. Get the commandLink via document.getElementById(commandLinkId) and call the click() method. Or see http://wiki.apache.org/myfaces/JavascriptWithJavaServerFaces Michael -Original Message- From: Oellien, F (Frank) [mailto:[EMAIL PROTECTED] Sent: Mittwoch, 17. Januar 2007 16:33 To: MyFaces Discussion Subject: Div tag and action Hello, Is there somewhere a JSF div component available that can be used like t:commandLink? The component should provide the definition of different style classes for diefferent mouse events (over, clicked,..) and also the action and actionListener methods like in the case of the commandLink component. Is there a way to solve this issue by using div + Javascript + t:commandLink ? Regards Frank -- This message, including attachments, is confidential and may be privileged. If you are not an intended recipient, please notify the sender then delete and destroy the original message and all copies. You should not copy, forward and/or disclose this message, in whole or in part, without permission of the sender. --
Re: how to force a jsf page to be shown in horizontal center of browser?
Legolas, This is a CSS issue (or maybe Tobago), not JSF. But this page should help you, as it did for me. See [1] [1] http://www.bluerobot.com/web/css/center1.html Regards, Jeff Bischoff Kenneth L Kurz Associates, Inc. legolas wrote: Hi Thank you for reading my post. i have some jfs pages (XML format) which contain several page fragments. When i run the application , for example index page opens , but its content are shown in left side of browser, i want them to be shown in horizontal center of browse. Imagine that my page size is 800*1000, so when some on with a resolution like 1024*768 view mypage he/she will see some free space in right side of his/her browser. I want my content to be in center of the browser and not in left side, is there any way for this? thanks
commandButton url output
Hi, This is almost a bookmarking question, but in essence I'm trying to have the output from my commandButton code go to a page where I want to dynamically append request parameters to the url. So for example, success might go to: http://.../context/myPath.jsf?requestParameter=dynamicValue Is this possible? And if so how does one go about doing this? Thank you Steph
Re: Can dataTable's value be a HashSet?
Is it possible to plug in a Comparator to the dataTable operation somehow to enable a Set to be sorted based on that Comparator? In fact, this could be used as a sorting mechanism for any collection, couldn't it? Does such functionality exist? (I couldn't find anything in the Javadoc to indicate so.) Simon Kitching-3 wrote: And in general sets are not ordered, which doesn't make sense when displaying data in a table. Read-only tables would be odd, but implementing editable tables would be really nasty if the server-side data structure that the table corresponds to could return its data in any order. The JSF spec explicitly lists what collections are supported for UIData, and Set is not one of them. Cagatay Civici wrote: Hi, It's not supported by UIData, because sets are not indexed. The workaround would be the wrapper you mentioned or a custom property resolver; http://www.jroller.com/page/mert?entry=settolistpropresolver_for_jsf_el Cagatay On 1/14/07, *lightbulb432* [EMAIL PROTECTED] mailto:[EMAIL PROTECTED] wrote: Can the value attribute of a h:dataTable be set to any Collection? I tried setting it to a Set (specifically, HashSet), but that gave trouble. To solve this, I added another property to the backing bean which simply wrapped that bean's Set in a List and used that as the value attribute, and then it worked fine! What is the reason that Sets/HashSets aren't allowed to be used? I sure hope there's a way to get it work, as many of my Collections are Sets and I wouldn't like to clutter my code with List wrappers just to make this work. -- View this message in context: http://www.nabble.com/Can-dataTable%27s-value-be-a-HashSet--tf2982099.html#a8329377 Sent from the MyFaces - Users mailing list archive at Nabble.com http://Nabble.com. -- View this message in context: http://www.nabble.com/Can-dataTable%27s-value-be-a-HashSet--tf2982099.html#a8414939 Sent from the MyFaces - Users mailing list archive at Nabble.com.
Re: JSTL and JSF
Matthias Wessendorf wrote: well, with facelets or jsf 1.2 that can be done ;) True, but why? Rendered seems to fit his needs perfectly. :) On 1/17/07, Joost Schouten [EMAIL PROTECTED] wrote: Thanks Simon! That did the trick. And no more c:xxx/ tags for me ;-) Cheers, Joost -Original Message- From: Simon Kitching [mailto:[EMAIL PROTECTED] Sent: Wednesday, January 17, 2007 4:14 PM To: MyFaces Discussion Subject: Re: JSTL and JSF Joost Schouten wrote: Hi, I have the below code trying to print a dataTable when the backing bean found entries, or no results when none are found. But my JSTL tags don't seem to have access to my JSF backing beans. What is the best way to combine JSTL and JSF, or are the other JSF tags/attributes I should use for this purpose? My table gets printed nicely without the JSTL c:if and c:choose tags Thank you, joost h:form id=searchResults onsubmit=return validateForm(this); c:if test=#{jsp$searchResults.query!=null c:choose c:when test=${jsp$searchResults.hits 0 !-- only show the dataTable if there is a query -- t:dataTable Combining JSTL conditional tags (or loops) with JSF+JSP1.1 is a very bad idea; it can result in very weird behaviour. Instead, do: t:dataTable rendered=#{searchResults.hits 0} /t:dataTable t:outputText rendered=#{searchResults.hits == 0} value=No results/ Regards, Simon
RE: how to force a jsf page to be shown in horizontal center of browser?
As Jeff said, CSS is way to go in most cases. One thing to note, in the example on that webpage, they set the content #content style class to have a fixed width of 500 pix. If you wish to play around more, such as having a center column that can expand depending on the browser window size/resolution, take a look at 3-column layouts using faux columns in CSS. It is essentially the same as what you are doing here, but you can use percentages on the left and right columns to allow for a liquid layout. If you are able to, I highly recommend using the Firebug or Web Developer plugins for Firefox, as they allow you to inspect individual elements on the page by mousing over them, and you can see the corresponding CSS. For JSF, CSS will take care of a lot of heartache with respect to positioning and style. There's tons of sites with templates for this, a couple I like are www.mollio.org and http://www.glish.com/css/. Good luck! Tim -Original Message- From: Jeff Bischoff [mailto:[EMAIL PROTECTED] Sent: Wednesday, January 17, 2007 11:32 AM To: MyFaces Discussion Subject: Re: how to force a jsf page to be shown in horizontal center of browser? Legolas, This is a CSS issue (or maybe Tobago), not JSF. But this page should help you, as it did for me. See [1] [1] http://www.bluerobot.com/web/css/center1.html Regards, Jeff Bischoff Kenneth L Kurz Associates, Inc. legolas wrote: Hi Thank you for reading my post. i have some jfs pages (XML format) which contain several page fragments. When i run the application , for example index page opens , but its content are shown in left side of browser, i want them to be shown in horizontal center of browse. Imagine that my page size is 800*1000, so when some on with a resolution like 1024*768 view mypage he/she will see some free space in right side of his/her browser. I want my content to be in center of the browser and not in left side, is there any way for this? thanks
Re: tabChangeListener Attribute in panelTabbedPane tag
I have not been able to obtain an answer for this attribute. Again if you look at the current implementation in the package org.apache.myfaces.custom.tabbedpane the class HtmlPanelTabbedPane contains the following member: private MethodBinding _tabChangeListener Why is this attribute useful? It will solve in a very elegant way the need for the backing bean to be notified that a tab change has ocurred and modify its state accordingly if it needs to. I have read many postings of the se of the tabChangeListener tag, but again it lacks the direct connection to the backing bean. I will be happy to provide my implementation but since I have not found anything in the postings or jira I need to know if there is no plans to provide such attribute. Thanks Fiallega, Jorge L wrote: Version: tomahawk 1.1.5 I am in need of a tabChangeListener attribute within the panelTabbedPane tag like: t:panelTabbedPane=20 serverSideTabSwitch=true styleClass=tabbedPane selectedIndex = 0 tabChangeListener =#{tablePannelPageCode.testListener} Although it is not available, I downloaded the lattest code and it seems as if the component has the basic skeleton for it (the member private MethodBinding _tabChangeListener = null on HtmlPanelTabbedPane). I went ahead and coded an implementation for this attribute. What I need to know is if there are plans to implement such attribute to = the component. I dont want to start using my implemention and not be supported in future releases. Thanks Jorge Luis -- View this message in context: http://www.nabble.com/tabChangeListener-Attribute-in-panelTabbedPane-tag-tf2842059.html#a8416982 Sent from the MyFaces - Users mailing list archive at Nabble.com.
where to place code to grab request parameters
Hi, Where can I place my code to grab the request parameters from the url in the back-end bean so that it's called each and every time a specific jsp is referenced (assuming a 1 to 1 mapping with a single backend bean). Regards, Steph
RE: Run-time tomahawk error
I'm still seeing the old snapshots (as of Jan 12th)in the nightly link. Have they been built recently? Thanks, Simeon -Original Message- From: news [mailto:[EMAIL PROTECTED] On Behalf Of Werner Punz Sent: Tuesday, January 16, 2007 10:40 AM To: users@myfaces.apache.org Subject: Re: Run-time tomahawk error Leyzerzon, Simeon schrieb: Werner, Thank you for the response. So what needs to be done on my part, re-downloading nightly Tomahawk? Please let me know when the sandbox component is fixed, if you will. Thanks again, Simeon The sandbox component was fixed by me yesterday night, I do not know if the fix already is in the snapshots, but it should appear soon. Yes redownloading should fix the issue. Cheers Werner PS: There is a handful of similar issues in my sandbox components, I will fix them ASAP. == Please access the attached hyperlink for an important electronic communications disclaimer: http://www.credit-suisse.com/legal/en/disclaimer_email_ib.html ==
Re: [tobago] Upgrading from 1.0.8 to 1.0.9 breaks tc:link (solved)
Hello Bernd, I tried the tobago example demo with the current trunk version and it worked. So I tried with another web app of my own and it worked, too! I finally found the significant difference in the two apps: I had an old tobago-config.xml configuration in my new webapp, still pointing to tobago and tobago-resource resource dirs. After changing to resource-dirorg/apache/myfaces/tobago/renderkit/resource-dir resource-dirtobago-resource/resource-dir everything works as expected (or as before!). This corrects both cases: the broken links and the input field with required markers. And you were right: the required markers were inside my login screen: the login name and password fields ;-) Thanks for your quick response. Regards, Stefan. Bernd Bohmann schrieb: Hello Stefan, 1.0.9 has to many changes. May be you get a validation or conversion error. Can you send the page, please. There are some issue with the popup. I hope we sort this out with the 1.0.10 release. So far I know there is an problem with the required marker and autofill values from the browser like password field. Can you describe your case? Regards Bernd Stefan Hedtfeld wrote: Hi, when upgrading my application from tobago 1.0.8 to 1.0.9 all my tc:link ... tags fail to work. I didn't find any release notes where any issues regarding upgrading from older versions are described. I'm running on JBoss 4.0.5 with JDK 1.5.0_10 and Firefox 2.0. I also noticed that the markers rendered to signal required fields keep displayed when editing the fields (I recognised this with tx:in fields, maybe it's also true for other controls). Regards, Stefan.
Re: Run-time tomahawk error
Mhh there were some issues with the continuum server according to a posting in the devs list. since this is out of my overview domain I do not know how often the snapshots are done. Are you familiar with Subversion, I only can recommend for now to check out the code yourself and then run maven on it to make your own build. Here is a link which describes the exact procedure on how to do it. http://wiki.apache.org/myfaces/Building_With_Maven maven has to be installed first That might be the fastest way to get the needed fixes in. Werner Leyzerzon, Simeon schrieb: I'm still seeing the old snapshots (as of Jan 12th)in the nightly link. Have they been built recently? Thanks, Simeon -Original Message- From: news [mailto:[EMAIL PROTECTED] On Behalf Of Werner Punz Sent: Tuesday, January 16, 2007 10:40 AM To: users@myfaces.apache.org Subject: Re: Run-time tomahawk error Leyzerzon, Simeon schrieb: Werner, Thank you for the response. So what needs to be done on my part, re-downloading nightly Tomahawk? Please let me know when the sandbox component is fixed, if you will. Thanks again, Simeon The sandbox component was fixed by me yesterday night, I do not know if the fix already is in the snapshots, but it should appear soon. Yes redownloading should fix the issue. Cheers Werner PS: There is a handful of similar issues in my sandbox components, I will fix them ASAP. == Please access the attached hyperlink for an important electronic communications disclaimer: http://www.credit-suisse.com/legal/en/disclaimer_email_ib.html ==
RE: GET on page with h:form handled like form submission
From: Giampaolo Tomassoni [mailto:[EMAIL PROTECTED] ...omissis... Is there any way to circumvent this problem? Is the way myfaces handles GET with parameters a by-design behaviour? Is so, which is the purpouse? Is there a way (maybe by mean of some init param) to instruct facelets to handle GETs always with a RESTORE_VIEW and RENDER_RESPONSE cycle, and not as a form submission? Our solution is a custom PhaseListener that checks the method property of the request, and discards any component tree that may have been retrieved during RESTORE_VIEW (thus forcing a jump to RENDER_RESPONSE). public void afterPhase(PhaseEvent event) { if (event.getPhaseId().equals(PhaseId.RESTORE_VIEW)) { // Never do a postback on GET request. // Ideally this check would be done in // before-restore-view, but JSF provides no way for // code to skip the restore-view processing. We // therefore need to let the normal restore-view // take its course, then forcibly override the results // here :-(. FacesContext fc = event.getFacesContext(); ExternalContext ec = fc.getExternalContext(); HttpServletRequest hreq = (HttpServletRequest) ec.getRequest(); if (hreq.getMethod().equals(GET)) { // discard UIViewRoot created during restoreView // and use a new one UIViewRoot viewRoot = fc.getViewRoot(); String viewId = viewRoot.getViewId(); UIViewRoot newView = fc.getApplication(). getViewHandler().createView(fc, viewId); newView.setViewId(viewId); fc.setViewRoot(newView); fc.renderResponse(); } } } Note that this code checks PhaseId==RESTORE_VIEW because our version of this listener actually does several things, so is active for all phases. If your version only returns RESTORE_VIEW as its active phase then this check is not needed. Thank you very much for sharing your code with me: I didn't even know where starting patch jsf to fix my problem. I guess that jsf-1.2 attempts fixing the is it a postback? problem, since it defines a isPostback() getter in the ResponseStateManager class. I suspect this is done exactly to allow the renderkit to more precisely discriminate show-the-page requests from true postback ones. Even not implementing the full jsf-1.2 specs, I guess that myfaces should apply more effort in discriminating the two cases. Please note also that method org.apache.myfaces.shared_impl.renderkit.html.HtmlFormRendererBase .encodeBegin in myfaces-1.1.4 says: snip writer.startElement(HTML.FORM_ELEM, htmlForm); writer.writeAttribute(HTML.ID_ATTR, clientId, null); writer.writeAttribute(HTML.NAME_ATTR, clientId, null); writer.writeAttribute(HTML.METHOD_ATTR, post, null); writer.writeURIAttribute(HTML.ACTION_ATTR, facesContext.getExternalContext().encodeActionURL(actionURL), null); /snip Which means that every and each h:form in myfaces-1.1.4 is to be handled through a POST request. This may mean that every and each GET request may be seen as not being a postback, but it seems that myfaces-1.1.4 does not enforce this. Please see the following excerpt from the org.apache.myfaces.lifecycle.LifecycleImpl.execute method: snip if (facesContext.getExternalContext().getRequestParameterMap().isEmpty()) { //no POST or query parameters -- set render response flag facesContext.renderResponse(); } /snip See? A GET is a postback if and only if it carries parameters (which is compatible with my experience about refreshing pages with no parameters). Even wider, a postback is as such irregardless of the carring method (POST or GET), which is compatible with what you told me about a JSF postback being carried by a GET, but which also seems not compatible with the specific myfaces-1.1.4 impl. of an html form. So, would it be possible to assert that, in the myfaces implementation, postbacks are handled only by POST (maybe non-empty) requests? What is supposed to be the payload of a postback GET when all the forms use POST methods instead? I don't have such a deep knowledge of the JSF framework to reply to this. I recently placed a Jira issue about this matter: http://issues.apache.org/jira/browse/MYFACES-1523 . We will see. Cheers, Giampaolo Cheers, Simon Thanks Simon. I really appreciate your help. Cheers dear, :) Giampaolo
RE: [Tobago] Problems with Tobago.reloadComponent with onclick
Hi Volker, Thank you very much for taking the time to prepare this. Unfortunately, it won't run in our Tomcat because your demo utilizes log4J which our Tomcat doesn't support (it is running as an embedded server within our application). Is it possible for you to provide a version that doesn't depend upon log4j? Thanks, John -Original Message- From: Volker Weber [mailto:[EMAIL PROTECTED] Sent: Saturday, January 13, 2007 3:12 PM To: MyFaces Discussion Subject: Re: [Tobago] Problems with Tobago.reloadComponent with onclick Hello John, i build a small demo app, could you test if this works for you? http://www.weber-oldenburg.dyndns.org/tobago/tobago-example-reload.war Which browser are you using? I'm on a linux box, so i can't test the IE. You are using the release 1.0.9 of tobago? I checked the tobago.js, on line 582 is nothing which can throw this error: Line: 582 Char: 7 Error: Object doesn't support this property or method Code:0 regards, Volker 2007/1/13, John [EMAIL PROTECTED]: Hi Bernd, I see that you have: 1) removed the outer Panel (maybe due to having to convert to a page, since this is a tag file) 2) Substituted placeholder backing bean calls (I know you had to do this for testing) 3) Removed bindings Other than that, I'm not finding any changes to implement. Of course, I can't remove the backing bean calls. Do you think the bindings are the problem? Am I missing some significant change? Thanks, John -Original Message- From: Bernd Bohmann [mailto:[EMAIL PROTECTED] Sent: Saturday, January 13, 2007 12:04 PM To: MyFaces Discussion Subject: Re: [Tobago] Problems with Tobago.reloadComponent with onclick Hello John, I modify your example jsp a little bit. The partial refresh works for me. Here is my modified example jsp: [EMAIL PROTECTED] uri=http://myfaces.apache.org/tobago/component; prefix=t% [EMAIL PROTECTED] uri=http://myfaces.apache.org/tobago/extension; prefix=tx% [EMAIL PROTECTED] uri=http://java.sun.com/jsf/core; prefix=f% f:view t:page id=page f:facet name=layout t:gridLayout columns=1000px id=quarantineGridLayout/ /f:facet t:box id=quarantineBox f:facet name=layout t:gridLayout / /f:facet f:facet name=toolBar t:toolBar labelPosition=left id=quarantineToolbar t:toolBarCommand label=Delete All tip=Delete all messages in quarantine id=QuarantineCmdDelAll f:facet name=confirmation t:out value=Delete every message in quarantine?/ /f:facet /t:toolBarCommand t:toolBarCommand label=Delete tip=Delete selected messages(s)/ t:toolBarCommand disabled=true/ t:toolBarCommand label=Deliver tip=Deliver selected messages to recipient(s) / t:toolBarCommand label=Deliver Always tip=Whitelist and then Deliver selected message(s) in one step / t:toolBarCommand label=WhiteList tip=Record sender of all selected messages - future messages from this sender will bypass filtering / t:toolBarCommand disabled=true/ t:toolBarCommand label=View Message tip=View message source in Message Display area / t:toolBarCommand disabled=true/ t:toolBarCommand label=Refresh action=#{test.refresh} tip=Refresh list of quarantined messages id=quarantineCmdRefresh t:attribute name=renderedPartially value=:page:quarantineInfoPanel/ /t:toolBarCommand /t:toolBar /f:facet t:panel id=quarantinePanel1 f:facet name=layout t:gridLayout rows=fixed;fixed;1* id=quarantineGridLayout1/ /f:facet t:panel id=quarantineInfoPanel f:facet name=layout t:gridLayout columns=fixed;fixed;1* rows=fixed;fixed;fixed id=quarantineGridLayout2/ /f:facet tx:in label=Total messages readonly=true id=messageCount value=#{test.rows}/ tx:in label=Messages / page value=#{test.count} id=messagesPerPage tip=Maximum messages displayed per page/ t:cell/ /t:panel t:panel f:facet name=layout t:gridLayout id=sheetLayout rows=400px/ /f:facet t:sheet id=quarantineSheet columns=3*;1*;1*;1*;1* var=quarantineRec showPageRange=right rows=0 t:column label=From id=From sortable=true t:out value=#{quarantineRec} id=quarantineSheetOut0/ /t:column t:column label=To id=To sortable=true t:out value=#{quarantineRec.recipient} id=quarantineSheetOut1/ /t:column t:column label=Subject id=Subject sortable=true t:out value=#{quarantineRec.subject} id=quarantineSheetOut2/ /t:column
[ot] Anyone know of a functional testing tool that can help with malicious attacks?
I want to test my MyFaces application with a barrage of malicious attacks geared to see if there are any vulnerabilities with my app. Are there any tools that have some predefined sets of malicious tests I could use for this? -- Thanks DJ MICK (Mick Knutson) http://www.djmick.com http://www.myspace.com/djmick_dot_com http://www.thumpradio.com
Re: JSTL and JSF
On 1/17/07, Jeff Bischoff [EMAIL PROTECTED] wrote: Matthias Wessendorf wrote: well, with facelets or jsf 1.2 that can be done ;) True, but why? Rendered seems to fit his needs perfectly. :) Agreed :-). I've also seen table components (such as the one that comes with Creator or VWP) that do exactly this for you automatically if the data you're bound to has zero rows. Might make a nice RFE to your favorite table component to have a way to enable this. Craig
RE : Re: Help to use MyFaces
I still can not run blank.war from MyFaces site. It seem that all of you have no problem to run MyFaces. But me, I am not able to run the most simple application blank.war. Every time I deploy it it says that it has deployed it, but it doesn't work (sandbox.jar and tomahawk.jar remains in the exploded app dir fo Tomcat). If also, tried removing tomahawk.jar and/or sandbox.jar, but the deployment fails and the log says: SEVERE: Exception starting filter extensionsFilter java.lang.ClassNotFoundException: org.apache.myfaces.component.html.util.ExtensionsFilter I've also tried reinstalling everything from scratch: Windows XP (Yes! I did it), J2SE 1.5, Tomcat 5.5.20 and Ant 1.6.5. So, I do not have any hidden libraries or anything special in my filesystem. Can anyone give some useful configuration to run MyFaces? Or perhaps a better version of blank.war or any other application that works? Or there is some black magic involved that I don't know? Thanks in advance, Patricio. --- Werner Punz [EMAIL PROTECTED] a écrit : Patricio Sanchez schrieb: Hi, I am starting to try myfaces, so I downloaded and deployed blank.war to test. After changing a single letter in a JSP page an redeploy, I keep getting the error: SEVERE: Error listener start Log file says: java.lang.ClassNotFoundException: org.apache.myfaces.component.html.util.ExtensionsFilter at org.apache.catalina.loader.WebappClassLoader.loadClass(WebappClassLoader.java:1340) at org.apache.catalina.loader.WebappClassLoader.loadClass(WebappClassLoader.java:1189) So I can not redeploy the application. I can't figure it out what am I doing wrong. Also I tried reinstalling J2SE 1.5.0 and Tomcat 5.0.28 from scratch, but it doesn't work anyway. Thanks in advance, Patricio. Tomcat 5.0 seems kindof old... Try to use a newer tomcat version... Although it should not make any difference, myfaces does not use JDK5 constructs! ___ Découvrez une nouvelle façon d'obtenir des réponses à toutes vos questions ! Profitez des connaissances, des opinions et des expériences des internautes sur Yahoo! Questions/Réponses http://fr.answers.yahoo.com
Re: rcfaces with myfaces
Hi Veit, Sorry the delay in response. Since rcfaces was not working so i shifted to other alternatives as we had time constraints. I now want to make rcfaces work as it seems to be a promising set of JSF components. I have done the following set up for rcfaces: 1. Added rcfaces-htmlc.jar and rcfaces-core.jar to WEB-INF/lib 2. Made the following entries into web.xml: servlet servlet-nameRcfaces Framework Contents/servlet-name servlet-class org.rcfaces.renderkit.html.internal.resource.ResourcesServlet /servlet-class init-param param-name org.rcfaces.renderkit.html.javascript.sets.CORE /param-name param-valuebasicComponent,message,fieldSet,ajax,service,extraButton,log, consoleLog/param-value /init-param load-on-startup4/load-on-startup /servlet servlet servlet-nameRcfaces Application Contents/servlet-name servlet-class org.rcfaces.core.internal.contentStorage.ContentStorageServlet /servlet-class load-on-startup5/load-on-startup /servlet Just to test i included the following in the JSP: %@ taglib uri=http://rcfaces.org/core; prefix=v% and h:panelGroup v:dateEntry id=entry11 autoCompletion=false/ v:dateChooser id=date11 for=entry11/ /h:panelGroup When the ear file for the application is deployed then an exception is thrown by rcfaces. Following is the exception: *x-- cut -- x* 179542 DEBUG [ScannerThread] org.rcfaces.core.internal.util.URLContentProvider - URL 'jar:file:/D:/jboss- 4.0.3SP1/server/default/tmp/deploy/tmp10242ehr-app.ear-contents/ehr- web-exp.war/WEB-INF/lib/rcfaces-htmlc_symbols.jar!/org/rcfaces/renderkit/html/internal/javascript/symbols' does not exist ! java.util.zip.ZipException: The system cannot find the file specified at java.util.zip.ZipFile.open(Native Method) *x-- cut -- x* ** *[[Madhav]] The file symbols is very much present in the jar.* ** *x-- cut -- x* 235103 DEBUG [http-0.0.0.0-8080-1] org.rcfaces.core.internal.config.ProvidersRegistry - Can not get constructor with provider parameter for class ' org.rcfaces.core.internal.adapter.AdapterManagerImpl' specified by provider id='null' (providerId='org.rcfaces.core.ADAPTER_MANAGER'). java.lang.NoSuchMethodException: org.rcfaces.core.internal.adapter.AdapterManagerImpl.init( org.rcfaces.core.provider.IProvider) at java.lang.Class.getConstructor0(Class.java:2647) *x-- cut -- x* ** 235650 DEBUG [http-0.0.0.0-8080-1] org.rcfaces.renderkit.html.internal.HtmlProcessContextImpl - Initialize htmlRenderExternalContext useMetaContentScriptType=true, useScriptCData=true, useFlatIdentifier=false, separatorChar='null'. 235650 DEBUG [http-0.0.0.0-8080-1] org.rcfaces.core.internal.renderkit.AbstractRenderContext - Push component. stack= / frmLogin:entry11 235728 ERROR [http-0.0.0.0-8080-1] org.apache.catalina.core.ContainerBase.[ jboss.web].[localhost].[/ehr].[jsp] - Servlet.service() for servlet jsp threw exception org.rcfaces.core.internal.renderkit.WriterException: RuntimeException at org.rcfaces.core.internal.renderkit.AbstractCameliaRenderer.encodeBegin( AbstractCameliaRenderer.java:48) at javax.faces.component.UIComponentBase.encodeBegin(UIComponentBase.java :515) at org.apache.myfaces.shared_impl.renderkit.RendererUtils.renderChild( RendererUtils.java:411) at org.apache.myfaces.shared_impl.renderkit.RendererUtils.renderChildren( RendererUtils.java:399) at org.apache.myfaces.shared_impl.renderkit.html.HtmlGroupRendererBase.encodeEnd (HtmlGroupRendererBase.java:78) at javax.faces.component.UIComponentBase.encodeEnd(UIComponentBase.java :539) at org.apache.myfaces.shared_impl.renderkit.RendererUtils.renderChild( RendererUtils.java:418) at org.apache.myfaces.shared_impl.renderkit.html.HtmlGridRendererBase.renderChildren (HtmlGridRendererBase.java:229) at org.apache.myfaces.shared_impl.renderkit.html.HtmlGridRendererBase.encodeEnd (HtmlGridRendererBase.java:101) at javax.faces.component.UIComponentBase.encodeEnd(UIComponentBase.java :539) at javax.faces.webapp.UIComponentTag.encodeEnd(UIComponentTag.java:498) at javax.faces.webapp.UIComponentTag.doEndTag(UIComponentTag.java:366) at org.apache.myfaces.shared_impl.taglib.UIComponentBodyTagBase.doEndTag( UIComponentBodyTagBase.java:57) at org.apache.jsp.index_jsp._jspx_meth_h_panelGrid_0( org.apache.jsp.index_jsp:454) at org.apache.jsp.index_jsp._jspx_meth_h_form_0( org.apache.jsp.index_jsp:326) at org.apache.jsp.index_jsp._jspx_meth_t_documentBody_0( org.apache.jsp.index_jsp:288) at org.apache.jsp.index_jsp._jspx_meth_t_document_0( org.apache.jsp.index_jsp:201) at org.apache.jsp.index_jsp._jspx_meth_f_view_0( org.apache.jsp.index_jsp:166) at org.apache.jsp.index_jsp._jspService(org.apache.jsp.index_jsp:130) at org.apache.jasper.runtime.HttpJspBase.service(HttpJspBase.java:97) at javax.servlet.http.HttpServlet.service(HttpServlet.java:810) at org.apache.jasper.servlet.JspServletWrapper.service( JspServletWrapper.java:322) at org.apache.jasper.servlet.JspServlet.serviceJspFile(JspServlet.java:314) at org.apache.jasper.servlet.JspServlet.service(JspServlet.java:264) at
Hibernate Object and JSF Bean Design
Now my JSF managed Bean contains some business object which is hiberante object. My friend told me this design is wrong, he says the managed bean should contain only View Object, and contents of view object is translated from business object. Am I really Wrong? As I use lots of lazy loading from hibernate, so I can directly call object lazily loaded for master and detail example. Any comments? -- View this message in context: http://www.nabble.com/Hibernate-Object-and-JSF-Bean-Design-tf3032608.html#a8425940 Sent from the MyFaces - Users mailing list archive at Nabble.com.