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: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]
---------------------------------------------------------------------
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]