users@woodstock.java.net

RE: Re: How to get request params easily?

From: Outar, Rob-P63430 <Robin.Outar_at_gdc4s.com>
Date: Wed, 18 Jun 2008 09:49:54 -0400

Netbeans had some tutorials on this and it makes development almost
trivial. I am still new at all of this yet I built an entire web
application just using Netbeans, now if I can only figure out why
listbox render with different widths in IE vs. Firefox....

Check out:

http://www.netbeans.org/kb/trails/web.html

Or specifically:

http://www.netbeans.org/kb/60/web/scopes.html


Thanks,

Rob
 
-----Original Message-----
From: Ryan.Lubke_at_Sun.COM [mailto:Ryan.Lubke_at_Sun.COM]
Sent: Wednesday, June 18, 2008 9:44 AM
To: users_at_woodstock.dev.java.net
Subject: Re: How to get request params easily?

Andrey Siver wrote:
>
>
> Dear list members,
>
> I'm newby in Woodstock framework...
>
> Is there any simple way how to set the request params of RequestBean1
> object from the request?
>
> This way is too long and awful:
>
> Map params = getExternalContext().getRequestParameterMap();
>
> if (params.get("param1") != null)
>
>
getRequestBean1().setParam1(Double.parseDouble(params.get("param1").toSt
ring()));
>
>
> Thanks in advance,
> Regards,
>
> -Andrey
>
I'm guessing RequestBean1 is a JSF managed bean?
If so, you can leverage managed properties to set the value like so:

(this is a child element of managed-bean)

<managed-property>
    <property-name>param1</property-name>
    <value>#{param.param1}</value>
</managed-property>

When RequestBean1 is instantiated, it will pass the value of the request

parameter
'param1' to your setter, setParam1() for you.



---------------------------------------------------------------------
To unsubscribe, e-mail: users-unsubscribe_at_woodstock.dev.java.net
For additional commands, e-mail: users-help_at_woodstock.dev.java.net