David,

Thank you very much for the reply and suggestions! You answered some questions 
I had.

My example code uses the MethodContext constructor that initializes it to 
service mode. After the simple method is run, I copy the MethodContext 
environment to the screen context - so the results of the method call can be 
used. Is that the right approach?

Isn't the screen widget rendering wrapped in a transaction already?

-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.



       
---------------------------------
Looking for last minute shopping deals?  Find them fast with Yahoo! Search.

Reply via email to