dev@javaserverfaces.java.net

Re: Redirect Params

From: Adam Winer <adam.winer_at_oracle.com>
Date: Mon, 12 Jun 2006 17:02:24 -0700

Instead of modifying the .xsd, why not put this inside an
extension element?

-- Adam



Ryan Lubke wrote:
> Roger Kitain wrote:
>> Hello Stan,
>>
>> For features "beyond the spec", we do have the jsf-extensions project
>> which is owned by Ed Burns. I'm ccing Ed.
> I think in this case, modifications of the XSD would require something
> different.
>
> Stan -
>
> The sandbox suggestion sounds reasonable to me. Could you provide a
> small proposal on structure, and how it would relate to the existing build
> environment (would there be options to include it by default, or would
> it be a separate bundle)?
>
>
>>
>> -roger
>>
>> Stan Silvert wrote:
>>>
>>> Being new to this project, I’m wondering what we do about features
>>> that go beyond the spec. For instance, I’ve implemented the ability
>>> to add params to a redirect:
>>>
>>> Say I have this in my managed beans declaration:
>>>
>>> <managed-bean>
>>>
>>> <managed-bean-name>random</managed-bean-name>
>>>
>>> <managed-bean-class>org.jboss.jsfresearch.boxofchocolates.RandomNumberBean</managed-bean-class>
>>>
>>>
>>> <managed-bean-scope>application</managed-bean-scope>
>>>
>>> </managed-bean>
>>>
>>> I can now use this in my navigation-case to set a random integer for
>>> foo:
>>>
>>> <redirect>
>>>
>>> <redirect-param>
>>>
>>> <redirect-param-name>foo</redirect-param-name>
>>>
>>> <redirect-param-value>#{random.nextInt}</redirect-param-value>
>>>
>>> </redirect-param>
>>>
>>> </redirect>
>>>
>>> When the redirect is executed, the browser will show something like
>>> this URL:
>>>
>>> http://localhost:8080/boxofchocolates/myredirectedpage.faces?foo=12345
>>>
>>> This is quite useful for restful applications that support
>>> bookmarking. For example, imagine a search form which allows a
>>> bookmarkable results screen.
>>>
>>> For redirect params, the code itself is fairly innocuous. The largest
>>> change is that the xsd had to be updated beyond the spec. So if you
>>> like the idea, the question is what to do with my code.
>>>
>>> Can it be added to the current project?
>>>
>>> Should we create a sandbox project for features that might make it
>>> into JSF.next?
>>>
>>> Stan Silvert
>>>
>>> JBoss, a division of RedHat
>>>
>>> ssilvert_at_jboss.com <mailto:ssilvert_at_jboss.com>
>>>
>>
>
> ---------------------------------------------------------------------
> To unsubscribe, e-mail: dev-unsubscribe_at_javaserverfaces.dev.java.net
> For additional commands, e-mail: dev-help_at_javaserverfaces.dev.java.net
>