On Thu, 2002-12-05 at 13:25, Konstantin Priblouda wrote:
> --- Torgeir Veimo <[EMAIL PROTECTED]> wrote:
> > On Thu, 2002-12-05 at 12:44, Konstantin Priblouda
> > wrote:
> > > > -then the first one is ignored. 
> > > > 
> > > > Is this a bug or a feature?
> > > 
> > > It's java grammar. 
> > 
> > Ok, I guess you refer to "A doc comment is written
> > in HTML and must
> > precede a class, field, constructor or method
> > declaration." from the
> > javadoc documentation.
> 
> Exactly. If you look into xjavadoc code ( or grammar
> file ) you will notice that it uses comment directly
> preceding programm element. 
> 
> > I tried to separate the two doc tag blocks because I
> > have a single
> > struts action class, which are used by multiple
> > action definitions, and
> > if I just stick them all together before the class
> > statement, the local
> > forward statements are defined for all the actions,
> > not just the
> > preceeding action. 
> > 
> > So for the definition I gave, I get the following in
> > my
> > struts-config.xml file;
> > 
> > <action path="/addInvestor"
> > type="com.something.admin.InvestorAdminAction"
> > name="investorForm"
> > scope="request" input="/addInvestor.jsp"
> > parameter="addInvestor"
> > unknown="false" validate="true">
> > <forward name="view" path="/listInvestors.do"
> > redirect="true"/>
> > <forward name="view" path="/listInvestors.do"
> > redirect="true"/>
> > <forward name="edit" path="/updateInvestor.jsp"
> > redirect="false"/>
> > </action>
> > -
> > <action path="/listInvestors"
> > type="com.something.admin.InvestorAdminAction"
> > name="investorForm"
> > scope="request" parameter="listInvestors"
> > unknown="false"
> > validate="false">
> > <forward name="view" path="/listInvestors.do"
> > redirect="true"/>
> > <forward name="view" path="/listInvestors.do"
> > redirect="true"/>
> > <forward name="edit" path="/updateInvestor.jsp"
> > redirect="false"/>
> > </action>
> > 
> > Is there a way of defining local forwards only for
> > the preceeding action
> > definition, without putting them in different files?
> 
> 
> I'm bit out of touch with the struts (mostly SWING
> right now), but why you are using the same action
> class for 2 different puproses?
> 
> If you have common code, put it into superclass and
> derive from it...
> 
> How do you decide which action you are doing right 
> now? Peek into request? Looks odd fo me. 

It's actually a recommended stuts practice. See
http://husted.com/struts/catalog.html down the page to "Use the
ActionMapping Parameter property to distinguish operations".

I use the parameter="listInvestors" to separate which action was called.
I do similar things with a lot of forms. I have a generic ListForm
class, which have a lot of session scope instances with different names,
and I declare this in the ListForm source file.

I have been programming struts for some time, but am new to xdoclet. 

-- 
Torgeir Veimo <[EMAIL PROTECTED]>



-------------------------------------------------------
This sf.net email is sponsored by:ThinkGeek
Welcome to geek heaven.
http://thinkgeek.com/sf
_______________________________________________
Xdoclet-user mailing list
[EMAIL PROTECTED]
https://lists.sourceforge.net/lists/listinfo/xdoclet-user

Reply via email to