You are viewing a plain text version of this content. The canonical link for it is here.
Posted to user@struts.apache.org by Marco Tedone <mt...@jemos.org> on 2003/10/19 12:42:56 UTC

[NEWBIE] Struts and Applets

Hi, I'm just entering the AWT and Applet world in java (in the sense that
I'm going to study those technologies). I was wondering if an Action can
process information in an Applet. In few words if it would be possible to
specify the following?:

1) From within an Applet, a link (by means of a button or a link) to a
Struts Action (this shouldn't be a problem);
2) From within the Struts Action, access the Applet layout components (text,
radio, check, etc.)

If this is not possible, would it be worthwhile to think at passing a
generic 'component' object to an Action execute method, instead of a Form
one, where this component is parent of both Form, Applets, and whatever
other kind of web component possible?

Have a nice w-e,

Marco




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


Re: [NEWBIE] Struts and Applets

Posted by Ted Husted <hu...@apache.org>.
You might try thinking about it from the other direction.

How about if there were a generic "component" or context object that was 
used by your business layer. So whatever it is your clients want either 
Swing application or a web application to do, is handled by your 
business layer code, which communicates to the rest of the world through 
a generic context.

Things like Struts Actions and Applets then become adapters between 
their presentation components and the business layer. The business layer 
works through context that everyone else can learn to read and write.

This is the general direction we are going with the Common Chain package.

http://cvs.apache.org/viewcvs/jakarta-commons-sandbox/chain/

So, to answer your question, it's no so much that we need to pass a 
generic component object to an Action, but that the Action (and Applet) 
should pass a generic object to your business layer. (The less done in 
Action classes, the better.)

-Ted.

Marco Tedone wrote:
> Hi, I'm just entering the AWT and Applet world in java (in the sense that
> I'm going to study those technologies). I was wondering if an Action can
> process information in an Applet. In few words if it would be possible to
> specify the following?:
> 
> 1) From within an Applet, a link (by means of a button or a link) to a
> Struts Action (this shouldn't be a problem);
> 2) From within the Struts Action, access the Applet layout components (text,
> radio, check, etc.)
> 
> If this is not possible, would it be worthwhile to think at passing a
> generic 'component' object to an Action execute method, instead of a Form
> one, where this component is parent of both Form, Applets, and whatever
> other kind of web component possible?
> 
> Have a nice w-e,
> 
> Marco

-- 
Ted Husted,
   Junit in Action  - <http://www.manning.com/massol/>,
   Struts in Action - <http://husted.com/struts/book.html>,
   JSP Site Design  - <http://www.amazon.com/exec/obidos/ISBN=1861005512>.




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