David,
I applied your suggestions with the exception of the transaction - since widget
rendering is already wrapped in a transaction - and it all works great.
I'll wait a few days to see if there are any objections, then I'll commit it.
Thanks again for your suggestions!
-Adrian
David E Jones <[EMAIL PROTECTED]> wrote:
I would be fine with that enhancement. There are caveats to using the
simple-method this way (like transaction control, etc), but it
certainly works and has been done in other places. It should also be
noted that these should only be used for reading information, not for
persisting it (just like any other screen action), and that is good as
it makes the transaction and other caveats with using the simple-
methods less of an issue.
To clarify: this would be running the simple-method in "service" mode
(as opposed to request event mode) and would use the current screen
context (with a push to isolate the context) for the input context of
the simple-method. There wouldn't be any parameters per-se, but it
might be nice to put the entire context in the a "parameters" Map to
make these simple-methods more like the ones that are actually called
through the service engine. For picking out the results after the call
to the simple-method using the results Map is probably still the best
way to go, again to make it more similar to the typical coding of a
simple-method called from a service and to better isolate the context.
-David
On Dec 31, 2007, at 12:45 PM, Adrian Crum wrote:
> Right now the screen widget only accepts bsh scripts in the
> section. I have a working example of the screen widget
> accepting simple methods also. It looks like this:
>
>
>
>
>
> Would something like that be useful to others? Should I commit it?
>
> -Adrian
>
>
>
> ---------------------------------
> Looking for last minute shopping deals? Find them fast with Yahoo!
> Search.
---------------------------------
Never miss a thing. Make Yahoo your homepage.