Re: composite components: optional method-expression-attributes

2010-11-11 Thread Jakob Korherr
You're welcome. I hardly think that there's an easy way to do this unless you return different outcomes in your action methods. Regards, Jakob 2010/11/10 Thomas Möller thomas.moel...@continentale.de: Thank you. I tried this but with this solution it is not possible to use the

Re: composite components: optional method-expression-attributes

2010-11-10 Thread Thomas Möller
Thank you. I tried this but with this solution it is not possible to use the action-expression in navigation rules because for every button panel it is #{cc.attrs.button1.myaction}. If I use my:buttonPanel button1=#{mybean.button1} / and my:buttonPanel button1=#{mybean.anotherButton1} /

Re: composite components: optional method-expression-attributes

2010-11-09 Thread Jakob Korherr
Hi Thomas, OK, thanks. Now it's more clear to me what you're trying to do. Something like this should work: cc:interface cc:attribute name=button1 type=insert.package.here.SimpleModel / /cc:interface cc:implementation h:commandButton disabled=#{cc.attrs.button1 == null}

Re: composite components: optional method-expression-attributes

2010-11-08 Thread Thomas Möller
Hi Jakob, I wanted to design the following composite component (a panel with two buttons): my:buttonPanel button1=#{myBean.button1} button2=#{myBean.button2} / where #{myBean.button1} and #{myBean.button2} are instances of SimpleModel. For the button expression should apply: If it evaluates

Re: composite components: optional method-expression-attributes

2010-11-06 Thread Jakob Korherr
Hi Thomas, Could you explain this in a little more detail please? Regards, Jakob 2010/11/4 Thomas Möller thomas.moel...@continentale.de: I found the discussion for jsf 2.1 and recognized that new attribute targetAttributeName on the attribute tag. But could somebody of the experts briefly

Re: composite components: optional method-expression-attributes

2010-11-04 Thread Thomas Möller
I found the discussion for jsf 2.1 and recognized that new attribute targetAttributeName on the attribute tag. But could somebody of the experts briefly answer here if I can do the following regarding to nested attributes: public interface SimpleModel { String myaction(); } my:buttonPanel

Re: composite components: optional method-expression-attributes

2010-11-03 Thread Thomas Möller
Finally it seems to me that the targets-feature is only sufficient for the simplest scenarios. There are too many restrictions: 1) only for a restricted set of attribute names: action, actionListener, validator, valueChangeListener 2) not supported in nested attributes So, what is the solution

Re: composite components: optional method-expression-attributes

2010-11-03 Thread Jakob Korherr
Hi Thomas, What you have encountered here is a known design problem of JSF 2.0. Currently we (the MyFaces team) are working hard to get all of this fixed for the JSF 2.1 specification, because - as you know - this stuff is really annoying and makes composite components unusable in the most

Re: composite components: optional method-expression-attributes

2010-11-03 Thread Matthias Wessendorf
I saw the discussion on the open jsr list. Jakob, is there any archive for Thomas to read the mails? -M sent from my Android phone On Nov 3, 2010 6:37 PM, Jakob Korherr jakob.korh...@gmail.com wrote: Hi Thomas, What you have encountered here is a known design problem of JSF 2.0. Currently we

Re: composite components: optional method-expression-attributes

2010-10-29 Thread Thomas Möller
My current problem is that retargeting only works using a restricted set of special attribute names like 'action' and 'actionListener' and so on but my real composite component contains several buttons and I want to declare for each button e. g. an action. How do I solve this: cc:interface

Re: composite components: optional method-expression-attributes

2010-10-28 Thread Jakob Korherr
Hi Thomas, Use the targets attribute of cc:attribute and it should work. Regards, Jakob 2010/10/27 Thomas Möller thomas.moel...@continentale.de: Hi, what is the recommended way how to deal with optional attributes that refer to a method expression? For example imagine a simple component

composite components: optional method-expression-attributes

2010-10-27 Thread Thomas Möller
Hi, what is the recommended way how to deal with optional attributes that refer to a method expression? For example imagine a simple component that uses a commandLink and has two attributes: action and actionListener: cc:interface cc:attribute name=action method-signature=java.lang.String

Re: composite components: optional method-expression-attributes

2010-10-27 Thread Mike Kienenberger
I seem to vaguely recall from the facelets mailing lists long ago that you had to sometimes pass method bindings as two separate parameters. One for the object, and one for the method name. #{object}.#{method} Sorry I can't be of more help, but maybe it'll get you going in the right direction.

Re: composite components: optional method-expression-attributes

2010-10-27 Thread Mike Kienenberger
While trying to find a reference to what I wrote about, I came across this posting. There's a number of ideas kicked back and forth there, and the one on using f:attribute for your action and actionListener might work for you. http://www.icefaces.org/JForum/posts/list/8006.page On Wed, Oct