Re: How can a retrive an Action instance with a path ?

2001-10-27 Thread martin . cooper

If you want the actual Action instance, then it can't be done. Struts
creates Action instances as they are needed, so when your tag is doing its
thing, the Action instance may or may not exist yet.

If you just want to know which Action class will handle the request, then,
as Ted mentioned, you can get the action mappings from the application
context. The key to use is Action.MAPPINGS_KEY.

--
Martin Cooper


- Original Message -
From: emmanuel.boudrant [EMAIL PROTECTED]
To: [EMAIL PROTECTED]
Sent: Friday, October 26, 2001 3:24 AM
Subject: How can a retrive an Action instance with a path ?


 I make a TabLig:

 csi:prepareform path=saisie.do/
 html:form action=saisie.do
 ...
 /html:form

 And in this tag, I must access to the Action instance
 witch path is /saisie.do

 How can I retrive this action instance with
 ActionMappings in application scope ?

 Thanx.

 ___
 Do You Yahoo!? -- Une adresse @yahoo.fr gratuite et en français !
 Yahoo! Courrier : http://courrier.yahoo.fr



--
To unsubscribe, e-mail:   mailto:[EMAIL PROTECTED]
For additional commands, e-mail: mailto:[EMAIL PROTECTED]




How can a retrive an Action instance with a path ?

2001-10-26 Thread emmanuel.boudrant

I make a TabLig:

csi:prepareform path=saisie.do/
html:form action=saisie.do
...
/html:form

And in this tag, I must access to the Action instance
witch path is /saisie.do

How can I retrive this action instance with
ActionMappings in application scope ?

Thanx.

___
Do You Yahoo!? -- Une adresse @yahoo.fr gratuite et en français !
Yahoo! Courrier : http://courrier.yahoo.fr



Re: How can a retrive an Action instance with a path ?

2001-10-26 Thread emmanuel.boudrant

Is is the unique solution ?



package com.csi.controller;

import org.apache.struts.action.ActionMapping;

public class CsiActionMapping extends ActionMapping
{

   /**
* @roseuid 3BD93D2D0078
*/
   public CsiActionMapping()
   {

   }

   public getActionInstance() {
return instance;
   }
}




___
Do You Yahoo!? -- Une adresse @yahoo.fr gratuite et en français !
Yahoo! Courrier : http://courrier.yahoo.fr



Re: How can a retrive an Action instance with a path ?

2001-10-26 Thread Ted Husted

The ActionMappings are already in application scope, which is how the
html tags use them.

I suppose you could do the same with your Action, put a reference to it
in application scope, under a known name. Usually, you would obtain
whatever you needed from the Action first and put it into the request
scope, and have the tags look there. The View is not usually aware that
the Actions exist.

emmanuel.boudrant wrote:
 
 I make a TabLig:
 
 csi:prepareform path=saisie.do/
 html:form action=saisie.do
 ...
 /html:form
 
 And in this tag, I must access to the Action instance
 witch path is /saisie.do
 
 How can I retrive this action instance with
 ActionMappings in application scope ?
 
 Thanx.
 
 ___
 Do You Yahoo!? -- Une adresse @yahoo.fr gratuite et en français !
 Yahoo! Courrier : http://courrier.yahoo.fr

-- Ted Husted, Husted dot Com, Fairport NY USA.
-- Custom Software ~ Technical Services.
-- Tel +1 716 737-3463
-- http://www.husted.com/struts/