myfaces-dev mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From "Adam Winer" <>
Subject Re: enhancements to form and command* components
Date Thu, 27 Apr 2006 14:18:53 GMT

The way I've implemented this sort of thing - getting request
parameters onto URLs pointing to JSF URLs - is by
hooking ViewHandler.getActionURL().  Would this
work for this scenario?

Or, if not, ExternalContext hooks?

The problem with hooking individual components is that,
well, there's a lot of them, not just the Tomahawk ones,
and you never want to tell users "Feature X only works
if you use components A, B, and C".

-- Adam

On 4/26/06, Mario Ivankovits <> wrote:
> Hi!
> For the upcoming conversation tag I need some enhancements to the form,
> commandLink, commandButton and outputLink components.
> Also a redirect should be catched (through a responseWrapper in
> ExtensionsFilter).
> The requirement is to provide a way to globally add request parameters
> to these components.
> The idea is to allow something like a RequestParameterProvider to be
> registered to tomahawk and the components above ask this provider for
> which fields and values to add.
> So the interface could be:
> interface RequestParameterProvider
> public String[] getFields();
> public String getFieldValue(String field);
> In case of form the required hidden fields should be added, and the
> value should be set via commandLink/commandButton.
> In case of outputLink and redirect the field/value pair should simply be
> added to the url.
> If the fieldValue is null, only a hidden field will be created.
> Later this should make it possible to implement things like auto_scroll
> using this provider, not sure if we need something else to make this
> work, but for my current requirement (conversation tag) this will be enough.
> The manager where a provider could register itself should be static, if
> and which fields and values to add is in the responsibility of the provider.
> The registration should be possible through code (this is sufficient for
> now - I think), the possibility to add provider classes via web.xml
> would also be nice.
> There is already a EnhancedCommandLink and EnhanceCommandButton in
> tomahawk, after adding EnhancedForm and EnhancedOutputLink this could be
> the right place to implement this stuff.
> Some additional ideas? Or even better a volunteer?
> Since I made good progress with the conversation tag today it would be
> nice - if there is a volunteer - to have this in the next two days
> (sorry for the pressure, but some else press me too ;-) greetings to
> Thomas), else I'll start with it.
> Ciao,
> Mario

View raw message