struts-dev mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From James Mitchell <james.l.mitch...@mac.com>
Subject Re: [shale] remoting XhtmlHelper.mapResourceId()
Date Thu, 09 Mar 2006 23:23:43 GMT
Craig, I just moderated this through...again.  Not sure why your  
message was hung in moderation.

Oh well.

--
James Mitchell
EdgeTech, Inc.
http://edgetechservices.net/
678.910.8017
Skype: jmitchtx




On Mar 4, 2006, at 6:25 PM, Craig McClanahan wrote:

> Really strange that I don't see this on the list.  Will need to  
> investigate that further.
>
> Ed Burns wrote:
>
>> Hello,
>>
>> When using the Mechanism.DYNAMIC_RESOURCE feature to call a
>> MethodBinding, the javadocs don't say anything about request query
>> parameters and how they relate to deriving the MethodBinding  
>> expression
>> from the request URI.  Are they just not considered?  I would  
>> think so.
>> Otherwise, how would one pass arguments to the method binding?
>>
>> Can someone please clarify
>>
>> Ed
>>
>>
> You are correct that request parameters are not considered when  
> calculating the URL, but they can be added on later.  A common  
> technique is to have your renderer use the helper method to  
> calculate the base URL and use that to set a JavaScript variable  
> (or pass it in as a function parameter).  The client side code can  
> then tack on query parameters:
>
>    function doCallback(baseUrl) {
>        url = baseUrl + "?foo=" + escape(fooValue) + "&bar=" + escape 
> (barValue);
>       ... do a dojo.io.bind() call or whatever ...
>    }
>
> On the server side, I also like the way managed beans let you do  
> dependency injection -- if you create a request scope managed bean,  
> and use #{param.foo} and #{param.bar} expressions to initialize the  
> properties, they get injected for you so the server side code  
> doesn't have to do any extraction.  (Also a bit easier to unit test  
> the handler that way.)
>
> Craig
>
>
> ---------------------------------------------------------------------
> To unsubscribe, e-mail: dev-unsubscribe@struts.apache.org
> For additional commands, e-mail: dev-help@struts.apache.org
>


---------------------------------------------------------------------
To unsubscribe, e-mail: dev-unsubscribe@struts.apache.org
For additional commands, e-mail: dev-help@struts.apache.org


Mime
View raw message