Jim, I know it seems like its unrelated but its really not ... when you create an <action> element you are really defining an instance of ActionMapping (which extends ActionConfig). One of the "properties" of the ActionMapping is the type of the Action. Another is the path, whether to validate or not -- etc. If anything, the confusion lies in the name of the element -- it might be less confusing (but more verbose) it it were <action-mapping>.

Jim Barrows wrote:


-----Original Message-----
From: news [mailto:[EMAIL PROTECTED] Behalf Of Bill Siggelkow
Sent: Friday, September 03, 2004 11:42 AM
To: [EMAIL PROTECTED]
Subject: Re: ARRRGGGGHHHH!!! I'm being stupid again....


Hmmm ... don't know where I originally linked these synapses but here's a wiki page -- http://wiki.apache.org/struts/ActionMapping


So, I have to subclass an unrelated object.... *SIGH*.  Oh well, have to do it the 
"hard" way....


- Bill

Jim Barrows wrote:


-----Original Message-----
From: news [mailto:[EMAIL PROTECTED] Behalf Of Bill Siggelkow
Sent: Friday, September 03, 2004 10:08 AM
To: [EMAIL PROTECTED]
Subject: Re: ARRRGGGGHHHH!!! I'm being stupid again....


The <set-property> in nested <action> applies to the ActionMapping object not the Action.


Oh that makes sense in a SCO kind of way.......

Just so I can bookmark that info... where did you find it?



Jim Barrows wrote:


I'm trying to use the set-property tag in the struts-config

file. I know I'm being stupid, but what exactly is it?


It's not finding the property to set.

Okay if I have in my struts-config.xml:
<action name="loanForm" path="/loanAppWizard"    

type="com.sssc.shtuff.actions.LoanAppWizardAction" scope="session">

        <set-property property="maxNumberOfPages" value="2" />

        <forward name="page1" path="/demographics.jsp"></forward>
        <forward name="page2" path="/references.jsp"></forward>
        <forward name="done" path="/done.jsp"></forward>
</action>

and this in my action class:
public class LoanAppWizardAction extends Action {

        blah

/**Read only property from inside this action that

indicates what number is


   * the last page.
   */
  private int maxNumberOfPages = 0;

Lots o' blah
/**
* @return
*/
public int getMaxNumberOfPages() {
return maxNumberOfPages;
} public void setMaxNumberOfPages(int i) {
maxNumberOfPages = i;
}
}
Then I should end up with maxNumberOfPages set to 2, and not:
The following exception was logged

java.lang.NoSuchMethodException: Bean has no property named maxNumberOfPages



------------------------------------------------------------

---------

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




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





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



Reply via email to