Re: Checkbox event
Maybe a variation of the method proposed in http://wiki.apache.org/myfaces/SubmitPageOnValueChange is useful to you. You can have a hidden (with css) button that is clicked automatically when you select the checkbox... Regards, Bruno 2005/11/4, [EMAIL PROTECTED] [EMAIL PROTECTED]: That was helpful. But, I would like to try some other way to utilize the power of JSF :). Is there a action event or valuechange event for checkbox. Any idea? Thanks. Quoting Simon Kitching [EMAIL PROTECTED]: [EMAIL PROTECTED] wrote: Hi, I need to display a list box when a checkbox is clicked. I guess we need to implement OnSelect event for this purpose. Please, correct me here if I am wrong. Does anybody have some examples of using onSelect in the backing bean?. Any help is appreciated. onSelect is a *client side* thing only. It is a normal HTML feature that allows an arbitrary piece of scripting to be run in the browser. Nothing to do with JSF at all. You could implement what you want entirely on the client by ensuring your page includes the listbox, but with its style set to display:none. You should then be able to specify some script in the checkbox onSelect attribute which finds that component and sets its style to visible. This is really not JSF at all but that doesn't mean it's a bad solution. Alternatively, I expect you could map the checkbox value to some boolean value on a backing bean, and use the same value to control the rendered attribute of the listbox. h:selectBooleanCheckbox value=#{someBean.listBoxEnabled}/ h:selectManyListbox rendered=#{someBean.listBoxEnabled} ... / The problem here is that you need some mechanism for submitting the entire form back to the server when the checkbox value is changed so the page can be regenerated. Maybe you can use tomahawk's collapsible panel control instead of the checkbox/listbox combination, and avoid the whole issue? Regards, Simon
Re: Some notes of my loadtest results
If this setting is set to false the user might have some strange effects if multiple browser windows are used. IMO functionality is more important than performance which is the reason to have true as the default value. 2005/11/3, Travis Reeder [EMAIL PROTECTED]: Shouldn't it default to SERIALIZE_STATE_IN_SESSION = false if it's such a performance killer? Travis On 11/3/05, Mathias Brökelmann [EMAIL PROTECTED] wrote: SERIALIZE_STATE_IN_SESSION and NUMBER_OF_VIEWS_IN_SESSION are only effective if STATE_SAVING_METHOD=server otherwise it´s settings will be ignored. The default for SERIALIZE_STATE_IN_SESSION is true and NUMBER_OF_VIEWS_IN_SESSION is 20 and are recommended if you use STATE_SAVING_METHOD=server to avoid strange side effects. 2005/11/3, CONNER, BRENDAN (SBCSI) [EMAIL PROTECTED]: So is there enough information at the moment to make a recommendation about how to set the parameters? For example: 1. If I set STATE_SAVING_METHOD=client, should I then set SERIALIZE_STATE_IN_SESSION=false? 2. If I set STATE_SAVING_METHOD=server, should I then set SERIALIZE_STATE_IN_SESSION=true? - Brendan -Original Message- From: Vesa Lindfors [mailto:[EMAIL PROTECTED] Sent: Thursday, November 03, 2005 1:51 AM Cc: MyFaces Discussion Subject: Re: Some notes of my loadtest results Hi, I have now tested org.apache.myfaces.SERIALIZE _STATE_IN_SESSION=false - and it worked like charm in the same Itanium environment the earlier test of nightly build was giving bad results. Average response time was now 116ms and no high load on processors. I also tried org.apache.myfaces.SERIALIZE_STATE_IN_SESSION=true org.apache.myfaces.NUMBER_OF_VIEWS_IN_SESSION=3. It gave bad results (average 19419 ms and lot of load) again - but that was expected as the memory or garbage collection was not the problem earlier, just processor load. We are using t:saveStates in our application, and I'm not sure if SERIALIZE_STATE_IN_SESSION had effect when I tried to update-operation of same pojo (pojo moved between pages with t:saveState) in two different views, sometimes hibernate gave nicely announcement (with later update operation) that data is stale and sometimes not, but it could also be some caching issue or something - must be checked later.. Can you please give me an example when I can expect some issues with SERIALIZE_STATE_IN_SESSION=false ? Anyway, I can now continue testing 100 users with this setup in other platforms (Solaris, HP-UX, AIX, Compaq and Linux) - thanks! --- VLi --- On 11/3/05, Mathias Brökelmann [EMAIL PROTECTED] wrote: @Vesa could you run your tests again with the nightly and define the context param org.apache.myfaces.SERIALIZE_STATE_IN_SESSION with a value set to false in your web.xml? You can also try to change the setting for org.apache.myfaces.NUMBER_OF_VIEWS_IN_SESSION which defines how many views are held in the session (default = 20). This might cause a garbage collector problem if memory is limited. Thanks a lot for your tests! 2005/11/2, Vesa Lindfors [EMAIL PROTECTED]: Hi, We have small CRUD application that I have started to load-test in different platforms. I'm using Myfaces impl + hibenate + Java 1.4.2. Test-case 1 (25% of users): Login – Creation of pojo and storing it to db - Listing pojos in db- - Search of created pojo – Remove of created pojo – Search of removed pojo – Logout . Test-case 2 (75% of users): Login – Listing pojos in db - Search of some pojos – Logout. Tester is run with 100 threads (=users) and set to use 20 +-10 seconds delay per page to simulate end users actions. Ramp times are set so that there is one logging-in per second. I noticed that application is really slow already in first tests. It is not so bad in my Win laptop, but same application is really too much for 4 processor HP-itanium or 20 processor solaris machine (both few years old). Slowness is due to application's processor capacity usage in machines. Memory or garbage collection is not the issue. After while there is hardly any IDLE capasity and machines start to use plenty of SYS time. Response times are after that really long. This can be achieved just by running those 100 users once. During development we have used STATE_SAVING_METHOD=client. When turning to STATE_SAVING_METHOD=server, load problems disappears. This was tested with Myfaces-all.jar 1.1.1. When I noticed that with nightly build it is now possible to use server side state saving, and still having multiple browser views (=tabs). So I decided to test that possibility also. Following
How to create component without binding?
Hello @all, I would like to create dynamically inside a backing bean some components. Looking around in the net I found only solutions that create a binding to a component, for example: h:panelGroup binding=#{my.backingbean} ... This means that I always need an existing component like panelGroup for creating with a binding some components. How can I create dynamically components without using a binding (and in the end an extra component)? Thanks and best regards, René Ott
Draw dynamical columns in Datatable
Title: Draw dynamical columns in Datatable Is there a possibility to tell JSF dynamically how much columns in a Datatable it should draw. I have a little Database Administration page, where the user can add new datasets to different tables. Now I have to draw several empty inputtext boxes for entering data, depending on how much columns each table has. Is there a way to do that? Thx! 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. __
Tree2
Hello! I have a question concerning the Tree2 component. What means the attribute clientSideToggle=false. Means this, that the data is loaded from the server if I click on the icon? Because that's what I need. I have so much data to load, that it costs so much time to load it all at the beginning. Is it possible to load it only if the user click on the parent node? Thanks, shed -- Ein Service von http://www.sms.at
Re: inputFileUpload using excessive amounts of memory
Hi, I have tried to profile the application and try and catch the error but nothing is working. For one thing I suck at profiling as I have no idea what i'm doing :S. I downloaded JProfiler and it has many nice screens but I cant seem to make it do anything usefull. I tried using NetBeans debugger to break on any ServletException or OutOfMemoryError and it didnt catch either :S. Any ideas of how I could track this thing down? Thanks, -Robert Martin Marinschek wrote: Sounds very interesting. Can you profile through what the extensions filter is doing? The question is when this amount of memory is built up, if in the extension filter or later in the JSF life-cycle, I can't imagine where this would be. regards, Martin On 11/3/05, Robert Parsons [EMAIL PROTECTED] wrote: Hi, Sorry to bother everyone again. I have been trying to use the file upload component of MyFaces (Tomahawk), but my JVM is using up an incredible amount of memory to process each upload request. With a max memory size of 64mb it (the server) would almost certainly run out of heap space. On 120mb I could upload the file but if I uploaded 2 in quick succession it would almost certainly run out. With 1GB of memory I could always upload a file, but uploading files in quick succession took the memory usage super high from 120mb,200mb,500mb! Oh and by the way these files were no more than 2mb each, and you didn't even have to upload a file to use up the memory, just submit the form. Sureley this much memory should not be need to upload such tiny files. Is this a problem with the upload component (or the extension filter) or is it something i'm doing wrong? In my web.xml the maximum upload size is set to 50mb and a use-the-disk threshold of 10mb. The exception see back from tomcat is: exception: javax.servlet.ServletException: Filter execution threw an exception org.apache.myfaces.component.html.util.MultipartFilter.doFilter(MultipartFilter.java:102) root cause: java.lang.OutOfMemoryError: Java heap space Any ideas? Thanks, -Robert. -- http://www.irian.at Your JSF powerhouse - JSF Trainings in English and German
Re: How to create component without binding?
Can you explain your task better, please. Nikita On 04/11/05, Rene Ott [EMAIL PROTECTED] wrote: Hello @all, I would like to create dynamically inside a backing bean some components. Looking around in the net I found only solutions that create a binding to a component, for example: h:panelGroup binding=#{my.backingbean} ... This means that I always need an existing component like panelGroup for creating with a binding some components. How can I create dynamically components without using a binding (and in the end an extra component)? Thanks and best regards, René Ott
Re: t:buffer as variable
Not being the definite expert on buffer, I would have said now. 'Buffer' buffers the output of the component rendering, afaik. Have you tried aliasBean for achieving this? With aliasBean, the value is retrieved once and set into the session - and is later recollected when the aliasBean is closed. regards, Martin On 11/4/05, Dave [EMAIL PROTECTED] wrote: Can t:buffer be used as variable to hold data to avoid multiple backing bean calls ? t:buffer into=#{value} h:outputText value=#{backBean.valueFromDB}/ /t:buffer h:graphicImage url=a.jpg rendered=#{value=='a'}/ h:graphicImage url=b.jpg rendered=#{value=='b'}/ It looks not very nice. I tried it in dataTable, but the page becomes blank without any error message. Yahoo! FareChase - Search multiple travel sites in one click. -- http://www.irian.at Your JSF powerhouse - JSF Trainings in English and German
Re: How to create component without binding?
You could add just the panelGroup (bound) and then add the components as children of this panelGroup, so in the end you only have one binding. Just use the method getChildren().add() of a component to add children to that component, Regards, Bruno 2005/11/4, Rene Ott [EMAIL PROTECTED]: Hello @all, I would like to create dynamically inside a backing bean some components. Looking around in the net I found only solutions that create a binding to a component, for example: h:panelGroup binding=#{my.backingbean} ... This means that I always need an existing component like panelGroup for creating with a binding some components. How can I create dynamically components without using a binding (and in the end an extra component)? Thanks and best regards, René Ott
Re: How to create component without binding?
What you want to do is do a binding for panelGroup and then add children to this panelGroup - with this you can create extra components. code snippet (not compiled except in my head ;): public UIComponent getPanelGroup() { HtmlPanelGroup panelGroup = new HtmlPanelGroup(); panelGroup.getChildren().add(new HtmlInputText()); panelGroup.getChildren().add(new HtmlOutputText()); ... return panelGroup; } regards, Martin On 11/4/05, Nikita Koselev [EMAIL PROTECTED] wrote: Can you explain your task better, please. Nikita On 04/11/05, Rene Ott [EMAIL PROTECTED] wrote: Hello @all, I would like to create dynamically inside a backing bean some components. Looking around in the net I found only solutions that create a binding to a component, for example: h:panelGroup binding=#{my.backingbean} ... This means that I always need an existing component like panelGroup for creating with a binding some components. How can I create dynamically components without using a binding (and in the end an extra component)? Thanks and best regards, René Ott -- http://www.irian.at Your JSF powerhouse - JSF Trainings in English and German
problem with date component and custom component
Hi! I'm using the great myfaces component date with popupCalendar=true and one of my custom components drawing a html select box (use the standard renderer. My application uses the jsf 1.1.01 with myfaces extension. The popup date component is shown above my custom select box component. Every time I click at the date component the popup is shown and the select box of my custom component is disappeared (=hidden)!!! When the popup is closed my custom component will be shown again... Does anyone know this problem? regards Stefan
Re: How to create component without binding?
Hi, Recently I posted a similar question and got the answer from Mike Kienenberger about not using the getter of the binded property to create it, as I can have it already created from the JSF engine in my setter method. Now I see that Martin proposes to create it in the getter. But should be the best approach then? 2005/11/4, Martin Marinschek [EMAIL PROTECTED]: What you want to do is do a binding for panelGroupand then add children to this panelGroup - with this you can createextra components.code snippet (not compiled except in my head ;):public UIComponent getPanelGroup() {HtmlPanelGroup panelGroup = new HtmlPanelGroup();panelGroup.getChildren().add(new HtmlInputText());panelGroup.getChildren().add(new HtmlOutputText());...return panelGroup;}regards, MartinOn 11/4/05, Nikita Koselev [EMAIL PROTECTED] wrote: Can you explain your task better, please. Nikita On 04/11/05, Rene Ott [EMAIL PROTECTED] wrote: Hello @all, I would like to create dynamically inside a backing bean some components. Looking around in the net I found only solutions that create a binding to a component, for example: h:panelGroup binding=#{my.backingbean} ... This means that I always need an existing component like panelGroup for creating with a binding some components. How can I create dynamically components without using a binding (and in the end an extra component)? Thanks and best regards, René Ott --http://www.irian.atYour JSF powerhouse -JSF Trainings in English and German
Re: How to create component without binding?
Well, for very easy situations, it is ok to create it in the getter, when it is sure that your component will not change during the life-time of a view. For all other things, it is much better to provide a setter and initialize the component somewhere else so that you can dynamically change the component and what it binds to. regards, Martin On 11/4/05, Enrique Medina [EMAIL PROTECTED] wrote: Hi, Recently I posted a similar question and got the answer from Mike Kienenberger about not using the getter of the binded property to create it, as I can have it already created from the JSF engine in my setter method. Now I see that Martin proposes to create it in the getter. But should be the best approach then? 2005/11/4, Martin Marinschek [EMAIL PROTECTED]: What you want to do is do a binding for panelGroup and then add children to this panelGroup - with this you can create extra components. code snippet (not compiled except in my head ;): public UIComponent getPanelGroup() { HtmlPanelGroup panelGroup = new HtmlPanelGroup(); panelGroup.getChildren().add(new HtmlInputText()); panelGroup.getChildren().add(new HtmlOutputText()); ... return panelGroup; } regards, Martin On 11/4/05, Nikita Koselev [EMAIL PROTECTED] wrote: Can you explain your task better, please. Nikita On 04/11/05, Rene Ott [EMAIL PROTECTED] wrote: Hello @all, I would like to create dynamically inside a backing bean some components. Looking around in the net I found only solutions that create a binding to a component, for example: h:panelGroup binding=#{my.backingbean} ... This means that I always need an existing component like panelGroup for creating with a binding some components. How can I create dynamically components without using a binding (and in the end an extra component)? Thanks and best regards, René Ott -- http://www.irian.at Your JSF powerhouse - JSF Trainings in English and German -- http://www.irian.at Your JSF powerhouse - JSF Trainings in English and German
Javascript conflict between x:tree2 and x:inputCalendar
Does anyone have any idea of what's happening with the javascript resources lately, that they seem to conflict with each other? Specifically, as I reported on issue #MYFACES-743, I can't have x:tree2 with client-side toggling and x:calendar with popup, because the treeNavClick javascript function fails. Also, I noticed that the generated HTML body tag is malformed: body (with a space and a quotation mark) Could this be related to the problem? Nota Legal: Este correo electronico puede contener informacion estrictamente confidencial y es de uso exclusivo del destinatario, quedando prohibida a cualquier otra persona su revelacion, copia, distribucion, o el ejercicio de cualquier accion relativa a su contenido. Si ha recibido este correo electronico por error, por favor, conteste al remitente, y posteriormente proceda a borrarlo de su sistema. Gracias por su colaboracion. Confidentiality notice: This e-mail message may contain confidential and/or legally privileged information and is solely for the attention and use of the intended recipient. Any disclosure, copying, distribution or the taking of any action with relation to the contents of this e-mail by any other person is strictly prohibited. If you believe that this e-mail has been mistakenly sent to you, please reply to the sender from whom you received the message in error and then delete the original e-mail from your system. Thank you for your co-operation.
Re: How to create component without binding?
Have you try to simplify your code to see if the binding works ok? Just put an HtmlOutputText in the panel, for instance... and if that works, add more logic... Regards, Bruno 2005/11/4, Enrique Medina [EMAIL PROTECTED]: Yes, that's what I am doing. But the thing is I cannot make it work. See my code (but nothing appears in my JSP page): public void setPanelTabuladores(UIPanel panelTabuladores) { if (this.panelTabuladores == null) { this.panelTabuladores = panelTabuladores; UIPanel tab0 = (HtmlPanelTab) FacesUtils.getApplication() .createComponent(HtmlPanelTab.COMPONENT_TYPE); tab0.setId(panelTab0); tab0.getAttributes().put(label, Variable0); UIData tabla0 = (HtmlDataTable) FacesUtils.getApplication() .createComponent(HtmlDataTable.COMPONENT_TYPE); tabla0.setId(tablaEdicionPuntuaciones0); tabla0.setVar(puntuacion0); tabla0.getAttributes().put(width, 100%); tabla0.getAttributes().put(cellspacing, 1); tabla0.getAttributes().put(cellpadding, 2); tabla0.getAttributes().put(renderedIfEmpty, Boolean.FALSE); tabla0.getAttributes().put(preserveDataModel, Boolean.FALSE); tabla0.setValueBinding(value, FacesUtils .getValueBinding(#{puntuaciones.listasPuntuaciones[0]})); tabla0.setRows(10); tabla0.getAttributes().put(rowClasses, impar,par); tabla0.getAttributes().put(headerClass, apptblhdr); tabla0.getAttributes().put(rowIndexVar, numFila0); tabla0.getAttributes().put(rowOnMouseOver, tblOver(this)); tabla0.getAttributes().put(rowOnMouseOut, tblOut(this, #{numFila0%2})); UIColumn col1 = (HtmlSimpleColumn) FacesUtils.getApplication() .createComponent(HtmlSimpleColumn.COMPONENT_TYPE); col1.getAttributes().put(style, text-align: center;); UIOutput texto1 = (HtmlOutputText) FacesUtils.getApplication() .createComponent(HtmlOutputText.COMPONENT_TYPE); texto1.setValueBinding(value, FacesUtils .getValueBinding(#{mensajes.puntuaciones_Tramos})); col1.setHeader(texto1); UIOutput texto2 = (HtmlOutputText) FacesUtils.getApplication() .createComponent(HtmlOutputText.COMPONENT_TYPE); texto2 .setValueBinding( value, FacesUtils .getValueBinding(#{puntuacion0.valor.minimo} - #{puntuacion0.valor.maximo})); col1.getChildren().add(texto2); UIColumn col2 = (HtmlSimpleColumn) FacesUtils.getApplication() .createComponent(HtmlSimpleColumn.COMPONENT_TYPE); col2.getAttributes().put(style, text-align: center;); UIInput texto3 = (HtmlInputText) FacesUtils.getApplication() .createComponent(HtmlInputText.COMPONENT_TYPE); texto3.setValueBinding(value, FacesUtils .getValueBinding(#{puntuacion0.puntuacion})); col2.getChildren().add(texto3); tabla0.getChildren().add(col1); tabla0.getChildren().add(col2); tab0.getChildren().add(tabla0); this.panelTabuladores.getChildren().add(tab0); } } 2005/11/4, Martin Marinschek [EMAIL PROTECTED]: Well, for very easy situations, it is ok to create it in the getter, when it is sure that your component will not change during the life-time of a view. For all other things, it is much better to provide a setter and initialize the component somewhere else so that you can dynamically change the component and what it binds to. regards, Martin On 11/4/05, Enrique Medina [EMAIL PROTECTED] wrote: Hi, Recently I posted a similar question and got the answer from Mike Kienenberger about not using the getter of the binded property to create it, as I can have it already created from the JSF engine in my setter method. Now I see that Martin proposes to create it in the getter. But should be the best approach then? 2005/11/4, Martin Marinschek [EMAIL PROTECTED]: What you want to do is do a binding for panelGroup and then add children to this panelGroup - with this you can create extra components. code snippet (not compiled except in my head ;): public UIComponent getPanelGroup() { HtmlPanelGroup panelGroup = new HtmlPanelGroup(); panelGroup.getChildren().add(new HtmlInputText()); panelGroup.getChildren().add(new HtmlOutputText()); ... return panelGroup; } regards, Martin On 11/4/05, Nikita Koselev [EMAIL
Re: How to create component without binding?
This won't work - on every request, your setter will be called by the JSF implementation. And on every request, you will get passed a new component reference (except you do server side state saving, then this might actually be the same) as it is serialized/deserialized from the saved state. Can you debug in what happens with your get/set pair? You should easily find out what is going out then... regards, Martin On 11/4/05, Enrique Medina [EMAIL PROTECTED] wrote: Yes, that's what I am doing. But the thing is I cannot make it work. See my code (but nothing appears in my JSP page): public void setPanelTabuladores(UIPanel panelTabuladores) { if (this.panelTabuladores == null) { this.panelTabuladores = panelTabuladores; UIPanel tab0 = (HtmlPanelTab) FacesUtils.getApplication() .createComponent(HtmlPanelTab.COMPONENT_TYPE); tab0.setId(panelTab0); tab0.getAttributes().put(label, Variable0); UIData tabla0 = (HtmlDataTable) FacesUtils.getApplication() .createComponent(HtmlDataTable.COMPONENT_TYPE); tabla0.setId(tablaEdicionPuntuaciones0); tabla0.setVar(puntuacion0); tabla0.getAttributes().put(width, 100%); tabla0.getAttributes().put(cellspacing, 1); tabla0.getAttributes().put(cellpadding, 2); tabla0.getAttributes().put(renderedIfEmpty, Boolean.FALSE); tabla0.getAttributes().put(preserveDataModel, Boolean.FALSE); tabla0.setValueBinding(value, FacesUtils .getValueBinding(#{puntuaciones.listasPuntuaciones[0]})); tabla0.setRows(10); tabla0.getAttributes().put(rowClasses, impar,par); tabla0.getAttributes().put(headerClass, apptblhdr); tabla0.getAttributes().put(rowIndexVar, numFila0); tabla0.getAttributes().put(rowOnMouseOver, tblOver(this)); tabla0.getAttributes().put(rowOnMouseOut, tblOut(this, #{numFila0%2})); UIColumn col1 = (HtmlSimpleColumn) FacesUtils.getApplication() .createComponent(HtmlSimpleColumn.COMPONENT_TYPE); col1.getAttributes().put(style, text-align: center;); UIOutput texto1 = (HtmlOutputText) FacesUtils.getApplication() .createComponent(HtmlOutputText.COMPONENT_TYPE); texto1.setValueBinding(value, FacesUtils .getValueBinding(#{mensajes.puntuaciones_Tramos})); col1.setHeader(texto1); UIOutput texto2 = (HtmlOutputText) FacesUtils.getApplication() .createComponent(HtmlOutputText.COMPONENT_TYPE); texto2 .setValueBinding( value, FacesUtils .getValueBinding(#{puntuacion0.valor.minimo} - #{puntuacion0.valor.maximo})); col1.getChildren().add(texto2); UIColumn col2 = (HtmlSimpleColumn) FacesUtils.getApplication() .createComponent(HtmlSimpleColumn.COMPONENT_TYPE); col2.getAttributes().put(style, text-align: center;); UIInput texto3 = (HtmlInputText) FacesUtils.getApplication() .createComponent(HtmlInputText.COMPONENT_TYPE); texto3.setValueBinding(value, FacesUtils .getValueBinding(#{puntuacion0.puntuacion})); col2.getChildren().add(texto3); tabla0.getChildren().add(col1); tabla0.getChildren().add(col2); tab0.getChildren().add(tabla0); this.panelTabuladores.getChildren().add(tab0); } } 2005/11/4, Martin Marinschek [EMAIL PROTECTED]: Well, for very easy situations, it is ok to create it in the getter, when it is sure that your component will not change during the life-time of a view. For all other things, it is much better to provide a setter and initialize the component somewhere else so that you can dynamically change the component and what it binds to. regards, Martin On 11/4/05, Enrique Medina [EMAIL PROTECTED] wrote: Hi, Recently I posted a similar question and got the answer from Mike Kienenberger about not using the getter of the binded property to create it, as I can have it already created from the JSF engine in my setter method. Now I see that Martin proposes to create it in the getter. But should be the best approach then? 2005/11/4, Martin Marinschek [EMAIL PROTECTED]: What you want to do is do a binding for panelGroup and then add children to this panelGroup - with this you can create extra components. code snippet (not compiled except in my head ;): public UIComponent getPanelGroup() { HtmlPanelGroup panelGroup = new
Re: Javascript conflict between x:tree2 and x:inputCalendar
yes, that might as well be. Can you add this to the open issue? regards, Martin On 11/4/05, Luciano Medina [EMAIL PROTECTED] wrote: Does anyone have any idea of what's happening with the javascript resources lately, that they seem to conflict with each other? Specifically, as I reported on issue #MYFACES-743, I can't have x:tree2 with client-side toggling and x:calendar with popup, because the treeNavClick javascript function fails. Also, I noticed that the generated HTML body tag is malformed: body (with a space and a quotation mark) Could this be related to the problem? Nota Legal: Este correo electronico puede contener informacion estrictamente confidencial y es de uso exclusivo del destinatario, quedando prohibida a cualquier otra persona su revelacion, copia, distribucion, o el ejercicio de cualquier accion relativa a su contenido. Si ha recibido este correo electronico por error, por favor, conteste al remitente, y posteriormente proceda a borrarlo de su sistema. Gracias por su colaboracion. Confidentiality notice: This e-mail message may contain confidential and/or legally privileged information and is solely for the attention and use of the intended recipient. Any disclosure, copying, distribution or the taking of any action with relation to the contents of this e-mail by any other person is strictly prohibited. If you believe that this e-mail has been mistakenly sent to you, please reply to the sender from whom you received the message in error and then delete the original e-mail from your system. Thank you for your co-operation. -- http://www.irian.at Your JSF powerhouse - JSF Trainings in English and German
Re: How to create component without binding?
Yes, I've tried so. A simple text works. Then the tab also works, as the result I'm getting now is the tab, but totally empty. I have checked once and again my code, but don't see anything wrong with it. Maybe other eyes can see what I don't see...2005/11/4, Bruno Aranda [EMAIL PROTECTED]: Have you try to simplify your code to see if the binding works ok?Just put an HtmlOutputText in the panel, for instance... and if thatworks, add more logic...Regards,Bruno2005/11/4, Enrique Medina [EMAIL PROTECTED]: Yes, that's what I am doing. But the thing is I cannot make it work.See my code (but nothing appears in my JSP page): public void setPanelTabuladores(UIPanel panelTabuladores){if (this.panelTabuladores == null){this.panelTabuladores = panelTabuladores;UIPanel tab0 = (HtmlPanelTab) FacesUtils.getApplication().createComponent(HtmlPanelTab.COMPONENT_TYPE);tab0.setId(panelTab0);tab0.getAttributes ().put(label, Variable0);UIData tabla0 = (HtmlDataTable) FacesUtils.getApplication().createComponent(HtmlDataTable.COMPONENT_TYPE);tabla0.setId(tablaEdicionPuntuaciones0); tabla0.setVar(puntuacion0);tabla0.getAttributes().put(width, 100%);tabla0.getAttributes().put(cellspacing, 1);tabla0.getAttributes().put(cellpadding, 2);tabla0.getAttributes().put(renderedIfEmpty, Boolean.FALSE);tabla0.getAttributes().put(preserveDataModel, Boolean.FALSE);tabla0.setValueBinding(value, FacesUtils .getValueBinding(#{puntuaciones.listasPuntuaciones[0]}));tabla0.setRows(10);tabla0.getAttributes().put(rowClasses, impar,par);tabla0.getAttributes().put(headerClass, apptblhdr);tabla0.getAttributes().put(rowIndexVar, numFila0);tabla0.getAttributes().put(rowOnMouseOver, tblOver(this));tabla0.getAttributes().put(rowOnMouseOut,tblOut(this, #{numFila0%2}));UIColumn col1 = (HtmlSimpleColumn) FacesUtils.getApplication().createComponent(HtmlSimpleColumn.COMPONENT_TYPE);col1.getAttributes().put(style, text-align: center;);UIOutput texto1 = (HtmlOutputText) FacesUtils.getApplication().createComponent(HtmlOutputText.COMPONENT_TYPE);texto1.setValueBinding(value, FacesUtils.getValueBinding(#{mensajes.puntuaciones_Tramos}));col1.setHeader(texto1);UIOutput texto2 = (HtmlOutputText) FacesUtils.getApplication().createComponent(HtmlOutputText.COMPONENT_TYPE);texto2.setValueBinding(value, FacesUtils .getValueBinding(#{puntuacion0.valor.minimo} - #{puntuacion0.valor.maximo}));col1.getChildren().add(texto2); UIColumn col2 = (HtmlSimpleColumn) FacesUtils.getApplication().createComponent(HtmlSimpleColumn.COMPONENT_TYPE);col2.getAttributes().put(style, text-align: center;);UIInput texto3 = (HtmlInputText) FacesUtils.getApplication().createComponent(HtmlInputText.COMPONENT_TYPE);texto3.setValueBinding(value, FacesUtils.getValueBinding(#{puntuacion0.puntuacion}));col2.getChildren().add(texto3);tabla0.getChildren().add(col1); tabla0.getChildren().add(col2);tab0.getChildren().add(tabla0);this.panelTabuladores.getChildren().add(tab0);}} 2005/11/4, Martin Marinschek [EMAIL PROTECTED]: Well, for very easy situations, it is ok to create it in the getter, when it is sure that your component will not change during the life-time of a view. For all other things, it is much better to provide a setter and initialize the component somewhere else so that you can dynamically change the component and what it binds to. regards, MartinOn 11/4/05, Enrique Medina [EMAIL PROTECTED] wrote: Hi,Recently I posted a similar question and got the answer from Mike Kienenberger about not using the getter of the binded property to create it, as I can have it already created from the JSF engine in my setter method.Now I see that Martin proposes to create it in the getter. But should be the best approach then? 2005/11/4, Martin Marinschek [EMAIL PROTECTED] :What you want to do is do a binding for panelGroup and then add children to this panelGroup - with this you can createextra components. code snippet (not compiled except in my head ;): public UIComponent getPanelGroup(){HtmlPanelGroup panelGroup = new HtmlPanelGroup(); panelGroup.getChildren().add(new HtmlInputText());panelGroup.getChildren().add(new HtmlOutputText());... return panelGroup; } regards, Martin On 11/4/05, Nikita Koselev [EMAIL PROTECTED] wrote: Can you explain your task better, please. Nikita On 04/11/05, Rene Ott [EMAIL PROTECTED] wrote: Hello @all, I would like to create dynamically inside a backing bean some components. Looking around in the net I found only solutions that create a binding to a component, for example: h:panelGroup binding=#{my.backingbean} ... This means that I always need an existing component like panelGroup for creating with a binding some components. How can I create dynamically components without using a binding (and in the end an extra component)? Thanks and best
Re: How to create component without binding?
The debug shows that: 1) The getter is only called every time the page is rendered coming from another different page. If it is re-rendered (for example, because you click on the tab), the getter is not called 2) The setter is called: 2.1) Just after the only time the getter is invoked (I think this is the perfect point to create all the components) 2.2) Every time I click on the tab (simply return the parameter passed by JSF) 2.3) Sometimes when I navigate to another page (simply return the parameter passed by JSF - ignore it) I also noticed then that I should always return null from the getter, so every time this page is called, the components must be recreated, as it is probably that the data has changed2005/11/4, Martin Marinschek [EMAIL PROTECTED]: This won't work - on every request, your setter will be called by theJSF implementation. And on every request, you will get passed a newcomponent reference (except you do server side state saving, then thismight actually be the same) as it is serialized/deserialized from the saved state.Can you debug in what happens with your get/set pair? You shouldeasily find out what is going out then...regards,MartinOn 11/4/05, Enrique Medina [EMAIL PROTECTED] wrote: Yes, that's what I am doing. But the thing is I cannot make it work.See my code (but nothing appears in my JSP page):public void setPanelTabuladores(UIPanel panelTabuladores) {if (this.panelTabuladores == null){this.panelTabuladores = panelTabuladores;UIPanel tab0 = (HtmlPanelTab) FacesUtils.getApplication().createComponent(HtmlPanelTab.COMPONENT_TYPE);tab0.setId(panelTab0);tab0.getAttributes ().put(label, Variable0);UIData tabla0 = (HtmlDataTable) FacesUtils.getApplication().createComponent(HtmlDataTable.COMPONENT_TYPE);tabla0.setId(tablaEdicionPuntuaciones0); tabla0.setVar(puntuacion0);tabla0.getAttributes().put(width, 100%);tabla0.getAttributes().put(cellspacing, 1);tabla0.getAttributes().put(cellpadding, 2);tabla0.getAttributes().put(renderedIfEmpty, Boolean.FALSE);tabla0.getAttributes().put(preserveDataModel, Boolean.FALSE);tabla0.setValueBinding(value, FacesUtils .getValueBinding(#{puntuaciones.listasPuntuaciones[0]}));tabla0.setRows(10);tabla0.getAttributes().put(rowClasses, impar,par);tabla0.getAttributes().put(headerClass, apptblhdr);tabla0.getAttributes().put(rowIndexVar, numFila0);tabla0.getAttributes().put(rowOnMouseOver, tblOver(this));tabla0.getAttributes().put(rowOnMouseOut,tblOut(this, #{numFila0%2}));UIColumn col1 = (HtmlSimpleColumn) FacesUtils.getApplication().createComponent(HtmlSimpleColumn.COMPONENT_TYPE);col1.getAttributes().put(style, text-align: center;);UIOutput texto1 = (HtmlOutputText) FacesUtils.getApplication().createComponent(HtmlOutputText.COMPONENT_TYPE);texto1.setValueBinding(value, FacesUtils.getValueBinding(#{mensajes.puntuaciones_Tramos}));col1.setHeader(texto1);UIOutput texto2 = (HtmlOutputText) FacesUtils.getApplication().createComponent(HtmlOutputText.COMPONENT_TYPE);texto2.setValueBinding(value, FacesUtils .getValueBinding(#{puntuacion0.valor.minimo} - #{puntuacion0.valor.maximo}));col1.getChildren().add(texto2); UIColumn col2 = (HtmlSimpleColumn) FacesUtils.getApplication().createComponent(HtmlSimpleColumn.COMPONENT_TYPE);col2.getAttributes().put(style, text-align: center;);UIInput texto3 = (HtmlInputText) FacesUtils.getApplication().createComponent(HtmlInputText.COMPONENT_TYPE);texto3.setValueBinding(value, FacesUtils.getValueBinding(#{puntuacion0.puntuacion}));col2.getChildren().add(texto3);tabla0.getChildren().add(col1); tabla0.getChildren().add(col2);tab0.getChildren().add(tabla0);this.panelTabuladores.getChildren().add(tab0);}} 2005/11/4, Martin Marinschek [EMAIL PROTECTED]: Well, for very easy situations, it is ok to create it in the getter, when it is sure that your component will not change during the life-time of a view. For all other things, it is much better to provide a setter and initialize the component somewhere else so that you can dynamically change the component and what it binds to. regards, MartinOn 11/4/05, Enrique Medina [EMAIL PROTECTED] wrote: Hi,Recently I posted a similar question and got the answer from Mike Kienenberger about not using the getter of the binded property to create it, as I can have it already created from the JSF engine in my setter method.Now I see that Martin proposes to create it in the getter. But should be the best approach then? 2005/11/4, Martin Marinschek [EMAIL PROTECTED] :What you want to do is do a binding for panelGroup and then add children to this panelGroup - with this you can createextra components. code snippet (not compiled except in my head ;): public UIComponent getPanelGroup(){HtmlPanelGroup panelGroup = new HtmlPanelGroup(); panelGroup.getChildren().add(new HtmlInputText());panelGroup.getChildren().add(new HtmlOutputText());... return panelGroup; } regards, Martin On
AW: MyFaces 1.1.1 - rendering of radiobuttons/labels
Hi! I use the following code in my JSP/JSF page to render a list of radiobuttons: t:selectOneRadio lang=de layout=pageDirection required=true styleClass=daten title=Radiobuttons zur Auswahl des Umfragetyps f:selectItems value=#{UmfrageBacking.umfragetypen} / /t:selectOneRadio The following code ist generated with h:selectOneRadio and t:selectOneRadio using MyFaces 1.1.1: table class=daten tr tdlabelinput type=radio name=_id0:_id2 value=Lehrevaluierung lang=de title=Radiobuttons zur Auswahl des Umfragetyps class=daten /#160;Lehrevaluierung/label/td/tr/tr trtdlabelinput type=radio name=_id0:_id2 value=Allgemeine Studierendenbefragung lang=de title=Radiobuttons zur Auswahl des Umfragetyps class=daten /#160;Allgemeine Studierendenbefragung/label/td /tr/tr tr tdlabelinput type=radio name=_id0:_id2 value=Mitarbeiterbefragung lang=de title=Radiobuttons zur Auswahl des Umfragetyps class=daten /#160;Mitarbeiterbefragung/label/td /tr/tr tr tdlabelinput type=radio name=_id0:_id2 value=Sonstige Umfrage lang=de title=Radiobuttons zur Auswahl des Umfragetyps class=daten /#160;Sonstige Umfrage/label/td /tr/tr /table As you can see, besides of the useless label element, there's also a double /tr end tag for the delimitation of each table row. Regards, Matthias -Ursprüngliche Nachricht- Von: [EMAIL PROTECTED] [mailto:[EMAIL PROTECTED] Auftrag von Bruno Aranda Gesendet: Donnerstag, 3. November 2005 18:19 An: MyFaces Discussion Betreff: Re: MyFaces 1.1.1 - rendering of radiobuttons/labels You are true, that's not desirable behaviour... can we see the snippet of the jsf code you are using? Regards, Bruno 2005/11/3, Matthias Kahlau [EMAIL PROTECTED]: Hi all! Doesn't the rendering of radiobuttons / labels work correctly? Usually, you have to use the label element using the following approach described in the SelfHTML 8.1 documentation: label for=idNameLabel:/label [Formelement] id=idName But JSF renders something like this (it doesn't matter if I use the standard JSF HTML RenderKit taglib or Tomahawk): labelinput type=radio name=_id0:_id2 value=someValue lang=de title=someTitle class=daten /#160;someDescription/label With this approach, you can't click on the label to select/deselect the radiobutton, so the label just makes no sense. Using the label to select/deselect the radiobutton would improve the usability of the control. Is this a bug? Regards, Matthias
AW: How to create component without binding?
First thanks for the many answers in just one hour :-) Why do I need a binding to do this? If I need a binding to for example a panelgroup this means that on the page the panelgroup gets rendered although I don't need (or want) it. Lets assume I want to create dynamically several outputlinks. With a panelgroup binding they are all inside a panelgroup. Why cannot I just hang the outputlinks in UIviewroot and skip all the binding stuff? René Ott -Ursprüngliche Nachricht- Von: Martin Marinschek [mailto:[EMAIL PROTECTED] Gesendet: Freitag, 4. November 2005 09:49 An: MyFaces Discussion Betreff: Re: How to create component without binding? What you want to do is do a binding for panelGroup and then add children to this panelGroup - with this you can create extra components. code snippet (not compiled except in my head ;): public UIComponent getPanelGroup() { HtmlPanelGroup panelGroup = new HtmlPanelGroup(); panelGroup.getChildren().add(new HtmlInputText()); panelGroup.getChildren().add(new HtmlOutputText()); ... return panelGroup; } regards, Martin On 11/4/05, Nikita Koselev [EMAIL PROTECTED] wrote: Can you explain your task better, please. Nikita On 04/11/05, Rene Ott [EMAIL PROTECTED] wrote: Hello @all, I would like to create dynamically inside a backing bean some components. Looking around in the net I found only solutions that create a binding to a component, for example: h:panelGroup binding=#{my.backingbean} ... This means that I always need an existing component like panelGroup for creating with a binding some components. How can I create dynamically components without using a binding (and in the end an extra component)? Thanks and best regards, René Ott -- http://www.irian.at Your JSF powerhouse - JSF Trainings in English and German
Re: MyFaces 1.1.1 - rendering of radiobuttons/labels
I miss the h:outputLabel in your jsp code 2005/11/4, Matthias Kahlau [EMAIL PROTECTED]: Hi! I use the following code in my JSP/JSF page to render a list of radiobuttons: t:selectOneRadio lang=de layout=pageDirection required=true styleClass=daten title=Radiobuttons zur Auswahl des Umfragetyps f:selectItems value=#{UmfrageBacking.umfragetypen} / /t:selectOneRadio The following code ist generated with h:selectOneRadio and t:selectOneRadio using MyFaces 1.1.1: table class=daten tr tdlabelinput type=radio name=_id0:_id2 value=Lehrevaluierung lang=de title=Radiobuttons zur Auswahl des Umfragetyps class=daten /#160;Lehrevaluierung/label/td/tr/tr trtdlabelinput type=radio name=_id0:_id2 value=Allgemeine Studierendenbefragung lang=de title=Radiobuttons zur Auswahl des Umfragetyps class=daten /#160;Allgemeine Studierendenbefragung/label/td /tr/tr tr tdlabelinput type=radio name=_id0:_id2 value=Mitarbeiterbefragung lang=de title=Radiobuttons zur Auswahl des Umfragetyps class=daten /#160;Mitarbeiterbefragung/label/td /tr/tr tr tdlabelinput type=radio name=_id0:_id2 value=Sonstige Umfrage lang=de title=Radiobuttons zur Auswahl des Umfragetyps class=daten /#160;Sonstige Umfrage/label/td /tr/tr /table As you can see, besides of the useless label element, there's also a double /tr end tag for the delimitation of each table row. Regards, Matthias -Ursprüngliche Nachricht- Von: [EMAIL PROTECTED] [mailto:[EMAIL PROTECTED] Auftrag von Bruno Aranda Gesendet: Donnerstag, 3. November 2005 18:19 An: MyFaces Discussion Betreff: Re: MyFaces 1.1.1 - rendering of radiobuttons/labels You are true, that's not desirable behaviour... can we see the snippet of the jsf code you are using? Regards, Bruno 2005/11/3, Matthias Kahlau [EMAIL PROTECTED]: Hi all! Doesn't the rendering of radiobuttons / labels work correctly? Usually, you have to use the label element using the following approach described in the SelfHTML 8.1 documentation: label for=idNameLabel:/label [Formelement] id=idName But JSF renders something like this (it doesn't matter if I use the standard JSF HTML RenderKit taglib or Tomahawk): labelinput type=radio name=_id0:_id2 value=someValue lang=de title=someTitle class=daten /#160;someDescription/label With this approach, you can't click on the label to select/deselect the radiobutton, so the label just makes no sense. Using the label to select/deselect the radiobutton would improve the usability of the control. Is this a bug? Regards, Matthias -- Mathias
Re: Draw dynamical columns in Datatable
use t:columns inside your t:datatable take a look at the examples and the doc at http://wiki.apache.org/myfaces/Dynamic_Columns or http://myfaces.apache.org/tomahawk/columns.html 2005/11/4, [EMAIL PROTECTED] [EMAIL PROTECTED]: Is there a possibility to tell JSF dynamically how much columns in a Datatable it should draw. I have a little Database Administration page, where the user can add new datasets to different tables. Now I have to draw several empty inputtext boxes for entering data, depending on how much columns each table has. Is there a way to do that? Thx! 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. __ -- Mathias
Re: MyFaces 1.1.1 - rendering of radiobuttons/labels
Well, myfaces renders the component as the spec says ( http://java.sun.com/j2ee/javaserverfaces/1.1_01/docs/renderkitdocs/HTML_BASIC/javax.faces.SelectOnejavax.faces.Radio.html ), so maybe it is a mistake in the spec? Regards Bruno 2005/11/4, Matthias Kahlau [EMAIL PROTECTED]: Hi! I use the following code in my JSP/JSF page to render a list of radiobuttons: t:selectOneRadio lang=de layout=pageDirection required=true styleClass=daten title=Radiobuttons zur Auswahl des Umfragetyps f:selectItems value=#{UmfrageBacking.umfragetypen} / /t:selectOneRadio The following code ist generated with h:selectOneRadio and t:selectOneRadio using MyFaces 1.1.1: table class=daten tr tdlabelinput type=radio name=_id0:_id2 value=Lehrevaluierung lang=de title=Radiobuttons zur Auswahl des Umfragetyps class=daten /#160;Lehrevaluierung/label/td/tr/tr trtdlabelinput type=radio name=_id0:_id2 value=Allgemeine Studierendenbefragung lang=de title=Radiobuttons zur Auswahl des Umfragetyps class=daten /#160;Allgemeine Studierendenbefragung/label/td /tr/tr tr tdlabelinput type=radio name=_id0:_id2 value=Mitarbeiterbefragung lang=de title=Radiobuttons zur Auswahl des Umfragetyps class=daten /#160;Mitarbeiterbefragung/label/td /tr/tr tr tdlabelinput type=radio name=_id0:_id2 value=Sonstige Umfrage lang=de title=Radiobuttons zur Auswahl des Umfragetyps class=daten /#160;Sonstige Umfrage/label/td /tr/tr /table As you can see, besides of the useless label element, there's also a double /tr end tag for the delimitation of each table row. Regards, Matthias -Ursprüngliche Nachricht- Von: [EMAIL PROTECTED] [mailto:[EMAIL PROTECTED] Auftrag von Bruno Aranda Gesendet: Donnerstag, 3. November 2005 18:19 An: MyFaces Discussion Betreff: Re: MyFaces 1.1.1 - rendering of radiobuttons/labels You are true, that's not desirable behaviour... can we see the snippet of the jsf code you are using? Regards, Bruno 2005/11/3, Matthias Kahlau [EMAIL PROTECTED]: Hi all! Doesn't the rendering of radiobuttons / labels work correctly? Usually, you have to use the label element using the following approach described in the SelfHTML 8.1 documentation: label for=idNameLabel:/label [Formelement] id=idName But JSF renders something like this (it doesn't matter if I use the standard JSF HTML RenderKit taglib or Tomahawk): labelinput type=radio name=_id0:_id2 value=someValue lang=de title=someTitle class=daten /#160;someDescription/label With this approach, you can't click on the label to select/deselect the radiobutton, so the label just makes no sense. Using the label to select/deselect the radiobutton would improve the usability of the control. Is this a bug? Regards, Matthias
Re: How to create component without binding?
Then you'll need to do a binding for the ViewRoot ;) How would JSF know where to put your components, if you don't have them in the template? regards, Martin On 11/4/05, Rene Ott [EMAIL PROTECTED] wrote: First thanks for the many answers in just one hour :-) Why do I need a binding to do this? If I need a binding to for example a panelgroup this means that on the page the panelgroup gets rendered although I don't need (or want) it. Lets assume I want to create dynamically several outputlinks. With a panelgroup binding they are all inside a panelgroup. Why cannot I just hang the outputlinks in UIviewroot and skip all the binding stuff? René Ott -Ursprüngliche Nachricht- Von: Martin Marinschek [mailto:[EMAIL PROTECTED] Gesendet: Freitag, 4. November 2005 09:49 An: MyFaces Discussion Betreff: Re: How to create component without binding? What you want to do is do a binding for panelGroup and then add children to this panelGroup - with this you can create extra components. code snippet (not compiled except in my head ;): public UIComponent getPanelGroup() { HtmlPanelGroup panelGroup = new HtmlPanelGroup(); panelGroup.getChildren().add(new HtmlInputText()); panelGroup.getChildren().add(new HtmlOutputText()); ... return panelGroup; } regards, Martin On 11/4/05, Nikita Koselev [EMAIL PROTECTED] wrote: Can you explain your task better, please. Nikita On 04/11/05, Rene Ott [EMAIL PROTECTED] wrote: Hello @all, I would like to create dynamically inside a backing bean some components. Looking around in the net I found only solutions that create a binding to a component, for example: h:panelGroup binding=#{my.backingbean} ... This means that I always need an existing component like panelGroup for creating with a binding some components. How can I create dynamically components without using a binding (and in the end an extra component)? Thanks and best regards, René Ott -- http://www.irian.at Your JSF powerhouse - JSF Trainings in English and German -- http://www.irian.at Your JSF powerhouse - JSF Trainings in English and German
AW: MyFaces 1.1.1 - rendering of radiobuttons/labels
Ok, but how do I have to use the h:outputLabel tag, when I use f:selectItems .. to render a dynamic list of options? Viele Grüße Matthias Kahlau -Ursprüngliche Nachricht- Von: [EMAIL PROTECTED] [mailto:[EMAIL PROTECTED] Auftrag von Mathias Brökelmann Gesendet: Freitag, 4. November 2005 10:43 An: MyFaces Discussion Betreff: Re: MyFaces 1.1.1 - rendering of radiobuttons/labels I miss the h:outputLabel in your jsp code 2005/11/4, Matthias Kahlau [EMAIL PROTECTED]: Hi! I use the following code in my JSP/JSF page to render a list of radiobuttons: t:selectOneRadio lang=de layout=pageDirection required=true styleClass=daten title=Radiobuttons zur Auswahl des Umfragetyps f:selectItems value=#{UmfrageBacking.umfragetypen} / /t:selectOneRadio The following code ist generated with h:selectOneRadio and t:selectOneRadio using MyFaces 1.1.1: table class=daten tr tdlabelinput type=radio name=_id0:_id2 value=Lehrevaluierung lang=de title=Radiobuttons zur Auswahl des Umfragetyps class=daten /#160;Lehrevaluierung/label/td/tr/tr trtdlabelinput type=radio name=_id0:_id2 value=Allgemeine Studierendenbefragung lang=de title=Radiobuttons zur Auswahl des Umfragetyps class=daten /#160;Allgemeine Studierendenbefragung/label/td /tr/tr tr tdlabelinput type=radio name=_id0:_id2 value=Mitarbeiterbefragung lang=de title=Radiobuttons zur Auswahl des Umfragetyps class=daten /#160;Mitarbeiterbefragung/label/td /tr/tr tr tdlabelinput type=radio name=_id0:_id2 value=Sonstige Umfrage lang=de title=Radiobuttons zur Auswahl des Umfragetyps class=daten /#160;Sonstige Umfrage/label/td /tr/tr /table As you can see, besides of the useless label element, there's also a double /tr end tag for the delimitation of each table row. Regards, Matthias -Ursprüngliche Nachricht- Von: [EMAIL PROTECTED] [mailto:[EMAIL PROTECTED] Auftrag von Bruno Aranda Gesendet: Donnerstag, 3. November 2005 18:19 An: MyFaces Discussion Betreff: Re: MyFaces 1.1.1 - rendering of radiobuttons/labels You are true, that's not desirable behaviour... can we see the snippet of the jsf code you are using? Regards, Bruno 2005/11/3, Matthias Kahlau [EMAIL PROTECTED]: Hi all! Doesn't the rendering of radiobuttons / labels work correctly? Usually, you have to use the label element using the following approach described in the SelfHTML 8.1 documentation: label for=idNameLabel:/label [Formelement] id=idName But JSF renders something like this (it doesn't matter if I use the standard JSF HTML RenderKit taglib or Tomahawk): labelinput type=radio name=_id0:_id2 value=someValue lang=de title=someTitle class=daten /#160;someDescription/label With this approach, you can't click on the label to select/deselect the radiobutton, so the label just makes no sense. Using the label to select/deselect the radiobutton would improve the usability of the control. Is this a bug? Regards, Matthias -- Mathias
AW: How to create component without binding?
That sounds good ;) How can I realize this? f:view binding=my.backingbean Like this? Does a component exist that acts just like a container for other components but itself doesn't get displayed? This way it would be possible to make a binding to this component without the need to display the component. René -Ursprüngliche Nachricht- Von: Martin Marinschek [mailto:[EMAIL PROTECTED] Gesendet: Freitag, 4. November 2005 11:06 An: MyFaces Discussion Betreff: Re: How to create component without binding? Then you'll need to do a binding for the ViewRoot ;) How would JSF know where to put your components, if you don't have them in the template? regards, Martin On 11/4/05, Rene Ott [EMAIL PROTECTED] wrote: First thanks for the many answers in just one hour :-) Why do I need a binding to do this? If I need a binding to for example a panelgroup this means that on the page the panelgroup gets rendered although I don't need (or want) it. Lets assume I want to create dynamically several outputlinks. With a panelgroup binding they are all inside a panelgroup. Why cannot I just hang the outputlinks in UIviewroot and skip all the binding stuff? René Ott -Ursprüngliche Nachricht- Von: Martin Marinschek [mailto:[EMAIL PROTECTED] Gesendet: Freitag, 4. November 2005 09:49 An: MyFaces Discussion Betreff: Re: How to create component without binding? What you want to do is do a binding for panelGroup and then add children to this panelGroup - with this you can create extra components. code snippet (not compiled except in my head ;): public UIComponent getPanelGroup() { HtmlPanelGroup panelGroup = new HtmlPanelGroup(); panelGroup.getChildren().add(new HtmlInputText()); panelGroup.getChildren().add(new HtmlOutputText()); ... return panelGroup; } regards, Martin On 11/4/05, Nikita Koselev [EMAIL PROTECTED] wrote: Can you explain your task better, please. Nikita On 04/11/05, Rene Ott [EMAIL PROTECTED] wrote: Hello @all, I would like to create dynamically inside a backing bean some components. Looking around in the net I found only solutions that create a binding to a component, for example: h:panelGroup binding=#{my.backingbean} ... This means that I always need an existing component like panelGroup for creating with a binding some components. How can I create dynamically components without using a binding (and in the end an extra component)? Thanks and best regards, René Ott -- http://www.irian.at Your JSF powerhouse - JSF Trainings in English and German -- http://www.irian.at Your JSF powerhouse - JSF Trainings in English and German
Re: Calendar problems??
Hello! And this is the reason why I created facelets issue too. Ok, waiting for the Jacob Hookom comments. I'll quote You in Facelet's issue. Martin Marinschek wrote: Hi, we've had Thomas Spiegl look at problems with duplicate Ids and facelets with the navMenu - and he has found no resolution (in the limited time he had for this). It seems that several components are now incompatible with facelets, and it just shows up cause I implemented better errror handling. I am now controlling that for the same parent, you can have the component with the same id only once. I don't know what facelets would do to change this, really, but Thomas was saying that somehow facelets seems to be creating components even though they are already existing? Please don't take everything I say here for granted, this is just what I heard of from hearsay. regards, Martin On 11/4/05, Boris Kovalenko [EMAIL PROTECTED] wrote: Hello! Unfortunatelly no :( I opened two PRs (one in MyFaces bugtracker and one in Facelets) and still got no answer. May be someone of developers will look at this? Kia Lewis wrote: Have you found a solution to this problem? I have the latest build (Nov 3) and I am still getting this issue. I have seen mention of the problem on different message boards but no real solution. -Original Message- From: Boris Kovalenko [mailto:[EMAIL PROTECTED] Sent: Monday, October 31, 2005 12:53 AM To: MyFaces Discussion Subject: Calendar problems?? Hello! Till today calendar worked ok. But today (31.10.2005) I getting exception!! MyFaces 1.1.1 release, calendar code is simple: t:inputCalendar id=calendar monthYearRowClass=monthYearRowClass weekRowClass=weekRowClass dayCellClass=dayCellClass currentDayCellClass=currentDayCellClass value=#{sessionBean.newsDate}/ [2005-10-31 10:38:59.315] Error Rendering View [2005-10-31 10:38:59.315] java.lang.IllegalStateException: Client-id : calendar_1130737139296_link is duplicated in the faces tree. [2005-10-31 10:38:59.315] at org.apache.myfaces.application.jsp.JspStateManagerImpl.checkForDuplicateId s(JspStateManagerImpl.java:241) [2005-10-31 10:38:59.315] a org.apache.myfaces.application.jsp.JspStateManagerImpl.checkForDuplicateId s(JspStateManagerImpl.java:255) [2005-10-31 10:38:59.315] at org.apache.myfaces.application.jsp.JspStateManagerImpl.checkForDuplicateId s(JspStateManagerImpl.java:255) [2005-10-31 10:38:59.315] at org.apache.myfaces.application.jsp.JspStateManagerImpl.saveSerializedView( JspStateManagerImpl.java:204) [2005-10-31 10:38:59.315] at org.apache.myfaces.renderkit.html.util.DummyFormUtils.writeDummyForm(Dummy FormUtils.java:111) [2005-10-31 10:38:59.315] at org.apache.myfaces.renderkit.html.HtmlResponseWriterImpl.endDocument(HtmlR esponseWriterImpl.java:156) [2005-10-31 10:38:59.315] at com.sun.facelets.FaceletViewHandler.renderView(FaceletViewHandler.java:449 ) [2005-10-31 10:38:59.315] at org.apache.myfaces.lifecycle.LifecycleImpl.render(LifecycleImpl.java:352) [2005-10-31 10:38:59.315] at javax.faces.webapp.FacesServlet.service(FacesServlet.java:107) [2005-10-31 10:38:59.315] at com.caucho.server.dispatch.ServletFilterChain.doFilter(ServletFilterChain. java:99) [2005-10-31 10:38:59.315] at org.apache.myfaces.component.html.util.ExtensionsFilter.doFilter(Extension sFilter.java:122) [2005-10-31 10:38:59.315] at com.caucho.server.dispatch.FilterFilterChain.doFilter(FilterFilterChain.ja va:70) [2005-10-31 10:38:59.315] at com.caucho.server.webapp.WebAppFilterChain.doFilter(WebAppFilterChain.java :163) [2005-10-31 10:38:59.315] at com.caucho.server.dispatch.ServletInvocation.service(ServletInvocation.jav a:208) [2005-10-31 10:38:59.315] at com.caucho.server.hmux.HmuxRequest.handleRequest(HmuxRequest.java:396) [2005-10-31 10:38:59.315] at com.caucho.server.port.TcpConnection.run(TcpConnection.java:363) [2005-10-31 10:38:59.315] at com.caucho.util.ThreadPool.runTasks(ThreadPool.java:490) [2005-10-31 10:38:59.315] at com.caucho.util.ThreadPool.run(ThreadPool.java:423) [2005-10-31 10:38:59.315] at java.lang.Thread.run(Thread.java:534) [10:38:59.316] Took Type: java.io.PrintWriter [2005-10-31 10:38:59.316] Took Type: java.io.PrintWriter With respect, Boris With respect, Boris With respect, Boris
AW: MyFaces 1.1.1 - rendering of radiobuttons/labels
Does the MyFaces development team have the option to change the rendering behavior of the t:selectOneRadio ... tag, so that the label element will be rendered correctly for the options defined with f:selectItems ... (and the second superfluous /tr will be removed)? Regards, Matthias -Ursprüngliche Nachricht- Von: [EMAIL PROTECTED] [mailto:[EMAIL PROTECTED] Auftrag von Bruno Aranda Gesendet: Freitag, 4. November 2005 11:27 An: MyFaces Discussion Betreff: Re: MyFaces 1.1.1 - rendering of radiobuttons/labels No no, you don't have to use the labels directly, the renderer encodes them following the spec on how this component should be rendered... Regards, Bruno 2005/11/4, Matthias Kahlau [EMAIL PROTECTED]: Ok, but how do I have to use the h:outputLabel tag, when I use f:selectItems .. to render a dynamic list of options? Viele Grüße Matthias Kahlau -Ursprüngliche Nachricht- Von: [EMAIL PROTECTED] [mailto:[EMAIL PROTECTED] Auftrag von Mathias Brökelmann Gesendet: Freitag, 4. November 2005 10:43 An: MyFaces Discussion Betreff: Re: MyFaces 1.1.1 - rendering of radiobuttons/labels I miss the h:outputLabel in your jsp code 2005/11/4, Matthias Kahlau [EMAIL PROTECTED]: Hi! I use the following code in my JSP/JSF page to render a list of radiobuttons: t:selectOneRadio lang=de layout=pageDirection required=true styleClass=daten title=Radiobuttons zur Auswahl des Umfragetyps f:selectItems value=#{UmfrageBacking.umfragetypen} / /t:selectOneRadio The following code ist generated with h:selectOneRadio and t:selectOneRadio using MyFaces 1.1.1: table class=daten tr tdlabelinput type=radio name=_id0:_id2 value=Lehrevaluierung lang=de title=Radiobuttons zur Auswahl des Umfragetyps class=daten /#160;Lehrevaluierung/label/td/tr/tr trtdlabelinput type=radio name=_id0:_id2 value=Allgemeine Studierendenbefragung lang=de title=Radiobuttons zur Auswahl des Umfragetyps class=daten /#160;Allgemeine Studierendenbefragung/label/td /tr/tr tr tdlabelinput type=radio name=_id0:_id2 value=Mitarbeiterbefragung lang=de title=Radiobuttons zur Auswahl des Umfragetyps class=daten /#160;Mitarbeiterbefragung/label/td /tr/tr tr tdlabelinput type=radio name=_id0:_id2 value=Sonstige Umfrage lang=de title=Radiobuttons zur Auswahl des Umfragetyps class=daten /#160;Sonstige Umfrage/label/td /tr/tr /table As you can see, besides of the useless label element, there's also a double /tr end tag for the delimitation of each table row. Regards, Matthias -Ursprüngliche Nachricht- Von: [EMAIL PROTECTED] [mailto:[EMAIL PROTECTED] Auftrag von Bruno Aranda Gesendet: Donnerstag, 3. November 2005 18:19 An: MyFaces Discussion Betreff: Re: MyFaces 1.1.1 - rendering of radiobuttons/labels You are true, that's not desirable behaviour... can we see the snippet of the jsf code you are using? Regards, Bruno 2005/11/3, Matthias Kahlau [EMAIL PROTECTED]: Hi all! Doesn't the rendering of radiobuttons / labels work correctly? Usually, you have to use the label element using the following approach described in the SelfHTML 8.1 documentation: label for=idNameLabel:/label [Formelement] id=idName But JSF renders something like this (it doesn't matter if I use the standard JSF HTML RenderKit taglib or Tomahawk): labelinput type=radio name=_id0:_id2 value=someValue lang=de title=someTitle class=daten /#160;someDescription/label With this approach, you can't click on the label to select/deselect the radiobutton, so the label just makes no sense. Using the label to select/deselect the radiobutton would improve the usability of the control. Is this a bug? Regards, Matthias -- Mathias
Re: Generic redirection screen
Hi, I'm liking your method. I might build myself a function to do all that all in one swoop. I guess the reason I started building multiple pages rather than using something more clever liek this was because my navigation rules all looked a bit boring when they all go to the same page and seems like a waste of time putting them in :p. Thanks! -Robert. Mike Kienenberger wrote: The general solution is to save the message in the session and display it on a generic "display message" page. The particular solution I'd use in this case would be to create a request-scoped backing bean that holds the message to display, set the message on the backing bean in my code, then use t:saveState on both the display message page and the caller page to preserve that value across the request. I generally fetch/create the backing bean using this code, but maybe there's a better way to do it. ValueBinding binding = FacesContext.getCurrentInstance().getApplication().createValueBinding("#{backingBean}"); BackingBean backingBean = (BackingBean )binding.getValue(FacesContext.getCurrentInstance()); backingBean.setValue(value); On 11/2/05, Robert Parsons [EMAIL PROTECTED] wrote: Hi, In past non-faces applications I have had a simple method in my controlling servlet that would automatically display a screen with a given message before redirecting to some given page. Something like this: ... displayRedirect("Your order was completed successfully", "index.jsp"); In my JSF application I have navigation-rules for each outcome and a sepparate view for each message. So for the example above i'd have something like: navigation-case from-outcomecomplete/from-outcome to-view-id/order_complete.xhtml/to-view-id /navigation-case The 'order_complete.xhtml' page would have the message "Your order was completed successfully" and then a timed redirect to some other page. I'm not completley stupid and am using a template (btw i'm using facelets too) for all the redirection pages, but I'm still having to create a page for each outcome. Is there some nice way I can achieve this kind of behaviour without making an individual view for all the messages? Any comments welcome. Thanks, -Robert.
Re: How to create component without binding?
Hello, you can create a component subtree in your application, but at least you need one tag with a binding to your subtrees root component to include these into your view. regards Volker Rene Ott wrote: Hello @all, I would like to create dynamically inside a backing bean some components. Looking around in the net I found only solutions that create a binding to a component, for example: h:panelGroup binding=#{my.backingbean} ... This means that I always need an existing component like panelGroup for creating with a binding some components. How can I create dynamically components without using a binding (and in the end an extra component)? Thanks and best regards, René Ott -- 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: How to create component without binding?
I don't know if this works, but f:subView doesn't render anything. regards, Martin On 11/4/05, Rene Ott [EMAIL PROTECTED] wrote: That sounds good ;) How can I realize this? f:view binding=my.backingbean Like this? Does a component exist that acts just like a container for other components but itself doesn't get displayed? This way it would be possible to make a binding to this component without the need to display the component. René -Ursprüngliche Nachricht- Von: Martin Marinschek [mailto:[EMAIL PROTECTED] Gesendet: Freitag, 4. November 2005 11:06 An: MyFaces Discussion Betreff: Re: How to create component without binding? Then you'll need to do a binding for the ViewRoot ;) How would JSF know where to put your components, if you don't have them in the template? regards, Martin On 11/4/05, Rene Ott [EMAIL PROTECTED] wrote: First thanks for the many answers in just one hour :-) Why do I need a binding to do this? If I need a binding to for example a panelgroup this means that on the page the panelgroup gets rendered although I don't need (or want) it. Lets assume I want to create dynamically several outputlinks. With a panelgroup binding they are all inside a panelgroup. Why cannot I just hang the outputlinks in UIviewroot and skip all the binding stuff? René Ott -Ursprüngliche Nachricht- Von: Martin Marinschek [mailto:[EMAIL PROTECTED] Gesendet: Freitag, 4. November 2005 09:49 An: MyFaces Discussion Betreff: Re: How to create component without binding? What you want to do is do a binding for panelGroup and then add children to this panelGroup - with this you can create extra components. code snippet (not compiled except in my head ;): public UIComponent getPanelGroup() { HtmlPanelGroup panelGroup = new HtmlPanelGroup(); panelGroup.getChildren().add(new HtmlInputText()); panelGroup.getChildren().add(new HtmlOutputText()); ... return panelGroup; } regards, Martin On 11/4/05, Nikita Koselev [EMAIL PROTECTED] wrote: Can you explain your task better, please. Nikita On 04/11/05, Rene Ott [EMAIL PROTECTED] wrote: Hello @all, I would like to create dynamically inside a backing bean some components. Looking around in the net I found only solutions that create a binding to a component, for example: h:panelGroup binding=#{my.backingbean} ... This means that I always need an existing component like panelGroup for creating with a binding some components. How can I create dynamically components without using a binding (and in the end an extra component)? Thanks and best regards, René Ott -- http://www.irian.at Your JSF powerhouse - JSF Trainings in English and German -- http://www.irian.at Your JSF powerhouse - JSF Trainings in English and German -- http://www.irian.at Your JSF powerhouse - JSF Trainings in English and German
Trying to write my own component - AGAIN
Hi everyone, and thanks for the explanations about packing a component. Im trying to write now a Graphics component. I already have a GraphicFactory, that receives a model object, and convert its attributes in coordinates. I'm trying to follow the approach that is described in Core JSF - chapter 12. I just want to know one thing: 1 - How can I add something like: e:graphics value=#{bean.getGraphicModel}/, where this backingbean method returns this model object, filling the component with the model object in one fellow swoop. Did I have to do some Binding code, because it's just a output component. Did I have to only write the encodeBegin() method in the Tag?? Thanks and Best Regards Rafael Mauricio Nami
Re: AW: How to create component without binding?
Hi, the h:panelGroup ... tag should render nothing but just the children if no style or styleClass attributes are present. So h:panelGroup binding=#{my.backingbean} should do. see: http://java.sun.com/j2ee/javaserverfaces/1.1_01/docs/tlddocs/h/panelGroup.html regards Volker Rene Ott wrote: That sounds good ;) How can I realize this? f:view binding=my.backingbean Like this? Does a component exist that acts just like a container for other components but itself doesn't get displayed? This way it would be possible to make a binding to this component without the need to display the component. René -Ursprüngliche Nachricht- Von: Martin Marinschek [mailto:[EMAIL PROTECTED] Gesendet: Freitag, 4. November 2005 11:06 An: MyFaces Discussion Betreff: Re: How to create component without binding? Then you'll need to do a binding for the ViewRoot ;) How would JSF know where to put your components, if you don't have them in the template? regards, Martin On 11/4/05, Rene Ott [EMAIL PROTECTED] wrote: First thanks for the many answers in just one hour :-) Why do I need a binding to do this? If I need a binding to for example a panelgroup this means that on the page the panelgroup gets rendered although I don't need (or want) it. Lets assume I want to create dynamically several outputlinks. With a panelgroup binding they are all inside a panelgroup. Why cannot I just hang the outputlinks in UIviewroot and skip all the binding stuff? René Ott -Ursprüngliche Nachricht- Von: Martin Marinschek [mailto:[EMAIL PROTECTED] Gesendet: Freitag, 4. November 2005 09:49 An: MyFaces Discussion Betreff: Re: How to create component without binding? What you want to do is do a binding for panelGroup and then add children to this panelGroup - with this you can create extra components. code snippet (not compiled except in my head ;): public UIComponent getPanelGroup() { HtmlPanelGroup panelGroup = new HtmlPanelGroup(); panelGroup.getChildren().add(new HtmlInputText()); panelGroup.getChildren().add(new HtmlOutputText()); ... return panelGroup; } regards, Martin On 11/4/05, Nikita Koselev [EMAIL PROTECTED] wrote: Can you explain your task better, please. Nikita On 04/11/05, Rene Ott [EMAIL PROTECTED] wrote: Hello @all, I would like to create dynamically inside a backing bean some components. Looking around in the net I found only solutions that create a binding to a component, for example: h:panelGroup binding=#{my.backingbean} ... This means that I always need an existing component like panelGroup for creating with a binding some components. How can I create dynamically components without using a binding (and in the end an extra component)? Thanks and best regards, René Ott -- http://www.irian.at Your JSF powerhouse - JSF Trainings in English and German -- http://www.irian.at Your JSF powerhouse - JSF Trainings in English and German -- 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.
help needed regarding dynamic use of NavigationMenuItem
Hi all Can one be so kind and explain me what Im doing wrong. I must not have understood something! Need help. What I would like is to recognize the menu node which has been pressed by a user in my backing bean. In the backing bean I construct the menu dynamically as shown in the example and get it displayed correctly in the .jsp. When I press a menu node the action function get called. So far OK. But in that function I cannot identify the menu node which has been pressed, must say that all menu nodes call the same action function. The idea is to either grab the instance of the pressed menu node or to find it in the value parameter, but no way .. neither I can identify and get the node instance or have a value set in the value slot. I would appreciate if one could tell me how to identify the selected node. Many thanks in advance. Roland Here a code snippet of the backing bean to show how I do it. private SelectItem selectedNode; public SelectItem getSelectedNode() { return selectedNode; } public void setSelectedNode(SelectItem sNode) { selectedNode = sNode; } for (ListString menuItems : navMenuList) { String menuIndex = (String)menuItems.get(0); menuNode = new NavigationMenuItem((String)menuItems.get(1), #{navTreeBean.actionSelectedNode}, null, false); menuNode.setDescription(menuIndex); // misuse ID menuNode.setValue(#{navTreeBean.selectedNode}); mainMenuNode.add(childHeader); Return menu; public String actionSelectedNode() { ValueBinding xx = menuNode.getValueBinding(value); System.out.println(the UIComponent found: + xx); // OK found the UIComponent #{navTreeBean.menu} ArrayListNavigationMenuItem updateBinding = (ArrayListNavigationMenuItem) xx.getValue(context); for (NavigationMenuItem ni : updateBinding){ System.out.println(the NavigationMenuItem value: + ni.getValue()); NavigationMenuItem node[] = ni.getNavigationMenuItems(); for (NavigationMenuItem nd : node) System.out.println(the node: + nd.getValue() + id: + nd.getDescription()); } return page selected; } Out put of above iteration: the NavigationMenuItem value: Users Maintenance the node:#{navTreeBean.selectedNode} id: 2 the node:#{navTreeBean.selectedNode} id: 3 the node:#{navTreeBean.selectedNode} id: 4 the node:#{navTreeBean.selectedNode} id: 5 the NavigationMenuItem value: Resources Maintenance the node:#{navTreeBean.selectedNode} id: 11 the node:#{navTreeBean.selectedNode} id: 12 the node:#{navTreeBean.selectedNode} id: 13 the node:#{navTreeBean.selectedNode} id: 14 the NavigationMenuItem value: Process controls the node:#{navTreeBean.selectedNode} id: 21 the node:#{navTreeBean.selectedNode} id: 22 the node:#{navTreeBean.selectedNode} id: 23 the NavigationMenuItem value: Inspection tools the node:#{navTreeBean.selectedNode} id: 31 the node:#{navTreeBean.selectedNode} id: 32 Roland Oertig IT architect, developer and consultant Klotenerstrasse 10 CH-8303 Bassersdorf Tel. Business +41 44 836 9061 Tel. Private +41 44 836 8892 Mobile +41 79 303 5759 Skype rolandoertig E-Mail [EMAIL PROTECTED]
UnSubscribe my mailId
Hi, I would like to unsubscribe my subscription as my mail box size is getting reached to its max limit more frequently. Could u please let me know where should Can i do it for Subscription. Or Is it possible to stop the mails from users. Could u please help me as it is very urgent to me. Thanks in Advance Anji
RE: UnSubscribe my mailId
I also tried to unsubscribe many times but no use, someone please help. -Original Message-From: Anjaneyulu Sadineni [mailto:[EMAIL PROTECTED]Sent: Friday, November 04, 2005 8:26 AMTo: MyFaces DiscussionSubject: UnSubscribe my mailId Hi, I would like to unsubscribe my subscription as my mail box size is getting reached to its max limit more frequently. Could u please let me know where should Can i do it for Subscription. Or Is it possible to stop the mails from users. Could u please help me as it is very urgent to me. Thanks in Advance Anji
RE: UnSubscribe my mailId
+1 Me Too Not that the list isn't helpful -Original Message-From: Kranthi Parasu [mailto:[EMAIL PROTECTED]Sent: Friday, November 04, 2005 7:29 AMTo: 'MyFaces Discussion'Subject: RE: UnSubscribe my mailId I also tried to unsubscribe many times but no use, someone please help. -Original Message-From: Anjaneyulu Sadineni [mailto:[EMAIL PROTECTED]Sent: Friday, November 04, 2005 8:26 AMTo: MyFaces DiscussionSubject: UnSubscribe my mailId Hi, I would like to unsubscribe my subscription as my mail box size is getting reached to its max limit more frequently. Could u please let me know where should Can i do it for Subscription. Or Is it possible to stop the mails from users. Could u please help me as it is very urgent to me. Thanks in Advance Anji ** This e-mail is the property of Enron Corp. and/or its relevant affiliate and may contain confidential and privileged material for the sole use of the intended recipient (s). Any review, use, distribution or disclosure by others is strictly prohibited. If you are not the intended recipient (or authorized to receive for the recipient), please contact the sender or reply to Enron Corp. at [EMAIL PROTECTED] and delete all copies of the message. This e-mail (and any attachments hereto) are not intended to be an offer (or an acceptance) and do not create or evidence a binding and enforceable contract between Enron Corp. (or any of its affiliates) and the intended recipient or any other party, and may not be relied on by anyone as the basis of a contract by estoppel or otherwise. Thank you. **
RE: UnSubscribe my mailId
Did you try: To remove your address from the list, send a message to: [EMAIL PROTECTED] Cheers Roland From: Kranthi Parasu [mailto:[EMAIL PROTECTED] Sent: Freitag, 4. November 2005 14:29 To: 'MyFaces Discussion' Subject: RE: UnSubscribe my mailId I also tried to unsubscribe many times but no use, someone please help. -Original Message- From: Anjaneyulu Sadineni [mailto:[EMAIL PROTECTED] Sent: Friday, November 04, 2005 8:26 AM To: MyFaces Discussion Subject: UnSubscribe my mailId Hi, I would like to unsubscribe my subscription as my mail box size is getting reached to its max limit more frequently. Could u please let me know where should Can i do it for Subscription. Or Is it possible to stop the mails from users. Could u please help me as it is very urgent to me. Thanks in Advance Anji
Re: Trying to write my own component - AGAIN
I think that the best option to see how to implement a component is directly check out the sources for the tomahawk/sandbox components. Every component has the component, tag, and renderer implementation. You can check the faces-config.xml file to see how this components are registered and also the tld. About your specific questions: you don't need any binding if your component has everything in it (save/restore state, etc). Just pass the model to the value attribute (I guess it should be something like value=#{bean.graphicModel (without the getter)). Take a look at the schedule component, as it accepts a custom model object. The encodeBegin is optional as long as your component does not render any children. When a component has children, the method encodeBegin is called before and the encodeEnd afterwars. In your case, I guess you only need the encodeEnd in your renderer object (recommended). HTH, Bruno 2005/11/4, Rafael Nami [EMAIL PROTECTED]: Hi everyone, and thanks for the explanations about packing a component. Im trying to write now a Graphics component. I already have a GraphicFactory, that receives a model object, and convert its attributes in coordinates. I'm trying to follow the approach that is described in Core JSF - chapter 12. I just want to know one thing: 1 - How can I add something like: e:graphics value=#{bean.getGraphicModel}/, where this backingbean method returns this model object, filling the component with the model object in one fellow swoop. Did I have to do some Binding code, because it's just a output component. Did I have to only write the encodeBegin() method in the Tag?? Thanks and Best Regards Rafael Mauricio Nami
RE: UnSubscribe my mailId
Multiple times..it doesn't fail ( no nasty message from the mail daemon) but it doesn't work either. bn -Original Message-From: Roland Oertig [mailto:[EMAIL PROTECTED]Sent: Friday, November 04, 2005 7:33 AMTo: 'MyFaces Discussion'Subject: RE: UnSubscribe my mailId Did you try: To remove your address from the list, send a message to: [EMAIL PROTECTED] Cheers Roland From: Kranthi Parasu [mailto:[EMAIL PROTECTED] Sent: Freitag, 4. November 2005 14:29To: 'MyFaces Discussion'Subject: RE: UnSubscribe my mailId I also tried to unsubscribe many times but no use, someone please help. -Original Message-From: Anjaneyulu Sadineni [mailto:[EMAIL PROTECTED]Sent: Friday, November 04, 2005 8:26 AMTo: MyFaces DiscussionSubject: UnSubscribe my mailId Hi, I would like to unsubscribe my subscription as my mail box size is getting reached to its max limit more frequently. Could u please let me know where should Can i do it for Subscription. Or Is it possible to stop the mails from users. Could u please help me as it is very urgent to me. Thanks in Advance Anji ** This e-mail is the property of Enron Corp. and/or its relevant affiliate and may contain confidential and privileged material for the sole use of the intended recipient (s). Any review, use, distribution or disclosure by others is strictly prohibited. If you are not the intended recipient (or authorized to receive for the recipient), please contact the sender or reply to Enron Corp. at [EMAIL PROTECTED] and delete all copies of the message. This e-mail (and any attachments hereto) are not intended to be an offer (or an acceptance) and do not create or evidence a binding and enforceable contract between Enron Corp. (or any of its affiliates) and the intended recipient or any other party, and may not be relied on by anyone as the basis of a contract by estoppel or otherwise. Thank you. **
Re: Trying to write my own component - AGAIN
Thanks Bruno, I'm studying the source since yesterday :). I was trying to code it in the encodeBegin, but nothing displayed. I'll try to code in the encodeEnd() method, following the schedule like you said. Best Regards Rafael Mauricio Nami2005/11/4, Bruno Aranda [EMAIL PROTECTED]: I think that the best option to see how to implement a component isdirectly check out the sources for the tomahawk/sandbox components.Every component has the component, tag, and renderer implementation.You can check the faces-config.xml file to see how this components areregistered and also the tld.About your specific questions: you don't need any binding if yourcomponent has everything in it (save/restore state, etc). Just pass the model to the value attribute (I guess it should be something likevalue=#{bean.graphicModel (without the getter)). Take a look at theschedule component, as it accepts a custom model object.The encodeBegin is optional as long as your component does not render any children. When a component has children, the method encodeBegin iscalled before and the encodeEnd afterwars. In your case, I guess youonly need the encodeEnd in your renderer object (recommended).HTH, Bruno2005/11/4, Rafael Nami [EMAIL PROTECTED]: Hi everyone, and thanks for the explanations about packing a component.Im trying to write now a Graphics component. I already have a GraphicFactory, thatreceives a model object, and convert its attributes in coordinates. I'm trying tofollow the approach that is described in Core JSF - chapter 12. I just want to know one thing: 1 - How can I add something like:e:graphics value=#{bean.getGraphicModel}/, where this backingbean method returns thismodel object, filling the component with the model object in one fellow swoop.Did I have to do some Binding code, because it's just a output component.Did I have to only write the encodeBegin() method in the Tag??Thanks and Best Regards Rafael Mauricio Nami
JSF ToolBar
Hi, The MyFaces team has any plans about implement this component? -- Yours truly (Atenciosamente), Rogério
RE: Some notes of my loadtest results
The app I'm working on is currently using STATE_SAVING_METHOD=client, because, at the time our code was written, that was the only way to handle the back-button (and pop-up windows) correctly. Can I assume from some of the notes that have been passed around that: 1. We can now use STATE_SAVING_METHOD=server, and the back-button (and pop-up windows) will work correctly (e.g., when my pop-up window closes, my base window won't have forgotten its state)? 2. Using STATE_SAVING_METHOD=server is faster and thus recommended? Just wondering what the current state of affairs is regarding the tradeoffs between server and client state saving method. - Brendan -Original Message- From: Mathias Brökelmann [mailto:[EMAIL PROTECTED] Sent: Friday, November 04, 2005 2:18 AM To: MyFaces Discussion Subject: Re: Some notes of my loadtest results If this setting is set to false the user might have some strange effects if multiple browser windows are used. IMO functionality is more important than performance which is the reason to have true as the default value. 2005/11/3, Travis Reeder [EMAIL PROTECTED]: Shouldn't it default to SERIALIZE_STATE_IN_SESSION = false if it's such a performance killer? Travis On 11/3/05, Mathias Brökelmann [EMAIL PROTECTED] wrote: SERIALIZE_STATE_IN_SESSION and NUMBER_OF_VIEWS_IN_SESSION are only effective if STATE_SAVING_METHOD=server otherwise it´s settings will be ignored. The default for SERIALIZE_STATE_IN_SESSION is true and NUMBER_OF_VIEWS_IN_SESSION is 20 and are recommended if you use STATE_SAVING_METHOD=server to avoid strange side effects. 2005/11/3, CONNER, BRENDAN (SBCSI) [EMAIL PROTECTED]: So is there enough information at the moment to make a recommendation about how to set the parameters? For example: 1. If I set STATE_SAVING_METHOD=client, should I then set SERIALIZE_STATE_IN_SESSION=false? 2. If I set STATE_SAVING_METHOD=server, should I then set SERIALIZE_STATE_IN_SESSION=true? - Brendan -Original Message- From: Vesa Lindfors [mailto:[EMAIL PROTECTED] Sent: Thursday, November 03, 2005 1:51 AM Cc: MyFaces Discussion Subject: Re: Some notes of my loadtest results Hi, I have now tested org.apache.myfaces.SERIALIZE _STATE_IN_SESSION=false - and it worked like charm in the same Itanium environment the earlier test of nightly build was giving bad results. Average response time was now 116ms and no high load on processors. I also tried org.apache.myfaces.SERIALIZE_STATE_IN_SESSION=true org.apache.myfaces.NUMBER_OF_VIEWS_IN_SESSION=3. It gave bad results (average 19419 ms and lot of load) again - but that was expected as the memory or garbage collection was not the problem earlier, just processor load. We are using t:saveStates in our application, and I'm not sure if SERIALIZE_STATE_IN_SESSION had effect when I tried to update-operation of same pojo (pojo moved between pages with t:saveState) in two different views, sometimes hibernate gave nicely announcement (with later update operation) that data is stale and sometimes not, but it could also be some caching issue or something - must be checked later.. Can you please give me an example when I can expect some issues with SERIALIZE_STATE_IN_SESSION=false ? Anyway, I can now continue testing 100 users with this setup in other platforms (Solaris, HP-UX, AIX, Compaq and Linux) - thanks! --- VLi --- On 11/3/05, Mathias Brökelmann [EMAIL PROTECTED] wrote: @Vesa could you run your tests again with the nightly and define the context param org.apache.myfaces.SERIALIZE_STATE_IN_SESSION with a value set to false in your web.xml? You can also try to change the setting for org.apache.myfaces.NUMBER_OF_VIEWS_IN_SESSION which defines how many views are held in the session (default = 20). This might cause a garbage collector problem if memory is limited. Thanks a lot for your tests! 2005/11/2, Vesa Lindfors [EMAIL PROTECTED]: Hi, We have small CRUD application that I have started to load-test in different platforms. I'm using Myfaces impl + hibenate + Java 1.4.2. Test-case 1 (25% of users): Login - Creation of pojo and storing it to db - Listing pojos in db- - Search of created pojo - Remove of created pojo - Search of removed pojo - Logout . Test-case 2 (75% of users): Login - Listing pojos in db - Search of some pojos - Logout. Tester is run with 100 threads (=users) and set to use 20 +-10 seconds delay per page to simulate end users actions. Ramp times are set so that there is one logging-in per second. I noticed that application is really slow already in first tests. It is not so bad in my Win laptop, but same application is really too much for 4 processor
Re: JSF ToolBar
Hehehe, sure, i need to understand a bit more about method binding in JSF component development. -- Yours truly (Atenciosamente), Rogério
RE: Checkbox event
If you really want the checkbox to invoke a back-end action, I believe you'd have to do a short onselect JavaScript call to automatically click a hidden h:commandLink component that itself is defined to invoke the action. That's because actions are normally invoked only as a result of clicking on a link or button. - Brendan -Original Message- From: [EMAIL PROTECTED] [mailto:[EMAIL PROTECTED] Sent: Thursday, November 03, 2005 11:08 PM To: MyFaces Discussion; Simon Kitching Cc: MyFaces Discussion Subject: Re: Checkbox event That was helpful. But, I would like to try some other way to utilize the power of JSF :). Is there a action event or valuechange event for checkbox. Any idea? Thanks. Quoting Simon Kitching [EMAIL PROTECTED]: [EMAIL PROTECTED] wrote: Hi, I need to display a list box when a checkbox is clicked. I guess we need to implement OnSelect event for this purpose. Please, correct me here if I am wrong. Does anybody have some examples of using onSelect in the backing bean?. Any help is appreciated. onSelect is a *client side* thing only. It is a normal HTML feature that allows an arbitrary piece of scripting to be run in the browser. Nothing to do with JSF at all. You could implement what you want entirely on the client by ensuring your page includes the listbox, but with its style set to display:none. You should then be able to specify some script in the checkbox onSelect attribute which finds that component and sets its style to visible. This is really not JSF at all but that doesn't mean it's a bad solution. Alternatively, I expect you could map the checkbox value to some boolean value on a backing bean, and use the same value to control the rendered attribute of the listbox. h:selectBooleanCheckbox value=#{someBean.listBoxEnabled}/ h:selectManyListbox rendered=#{someBean.listBoxEnabled} ... / The problem here is that you need some mechanism for submitting the entire form back to the server when the checkbox value is changed so the page can be regenerated. Maybe you can use tomahawk's collapsible panel control instead of the checkbox/listbox combination, and avoid the whole issue? Regards, Simon
Re: url query string parameters as input to JSF action - not possible??
So do I Sverker Abrahamsson wrote: HiT his is now more a conceptual discussion about JSF than specifically about MyFaces. As I understand it the scope of JSF was to make an application frontend framework which is not tied to http/html. In many aspects it does a good work, providing flexibility with it's rich event model and good separation of business logic and presentation. I like those parts a lot. However, it claims to be a framework for building web based applications, which means using HTTP for transport and HTML/ECMAScript for presentation (weather it's generated by jsp, xml+xslt or whatever). These are not perfect protocols, when they were designed nobody imagined they would have such inpact, but over the years people have been able to use these tools to make web-based applications with good usability. For doing so a number of common use cases or design patterns has evolved, normally GET is used when reading the state from the web application and POST is used when updating persistant state in the app. Of course there are variants where POST is used for other purposes but the most important is to be able to choose the method most suitable for the use case. I would say that GET requests are used in 99.99% of the cases (or more). Some pros about using GET over POST is that the resulting page is bookmarkable, it is possible to refer to it with an url and in most cases it's possible to use the browser back and forward buttons to navigate. Of course the application has to be designed with that in mind so that going back and forth in the application, or jumping right into it doesn't break anything but that's not so difficult. The mechanism for using GET requests in a web application is to encode the parameters in a query string in the url, it works best for reading the state of the application but can be used for submitting simple forms if care is taken that it does not break anything if the user use the back/forward button. POST is only better to use when submitting bigger forms or when Craig asked why people insist on using GET and constructing direct url's and the simple answer is that it is neccesary to get e.g. addressability like the the examples below shows: Hi, Craig. I found this interesting book on Amazon. Take a look at it on http://www.amazon.com/exec/obidos/tg/detail/-/0131463055/qid=1125490932/sr=8-1/ref=pd_bbs_1/102-6998912-0718528?v=glances=booksn=507846 http://www.amazon.com/exec/obidos/tg/detail/-/0131463055/qid=1125490932/sr=8-1/ref=pd_bbs_1/102-6998912-0718528?v=glances=booksn=507846 The JCP page for JSF 1.2 can be found at http://www.jcp.org/en/jsr/detail?id=252; You can see the status of your UPS shipment on http://wwwapps.ups.com/WebTracking/processInputRequest?HTMLVersion=5.0sort_by=statustracknums_displayed=5TypeOfInquiryNumber=Tloc=en_SEInquiryNumber1=1ZInquiryNumber2=InquiryNumber3=InquiryNumber4=InquiryNumber5=AgreeToTermsAndConditions=yestrack.x=33track.y=9 http://wwwapps.ups.com/WebTracking/processInputRequest?HTMLVersion=5.0sort_by=statustracknums_displayed=5TypeOfInquiryNumber=Tloc=en_SEInquiryNumber1=1ZInquiryNumber2=InquiryNumber3=InquiryNumber4=InquiryNumber5=AgreeToTermsAndConditions=yestrack.x=33track.y=9 These are just some examples, it's not possible to accomplish the same with POST. I can't refer to the result of a POST request with an URL. When designing a web-based application, the most important aspects are usability, scalability and maintainability. Usability definitly comes first, if it is poor nobody will use it (especially not if some competitor can provide the same functionality with better usability). There are tons of examples where projects have failed because of poor usability. That is the reality for people developing real applications for the real world. From time to time it appears academic work which in teory seams very nice but lack the connection to reality. Take e.g. the EJB spec as example, 1.x entity beans was not really usable, 2.x was better but not good. There was ideas about components which was assambled into applications, I don't know about anybody who used that functionality. Instead people started using xdoclets to generate those descriptor xml files. In parallell Hibernate emerged which was much better in sync with reality. We see the result now, EJB is essencially adopting to Hibernate model for persistence. Another example from a compleatly other domain; Voice over IP. When SIP and RTP was designed for VoIP it was not taken into account the use case where many users are behind NAT firewalls. I read the discussions and a big reason was that the authors thought NAT is bad and ugly (and that it was difficult to solve the problem). That resulted in that it took many years for VoIP to take off, it wasn't until some way for SIP telephony to get through the NAT firewall was developed that it became usable for the common user.
RE: Some notes of my loadtest results
CONNER, BRENDAN \(SBCSI\) [EMAIL PROTECTED] wrote on 11/04/2005 10:16:25 AM: The app I'm working on is currently using STATE_SAVING_METHOD=client, because, at the time our code was written, that was the only way to handle the back-button (and pop-up windows) correctly. Can I assume from some of the notes that have been passed around that: 1. We can now use STATE_SAVING_METHOD=server, and the back-button (and pop-up windows) will work correctly (e.g., when my pop-up window closes, my base window won't have forgotten its state)? 2. Using STATE_SAVING_METHOD=server is faster and thus recommended? Just wondering what the current state of affairs is regarding the tradeoffs between server and client state saving method. +1 for this question..:) I have gone back and forth between the two and now am not at all sure which is recommended under what circumstances and why. I would also like to know, if MyFaces 1.1.1 is good enough or the answer given, whatver it may be, pertains to the latest nightly builds. - Brendan thanks, Geeta
Re: Why does UIData access its grandchild components directly?
Oops! Craig, thanks for catching this. I looked into this right before going to sleep, and I didn't notice I was looking at the javadocs for UIComponentBase.html#processDecodes instead of UIData.html#processDecodes! Yes, the javadocs for UIData clearly indicate that UIData is designed to spec. Sorry for the misinformation. On 11/3/05, Craig McClanahan [EMAIL PROTECTED] wrote: On 11/3/05, Mike Kienenberger [EMAIL PROTECTED] wrote: In fact, according to http://java.sun.com/j2ee/javaserverfaces/1.1_01/docs/api/javax/faces/component/UIComponentBase.html#processDecodes(javax.faces.context.FacesContext) I'd say MyFaces is not following the JSF 1.1 api for UIData. Not actually true, or it couldn't have passed the TCK :-). The javadocs state Call the processDecodes() method of all facets and children of this UIComponent, in the order determined by a call to getFacetsAndChildren(). and that's not currently happening since there are no calls to UIColumn.processDecodes(). That is superceded, for UIData, by the javadocs on that class itself. Going back to the original question, the reason for UIData to deal with grandchildren directly is explicity described in the javadocs quoted earlier -- it allows UIData to perform the iteration over the underlying data model. Among other things, that means UIData actually calls things like processDecodes() *multiple* times on the same grandchildren ... once per row. UIColumn doesn't get involved in this at all, other than being a container for the contents of the grandchildren that will be rendered inside that column zero or more times (indeed, it doesn't even have a renderer). If you want a different design for managing iteration, you'll need to design your own iteration component hierarchy. Craig At minimum, you should open a JIRA issue on this. -Mike On 11/3/05, Mike Kienenberger [EMAIL PROTECTED] wrote: To me, your suggested changes make a lot of sense. I don't see anything in the spec that says it has to be done the way it's currently being done. The only things I see are: 4.1.3 UIData == Only children of type UIColumn should be processed by renderers associated with this component. == UIData specializes the behavior of the processDecodes(), processValidators(), and processUpdates() methods inherited from its parent as follows: For each of these methods, the UIData implementation must iterate over each row in the underlying data model, starting with the row identified by the first property, for the number of rows indicated by the rows property, by calling the setRowIndex() method. When iteration is complete, set the rowIndex property of this component, and of the underlying DataModel, to zero, and remove any request attribute exposed via the var property. = 4.1.1 UIColumn UIColumn (extends UIComponentBase) is a component that represents a single column of data with a parent UIData component. The child components of a UIColumn will be processed once for each row in the data managed by the parent UIData. = On 11/3/05, Simon Kitching [EMAIL PROTECTED] wrote: Hi, For an HTML table, much of the decoding process is in fact controlled by the components rather than the renderer. In the class javax.faces.component.UIData, method processColumnChildren (which is called by processDecodes) does this: for (Iterator it = getChildren().iterator(); it.hasNext();) { UIComponent child = (UIComponent) it.next(); if (child instanceof UIColumn) { if (!child.isRendered()) { //Column is not visible continue; } for (Iterator columnChildIter = child.getChildren() .iterator(); columnChildIter.hasNext();) { UIComponent columnChild = (UIComponent) columnChildIter .next(); process(context, columnChild, processAction); } } } And that last call to process them calls component.processDecodes, which delegates to the renderer as needed. However this code means UIData is accessing its *grandchildren* directly, rather than just its children. I don't believe this is very nice OO design; UIData's children should be responsible for managing their own children, ie the UIColumn class should be told to process the children rather than calling getChildren on it and manipulating those directly. And in my case, I'm trying to write a custom UIColumn class,
Re: ##jsf IRC channel
As for the vitality of this mailing list, we are not so far off to Rails says my GMail ;) regards, Martin On 11/4/05, Eurig Jones [EMAIL PROTECTED] wrote: Yup, Agreed I was pretty shocked to see how empty ##JSF was when I logged on a while back.. Lets try and make it a bit more lively :-) Ed Burns wrote: Hello MyFaces developers and users, Wide distribution intended. I'm sure all of us working on JSF technologies are aware of the growing popularity of Ruby on Rails. One manifestation of this popularity is the vitality of the community around the technology, and one manifestation of that vitality is the traffic on the #rubyonrails IRC channel. To that end, and by way of good practice in general, I want to increase the vitality of the ##jsf irc channel on irc.freenode.net. Since posting this blog entry [1], I've been on the channel every day and have answered a few questions. I'd like to extend an invitation to everyone on these lists to join me in hanging out on this channel. Ed [1] http://weblogs.java.net/blog/edburns/archive/2005/10/jsf_irc_channel_1.html __ Yahoo! FareChase: Search multiple travel sites in one click. http://farechase.yahoo.com -- http://www.irian.at Your JSF powerhouse - JSF Trainings in English and German
Re: ##jsf IRC channel
Ed, For what it's worth, there's already a low-bandwidth #myfaces channel. I'd suggest you also document the ##jsf channel under the Community section for the MyFaces wiki, similar to what's been done for #myfaces (a one-liner). http://wiki.apache.org/myfaces/ On 11/4/05, Ed Burns [EMAIL PROTECTED] wrote: Hello MyFaces developers and users, Wide distribution intended. I'm sure all of us working on JSF technologies are aware of the growing popularity of Ruby on Rails. One manifestation of this popularity is the vitality of the community around the technology, and one manifestation of that vitality is the traffic on the #rubyonrails IRC channel. To that end, and by way of good practice in general, I want to increase the vitality of the ##jsf irc channel on irc.freenode.net. Since posting this blog entry [1], I've been on the channel every day and have answered a few questions. I'd like to extend an invitation to everyone on these lists to join me in hanging out on this channel. Ed [1] http://weblogs.java.net/blog/edburns/archive/2005/10/jsf_irc_channel_1.html __ Yahoo! FareChase: Search multiple travel sites in one click. http://farechase.yahoo.com
Re: custom error message
Thanks! you 2005/11/4, [EMAIL PROTECTED] [EMAIL PROTECTED]: What I have forgottenThe specification should be like thish:message2 style=color:red for="" value=You must fill the first name/-- Original-Nachricht --Reply-To: MyFaces Discussion users@myfaces.apache.org Date: Fri, 4 Nov 2005 15:46:26 +0100From: [EMAIL PROTECTED]Subject: RE: custom error messageTo: MyFaces Discussion users@myfaces.apache.orgI would like to have such a tag component.-- Original-Nachricht --Reply-To: MyFaces Discussion users@myfaces.apache.orgDate: Fri, 4 Nov 2005 11:36:50 -0300From: Sebastian Dimunzio [EMAIL PROTECTED]To: users@myfaces.apache.orgSubject: custom error messageHi!Somebody know the way to show a custom error message for each field onmyform, for example You must fill the first name Thanks!SaludosSebastian Dimunzio-- Sebastian Dimunzio
myFaces Tiles - Illegal to flush within a custom tag
Hello all again, This may not be the right place to ask, but I will anyway. Ive got some pages that are JSF/MyFaces pages I want to use some Tiles insert statements. When I do I get the error javax.servlet.ServletException: Can't insert page '/test.jsp' : Illegal to flush within a custom tag This works %@ taglib uri=http://struts.apache.org/tags-tiles prefix=tiles % html body tiles:insert page=/test.jsp flush=true/ f:view // cant place tiles: in here /f:view /body /html This doesnt %@ taglib uri=http://struts.apache.org/tags-tiles prefix=tiles % html body f:view tiles:insert page=/test.jsp flush=true/ /f:view /body /html Any idea people? Or tips on where to look for an answer. Thanks Jeff. Tools struts-1.2.7 myfaces-1.1.1.zip
Re: ##jsf IRC channel
--- Enrique Medina [EMAIL PROTECTED] wrote: Hi Ed, I get this message when trying to enter the channel: You need to be identified to join that channel freenode uses nickserv Just do /msg NickServ SET PASSWORD password Then do /msg NickServ IDENTIFY password Where password is a password you don't mind other people seeing, since I don't know how they handle it on freenode. For more do /msg NickServ HELP Ed __ Yahoo! Mail - PC Magazine Editors' Choice 2005 http://mail.yahoo.com
Re: tree2 problem
Do you think I can solve the problem using a server-side tree instead of the clied-side one? --- rosalba bochicchio [EMAIL PROTECTED] wrote: Hi all, I'm facing a problem related to tree2 component in myfaces 1.0.9 when deleting a node of the tree. The problem is the following one: if I delete a node (which can be a leaf or not) of the tree and then reload the page, the updated tree is correctly displayed but if I try to expand one of its nodes I get the following exception: java.lang.IllegalArgumentException: Node with id 0:3. Failed to parse 0:3 at org.apache.myfaces.custom.tree2.TreeModel.getNodeById(Ljava.lang.String;)Lorg.apache.myfaces.custom.tree2.TreeNode;(TreeModel.java:153) at org.apache.myfaces.custom.tree2.TreeModel.setNodeId(Ljava.lang.String;)V(TreeModel.java:71) at org.apache.myfaces.custom.tree2.UITreeData.setNodeId(Ljava.lang.String;)V(UITreeData.java:290) at org.apache.myfaces.custom.tree2.HtmlTree.setNodeId(Ljava.lang.String;)V(HtmlTree.java:80) at org.apache.myfaces.custom.tree2.HtmlTreeRenderer.decode(Ljavax.faces.context.FacesContext;Ljavax.faces.component.UIComponent;)V(HtmlTreeRenderer.java:104) at javax.faces.component.UIComponentBase.decode(Ljavax.faces.context.FacesContext;)V(UIComponentBase.java:305) at org.apache.myfaces.custom.tree2.UITreeData.processDecodes(Ljavax.faces.context.FacesContext;)V(UITreeData.java:139) at org.apache.myfaces.custom.tree2.HtmlTree.processDecodes(Ljavax.faces.context.FacesContext;)V(HtmlTree.java:91) at javax.faces.component.UIComponentBase.processDecodes(Ljavax.faces.context.FacesContext;)V(UIComponentBase.java:407) at javax.faces.component.UIComponentBase.processDecodes(Ljavax.faces.context.FacesContext;)V(UIComponentBase.java:407) at javax.faces.component.UIViewRoot.processDecodes(Ljavax.faces.context.FacesContext;)V(UIViewRoot.java:151) at org.apache.myfaces.lifecycle.LifecycleImpl.applyRequestValues(Ljavax.faces.context.FacesContext;)Z(LifecycleImpl.java:177) at org.apache.myfaces.lifecycle.LifecycleImpl.execute(Ljavax.faces.context.FacesContext;)V(LifecycleImpl.java:87) at javax.faces.webapp.FacesServlet.service(Ljavax.servlet.ServletRequest;Ljavax.servlet.ServletResponse;)V(FacesServlet.java:109) at weblogic.servlet.internal.ServletStubImpl$ServletInvocationAction.run()Ljava.lang.Object;(ServletStubImpl.java:996) at weblogic.servlet.internal.ServletStubImpl.invokeServlet(Ljavax.servlet.ServletRequest;Ljavax.servlet.ServletResponse;Lweblogic.servlet.internal.FilterChainImpl;)V(ServletStubImpl.java:419) at weblogic.servlet.internal.TailFilter.doFilter(Ljavax.servlet.ServletRequest;Ljavax.servlet.ServletResponse;Ljavax.servlet.FilterChain;)V(TailFilter.java:28) at weblogic.servlet.internal.FilterChainImpl.doFilter(Ljavax.servlet.ServletRequest;Ljavax.servlet.ServletResponse;)V(FilterChainImpl.java:27) at org.apache.myfaces.component.html.util.ExtensionsFilter.doFilter(Ljavax.servlet.ServletRequest;Ljavax.servlet.ServletResponse;Ljavax.servlet.FilterChain;)V(ExtensionsFilter.java:112) at weblogic.servlet.internal.FilterChainImpl.doFilter(Ljavax.servlet.ServletRequest;Ljavax.servlet.ServletResponse;)V(FilterChainImpl.java:27) at weblogic.servlet.internal.WebAppServletContext$ServletInvocationAction.run()Ljava.lang.Object;(WebAppServletContext.java:6458) at weblogic.security.acl.internal.AuthenticatedSubject.doAs(Lweblogic.security.subject.AbstractSubject;Ljava.security.PrivilegedAction;)Ljava.lang.Object;(AuthenticatedSubject.java:321) at weblogic.security.service.SecurityManager.runAs(Lweblogic.security.acl.internal.AuthenticatedSubject;Lweblogic.security.acl.internal.AuthenticatedSubject;Ljava.security.PrivilegedAction;)Ljava.lang.Object;(SecurityManager.java:118) at weblogic.servlet.internal.WebAppServletContext.invokeServlet(Lweblogic.servlet.internal.ServletRequestImpl;Lweblogic.servlet.internal.ServletResponseImpl;)V(WebAppServletContext.java:3661) at weblogic.servlet.internal.ServletRequestImpl.execute(Lweblogic.kernel.ExecuteThread;)V(ServletRequestImpl.java:2630) at weblogic.kernel.ExecuteThread.execute(Lweblogic.kernel.ExecuteRequest;)V(ExecuteThread.java:219) at weblogic.kernel.ExecuteThread.run()V(ExecuteThread.java:178) at java.lang.Thread.startThreadFromVM(Ljava.lang.Thread;)V(Unknown Source) The tree is a client-side tree. Can anyone help me please? Thanks, Rosalba __ Yahoo! FareChase: Search multiple travel sites in one click. http://farechase.yahoo.com __ Yahoo! Mail - PC Magazine Editors' Choice 2005 http://mail.yahoo.com
Re: custom error message
Sebastian, h:message2 is not a real component yet. It's just something that usrwagner was proposing. There's no easy solution to what you're asking for yet. JSF 1.2 has added a requiredMessage attribute that would do what you want. https://javaserverfaces-spec-public.dev.java.net/issues/show_bug.cgi?id=81 h:message2 could in theory cycle through the list of messages and replace certain messages with a custom one. However, it'd be very hard to determine which message was the one you wanted to replace. On 11/4/05, Sebastian Dimunzio [EMAIL PROTECTED] wrote: Thanks! you 2005/11/4, [EMAIL PROTECTED] [EMAIL PROTECTED]: What I have forgotten The specification should be like this h:message2 style=color:red for=firstname value=You must fill the first name/ -- Original-Nachricht -- Reply-To: MyFaces Discussion users@myfaces.apache.org Date: Fri, 4 Nov 2005 15:46:26 +0100 From: [EMAIL PROTECTED] Subject: RE: custom error message To: MyFaces Discussion users@myfaces.apache.org I would like to have such a tag component. -- Original-Nachricht -- Reply-To: MyFaces Discussion users@myfaces.apache.org Date: Fri, 4 Nov 2005 11:36:50 -0300 From: Sebastian Dimunzio [EMAIL PROTECTED] To: users@myfaces.apache.org Subject: custom error message Hi! Somebody know the way to show a custom error message for each field on my form, for example You must fill the first name Thanks! Saludos Sebastian Dimunzio -- Sebastian Dimunzio
RE: myFaces Tiles - Illegal to flush within a custom tag
Its Friday. Its my only excuse. Solved by tiles:insert page=/test.jsp flush=false/ (dont know how I missed that blonde moment.) sorry jeff -Original Message- From: Jeffrey Porter [mailto:[EMAIL PROTECTED] Sent: 04 November 2005 16:20 To: MyFaces Discussion Subject: myFaces Tiles - Illegal to flush within a custom tag Hello all again, This may not be the right place to ask, but I will anyway. Ive got some pages that are JSF/MyFaces pages I want to use some Tiles insert statements. When I do I get the error javax.servlet.ServletException: Can't insert page '/test.jsp' : Illegal to flush within a custom tag This works %@ taglib uri=http://struts.apache.org/tags-tiles prefix=tiles % html body tiles:insert page=/test.jsp flush=true/ f:view // cant place tiles: in here /f:view /body /html This doesnt %@ taglib uri=http://struts.apache.org/tags-tiles prefix=tiles % html body f:view tiles:insert page=/test.jsp flush=true/ /f:view /body /html Any idea people? Or tips on where to look for an answer. Thanks Jeff. Tools struts-1.2.7 myfaces-1.1.1.zip
Re: Tree2
Client side toggling (clientside=true) would allow the user to click, click, click the tree to expand and contract nodes using only Javascript, with no HTTP calls required. Server side toggling (clientside=false) requires that the browser turn each click on the tree into individual HTTP calls, where the new tree is rendered by the server and returned to the client web browser after each click. Clientside is similar to tree in a Swing application. Serverside is a bit painful for the users in my opinion. But if your tree is very large, and you only want to load it when the user clicks on it, this may be your best option. Wayne On Fri, 4 Nov 2005 09:29 +0100, [EMAIL PROTECTED] [EMAIL PROTECTED] wrote: Hello! I have a question concerning the Tree2 component. What means the attribute clientSideToggle=false. Means this, that the data is loaded from the server if I click on the icon? Because that's what I need. I have so much data to load, that it costs so much time to load it all at the beginning. Is it possible to load it only if the user click on the parent node? Thanks, shed -- Ein Service von http://www.sms.at
AW: AW: How to create component without binding?
I took a component binding to a panelGrid for testing and it worked quite well but the dynamically created components appear only once in the page. If I access the page a second time or reload the they disapper. The code I used is copied from here (the last entry): http://forums.java.sun.com/thread.jspa?threadID=555626messageID=2816029 What do I have to do that the components appear every time? I use facelets, does this have any impact? Many thanks in advance and best regards, René -Ursprüngliche Nachricht- Von: Volker Weber [mailto:[EMAIL PROTECTED] Gesendet: Freitag, 4. November 2005 13:38 An: MyFaces Discussion Betreff: Re: AW: How to create component without binding? Hi, the h:panelGroup ... tag should render nothing but just the children if no style or styleClass attributes are present. So h:panelGroup binding=#{my.backingbean} should do. see: http://java.sun.com/j2ee/javaserverfaces/1.1_01/docs/tlddocs/h/panelGroup.ht ml regards Volker Rene Ott wrote: That sounds good ;) How can I realize this? f:view binding=my.backingbean Like this? Does a component exist that acts just like a container for other components but itself doesn't get displayed? This way it would be possible to make a binding to this component without the need to display the component. René -Ursprüngliche Nachricht- Von: Martin Marinschek [mailto:[EMAIL PROTECTED] Gesendet: Freitag, 4. November 2005 11:06 An: MyFaces Discussion Betreff: Re: How to create component without binding? Then you'll need to do a binding for the ViewRoot ;) How would JSF know where to put your components, if you don't have them in the template? regards, Martin On 11/4/05, Rene Ott [EMAIL PROTECTED] wrote: First thanks for the many answers in just one hour :-) Why do I need a binding to do this? If I need a binding to for example a panelgroup this means that on the page the panelgroup gets rendered although I don't need (or want) it. Lets assume I want to create dynamically several outputlinks. With a panelgroup binding they are all inside a panelgroup. Why cannot I just hang the outputlinks in UIviewroot and skip all the binding stuff? René Ott -Ursprüngliche Nachricht- Von: Martin Marinschek [mailto:[EMAIL PROTECTED] Gesendet: Freitag, 4. November 2005 09:49 An: MyFaces Discussion Betreff: Re: How to create component without binding? What you want to do is do a binding for panelGroup and then add children to this panelGroup - with this you can create extra components. code snippet (not compiled except in my head ;): public UIComponent getPanelGroup() { HtmlPanelGroup panelGroup = new HtmlPanelGroup(); panelGroup.getChildren().add(new HtmlInputText()); panelGroup.getChildren().add(new HtmlOutputText()); ... return panelGroup; } regards, Martin On 11/4/05, Nikita Koselev [EMAIL PROTECTED] wrote: Can you explain your task better, please. Nikita On 04/11/05, Rene Ott [EMAIL PROTECTED] wrote: Hello @all, I would like to create dynamically inside a backing bean some components. Looking around in the net I found only solutions that create a binding to a component, for example: h:panelGroup binding=#{my.backingbean} ... This means that I always need an existing component like panelGroup for creating with a binding some components. How can I create dynamically components without using a binding (and in the end an extra component)? Thanks and best regards, René Ott -- http://www.irian.at Your JSF powerhouse - JSF Trainings in English and German -- http://www.irian.at Your JSF powerhouse - JSF Trainings in English and German -- 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.
JSCookMenu and Logoff
Hi, As I understand it, navigationMenuItems only take actions mapped to navigation-cases. How would I configure it to do something like log off, which is just an action, before going to a view id? Thanks, -- Don Tam Manager, Software Development (416)493-6111x143 [EMAIL PROTECTED]
Re: Some notes of my loadtest results
comments inline... 1. We can now use STATE_SAVING_METHOD=server, and the back-button (and pop-up windows) will work correctly (e.g., when my pop-up window closes, my base window won't have forgotten its state)? yes you can do this now 2. Using STATE_SAVING_METHOD=server is faster and thus recommended? definitely. Since the state must not be transferred to the client which saves time. Just wondering what the current state of affairs is regarding the tradeoffs between server and client state saving method. +1 for this question..:) I have gone back and forth between the two and now am not at all sure which is recommended under what circumstances and why. I would also like to know, if MyFaces 1.1.1 is good enough or the answer given, whatver it may be, pertains to the latest nightly builds. only nightly builds supports multiple views if server state is used. -- Mathias
Re: Providing spring-like InitializingBean interface for JSF managed beans
I see that this functionality has already made it into JSF 1.2, using annotations. The interesting part of the implementation is that it also supports a destroy method using ServletRequestListener, HttpSessionListener, and ServletContextListener. http://weblogs.java.net/blog/edburns/archive/2005/08/using_ejb_annot.html https://javaserverfaces-spec-public.dev.java.net/issues/show_bug.cgi?id=119 On 10/26/05, Mike Kienenberger [EMAIL PROTECTED] wrote: I've been reviewing open issues with my current application, and some of them seem to deal with using Spring. This is kind of frustrating because I'm finding that JSF managed beans do ALMOST everything I want without Spring, except for providing a InitializingBean.afterPropertiesSet() method call after a new bean's properties have been set. So after pondering it for a bit, it occurred to me that there's no reason why support for this interface (repackaged for MyFaces) can't be added to the org.apache.myfaces.el.VariableResolverImpl or to the org.apache.myfaces.config.ManagedBeanBuilder class. It seems to me that modifying one of the above classes to call the below code would provide this functionality in a backward-compatible way that does not affect the TCK. if (newBean instanceof InitializingBean) ((InitializingBean)newBean).afterPropertiesSet(); This could be done either as the last line in ManagedBeanBuilder.buildManagedBean() or right after the call to buildManagedBean() in VariableResolverImpl.resolveVariable. Unfortunately, I can't see a way to adding this functionality cleanly as a generic JSF tomahawk extension, so it would have to remain a MyFaces-only feature. Thoughts?
Usage of PanelNavigation2
Hi, We are using PanelNavigation2 to show a menu of actions. We have populated the menu and works pretty well. It gets rendered and it calls backing bean methods as expected. But since we create this menu dinamically in a backing bean, we can't define a diferent outcome for each menu entry in faces-config.xml. So, how can we know in the destination JSP which option has been selected?. Can we pass any kind of parameter to the NavigationMenuItem and retrieve it in the method given as action parameter?. Thank you very much for your attention, al.
panelTabbedPane h:commandLink problem
I believe that it is a known problem that panelTabbedPane will break any commandLinks found inside the tabs. It's because that bloody 'autoform' gets generated around the tabs AND their content. What I want to know is, has anyone modified panelTabbedPane to only wrap the form around the clickable top part of the tab? It seems like that would solve the problem, since the content of the tabs wouldn't be wrapped in the autoform anymore. I saw this mentioned in the mailing list back in April; is there really not a fix yet?
Form/Input Handling Problem
Does anyone know why I'm getting the following form/input error? Here's my scenario: I have a jsp page which uses an h:form and there are three h:commandButtons at the very top and the very bottom of the form. The form woks fine until I add another h:commandButton in the middle of the form. At which point the following message is displayed multiple times when I press any of the submit buttons. WARN [HtmlRendererUtils] There should always be a submitted value for an input if it is rendered, its form is submitted, and it is not disabled or read-only. My commandButtons are structured like this: h:commandButton id=force_audio_blend action=#{controlGEM.forceAudioBlend} value=#{resource_msg['label_control_force_audio_blend']} / Thank You, Rodney
Re: tree2 problem
That's easy enough to test. Just change the toggle attribute. I recommend taking a look at the several simple examples that are available and build on those. IMO too many users try to start off with their final sophisticated tree before they fully understand how to build a simple one. (I'm not saying that is your problem, just a general suggestion.) sean On 11/4/05, rosalba bochicchio [EMAIL PROTECTED] wrote: Do you think I can solve the problem using a server-side tree instead of the clied-side one? --- rosalba bochicchio [EMAIL PROTECTED] wrote: Hi all, I'm facing a problem related to tree2 component in myfaces 1.0.9 when deleting a node of the tree. The problem is the following one: if I delete a node (which can be a leaf or not) of the tree and then reload the page, the updated tree is correctly displayed but if I try to expand one of its nodes I get the following exception: java.lang.IllegalArgumentException: Node with id 0:3. Failed to parse 0:3 at org.apache.myfaces.custom.tree2.TreeModel.getNodeById(Ljava.lang.String;)Lorg.apache.myfaces.custom.tree2.TreeNode;(TreeModel.java:153) at org.apache.myfaces.custom.tree2.TreeModel.setNodeId(Ljava.lang.String;)V(TreeModel.java:71) at org.apache.myfaces.custom.tree2.UITreeData.setNodeId(Ljava.lang.String;)V(UITreeData.java:290) at org.apache.myfaces.custom.tree2.HtmlTree.setNodeId(Ljava.lang.String;)V(HtmlTree.java:80) at org.apache.myfaces.custom.tree2.HtmlTreeRenderer.decode(Ljavax.faces.context.FacesContext;Ljavax.faces.component.UIComponent;)V(HtmlTreeRenderer.java:104) at javax.faces.component.UIComponentBase.decode(Ljavax.faces.context.FacesContext;)V(UIComponentBase.java:305) at org.apache.myfaces.custom.tree2.UITreeData.processDecodes(Ljavax.faces.context.FacesContext;)V(UITreeData.java:139) at org.apache.myfaces.custom.tree2.HtmlTree.processDecodes(Ljavax.faces.context.FacesContext;)V(HtmlTree.java:91) at javax.faces.component.UIComponentBase.processDecodes(Ljavax.faces.context.FacesContext;)V(UIComponentBase.java:407) at javax.faces.component.UIComponentBase.processDecodes(Ljavax.faces.context.FacesContext;)V(UIComponentBase.java:407) at javax.faces.component.UIViewRoot.processDecodes(Ljavax.faces.context.FacesContext;)V(UIViewRoot.java:151) at org.apache.myfaces.lifecycle.LifecycleImpl.applyRequestValues(Ljavax.faces.context.FacesContext;)Z(LifecycleImpl.java:177) at org.apache.myfaces.lifecycle.LifecycleImpl.execute(Ljavax.faces.context.FacesContext;)V(LifecycleImpl.java:87) at javax.faces.webapp.FacesServlet.service(Ljavax.servlet.ServletRequest;Ljavax.servlet.ServletResponse;)V(FacesServlet.java:109) at weblogic.servlet.internal.ServletStubImpl$ServletInvocationAction.run()Ljava.lang.Object;(ServletStubImpl.java:996) at weblogic.servlet.internal.ServletStubImpl.invokeServlet(Ljavax.servlet.ServletRequest;Ljavax.servlet.ServletResponse;Lweblogic.servlet.internal.FilterChainImpl;)V(ServletStubImpl.java:419) at weblogic.servlet.internal.TailFilter.doFilter(Ljavax.servlet.ServletRequest;Ljavax.servlet.ServletResponse;Ljavax.servlet.FilterChain;)V(TailFilter.java:28) at weblogic.servlet.internal.FilterChainImpl.doFilter(Ljavax.servlet.ServletRequest;Ljavax.servlet.ServletResponse;)V(FilterChainImpl.java:27) at org.apache.myfaces.component.html.util.ExtensionsFilter.doFilter(Ljavax.servlet.ServletRequest;Ljavax.servlet.ServletResponse;Ljavax.servlet.FilterChain;)V(ExtensionsFilter.java:112) at weblogic.servlet.internal.FilterChainImpl.doFilter(Ljavax.servlet.ServletRequest;Ljavax.servlet.ServletResponse;)V(FilterChainImpl.java:27) at weblogic.servlet.internal.WebAppServletContext$ServletInvocationAction.run()Ljava.lang.Object;(WebAppServletContext.java:6458) at weblogic.security.acl.internal.AuthenticatedSubject.doAs(Lweblogic.security.subject.AbstractSubject;Ljava.security.PrivilegedAction;)Ljava.lang.Object;(AuthenticatedSubject.java:321) at weblogic.security.service.SecurityManager.runAs(Lweblogic.security.acl.internal.AuthenticatedSubject;Lweblogic.security.acl.internal.AuthenticatedSubject;Ljava.security.PrivilegedAction;)Ljava.lang.Object;(SecurityManager.java:118) at weblogic.servlet.internal.WebAppServletContext.invokeServlet(Lweblogic.servlet.internal.ServletRequestImpl;Lweblogic.servlet.internal.ServletResponseImpl;)V(WebAppServletContext.java:3661) at weblogic.servlet.internal.ServletRequestImpl.execute(Lweblogic.kernel.ExecuteThread;)V(ServletRequestImpl.java:2630) at weblogic.kernel.ExecuteThread.execute(Lweblogic.kernel.ExecuteRequest;)V(ExecuteThread.java:219) at weblogic.kernel.ExecuteThread.run()V(ExecuteThread.java:178) at java.lang.Thread.startThreadFromVM(Ljava.lang.Thread;)V(Unknown
Strategies for Reports
Hello all, I'd like to ask the group how you create grouped reports. Before JSF, I was using while statements inside of scriplets to create grouped reports that iterated repeatedly over ResultSets to create something like this: Level 1 Level 1_1 Level 1_2 Level 2 Level 2_1 and so on I'd like to accomplish the same thing and I'm wondering if tree tables or other tags can be utilized for this purpose. I'd surely appreciate any advice you have on the subject. Thanks
Re: Form/Input Handling Problem
I have received this warning when I disable the control using javascript on the client-side therefore the browser will not post the value back (I believe). Are you disabling controls on the client side? On 11/4/05, Burke, Rodney [EMAIL PROTECTED] wrote: Does anyone know why I'm getting the following form/input error? Here's my scenario: I have a jsp page which uses an h:form and there are three h:commandButtons at the very top and the very bottom of the form. The form woks fine until I add another h:commandButton in the middle of the form. At which point the following message is displayed multiple times when I press any of the submit buttons. WARN [HtmlRendererUtils] There should always be a submitted value for an input if it is rendered, its form is submitted, and it is not disabled or read-only. My commandButtons are structured like this: h:commandButton id=force_audio_blend action=#{controlGEM.forceAudioBlend} value=#{resource_msg['label_control_force_audio_blend']} / Thank You, Rodney
Re: Strategies for Reports
I use jasper. James Reynolds wrote: Hello all, I'd like to ask the group how you create grouped reports. Before JSF, I was using while statements inside of scriplets to create grouped reports that iterated repeatedly over ResultSets to create something like this: * Level 1 * Level 1_1 * Level 1_2 * Level 2 * Level 2_1 * and so on I'd like to accomplish the same thing and I'm wondering if tree tables or other tags can be utilized for this purpose. I'd surely appreciate any advice you have on the subject. Thanks
RE: Strategies for Reports
Wow. I just researched Jasper, it's very impressive. Thanks for the lead! -Original Message- From: Julián García [mailto:[EMAIL PROTECTED] Sent: Friday, November 04, 2005 2:25 PM To: MyFaces Discussion Subject: Re: Strategies for Reports I use jasper. James Reynolds wrote: Hello all, I'd like to ask the group how you create grouped reports. Before JSF, I was using while statements inside of scriplets to create grouped reports that iterated repeatedly over ResultSets to create something like this: * Level 1 * Level 1_1 * Level 1_2 * Level 2 * Level 2_1 * and so on I'd like to accomplish the same thing and I'm wondering if tree tables or other tags can be utilized for this purpose. I'd surely appreciate any advice you have on the subject. Thanks
DataScroller not working after upgrading to MyFaces 1.1.1
All, I recently upgraded from Myfaces 1.0.9 to My Faces 1.1.1. After the upgrade, the data scrollers are not working. I get some exceptions in my server. Do we have to change anything in the descriptors to get the data scroller to work? I still see the data scroller in my pages, but I can't click on them. Thanks, deepinder ___ Siebel IT'S ALL ABOUT THE CUSTOMER Visit www.siebel.com This e-mail message is for the sole use of the intended recipient(s) and contains confidential and/or privileged information belonging to Siebel Systems, Inc. or its customers or partners. Any unauthorized review, use, copying, disclosure or distribution of this message is strictly prohibited. If you are not an intended recipient of this message, please contact the sender by reply e-mail and destroy all soft and hard copies of the message and any attachments. Thank you for your cooperation.
MyFaces 1.1.1 - problem with dataTable and selectOne menu contained in a panelTab
Hi! I have a strange problem using a selectOneMenu within a panelTab (MyFaces 1.1.1). The selectOneMenu is placed above a dataTable, which is also contained in the panelTab. Without the selectOneMenu, I can click on a commandLink in a table row to select one entry. But with the selectOneMenu placed above the dataTable, I can click on the links or the dataScroller below, and nothing happens. No request is initiated to update the page. (It doesn't matter if I use tags of the standard JSF HTML RenderKit Taglib or Tomahawk.) What's the problem with this composition, and how can I manage this? Regards, Matthias
collection size
I have a handler return a list of SelectItems that I use as: h:selectOneMenu ... f:selectItems value=#{handler.types}/ ... But, if there is only one item in the list then I'd like to change it to plain output text (and a hidden input) So, I tried h:panelGroup rendered=#{length(handler.types) 1} h:selectOneMenu ... /h:panelGroup h:panelGroup rendered=#{length(handler.types) == 1} h:inputHidden rendered=true ... /h:panelGroup but that isn't valid expression syntax. How do I get the size of my collection (List)? Thanks, Kevin.
Re: Calendar problems??
Hello! Jacob comments: Boris, I did make modifications to Facelets on the CVS server, based on comments from Kito Mann. I will probably do a promoted build to see if this doesn't correct the issues you are seeing. So, hoping this will be fixed soon. Martin Marinschek wrote: Hi, we've had Thomas Spiegl look at problems with duplicate Ids and facelets with the navMenu - and he has found no resolution (in the limited time he had for this). It seems that several components are now incompatible with facelets, and it just shows up cause I implemented better errror handling. I am now controlling that for the same parent, you can have the component with the same id only once. I don't know what facelets would do to change this, really, but Thomas was saying that somehow facelets seems to be creating components even though they are already existing? Please don't take everything I say here for granted, this is just what I heard of from hearsay. regards, Martin On 11/4/05, Boris Kovalenko [EMAIL PROTECTED] wrote: Hello! Unfortunatelly no :( I opened two PRs (one in MyFaces bugtracker and one in Facelets) and still got no answer. May be someone of developers will look at this? Kia Lewis wrote: Have you found a solution to this problem? I have the latest build (Nov 3) and I am still getting this issue. I have seen mention of the problem on different message boards but no real solution. -Original Message- From: Boris Kovalenko [mailto:[EMAIL PROTECTED] Sent: Monday, October 31, 2005 12:53 AM To: MyFaces Discussion Subject: Calendar problems?? Hello! Till today calendar worked ok. But today (31.10.2005) I getting exception!! MyFaces 1.1.1 release, calendar code is simple: t:inputCalendar id=calendar monthYearRowClass=monthYearRowClass weekRowClass=weekRowClass dayCellClass=dayCellClass currentDayCellClass=currentDayCellClass value=#{sessionBean.newsDate}/ [2005-10-31 10:38:59.315] Error Rendering View [2005-10-31 10:38:59.315] java.lang.IllegalStateException: Client-id : calendar_1130737139296_link is duplicated in the faces tree. [2005-10-31 10:38:59.315] at org.apache.myfaces.application.jsp.JspStateManagerImpl.checkForDuplicateId s(JspStateManagerImpl.java:241) [2005-10-31 10:38:59.315] a org.apache.myfaces.application.jsp.JspStateManagerImpl.checkForDuplicateId s(JspStateManagerImpl.java:255) [2005-10-31 10:38:59.315] at org.apache.myfaces.application.jsp.JspStateManagerImpl.checkForDuplicateId s(JspStateManagerImpl.java:255) [2005-10-31 10:38:59.315] at org.apache.myfaces.application.jsp.JspStateManagerImpl.saveSerializedView( JspStateManagerImpl.java:204) [2005-10-31 10:38:59.315] at org.apache.myfaces.renderkit.html.util.DummyFormUtils.writeDummyForm(Dummy FormUtils.java:111) [2005-10-31 10:38:59.315] at org.apache.myfaces.renderkit.html.HtmlResponseWriterImpl.endDocument(HtmlR esponseWriterImpl.java:156) [2005-10-31 10:38:59.315] at com.sun.facelets.FaceletViewHandler.renderView(FaceletViewHandler.java:449 ) [2005-10-31 10:38:59.315] at org.apache.myfaces.lifecycle.LifecycleImpl.render(LifecycleImpl.java:352) [2005-10-31 10:38:59.315] at javax.faces.webapp.FacesServlet.service(FacesServlet.java:107) [2005-10-31 10:38:59.315] at com.caucho.server.dispatch.ServletFilterChain.doFilter(ServletFilterChain. java:99) [2005-10-31 10:38:59.315] at org.apache.myfaces.component.html.util.ExtensionsFilter.doFilter(Extension sFilter.java:122) [2005-10-31 10:38:59.315] at com.caucho.server.dispatch.FilterFilterChain.doFilter(FilterFilterChain.ja va:70) [2005-10-31 10:38:59.315] at com.caucho.server.webapp.WebAppFilterChain.doFilter(WebAppFilterChain.java :163) [2005-10-31 10:38:59.315] at com.caucho.server.dispatch.ServletInvocation.service(ServletInvocation.jav a:208) [2005-10-31 10:38:59.315] at com.caucho.server.hmux.HmuxRequest.handleRequest(HmuxRequest.java:396) [2005-10-31 10:38:59.315] at com.caucho.server.port.TcpConnection.run(TcpConnection.java:363) [2005-10-31 10:38:59.315] at com.caucho.util.ThreadPool.runTasks(ThreadPool.java:490) [2005-10-31 10:38:59.315] at com.caucho.util.ThreadPool.run(ThreadPool.java:423) [2005-10-31 10:38:59.315] at java.lang.Thread.run(Thread.java:534) [10:38:59.316] Took Type: java.io.PrintWriter [2005-10-31 10:38:59.316] Took Type: java.io.PrintWriter With respect, Boris With respect, Boris With respect, Boris
Re: inputFileUpload using excessive amounts of memory
I have been unable to find the exact cause but I have managed to stop the problem for the moment and I dont have the time to muck around with it any longer. It seems to be that it was allocating memory for the maximum file size that could be uploaded. If I had the max upload size at 50mb, but a disk threshold of around 5mb, it would run out of memory, even for very small files. By putting the disk threshold to 0mb it seems to always use the disk and I dont get any memory problems at all, even uploading 80mb files with a VM memory size of 64mb (which should be possible of course). So i'm happy for the time being. I dont know if this is a problem in the way that the MultipartFilter operates or a problem with using the mutli-part filter in combination with facelets or some other issue. Has anyone successfully used the Tomahawk file upload component with Facelets? I'm running MyFaces 1.1.1 (with same-version of Tomahawk) and Facelets 1.0d. Thanks, -Robert. Robert Parsons wrote: Hi, I have tried to profile the application and try and catch the error but nothing is working. For one thing I suck at profiling as I have no idea what i'm doing :S. I downloaded JProfiler and it has many nice screens but I cant seem to make it do anything usefull. I tried using NetBeans debugger to break on any ServletException or OutOfMemoryError and it didnt catch either :S. Any ideas of how I could track this thing down? Thanks, -Robert Martin Marinschek wrote: Sounds very interesting. Can you profile through what the extensions filter is doing? The question is when this amount of memory is built up, if in the extension filter or later in the JSF life-cycle, I can't imagine where this would be. regards, Martin On 11/3/05, Robert Parsons [EMAIL PROTECTED] wrote: Hi, Sorry to bother everyone again. I have been trying to use the file upload component of MyFaces (Tomahawk), but my JVM is using up an incredible amount of memory to process each upload request. With a max memory size of 64mb it (the server) would almost certainly run out of heap space. On 120mb I could upload the file but if I uploaded 2 in quick succession it would almost certainly run out. With 1GB of memory I could always upload a file, but uploading files in quick succession took the memory usage super high from 120mb,200mb,500mb! Oh and by the way these files were no more than 2mb each, and you didn't even have to upload a file to use up the memory, just submit the form. Sureley this much memory should not be need to upload such tiny files. Is this a problem with the upload component (or the extension filter) or is it something i'm doing wrong? In my web.xml the maximum upload size is set to 50mb and a use-the-disk threshold of 10mb. The exception see back from tomcat is: exception: javax.servlet.ServletException: Filter execution threw an exception org.apache.myfaces.component.html.util.MultipartFilter.doFilter(MultipartFilter.java:102) root cause: java.lang.OutOfMemoryError: Java heap space Any ideas? Thanks, -Robert. -- http://www.irian.at Your JSF powerhouse - JSF Trainings in English and German
Re: File upload, exceed limit
Should it possibly appear as if a normal validation exception? Have a fileSizeValidator? I dont really know how validators work, just a suggestion. Martin Marinschek wrote: That is an old problem we haven't resolved yet. What we should do is set a request parameter I think - and on decode, the fileUpload component checks this request parameter and adds a message. What do you think? regards, Martin On 11/3/05, Dave [EMAIL PROTECTED] wrote: I am using FileUpload. In case that file is too large, I like to display a message, but I got the following exception during Restore View phase. How should I catch the exception and display a message? Thanks! 01:14:14,156 INFO [MultipartRequestWrapper] user tried to upload a file that exceeded file-size limitations. org.apache.commons.fileupload.FileUploadBase$SizeLimitExceededException: the request was rejected because it's size exce eds allowed range at org.apache.commons.fileupload.FileUploadBase.parseRequest(FileUploadBase.java:317) at org.apache.myfaces.component.html.util.MultipartRequestWrapper.parseRequest(MultipartRequestWrapper.java:70) at org.apache.myfaces.component.html.util.MultipartRequestWrapper.getParameter(MultipartRequestWrapper.java:151) at org.apache.myfaces.context.servlet.RequestParameterMap.getAttribute(RequestParameterMap.java:39) at org.apache.myfaces.context.servlet.AbstractAttributeMap.get(AbstractAttributeMap.java:87) at org.apache.myfaces.application.jsp.JspStateManagerImpl.getSerializedViewFromServletSession(JspStateManagerImp l.java:356) at org.apache.myfaces.application.jsp.JspStateManagerImpl.restoreTreeStructure(JspStateManagerImpl.java:182) at org.apache.myfaces.application.jsp.JspStateManagerImpl.restoreView(JspStateManagerImpl.java:207) at org.apache.myfaces.application.jsp.JspViewHandlerImpl.restoreView(JspViewHandlerImpl.java:255) at org.apache.myfaces.lifecycle.LifecycleImpl.restoreView(LifecycleImpl.java:120) at org.apache.myfaces.lifecycle.LifecycleImpl.execute(LifecycleImpl.java:67) Yahoo! FareChase - Search multiple travel sites in one click. -- http://www.irian.at Your JSF powerhouse - JSF Trainings in English and German
Re: valueChangeBackListener ?
yes, that probably would have worked. however the business requirements changed at a meeting so now it isn't a problem ;) Original message Date: Wed, 2 Nov 2005 10:51:31 -0500 From: Mike Kienenberger [EMAIL PROTECTED] Subject: Re: valueChangeBackListener ? To: MyFaces Discussion users@myfaces.apache.org What about changing it to an actionListener and checking it yourself? http://wiki.apache.org/myfaces/SubmitPageOnValueChange I haven't used valueChangeListener, but it seems like a bug if it doesn't detect all changes. On 10/31/05, Dennis Byrne [EMAIL PROTECTED] wrote: I have a valueChangeListener that works fine, however the bound method does not fire once my h:selectOneMenu value is changed *back* to the original value. I realize this is probably a feature in mose cases, but what to do? Dennis Byrne Dennis Byrne