Map-backed ActionForms, validating using validWhen

2004-03-23 Thread Mark Thill
I have a form that I'm using map-backed properties
with.  There is nothing all that unusual about it, but
I'm trying to do validation using the validWhen
built-in validation.  I can't seem to figure out if I
can access a map-backed property in the conditional
statement for the validWhen validation.  My
validation.xml looks like such:

  

  


  


  
  
test
((*this* != null) or
(value(percentDecline) != null))
  

   

The first two for marketCategoryId and
shortDescription work fine, but when I add the 3rd it
gives me an error "unexpected token: value".  Does
anyone know how to access a map-backed property in
this conditional part of the validWhen validation?

Thanks for any help
Mark

__
Do you Yahoo!?
Yahoo! Finance Tax Center - File online. File on time.
http://taxes.yahoo.com/filing.html

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



RE: Using Struts Validator on Map-backed ActionForms

2003-08-14 Thread Erez Efrati
Just forgot to explain that I do the following:

mailto:[EMAIL PROTECTED] 
Sent: Wednesday, August 06, 2003 11:44 AM
To: 'Struts Users Mailing List'
Subject: RE: Using Struts Validator on Map-backed ActionForms

Hi Panchasheel,

I am working with map backed action forms and the way to work with
validation in this case is as follows (a piece of my validation.xml):

(on my ActionForm there are getProperty and setProperty interfacing the
actual map - as in your case I guess it is 'getVolume() and
setVolume()).








mask

${username}



Hope this helps,
Erez


