webtier@glassfish.java.net

Re: [webtier] f:ajax event attribute won't accept expression

From: Jim Driscoll <Jim.Driscoll_at_Sun.COM>
Date: Wed, 03 Jun 2009 07:39:23 -0700

On 6/2/09 9:49 PM, Paulo Cesar Reis wrote:
> Hi Jim, thanks for the answer.
>
> Yes, that would be better but my composite component looks like this:
> <composite:implementation>
> <h:panelGroup>
> <h:inputText id="someId" value="someValue" />
> </h:panelGroup>
>
> </composite:implementation>


If you have a using page of
<comp:component id="one">
<f:validateLength for="two" minimum="3" maximum="5"/>
</comp:component>

and a component of:

  <composite:implementation>
           <h:panelGroup>
                <h:inputText id="two" value="someValue" />
            </h:panelGroup>
  </composite:implementation>

Then it should work, and not attach to the panelgroup, but the
inputText. I think. I'm not sure, and I don't know if I'll have time
to test it today - I'd have already written the sample code if I was
back at my desk, but being on the road makes it more difficult.

> So with f:param I can do what I want but it doesn't work.

Right, because that use of f:param isn't supported by JSF - f:param is
defined on an on component basis, and we haven't really had anyone ask
for this before now.

> Faces could have a
> for attribute for components like converters and validators (<f:converter
> converterId="someId" for="componentId" />) so I could attach them outside of
> the component.

I'm not sure what you mean here, since that's exactly what I was getting
at in my last mail - maybe I wasn't clear.

If I get a chance, I'll try and code something today, though I might
take until tomorrow night to get it done, based on availability. Or, as
I said before, you could always give it a go and let me know if it works
- I don't think we've tried this before, but I think it should work.


Jim