I recommend asking this on the facelets list.

All you do is pass your binding/value/validator/converter/required
values into your composition template.     You can pass them either as
attributes or as "body text" (for validators and converters, this
often makes more sense).    The only tricky part is passing a
method-binding value (typically, you pass the bean and hardcode the
method name to deal with this -- you can then force any applicable
bean to implement an interface with the method to keep everything
clean).

You can get really fancy and trivially-create virtual components which
are compositions of other components.

http://jroller.com/page/RickHigh?entry=passing_an_action_sort_of
http://jroller.com/page/RickHigh?entry=another_reason_i_love_facelets

Or you can read through the facelets users mailing list archives
starting around Jan 9 or 10 (give or take a day).

On 2/26/06, David Schlotfeldt <[EMAIL PROTECTED]> wrote:
> I have parts of forms I would like to reuse from page to page but
> because  binding, value, validator, converter, and required are all
> specified in the XML code I can't reuse the code. I have been playing
> with the idea of removing these settings from my XML code completely and
> instead setting them from java by looking up components by id.
>
> Anyone know how to do this?
> Maybe I have to create a PhaseListener, or my own ViewHandler?
>
> (I am using Facelets if that at all affects the solution.)
>
> Thanks,
> David
>
>

Reply via email to