-Original Message-
From: Gandle, Panchasheel [mailto:[EMAIL PROTECTED] 
Sent: Wednesday, August 06, 2003 4:48 AM
To: 'Struts Users Mailing List'
Subject: RE: Using Struts Validator on Map-backed ActionForms

Has anybody come up with any validations for map-backed fields


   


what should go in ???
for 
<% for (int i=0;i<5;i++;) { %>

<% } %>

Thanks
Panchasheel


-Original Message-
From: Cordingley, Charles [mailto:[EMAIL PROTECTED]
Sent: Friday, August 01, 2003 1:24 PM
To: '[EMAIL PROTECTED]'
Subject: Using Struts Validator on Map-backed ActionForms


Hi,

I am trying to use the Struts Validator to generate Javascript
validation on
a Map-backed action form, but I keep getting "type is null or not an
object"
javascript error (I am using Struts 1.1). Non map-backed properties on
the
form work fine.

In the JSP I am creating text boxes using:



and have this method on the action form to get it:

public void setVolume(String key, Object value) {
   volumes.put(key, value);
}

In the validation.xml I have tried:


   


and:


   


but both result in the error.

Does anyone know how to do this?

Thanks,
Charles.



The Royal Bank of Scotland plc ('the Bank') is regulated by the
Financial 
Services Authority and is a member of The Royal Bank of Scotland
Marketing
Group.  The only packaged products (life policies, unit trusts and other
collective investment schemes and stakeholder and other pensions) the
Bank
advises on and sells are those of the Marketing Group, whose other
members
are Royal Scottish Assurance plc and Royal Bank of Scotland Unit Trust
Management Limited, both regulated by the Financial Services Authority.

The Royal Bank of Scotland plc. Registered in Scotland No 90312.
Registered
Office: 36 St Andrew Square, Edinburgh EH2 2YB. 

Agency agreements exist between members of The Royal Bank of Scotland
Group.

This e-mail message is confidential and for use by the addressee only.
If
the message is received by anyone other than the addressee, please
return
the message to the sender by replying to it and then delete the message
from
your computer. Internet e-mails are not necessarily secure. The Royal
Bank
of Scotland plc does not accept responsibility for changes made to this
message after it was sent. 

Whilst all reasonable care has been taken to avoid the transmission of
viruses, it is the responsibility of the recipient to ensure that the
onward
transmission, opening or use of this message and any attachments will
not
adversely affect its systems or data. No responsibility is accepted by
The
Royal Bank of Scotland plc in this regard and the recipient should carry
out
such virus and other checks as it considers appropriate.


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




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



RE: Using Struts Validator on Map-backed ActionForms

2003-08-07 Thread Gandle, Panchasheel
Has anybody come up with any validations for map-backed fields


   


what should go in ???
for 
<% for (int i=0;i<5;i++;) { %>

<% } %>

Thanks
Panchasheel


-Original Message-
From: Cordingley, Charles [mailto:[EMAIL PROTECTED]
Sent: Friday, August 01, 2003 1:24 PM
To: '[EMAIL PROTECTED]'
Subject: Using Struts Validator on Map-backed ActionForms


Hi,

I am trying to use the Struts Validator to generate Javascript validation on
a Map-backed action form, but I keep getting "type is null or not an object"
javascript error (I am using Struts 1.1). Non map-backed properties on the
form work fine.

In the JSP I am creating text boxes using:



and have this method on the action form to get it:

public void setVolume(String key, Object value) {
   volumes.put(key, value);
}

In the validation.xml I have tried:


   


and:


   


but both result in the error.

Does anyone know how to do this?

Thanks,
Charles.



The Royal Bank of Scotland plc ('the Bank') is regulated by the Financial 
Services Authority and is a member of The Royal Bank of Scotland Marketing
Group.  The only packaged products (life policies, unit trusts and other
collective investment schemes and stakeholder and other pensions) the Bank
advises on and sells are those of the Marketing Group, whose other members
are Royal Scottish Assurance plc and Royal Bank of Scotland Unit Trust
Management Limited, both regulated by the Financial Services Authority.

The Royal Bank of Scotland plc. Registered in Scotland No 90312.  Registered
Office: 36 St Andrew Square, Edinburgh EH2 2YB. 

Agency agreements exist between members of The Royal Bank of Scotland Group.

This e-mail message is confidential and for use by the addressee only. If
the message is received by anyone other than the addressee, please return
the message to the sender by replying to it and then delete the message from
your computer. Internet e-mails are not necessarily secure. The Royal Bank
of Scotland plc does not accept responsibility for changes made to this
message after it was sent. 

Whilst all reasonable care has been taken to avoid the transmission of
viruses, it is the responsibility of the recipient to ensure that the onward
transmission, opening or use of this message and any attachments will not
adversely affect its systems or data. No responsibility is accepted by The
Royal Bank of Scotland plc in this regard and the recipient should carry out
such virus and other checks as it considers appropriate.


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



RE: Using Struts Validator on Map-backed ActionForms

2003-08-07 Thread Gandle, Panchasheel


<% } %>

my actual fieldname is phone
but on jsp it would be
value(phone0),value(phone1),value(phone2),value(phone3),value(phone4)

if it was a single phone then its fine mailto:[EMAIL PROTECTED]
Sent: Wednesday, August 06, 2003 5:52 AM
To: 'Struts Users Mailing List'
Subject: RE: Using Struts Validator on Map-backed ActionForms


Just forgot to explain that I do the following:

mailto:[EMAIL PROTECTED] 
Sent: Wednesday, August 06, 2003 11:44 AM
To: 'Struts Users Mailing List'
Subject: RE: Using Struts Validator on Map-backed ActionForms

Hi Panchasheel,

I am working with map backed action forms and the way to work with
validation in this case is as follows (a piece of my validation.xml):

(on my ActionForm there are getProperty and setProperty interfacing the
actual map - as in your case I guess it is 'getVolume() and
setVolume()).








mask

${username}



Hope this helps,
Erez


-Original Message-
From: Gandle, Panchasheel [mailto:[EMAIL PROTECTED] 
Sent: Wednesday, August 06, 2003 4:48 AM
To: 'Struts Users Mailing List'
Subject: RE: Using Struts Validator on Map-backed ActionForms

Has anybody come up with any validations for map-backed fields


   


what should go in ???
for 
<% for (int i=0;i<5;i++;) { %>

<% } %>

Thanks
Panchasheel


-Original Message-
From: Cordingley, Charles [mailto:[EMAIL PROTECTED]
Sent: Friday, August 01, 2003 1:24 PM
To: '[EMAIL PROTECTED]'
Subject: Using Struts Validator on Map-backed ActionForms


Hi,

I am trying to use the Struts Validator to generate Javascript
validation on
a Map-backed action form, but I keep getting "type is null or not an
object"
javascript error (I am using Struts 1.1). Non map-backed properties on
the
form work fine.

In the JSP I am creating text boxes using:



and have this method on the action form to get it:

public void setVolume(String key, Object value) {
   volumes.put(key, value);
}

In the validation.xml I have tried:


   


and:


   


but both result in the error.

Does anyone know how to do this?

Thanks,
Charles.



The Royal Bank of Scotland plc ('the Bank') is regulated by the
Financial 
Services Authority and is a member of The Royal Bank of Scotland
Marketing
Group.  The only packaged products (life policies, unit trusts and other
collective investment schemes and stakeholder and other pensions) the
Bank
advises on and sells are those of the Marketing Group, whose other
members
are Royal Scottish Assurance plc and Royal Bank of Scotland Unit Trust
Management Limited, both regulated by the Financial Services Authority.

The Royal Bank of Scotland plc. Registered in Scotland No 90312.
Registered
Office: 36 St Andrew Square, Edinburgh EH2 2YB. 

Agency agreements exist between members of The Royal Bank of Scotland
Group.

This e-mail message is confidential and for use by the addressee only.
If
the message is received by anyone other than the addressee, please
return
the message to the sender by replying to it and then delete the message
from
your computer. Internet e-mails are not necessarily secure. The Royal
Bank
of Scotland plc does not accept responsibility for changes made to this
message after it was sent. 

Whilst all reasonable care has been taken to avoid the transmission of
viruses, it is the responsibility of the recipient to ensure that the
onward
transmission, opening or use of this message and any attachments will
not
adversely affect its systems or data. No responsibility is accepted by
The
Royal Bank of Scotland plc in this regard and the recipient should carry
out
such virus and other checks as it considers appropriate.


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




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



RE: Using Struts Validator on Map-backed ActionForms

2003-08-06 Thread Erez Efrati
Hi Panchasheel,

I am working with map backed action forms and the way to work with
validation in this case is as follows (a piece of my validation.xml):

(on my ActionForm there are getProperty and setProperty interfacing the
actual map - as in your case I guess it is 'getVolume() and
setVolume()).








mask

${username}



Hope this helps,
Erez


-Original Message-
From: Gandle, Panchasheel [mailto:[EMAIL PROTECTED] 
Sent: Wednesday, August 06, 2003 4:48 AM
To: 'Struts Users Mailing List'
Subject: RE: Using Struts Validator on Map-backed ActionForms

Has anybody come up with any validations for map-backed fields


   


what should go in ???
for 
<% for (int i=0;i<5;i++;) { %>

<% } %>

Thanks
Panchasheel


-Original Message-
From: Cordingley, Charles [mailto:[EMAIL PROTECTED]
Sent: Friday, August 01, 2003 1:24 PM
To: '[EMAIL PROTECTED]'
Subject: Using Struts Validator on Map-backed ActionForms


Hi,

I am trying to use the Struts Validator to generate Javascript
validation on
a Map-backed action form, but I keep getting "type is null or not an
object"
javascript error (I am using Struts 1.1). Non map-backed properties on
the
form work fine.

In the JSP I am creating text boxes using:



and have this method on the action form to get it:

public void setVolume(String key, Object value) {
   volumes.put(key, value);
}

In the validation.xml I have tried:


   


and:


   


but both result in the error.

Does anyone know how to do this?

Thanks,
Charles.



The Royal Bank of Scotland plc ('the Bank') is regulated by the
Financial 
Services Authority and is a member of The Royal Bank of Scotland
Marketing
Group.  The only packaged products (life policies, unit trusts and other
collective investment schemes and stakeholder and other pensions) the
Bank
advises on and sells are those of the Marketing Group, whose other
members
are Royal Scottish Assurance plc and Royal Bank of Scotland Unit Trust
Management Limited, both regulated by the Financial Services Authority.

The Royal Bank of Scotland plc. Registered in Scotland No 90312.
Registered
Office: 36 St Andrew Square, Edinburgh EH2 2YB. 

Agency agreements exist between members of The Royal Bank of Scotland
Group.

This e-mail message is confidential and for use by the addressee only.
If
the message is received by anyone other than the addressee, please
return
the message to the sender by replying to it and then delete the message
from
your computer. Internet e-mails are not necessarily secure. The Royal
Bank
of Scotland plc does not accept responsibility for changes made to this
message after it was sent. 

Whilst all reasonable care has been taken to avoid the transmission of
viruses, it is the responsibility of the recipient to ensure that the
onward
transmission, opening or use of this message and any attachments will
not
adversely affect its systems or data. No responsibility is accepted by
The
Royal Bank of Scotland plc in this regard and the recipient should carry
out
such virus and other checks as it considers appropriate.


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



RE: Using Struts Validator on Map-backed ActionForms

2003-08-01 Thread Yansheng Lin

I don't think this is legal, i.e., you can not have a bracket inside of property
attribute:

mailto:[EMAIL PROTECTED] 
Sent: August 1, 2003 11:24 AM
To: '[EMAIL PROTECTED]'
Subject: Using Struts Validator on Map-backed ActionForms


Hi,

I am trying to use the Struts Validator to generate Javascript validation on
a Map-backed action form, but I keep getting "type is null or not an object"
javascript error (I am using Struts 1.1). Non map-backed properties on the
form work fine.

In the JSP I am creating text boxes using:



and have this method on the action form to get it:

public void setVolume(String key, Object value) {
   volumes.put(key, value);
}

In the validation.xml I have tried:


   


and:


   


but both result in the error.

Does anyone know how to do this?

Thanks,
Charles.



The Royal Bank of Scotland plc ('the Bank') is regulated by the Financial 
Services Authority and is a member of The Royal Bank of Scotland Marketing
Group.  The only packaged products (life policies, unit trusts and other
collective investment schemes and stakeholder and other pensions) the Bank
advises on and sells are those of the Marketing Group, whose other members
are Royal Scottish Assurance plc and Royal Bank of Scotland Unit Trust
Management Limited, both regulated by the Financial Services Authority.

The Royal Bank of Scotland plc. Registered in Scotland No 90312.  Registered
Office: 36 St Andrew Square, Edinburgh EH2 2YB. 

Agency agreements exist between members of The Royal Bank of Scotland Group.

This e-mail message is confidential and for use by the addressee only. If
the message is received by anyone other than the addressee, please return
the message to the sender by replying to it and then delete the message from
your computer. Internet e-mails are not necessarily secure. The Royal Bank
of Scotland plc does not accept responsibility for changes made to this
message after it was sent. 

Whilst all reasonable care has been taken to avoid the transmission of
viruses, it is the responsibility of the recipient to ensure that the onward
transmission, opening or use of this message and any attachments will not
adversely affect its systems or data. No responsibility is accepted by The
Royal Bank of Scotland plc in this regard and the recipient should carry out
such virus and other checks as it considers appropriate.


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



Using Struts Validator on Map-backed ActionForms

2003-08-01 Thread Cordingley, Charles
Hi,

I am trying to use the Struts Validator to generate Javascript validation on
a Map-backed action form, but I keep getting "type is null or not an object"
javascript error (I am using Struts 1.1). Non map-backed properties on the
form work fine.

In the JSP I am creating text boxes using:



and have this method on the action form to get it:

public void setVolume(String key, Object value) {
   volumes.put(key, value);
}

In the validation.xml I have tried:


   


and:


   


but both result in the error.

Does anyone know how to do this?

Thanks,
Charles.



The Royal Bank of Scotland plc ('the Bank') is regulated by the Financial 
Services Authority and is a member of The Royal Bank of Scotland Marketing
Group.  The only packaged products (life policies, unit trusts and other
collective investment schemes and stakeholder and other pensions) the Bank
advises on and sells are those of the Marketing Group, whose other members
are Royal Scottish Assurance plc and Royal Bank of Scotland Unit Trust
Management Limited, both regulated by the Financial Services Authority.

The Royal Bank of Scotland plc. Registered in Scotland No 90312.  Registered
Office: 36 St Andrew Square, Edinburgh EH2 2YB. 

Agency agreements exist between members of The Royal Bank of Scotland Group.

This e-mail message is confidential and for use by the addressee only. If
the message is received by anyone other than the addressee, please return
the message to the sender by replying to it and then delete the message from
your computer. Internet e-mails are not necessarily secure. The Royal Bank
of Scotland plc does not accept responsibility for changes made to this
message after it was sent. 

Whilst all reasonable care has been taken to avoid the transmission of
viruses, it is the responsibility of the recipient to ensure that the onward
transmission, opening or use of this message and any attachments will not
adversely affect its systems or data. No responsibility is accepted by The
Royal Bank of Scotland plc in this regard and the recipient should carry out
such virus and other checks as it considers appropriate.


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



Can you use the Validator with Map-Backed ActionForms?

2002-12-28 Thread Max Kremer
I'm currently using Map-backed forms to manage forms that are dynamically
created from a database, where the number of fields, their names, their
types are not necessarily known at deployment (so no DynaActionForm). I'm
wondering if it's still possible to use the (Commons) Validator to validate
the form fields.

I understand that the normal usage requires form elements in the
validator-rules file to match that of a form-bean element in the Struts
config file. That's not really possible in my case because I don't know
ahead of time what the fields will be (by name or type, in number, etc.).
Would it be possible to programmatically create the formset and form
elements Validator requires but still use them in conjunction with the
validations file (where the validator elements are stored), which would be
commonly shared between forms? Any pointers on how I can accomplish this?
Or, is there a better way to handle dynamic (i.e., on-the-fly or real-time)
form creation with Struts?





--
To unsubscribe, e-mail:   
For additional commands, e-mail: 




Re: Map-backed ActionForms with JSTL

2002-12-12 Thread Justin Ashworth
Thanks Kris - this worked.  Seems an obvious solution now that I look at it.
:)

Thanks again,

Justin

- Original Message -
From: "Kris Schneider" <[EMAIL PROTECTED]>
To: "Struts Users Mailing List" <[EMAIL PROTECTED]>
Sent: Wednesday, December 11, 2002 11:59 AM
Subject: RE: Map-backed ActionForms with JSTL


> Assuming you've got something like:
>
> public ProfilePageForm extends ActionForm {
>   private final Map map = new HashMap();
>
>   public void setProperty(String key, Object value) {
> map.put(key, value);
>   }
>
>   public Object getProperty(String key) {
> return map.get(key);
>   }
> }
>
> As a standard bean, there really aren't any properties exposed for JSTL to
play
> with. You'd have to add something like:
>
> public Map getMap() {
>   return map;
> }
>
> Then you should be able to do:
>
> 
>
> or:
>
> 
>
> Quoting Jarnot Voytek Contr AU HQ/SC <[EMAIL PROTECTED]>:
>
> > not a JSTL expert here, but have you tried
${profilePage.property["ID"]}?
> >
> > -----Original Message-----
> > From: Justin Ashworth [mailto:[EMAIL PROTECTED]]
> > Sent: Wednesday, December 11, 2002 10:34 AM
> > To: Struts Users Mailing List
> > Subject: Map-backed ActionForms with JSTL
> >
> >
> > Hi,
> >
> > Has anyone been able to successfully access properties in a map-backed
> > ActionForm with JSTL?  I haven't been able to come up with the
expression
> > language to retrieve properties out of a Map in my ActionForm.  If this
is
> > possible, what is the syntax?  I have tried  > value="${profilePage[property].ID}", but that didn't return anything.  I
> > don't get a compilation error - it just returns empty.  profilePage is
my
> > ActionForm, property is the name of the Map within my form (with the
> > appropriate getProperty(String) and setProperty(String, Object)
methods),
> > and ID is the key within the property Map.
> >
> > Once I get this figured out, I'm going to try to replace ID with a
constant
> > variable defined in some class.  Ideas on that?
> >
> > Thanks,
> >
> > Justin
> >
> >
> > --
> > To unsubscribe, e-mail:
> > <mailto:[EMAIL PROTECTED]>
> > For additional commands, e-mail:
> > <mailto:[EMAIL PROTECTED]>
> >
> > --
> > To unsubscribe, e-mail:
> > <mailto:[EMAIL PROTECTED]>
> > For additional commands, e-mail:
> > <mailto:[EMAIL PROTECTED]>
> >
>
>
> --
> Kris Schneider <mailto:[EMAIL PROTECTED]>
> D.O.Tech   <http://www.dotech.com/>
>
> --
> To unsubscribe, e-mail:
<mailto:[EMAIL PROTECTED]>
> For additional commands, e-mail:
<mailto:[EMAIL PROTECTED]>
>


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




RE: Map-backed ActionForms with JSTL

2002-12-11 Thread Kris Schneider
Assuming you've got something like:

public ProfilePageForm extends ActionForm {
  private final Map map = new HashMap();

  public void setProperty(String key, Object value) {
map.put(key, value);
  }

  public Object getProperty(String key) {
return map.get(key);
  }
}

As a standard bean, there really aren't any properties exposed for JSTL to play
with. You'd have to add something like:

public Map getMap() {
  return map;
}

Then you should be able to do:



or:



Quoting Jarnot Voytek Contr AU HQ/SC <[EMAIL PROTECTED]>:

> not a JSTL expert here, but have you tried ${profilePage.property["ID"]}?
> 
> -Original Message-
> From: Justin Ashworth [mailto:[EMAIL PROTECTED]]
> Sent: Wednesday, December 11, 2002 10:34 AM
> To: Struts Users Mailing List
> Subject: Map-backed ActionForms with JSTL
> 
> 
> Hi,
> 
> Has anyone been able to successfully access properties in a map-backed
> ActionForm with JSTL?  I haven't been able to come up with the expression
> language to retrieve properties out of a Map in my ActionForm.  If this is
> possible, what is the syntax?  I have tried  value="${profilePage[property].ID}", but that didn't return anything.  I
> don't get a compilation error - it just returns empty.  profilePage is my
> ActionForm, property is the name of the Map within my form (with the
> appropriate getProperty(String) and setProperty(String, Object) methods),
> and ID is the key within the property Map.
> 
> Once I get this figured out, I'm going to try to replace ID with a constant
> variable defined in some class.  Ideas on that?
> 
> Thanks,
> 
> Justin
> 
> 
> --
> To unsubscribe, e-mail:
> <mailto:[EMAIL PROTECTED]>
> For additional commands, e-mail:
> <mailto:[EMAIL PROTECTED]>
> 
> --
> To unsubscribe, e-mail:  
> <mailto:[EMAIL PROTECTED]>
> For additional commands, e-mail:
> <mailto:[EMAIL PROTECTED]>
> 


-- 
Kris Schneider <mailto:[EMAIL PROTECTED]>
D.O.Tech   <http://www.dotech.com/>

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




RE: Map-backed ActionForms with JSTL

2002-12-11 Thread Jarnot Voytek Contr AU HQ/SC
not a JSTL expert here, but have you tried ${profilePage.property["ID"]}?

-Original Message-
From: Justin Ashworth [mailto:[EMAIL PROTECTED]]
Sent: Wednesday, December 11, 2002 10:34 AM
To: Struts Users Mailing List
Subject: Map-backed ActionForms with JSTL


Hi,

Has anyone been able to successfully access properties in a map-backed
ActionForm with JSTL?  I haven't been able to come up with the expression
language to retrieve properties out of a Map in my ActionForm.  If this is
possible, what is the syntax?  I have tried mailto:[EMAIL PROTECTED]>
For additional commands, e-mail:
<mailto:[EMAIL PROTECTED]>

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




Map-backed ActionForms with JSTL

2002-12-11 Thread Justin Ashworth
Hi,

Has anyone been able to successfully access properties in a map-backed
ActionForm with JSTL?  I haven't been able to come up with the expression
language to retrieve properties out of a Map in my ActionForm.  If this is
possible, what is the syntax?  I have tried mailto:[EMAIL PROTECTED]>
For additional commands, e-mail: 




Re: Map-backed ActionForms

2002-12-11 Thread Mark
Dooh.. I assumed i had to pass the form to the excute method as a dynaform..
Cool i'll be back soon.

On 11-12-2002 15:59, "Pat Quinn" <[EMAIL PROTECTED]> wrote:

> You access your form bean in the very same way as before theres nothing new
> there.
> 
> 
> 
> 
> 
> 
>> From: Mark <[EMAIL PROTECTED]>
>> Reply-To: [EMAIL PROTECTED]
>> To: Struts Users Mailing List <[EMAIL PROTECTED]>
>> Subject: Re: Map-backed ActionForms
>> Date: Wed, 11 Dec 2002 15:54:36 +0100
>> 
>> Pat
>> 
>> How do i get to my FormBean in my action class
>> 
>> usually:
>> 
>> MyForm theForm = (MyForm) form;
>> 
>> But when i try to compile javac says 'no', is there something i'm missing
>> or
>> does javac hate me :)?
>> 
>> 
>> On 11-12-2002 14:49, "Pat Quinn" <[EMAIL PROTECTED]> wrote:
>> 
>>> I'm using the Map-Backed action form approach as detailed here:
>>> 
>>> 
>> 
http://jakarta.apache.org/struts/userGuide/building_controller.html#map_actio>>
n
>>> _form_classes
>>> 
>>> I have a form bean with a one instance of a Value
>> Object(i.e.customersVO),
>>> this value object contain an ArrayList(i.e. CustomerDetails) of other
>> Value
>>> objects(i.e. CustomerDetailsVO).
>>> 
>>> --
>>> Form Bean
>>> --
>>> public class customersForm extends ActionForm {
>>> 
>>> 
>>>   private customersVO customers = null;
>>> 
>>> 
>>>   /*Get & Set methods for the customers Value Object*/
>>>   public void setCustomers(customersVO pCustomersVO ) {
>>>   customers = pCustomersVO;
>>>   }
>>> 
>>> 
>>>   public customersVO getCustomers() {
>>>   return customers;
>>>   }
>>> 
>>> 
>>>   /*Get & Set methods for the ArrayList of VO's contained within the
>>> customersVO*/
>>>   public Object getCustomerDetail(int key) {
>>>   return customers.getCustomerDetails().get(key);
>>>   }
>>> 
>>>   public void setCustomerDetail(int key, Object value) {
>>>  customers.getCustomerDetails().set(key, value);
>>>   }
>>> }
>>> 
>>> 
>>> ---
>>> JSP Source
>>> ---
>>> > indexId="rowIndex">
>>> <% String name = "customerDetail["+rowIndex+"]";%>
>>> "/>
>>> 
>>> 
>>> 
>>> This works fine but i personally don't like including scriplet code like
>>> this in my jsp's. Is there another way can do this??
>>> 
>>> 
>>> 
>>> 
>>> 
>>> 
>>> _
>>> Add photos to your e-mail with MSN 8. Get 2 months FREE*.
>>> http://join.msn.com/?page=features/featuredemail
>>> 
>>> 
>>> --
>>> To unsubscribe, e-mail:
>> <mailto:[EMAIL PROTECTED]>
>>> For additional commands, e-mail:
>> <mailto:[EMAIL PROTECTED]>
>>> 
>>> 
>> 
>> 
>> --
>> To unsubscribe, e-mail:
>> <mailto:[EMAIL PROTECTED]>
>> For additional commands, e-mail:
>> <mailto:[EMAIL PROTECTED]>
> 
> 
> _
> Help STOP SPAM with the new MSN 8 and get 2 months FREE*
> http://join.msn.com/?page=features/junkmail
> 
> 
> --
> To unsubscribe, e-mail:   <mailto:[EMAIL PROTECTED]>
> For additional commands, e-mail: <mailto:[EMAIL PROTECTED]>
> 
> 


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




Re: Map-backed ActionForms

2002-12-11 Thread Pat Quinn
You access your form bean in the very same way as before theres nothing new 
there.






From: Mark <[EMAIL PROTECTED]>
Reply-To: [EMAIL PROTECTED]
To: Struts Users Mailing List <[EMAIL PROTECTED]>
Subject: Re: Map-backed ActionForms
Date: Wed, 11 Dec 2002 15:54:36 +0100

Pat

How do i get to my FormBean in my action class

usually:

MyForm theForm = (MyForm) form;

But when i try to compile javac says 'no', is there something i'm missing 
or
does javac hate me :)?


On 11-12-2002 14:49, "Pat Quinn" <[EMAIL PROTECTED]> wrote:

> I'm using the Map-Backed action form approach as detailed here:
>
> 
http://jakarta.apache.org/struts/userGuide/building_controller.html#map_action
> _form_classes
>
> I have a form bean with a one instance of a Value 
Object(i.e.customersVO),
> this value object contain an ArrayList(i.e. CustomerDetails) of other 
Value
> objects(i.e. CustomerDetailsVO).
>
> --
> Form Bean
> --
> public class customersForm extends ActionForm {
>
>
>   private customersVO customers = null;
>
>
>   /*Get & Set methods for the customers Value Object*/
>   public void setCustomers(customersVO pCustomersVO ) {
>   customers = pCustomersVO;
>   }
>
>
>   public customersVO getCustomers() {
>   return customers;
>   }
>
>
>   /*Get & Set methods for the ArrayList of VO's contained within the
> customersVO*/
>   public Object getCustomerDetail(int key) {
>   return customers.getCustomerDetails().get(key);
>   }
>
>   public void setCustomerDetail(int key, Object value) {
>  customers.getCustomerDetails().set(key, value);
>   }
> }
>
>
> ---
> JSP Source
> ---
> 
> <% String name = "customerDetail["+rowIndex+"]";%>
> "/>
>
>
>
> This works fine but i personally don't like including scriplet code like
> this in my jsp's. Is there another way can do this??
>
>
>
>
>
>
> _
> Add photos to your e-mail with MSN 8. Get 2 months FREE*.
> http://join.msn.com/?page=features/featuredemail
>
>
> --
> To unsubscribe, e-mail:   
<mailto:[EMAIL PROTECTED]>
> For additional commands, e-mail: 
<mailto:[EMAIL PROTECTED]>
>
>


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


_
Help STOP SPAM with the new MSN 8 and get 2 months FREE*  
http://join.msn.com/?page=features/junkmail


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



Re: Map-backed ActionForms

2002-12-11 Thread Justin Ashworth
That should work.  Are you certain that MyForm is extending ActionForm?

- Original Message -
From: "Mark" <[EMAIL PROTECTED]>
To: "Struts Users Mailing List" <[EMAIL PROTECTED]>
Sent: Wednesday, December 11, 2002 9:54 AM
Subject: Re: Map-backed ActionForms


> Pat
>
> How do i get to my FormBean in my action class
>
> usually:
>
> MyForm theForm = (MyForm) form;
>
> But when i try to compile javac says 'no', is there something i'm missing
or
> does javac hate me :)?
>
>
> On 11-12-2002 14:49, "Pat Quinn" <[EMAIL PROTECTED]> wrote:
>
> > I'm using the Map-Backed action form approach as detailed here:
> >
> >
http://jakarta.apache.org/struts/userGuide/building_controller.html#map_acti
on
> > _form_classes
> >
> > I have a form bean with a one instance of a Value
Object(i.e.customersVO),
> > this value object contain an ArrayList(i.e. CustomerDetails) of other
Value
> > objects(i.e. CustomerDetailsVO).
> >
> > --
> > Form Bean
> > --
> > public class customersForm extends ActionForm {
> >
> >
> >   private customersVO customers = null;
> >
> >
> >   /*Get & Set methods for the customers Value Object*/
> >   public void setCustomers(customersVO pCustomersVO ) {
> >   customers = pCustomersVO;
> >   }
> >
> >
> >   public customersVO getCustomers() {
> >   return customers;
> >   }
> >
> >
> >   /*Get & Set methods for the ArrayList of VO's contained within the
> > customersVO*/
> >   public Object getCustomerDetail(int key) {
> >   return customers.getCustomerDetails().get(key);
> >   }
> >
> >   public void setCustomerDetail(int key, Object value) {
> >  customers.getCustomerDetails().set(key, value);
> >   }
> > }
> >
> >
> > ---
> > JSP Source
> > ---
> > 
> > <% String name = "customerDetail["+rowIndex+"]";%>
> > "/>
> >
> >
> >
> > This works fine but i personally don't like including scriplet code like
> > this in my jsp's. Is there another way can do this??
> >
> >
> >
> >
> >
> >
> > _
> > Add photos to your e-mail with MSN 8. Get 2 months FREE*.
> > http://join.msn.com/?page=features/featuredemail
> >
> >
> > --
> > To unsubscribe, e-mail:
<mailto:[EMAIL PROTECTED]>
> > For additional commands, e-mail:
<mailto:[EMAIL PROTECTED]>
> >
> >
>
>
> --
> To unsubscribe, e-mail:
<mailto:[EMAIL PROTECTED]>
> For additional commands, e-mail:
<mailto:[EMAIL PROTECTED]>
>


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




Re: Map-backed ActionForms

2002-12-11 Thread Mark
Pat

How do i get to my FormBean in my action class

usually:

MyForm theForm = (MyForm) form;

But when i try to compile javac says 'no', is there something i'm missing or
does javac hate me :)?


On 11-12-2002 14:49, "Pat Quinn" <[EMAIL PROTECTED]> wrote:

> I'm using the Map-Backed action form approach as detailed here:
> 
> http://jakarta.apache.org/struts/userGuide/building_controller.html#map_action
> _form_classes
> 
> I have a form bean with a one instance of a Value Object(i.e.customersVO),
> this value object contain an ArrayList(i.e. CustomerDetails) of other Value
> objects(i.e. CustomerDetailsVO).
> 
> --
> Form Bean
> --
> public class customersForm extends ActionForm {
> 
> 
>   private customersVO customers = null;
> 
> 
>   /*Get & Set methods for the customers Value Object*/
>   public void setCustomers(customersVO pCustomersVO ) {
>   customers = pCustomersVO;
>   }
> 
> 
>   public customersVO getCustomers() {
>   return customers;
>   }
> 
> 
>   /*Get & Set methods for the ArrayList of VO's contained within the
> customersVO*/
>   public Object getCustomerDetail(int key) {
>   return customers.getCustomerDetails().get(key);
>   }
> 
>   public void setCustomerDetail(int key, Object value) {
>  customers.getCustomerDetails().set(key, value);
>   }
> }
> 
> 
> ---
> JSP Source
> ---
> 
> <% String name = "customerDetail["+rowIndex+"]";%>
> "/>
> 
> 
> 
> This works fine but i personally don't like including scriplet code like
> this in my jsp's. Is there another way can do this??
> 
> 
> 
> 
> 
> 
> _
> Add photos to your e-mail with MSN 8. Get 2 months FREE*.
> http://join.msn.com/?page=features/featuredemail
> 
> 
> --
> To unsubscribe, e-mail:   
> For additional commands, e-mail: 
> 
> 


--
To unsubscribe, e-mail:   
For additional commands, e-mail: 




Map-backed ActionForms

2002-12-11 Thread Pat Quinn
I'm using the Map-Backed action form approach as detailed here:

http://jakarta.apache.org/struts/userGuide/building_controller.html#map_action_form_classes

I have a form bean with a one instance of a Value Object(i.e.customersVO), 
this value object contain an ArrayList(i.e. CustomerDetails) of other Value 
objects(i.e. CustomerDetailsVO).

--
Form Bean
--
public class customersForm extends ActionForm {


   private customersVO customers = null;


   /*Get & Set methods for the customers Value Object*/
   public void setCustomers(customersVO pCustomersVO ) {
   customers = pCustomersVO;
   }


   public customersVO getCustomers() {
   return customers;
   }


   /*Get & Set methods for the ArrayList of VO's contained within the 
customersVO*/
   public Object getCustomerDetail(int key) {
   return customers.getCustomerDetails().get(key);
   }

   public void setCustomerDetail(int key, Object value) {
  customers.getCustomerDetails().set(key, value);
   }
}


---
JSP Source
---

	<% String name = "customerDetail["+rowIndex+"]";%>
	"/>



This works fine but i personally don't like including scriplet code like 
this in my jsp's. Is there another way can do this??






_
Add photos to your e-mail with MSN 8. Get 2 months FREE*. 
http://join.msn.com/?page=features/featuredemail


--
To unsubscribe, e-mail:   
For additional commands, e-mail: