Re: Cannot get tr:inputDate to work
On Tue, Apr 13, 2010 at 11:47 AM, Eisenträger, Tobias tobias.eisentrae...@arag.de wrote: -Ursprüngliche Nachricht- Von: mwessend...@gmail.com [mailto:mwessend...@gmail.com] Im Auftrag von Matthias Wessendorf Gesendet: Dienstag, 13. April 2010 11:31 An: MyFaces Discussion Betreff: Re: Cannot get tr:inputDate to work does the vanilla demo work for you ? No, gives the error as stated in original email. hrm, I do not see that. checked on here http://svn.apache.org/repos/asf/myfaces/trinidad/branches/trinidad-1.2.x/ in trinidad-examples/trinidad-demo I simply called mvn clean jetty:run -PjettyConfig (After I build the branch) tr:inputDate works fine -M Did you register the TrindadFilter ? filter filter-nametrinidad/filter-name filter-class org.apache.myfaces.trinidad.webapp.TrinidadFilter /filter-class /filter filter-mapping filter-nametrinidad/filter-name servlet-namefaces/servlet-name /filter-mapping filter-mapping filter-nameMyFacesExtensionsFilter/filter-name url-pattern*.jsf/url-pattern /filter-mapping filter-mapping filter-nameMyFacesExtensionsFilter/filter-name url-pattern/faces/*/url-pattern /filter-mapping Do I need more filter mappings - I notice that only the urls with appname/index.jsf work, the ones with /faces/index.jspx do not. Did you add the renderKit (to faces-cfg) ? application !-- Use the Trinidad RenderKit -- default-render-kit-id org.apache.myfaces.trinidad.core /default-render-kit-id !-- Set the user locale -- locale-config default-localede/default-locale supported-localede/supported-locale /locale-config resource-bundle base-namemessages/base-name varmsgs/var /resource-bundle resource-bundle base-namejflowwebclient/base-name varproperties/var /resource-bundle /application -M On Tue, Apr 13, 2010 at 11:23 AM, Eisenträger, Tobias tobias.eisentrae...@arag.de wrote: Hello, I think I am missing a configuration, something for additional resources from ADF, but I cannot remember how to configure that, and where. The problem is that when I use the tr:inputDate from the example at: http://myfaces.apache.org/trinidad/trinidad-api/tagdoc/tr_inputDate.html http://myfaces.apache.org/trinidad/trinidad-api/tagdoc/tr_inputDate.html on click nothing happens - the problem ist, that the browser is looking for: http://server:port/appName/__ADFv__?_t=cdvalue=1271150122202loc=deenc=i so-8859-1 where a 404 is returned. Apr 13, 2010 11:22:54 AM org.apache.myfaces.renderkit.html.HtmlRenderKitImpl getRenderer WARNING: Unsupported component-family/renderer-type: org.apache.myfaces.trinidad.Input/org.apache.myfaces.trinidad.CoreInputTex t Apr 13, 2010 11:22:54 AM org.apache.myfaces.trinidadinternal.renderkit.RenderKitBase getRenderer WARNING: Renderer 'org.apache.myfaces.trinidad.CoreInputText' not found for component family 'org.apache.myfaces.trinidad.Input' Apr 13, 2010 11:22:54 AM org.apache.myfaces.trinidad.component.UIXComponentBase _getRendererImpl WARNING: Could not find renderer for UIXInput[UIXEditableFacesBeanImpl, id=patitoPerez] rendererType = org.apache.myfaces.trinidad.CoreInputText Any tipps? Thanks! Mit freundlichen Grüßen Tobias Eisenträger Softwareentwickler Dokumentenmanagement/Workflow/Internet, AKB 8125 ARAG IT GmbH ARAG Platz 1, 40472 Düsseldorf Tel.: +49 (0)211 964-1937 tobias.eisentrae...@arag.de www.ARAG.de Aufsichtsratsvorsitzender: Gerd Peskes Vorstand: Dr. Paul-Otto Faßbender (Vors.), Dr. Jan-Peter Horst, Dr. Johannes Kathan, Werner Nicoll, Hanno Petersen, Dr. Joerg Schwarze Sitz und Registergericht: Düsseldorf, HRB 1371 USt-ID-Nr.: DE 119 355 995 -- Matthias Wessendorf blog: http://matthiaswessendorf.wordpress.com/ sessions: http://www.slideshare.net/mwessendorf twitter: http://twitter.com/mwessendorf -- Matthias Wessendorf blog: http://matthiaswessendorf.wordpress.com/ sessions: http://www.slideshare.net/mwessendorf twitter: http://twitter.com/mwessendorf
[Trinidad] PPR issue with Firefox when returning from Dialog
Hi, what I tried to achieve is, that when when closing a Trinidad dialog certain areas of the origin page get refreshed. For testing my pages I use Firefox and Chrome and in Chrome the PPR is working, in Firefox it isn't. Even when removing the partialSubmit from the button which triggers the dialog, so there isn't any more ajax and the page get's a full reload, the changes aren't visible and I still have to make a manual reload. Has anybody else encountered a problem with dialogs in Firefox and a hint on how to solve this issue? Simon P.S. Tested with Trinidad 1.2.12/13 -- View this message in context: http://old.nabble.com/-Trinidad--PPR-issue-with-Firefox-when-returning-from-Dialog-tp28242150p28242150.html Sent from the MyFaces - Users mailing list archive at Nabble.com.
Re: tobago partial rendering question
Hello Volker, thanks for the response. Yes I target the panel. I use now actionListener and return null as return value. I also preset the value of string1 so that the value is always already initialized. But nervertheless the string2 is set to the new value (I debug that) but after rendering the tx:in box is still empty. Maybe you can take a look to the latest version of my test page and controller. Best regards Michael %@ page contentType=text/html;charset=UTF-8 language=java % %@ taglib uri=http://java.sun.com/jsf/core; prefix=f % %@ taglib uri=http://myfaces.apache.org/tobago/component; prefix=tc % %@ taglib uri=http://myfaces.apache.org/tobago/extension; prefix=tx % f:view locale=de tc:page width=1280 id=page f:facet name=layout tc:gridLayout rows=1*;fixed columns=fixed/ /f:facet tc:panel id=panel1 f:facet name=layout tc:gridLayout rows=fixed;fixed;1* columns=fixed/ /f:facet tc:form id=form1 tc:box label=box1 id=box1 f:facet name=layout tc:gridLayout rows=fixed;fixed;1* columns=fixed/ /f:facet tc:cell tx:in value=#{myController.string1} label=string1 / /tc:cell tc:cell tc:button actionListener=#{myController.action1} label=submit1 tc:attribute name=renderedPartially value=:page:panel1/ /tc:button /tc:cell tc:cell/ /tc:box /tc:form tc:form id=form2 tc:box label=box2 id=box2 f:facet name=layout tc:gridLayout rows=fixed;fixed;1* columns=fixed/ /f:facet tc:cell id=cell2 tx:in value=#{myController.string2} label=string2 / /tc:cell tc:cell/ /tc:box /tc:form tc:cell/ /tc:panel tc:cell /tc:cell /tc:page /f:view package test1; import javax.faces.event.ActionEvent; public class MyController { private String string1 = 99; private String string2; public String action1(ActionEvent actionEvent) { string2 = string1; return null; } public String getString1() { return string1; } public void setString1(String string1) { this.string1 = string1; } public String getString2() { return string2; } public void setString2(String string2) { this.string2 = string2; } } Volker Weber schrieb: Hi Michael, for actions used in partial rendering you should always return null! I the action returns a string than a full reload is made! I suggest using actionListener for partial actions. When rendering partially only the requested subview (plus the action component if outside) is processed on the server. In your example you request reload of box2, which means the content of box2 is processed and stored in the model. In the action string2 is set to string1 but string1 was not processed so it is still null here. Have you in helmuts example really changed the value of renderedPartially to the suggested panel arround both boxes? Regards, Volker 2010/4/12 kakusc...@elbe-net.de: Hello, I'm trying to execute an action and partial rendering the result in an tx:in field. The tx:button which calls the action and the tx:in elements are in different forms. For some reasons after the new value is set to the underlaying value of the tx:in field the setter of this value is called from somewhere and overwrites the new value with an empty string. But I want to have the value I set with my action1 method in the field instead an empty string. Can some one tell me what I'm doing wrong? Thanks a lot Michael %@ page contentType=text/html;charset=UTF-8 language=java % %@ taglib uri=http://java.sun.com/jsf/core; prefix=f % %@ taglib uri=http://myfaces.apache.org/tobago/component; prefix=tc % %@ taglib uri=http://myfaces.apache.org/tobago/extension; prefix=tx % f:view locale=de tc:page width=1280 id=page f:facet name=layout tc:gridLayout rows=fixed;fixed;1* columns=fixed/ /f:facet tc:form id=form1 tc:box label=box1 id=box1 f:facet name=layout tc:gridLayout rows=fixed;fixed;1* columns=fixed/ /f:facet tc:cell tx:in value=#{testController.string1} label=string1 / /tc:cell tc:cell tc:button action=#{testController.action1} label=submit1 tc:attribute name=renderedPartially value=:page:form2:box2/ /tc:button /tc:cell tc:cell/ /tc:box /tc:form tc:form id=form2 tc:box label=box2 id=box2 f:facet name=layout tc:gridLayout rows=fixed;fixed;1* columns=fixed/ /f:facet tc:cell id=cell2 tx:in value=#{testController.string2} label=string2 / /tc:cell tc:cell/ /tc:box /tc:form tc:cell /tc:cell /tc:page /f:view package test;
How to activate an tc:tab element to be on top in tobago
Hello, is there a way to activate an tc:tab element within an action so that it comes to the top of a tc:tabGroup ? Thanks for your help Michael
Re: About the h:outputLink in Portlet Bridge still redirect out of portal
Can you try, instead? h:outputLink value=pages/calculator.jsf?javax.portlet.faces.ViewLink=true h:outputText value=outputlink/ /h:outputLink The bridge doesn't deal with quoted queryString values. Try the above and if it still doesn't work, send me the generated markup as you did below. -Mike- On 4/12/2010 1:09 AM, Will Vann wrote: Hello h:outputLink value=pages/calculator.jsf?javax.portlet.faces.ViewLink=\true\ h:outputText value=outputlink/ /h:outputLink the markup generated by pluto is: a true= href=pages/calculator.jsf;jsessionid=1DA96049878DF4F0765888627F05287C?javax.portlet.faces.ViewLink=outputlink/a how could i make sure the h:outputLink still in portal? should i config the facesconfig.xml? Best regards, 2010-04-12 Will Vann
Re: How to activate an tc:tab element to be on top in tobago
Hi Michael, yes, bind the tabIndex attribute of tc:tabgroup to an int in your controller, than you can set the index in your action. Regards, Volker 2010/4/14 Michael Kakuschky kakusc...@elbe-net.de: Hello, is there a way to activate an tc:tab element within an action so that it comes to the top of a tc:tabGroup ? Thanks for your help Michael -- inexso - information exchange solutions GmbH Bismarckstraße 13 | 26122 Oldenburg Tel.: +49 441 4082 356 | FAX: +49 441 4082 355 | www.inexso.de
Re: tobago partial rendering question
Hi Michael, after a more closer view to your jsp i found the problem. The tc:form arround the box is the probem, using subforms you are reduce the validation and modelUpdate only to the subform where the command is in, the other content is not processed and therfore the submitted values are rerenderd. did you really need the forms? Regards, Volker 2010/4/14 Michael Kakuschky kakusc...@elbe-net.de: Hello Volker, thanks for the response. Yes I target the panel. I use now actionListener and return null as return value. I also preset the value of string1 so that the value is always already initialized. But nervertheless the string2 is set to the new value (I debug that) but after rendering the tx:in box is still empty. Maybe you can take a look to the latest version of my test page and controller. Best regards Michael %@ page contentType=text/html;charset=UTF-8 language=java % %@ taglib uri=http://java.sun.com/jsf/core; prefix=f % %@ taglib uri=http://myfaces.apache.org/tobago/component; prefix=tc % %@ taglib uri=http://myfaces.apache.org/tobago/extension; prefix=tx % f:view locale=de tc:page width=1280 id=page f:facet name=layout tc:gridLayout rows=1*;fixed columns=fixed/ /f:facet tc:panel id=panel1 f:facet name=layout tc:gridLayout rows=fixed;fixed;1* columns=fixed/ /f:facet tc:form id=form1 tc:box label=box1 id=box1 f:facet name=layout tc:gridLayout rows=fixed;fixed;1* columns=fixed/ /f:facet tc:cell tx:in value=#{myController.string1} label=string1 / /tc:cell tc:cell tc:button actionListener=#{myController.action1} label=submit1 tc:attribute name=renderedPartially value=:page:panel1/ /tc:button /tc:cell tc:cell/ /tc:box /tc:form tc:form id=form2 tc:box label=box2 id=box2 f:facet name=layout tc:gridLayout rows=fixed;fixed;1* columns=fixed/ /f:facet tc:cell id=cell2 tx:in value=#{myController.string2} label=string2 / /tc:cell tc:cell/ /tc:box /tc:form tc:cell/ /tc:panel tc:cell /tc:cell /tc:page /f:view package test1; import javax.faces.event.ActionEvent; public class MyController { private String string1 = 99; private String string2; public String action1(ActionEvent actionEvent) { string2 = string1; return null; } public String getString1() { return string1; } public void setString1(String string1) { this.string1 = string1; } public String getString2() { return string2; } public void setString2(String string2) { this.string2 = string2; } } Volker Weber schrieb: Hi Michael, for actions used in partial rendering you should always return null! I the action returns a string than a full reload is made! I suggest using actionListener for partial actions. When rendering partially only the requested subview (plus the action component if outside) is processed on the server. In your example you request reload of box2, which means the content of box2 is processed and stored in the model. In the action string2 is set to string1 but string1 was not processed so it is still null here. Have you in helmuts example really changed the value of renderedPartially to the suggested panel arround both boxes? Regards, Volker 2010/4/12 kakusc...@elbe-net.de: Hello, I'm trying to execute an action and partial rendering the result in an tx:in field. The tx:button which calls the action and the tx:in elements are in different forms. For some reasons after the new value is set to the underlaying value of the tx:in field the setter of this value is called from somewhere and overwrites the new value with an empty string. But I want to have the value I set with my action1 method in the field instead an empty string. Can some one tell me what I'm doing wrong? Thanks a lot Michael %@ page contentType=text/html;charset=UTF-8 language=java % %@ taglib uri=http://java.sun.com/jsf/core; prefix=f % %@ taglib uri=http://myfaces.apache.org/tobago/component; prefix=tc % %@ taglib uri=http://myfaces.apache.org/tobago/extension; prefix=tx % f:view locale=de tc:page width=1280 id=page f:facet name=layout tc:gridLayout rows=fixed;fixed;1* columns=fixed/ /f:facet tc:form id=form1 tc:box label=box1 id=box1 f:facet name=layout tc:gridLayout rows=fixed;fixed;1* columns=fixed/ /f:facet tc:cell tx:in value=#{testController.string1} label=string1 / /tc:cell tc:cell tc:button action=#{testController.action1} label=submit1 tc:attribute name=renderedPartially value=:page:form2:box2/ /tc:button /tc:cell tc:cell/
Re: tobago partial rendering question
Hello Volker, I think I need the forms. I have an application which use tabs with different formulars. If I don't use subforms and set the required attribute on some elements on one tab and I want to submit a fomular on another tab it does not work because the element on the other tab is not completely filled and the set require attribute does not allow to submit the main form.. That the reason I subforms. Is there another common way to solve this kind of problem? Thanks and best regards Michael Volker Weber schrieb: Hi Michael, after a more closer view to your jsp i found the problem. The tc:form arround the box is the probem, using subforms you are reduce the validation and modelUpdate only to the subform where the command is in, the other content is not processed and therfore the submitted values are rerenderd. did you really need the forms? Regards, Volker 2010/4/14 Michael Kakuschky kakusc...@elbe-net.de: Hello Volker, thanks for the response. Yes I target the panel. I use now actionListener and return null as return value. I also preset the value of string1 so that the value is always already initialized. But nervertheless the string2 is set to the new value (I debug that) but after rendering the tx:in box is still empty. Maybe you can take a look to the latest version of my test page and controller. Best regards Michael %@ page contentType=text/html;charset=UTF-8 language=java % %@ taglib uri=http://java.sun.com/jsf/core; prefix=f % %@ taglib uri=http://myfaces.apache.org/tobago/component; prefix=tc % %@ taglib uri=http://myfaces.apache.org/tobago/extension; prefix=tx % f:view locale=de tc:page width=1280 id=page f:facet name=layout tc:gridLayout rows=1*;fixed columns=fixed/ /f:facet tc:panel id=panel1 f:facet name=layout tc:gridLayout rows=fixed;fixed;1* columns=fixed/ /f:facet tc:form id=form1 tc:box label=box1 id=box1 f:facet name=layout tc:gridLayout rows=fixed;fixed;1* columns=fixed/ /f:facet tc:cell tx:in value=#{myController.string1} label=string1 / /tc:cell tc:cell tc:button actionListener=#{myController.action1} label=submit1 tc:attribute name=renderedPartially value=:page:panel1/ /tc:button /tc:cell tc:cell/ /tc:box /tc:form tc:form id=form2 tc:box label=box2 id=box2 f:facet name=layout tc:gridLayout rows=fixed;fixed;1* columns=fixed/ /f:facet tc:cell id=cell2 tx:in value=#{myController.string2} label=string2 / /tc:cell tc:cell/ /tc:box /tc:form tc:cell/ /tc:panel tc:cell /tc:cell /tc:page /f:view package test1; import javax.faces.event.ActionEvent; public class MyController { private String string1 = 99; private String string2; public String action1(ActionEvent actionEvent) { string2 = string1; return null; } public String getString1() { return string1; } public void setString1(String string1) { this.string1 = string1; } public String getString2() { return string2; } public void setString2(String string2) { this.string2 = string2; } } Volker Weber schrieb: Hi Michael, for actions used in partial rendering you should always return null! I the action returns a string than a full reload is made! I suggest using actionListener for partial actions. When rendering partially only the requested subview (plus the action component if outside) is processed on the server. In your example you request reload of box2, which means the content of box2 is processed and stored in the model. In the action string2 is set to string1 but string1 was not processed so it is still null here. Have you in helmuts example really changed the value of renderedPartially to the suggested panel arround both boxes? Regards, Volker 2010/4/12 kakusc...@elbe-net.de: Hello, I'm trying to execute an action and partial rendering the result in an tx:in field. The tx:button which calls the action and the tx:in elements are in different forms. For some reasons after the new value is set to the underlaying value of the tx:in field the setter of this value is called from somewhere and overwrites the new value with an empty string. But I want to have the value I set with my action1 method in the field instead an empty string. Can some one tell me what I'm doing wrong? Thanks a lot Michael %@ page contentType=text/html;charset=UTF-8 language=java % %@ taglib uri=http://java.sun.com/jsf/core; prefix=f % %@ taglib uri=http://myfaces.apache.org/tobago/component; prefix=tc % %@ taglib uri=http://myfaces.apache.org/tobago/extension; prefix=tx % f:view locale=de tc:page width=1280 id=page f:facet name=layout tc:gridLayout rows=fixed;fixed;1* columns=fixed/ /f:facet tc:form id=form1 tc:box label=box1 id=box1 f:facet name=layout
Re: tobago partial rendering question
Hi Michael, not a common way, but there is always something you can do :-) But how exact depends on the concrete situation. You can put a tc:command with action 1 as facet eg. inside the box2 and use the onclick attribute of the button: On the button in box 1 remove the actionListner and add onClick=Tobago.reloadComponent('page:form2:box2', 'page:form2:action1'); in box2 add a tc:command as facet: f:facet name=action1Facet tc:command id=action1 actionListener=#{controller.action1} tc:attribute name=renderedPartially value=box2/ /tc:command /f:facet but now is the box1 not processed, so you cant get the value of string1. If you need this then you can put the action facet on the surrounding panel. Regards, Volker 2010/4/14 Michael Kakuschky kakusc...@elbe-net.de: Hello Volker, I think I need the forms. I have an application which use tabs with different formulars. If I don't use subforms and set the required attribute on some elements on one tab and I want to submit a fomular on another tab it does not work because the element on the other tab is not completely filled and the set require attribute does not allow to submit the main form.. That the reason I subforms. Is there another common way to solve this kind of problem? Thanks and best regards Michael Volker Weber schrieb: Hi Michael, after a more closer view to your jsp i found the problem. The tc:form arround the box is the probem, using subforms you are reduce the validation and modelUpdate only to the subform where the command is in, the other content is not processed and therfore the submitted values are rerenderd. did you really need the forms? Regards, Volker 2010/4/14 Michael Kakuschky kakusc...@elbe-net.de: Hello Volker, thanks for the response. Yes I target the panel. I use now actionListener and return null as return value. I also preset the value of string1 so that the value is always already initialized. But nervertheless the string2 is set to the new value (I debug that) but after rendering the tx:in box is still empty. Maybe you can take a look to the latest version of my test page and controller. Best regards Michael %@ page contentType=text/html;charset=UTF-8 language=java % %@ taglib uri=http://java.sun.com/jsf/core; prefix=f % %@ taglib uri=http://myfaces.apache.org/tobago/component; prefix=tc % %@ taglib uri=http://myfaces.apache.org/tobago/extension; prefix=tx % f:view locale=de tc:page width=1280 id=page f:facet name=layout tc:gridLayout rows=1*;fixed columns=fixed/ /f:facet tc:panel id=panel1 f:facet name=layout tc:gridLayout rows=fixed;fixed;1* columns=fixed/ /f:facet tc:form id=form1 tc:box label=box1 id=box1 f:facet name=layout tc:gridLayout rows=fixed;fixed;1* columns=fixed/ /f:facet tc:cell tx:in value=#{myController.string1} label=string1 / /tc:cell tc:cell tc:button actionListener=#{myController.action1} label=submit1 tc:attribute name=renderedPartially value=:page:panel1/ /tc:button /tc:cell tc:cell/ /tc:box /tc:form tc:form id=form2 tc:box label=box2 id=box2 f:facet name=layout tc:gridLayout rows=fixed;fixed;1* columns=fixed/ /f:facet tc:cell id=cell2 tx:in value=#{myController.string2} label=string2 / /tc:cell tc:cell/ /tc:box /tc:form tc:cell/ /tc:panel tc:cell /tc:cell /tc:page /f:view package test1; import javax.faces.event.ActionEvent; public class MyController { private String string1 = 99; private String string2; public String action1(ActionEvent actionEvent) { string2 = string1; return null; } public String getString1() { return string1; } public void setString1(String string1) { this.string1 = string1; } public String getString2() { return string2; } public void setString2(String string2) { this.string2 = string2; } } Volker Weber schrieb: Hi Michael, for actions used in partial rendering you should always return null! I the action returns a string than a full reload is made! I suggest using actionListener for partial actions. When rendering partially only the requested subview (plus the action component if outside) is processed on the server. In your example you request reload of box2, which means the content of box2 is processed and stored in the model. In the action string2 is set to string1 but string1 was not processed so it is still null here. Have you in helmuts example really changed the value of renderedPartially to the suggested panel arround both boxes? Regards, Volker 2010/4/12 kakusc...@elbe-net.de: Hello, I'm trying to execute an action and partial rendering the result in an tx:in field. The tx:button which calls the action and the tx:in elements are in different forms. For some reasons after
Re: [TOBAGO] tobago partial rendering question
btw: please prefix the subject with [TOBAGO] for tobago related messages. 2010/4/14 Volker Weber v.we...@inexso.de: Hi Michael, not a common way, but there is always something you can do :-) But how exact depends on the concrete situation. You can put a tc:command with action 1 as facet eg. inside the box2 and use the onclick attribute of the button: On the button in box 1 remove the actionListner and add onClick=Tobago.reloadComponent('page:form2:box2', 'page:form2:action1'); in box2 add a tc:command as facet: f:facet name=action1Facet tc:command id=action1 actionListener=#{controller.action1} tc:attribute name=renderedPartially value=box2/ /tc:command /f:facet but now is the box1 not processed, so you cant get the value of string1. If you need this then you can put the action facet on the surrounding panel. Regards, Volker 2010/4/14 Michael Kakuschky kakusc...@elbe-net.de: Hello Volker, I think I need the forms. I have an application which use tabs with different formulars. If I don't use subforms and set the required attribute on some elements on one tab and I want to submit a fomular on another tab it does not work because the element on the other tab is not completely filled and the set require attribute does not allow to submit the main form.. That the reason I subforms. Is there another common way to solve this kind of problem? Thanks and best regards Michael Volker Weber schrieb: Hi Michael, after a more closer view to your jsp i found the problem. The tc:form arround the box is the probem, using subforms you are reduce the validation and modelUpdate only to the subform where the command is in, the other content is not processed and therfore the submitted values are rerenderd. did you really need the forms? Regards, Volker 2010/4/14 Michael Kakuschky kakusc...@elbe-net.de: Hello Volker, thanks for the response. Yes I target the panel. I use now actionListener and return null as return value. I also preset the value of string1 so that the value is always already initialized. But nervertheless the string2 is set to the new value (I debug that) but after rendering the tx:in box is still empty. Maybe you can take a look to the latest version of my test page and controller. Best regards Michael %@ page contentType=text/html;charset=UTF-8 language=java % %@ taglib uri=http://java.sun.com/jsf/core; prefix=f % %@ taglib uri=http://myfaces.apache.org/tobago/component; prefix=tc % %@ taglib uri=http://myfaces.apache.org/tobago/extension; prefix=tx % f:view locale=de tc:page width=1280 id=page f:facet name=layout tc:gridLayout rows=1*;fixed columns=fixed/ /f:facet tc:panel id=panel1 f:facet name=layout tc:gridLayout rows=fixed;fixed;1* columns=fixed/ /f:facet tc:form id=form1 tc:box label=box1 id=box1 f:facet name=layout tc:gridLayout rows=fixed;fixed;1* columns=fixed/ /f:facet tc:cell tx:in value=#{myController.string1} label=string1 / /tc:cell tc:cell tc:button actionListener=#{myController.action1} label=submit1 tc:attribute name=renderedPartially value=:page:panel1/ /tc:button /tc:cell tc:cell/ /tc:box /tc:form tc:form id=form2 tc:box label=box2 id=box2 f:facet name=layout tc:gridLayout rows=fixed;fixed;1* columns=fixed/ /f:facet tc:cell id=cell2 tx:in value=#{myController.string2} label=string2 / /tc:cell tc:cell/ /tc:box /tc:form tc:cell/ /tc:panel tc:cell /tc:cell /tc:page /f:view package test1; import javax.faces.event.ActionEvent; public class MyController { private String string1 = 99; private String string2; public String action1(ActionEvent actionEvent) { string2 = string1; return null; } public String getString1() { return string1; } public void setString1(String string1) { this.string1 = string1; } public String getString2() { return string2; } public void setString2(String string2) { this.string2 = string2; } } Volker Weber schrieb: Hi Michael, for actions used in partial rendering you should always return null! I the action returns a string than a full reload is made! I suggest using actionListener for partial actions. When rendering partially only the requested subview (plus the action component if outside) is processed on the server. In your example you request reload of box2, which means the content of box2 is processed and stored in the model. In the action string2 is set to string1 but string1 was not processed so it is still null here. Have you in helmuts example really changed the value of renderedPartially to the suggested panel arround both boxes? Regards, Volker 2010/4/12 kakusc...@elbe-net.de: Hello, I'm trying to execute an action and partial rendering the
Re: Facelets custom component with an action as a variable like ui:param
Actually the only way in JSF 1.2 to do this really is to write a tag handler to generate a method binding somone pointed out the links which explain it. So no further explanation here. But there is hope,JSF 2.0 allows to do that from Facelets itself via its composite interface definitions, this will achieve exactly what you need. composite:interface composite:attribute name=saveLabel required=false default=Save/ composite:attribute name=action required=true targets=save method-signature=java.lang.String f()/ /composite:interface composite:implementation h:commandButton id=save value=#{cc.attrs.saveLabel} / /composite:implementation ... will result in mc:myButton action=#{customerBean.save} / Just as additional note, this looks like a lot Locs per component but have in mind, that usually you have a snippet of html instead of just one tag in the implementation section of your composite component, so in reality things look a little bit less like interface bloat :-) I just wanted to add this info to the thread. Werner Am 12.04.10 14:59, schrieb Walter Mourão: Hi, Georg, yes, there are some (quite ugly) solutions: http://www.ibm.com/developerworks/java/library/j-facelets2.html Component with the same problem/solution: http://code.google.com/p/trinidadcomponents Cheers, Walter Mourão http://waltermourao.com.br http://arcadian.com.br http://oriens.com.br On Mon, Apr 12, 2010 at 8:56 AM, Georg Füchslegiofy...@googlemail.comwrote: Hallo, I use JSF 1.2 with Facelets and Tomahawk. Now I would like to make a facelets custom component for a navigation / toolkit bar (button panel) that looks the same in every page. This component should exist of a number oft:commandButtons that can be defined by calling this custom component. I thougt about something like this: In a file 'btnPanel.xhtml': span xmlns=http://www.w3.org/1999/xhtml; xmlns:f=http://java.sun.com/jsf/core; xmlns:h=http://java.sun.com/jsf/html; xmlns:ui=http://java.sun.com/jsf/facelets; xmlns:t=http://myfaces.apache.org/tomahawk; xmlns:c=http://java.sun.com/jstl/core; ui:composition ui:param name=btn1Value value=#{btn1Value}/ ui:param name=btn1Action value=#{btn1Action}/ . /span I would define this as a custom tag: tag tag-namebtnPanel/tag-name source../pages/btnPanel.xhtml/source /tag Finally I want to call this control in my xhtml-pages like this: safir:btnPanel btn1Value=save btn1Action=#{mbBean.save}/ But I realised that it is not possible to define a variable action for my custom control like this. Actually this way JSF looks for a method mbBean.getSave() instead of performing the action mbBean.save() Is there another way to do that? Thanks in advance Georg