Help- logic:iterate tag

2003-06-09 Thread Sashi Ravipati
Hi

I am trying to understand the logic:iterate tag. I have gone thru the docs but could 
figure out some of the attributes of this tag.

My confusion is following attributes

1. property=some name 

so should this have a get and set methods in the ActionForm

2. Collection - when will this be used

3. indexID - when should this be used

Can some body throw some insight on these tags or some examples of usage.

Thanks


RE: Help- logic:iterate tag

2003-06-09 Thread Kamholz, Keith (corp-staff) USX
Well, I'm not sure exactly what you want to know, but here's an example of
how I used it in an application I'm currently working on:


table
logic:iterate id=ansm name=groups
type=com.moog.us.app.ans.data.AnsmItem
tr
td
html:link page=/GetFormatGroup.do?type=group
paramId=key paramName=ansm paramProperty=numberType
bean:write name=ansm property=numberType/
/html:link
/td
td
html:link page=/GetList.do?type=subformats paramId=key
paramName=ansm paramProperty=numberType
img src=subtypes.gif/
/html:link
/td
td
bean:write name=ansm property=typeDesc/
/td
/tr
/logic:iterate
/table


groups is an ArrayList that I put in the request from the preceding
action.  it stores variables of type AnsmItem.  ansm is the local bean
name that you use within the iterate tag to access the current element of
the collection.

Let me know if you have any questions about it, or if you want to know
anything else.


Keith Kamholz
Programming and Architecture
Moog Inc.

Phone: (716) 687-7001



-Original Message-
From: Sashi Ravipati [mailto:[EMAIL PROTECTED]
Sent: Monday, June 09, 2003 11:22 AM
To: [EMAIL PROTECTED]
Subject: Help- logic:iterate tag


Hi

I am trying to understand the logic:iterate tag. I have gone thru the docs
but could figure out some of the attributes of this tag.

My confusion is following attributes

1. property=some name 

so should this have a get and set methods in the ActionForm

2. Collection - when will this be used

3. indexID - when should this be used

Can some body throw some insight on these tags or some examples of usage.

Thanks

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



RE: Help- logic:iterate tag

2003-06-09 Thread Sashi Ravipati
This will definitely help me , but the reason for asking this question
..

In my application my requirement is to have multiple HTML elements with
the same name.

eg:

table
tr
 tdhtml:text property=beginDate/td
tdhtml:text property=endDate/td
td
  html:select property=area
  html:option value=nbsp;/html:option
   html:option value=1 MH/html:option 
   html:option value=2 MSA/html:option 
   html:option value=3 NATIONAL/html:option 
/html:select 
/td
/tr
/table

But the above table can be 1 row or many rows (dynamic). Once the user
submits the page, and say there is some validation error, I want to
rebuild the table with the values from the action form.



Hope i am clear, if not I will further info.

 [EMAIL PROTECTED] 06/09/03 12:33PM 
Well, I'm not sure exactly what you want to know, but here's an example
of
how I used it in an application I'm currently working on:


table
logic:iterate id=ansm name=groups
type=com.moog.us.app.ans.data.AnsmItem
tr
td
html:link page=/GetFormatGroup.do?type=group
paramId=key paramName=ansm paramProperty=numberType
bean:write name=ansm property=numberType/
/html:link
/td
td
html:link page=/GetList.do?type=subformats paramId=key
paramName=ansm paramProperty=numberType
img src=subtypes.gif/
/html:link
/td
td
bean:write name=ansm property=typeDesc/
/td
/tr
/logic:iterate
/table


groups is an ArrayList that I put in the request from the preceding
action.  it stores variables of type AnsmItem.  ansm is the local bean
name that you use within the iterate tag to access the current element
of
the collection.

Let me know if you have any questions about it, or if you want to know
anything else.


Keith Kamholz
Programming and Architecture
Moog Inc.

Phone: (716) 687-7001



-Original Message-
From: Sashi Ravipati [mailto:[EMAIL PROTECTED]
Sent: Monday, June 09, 2003 11:22 AM
To: [EMAIL PROTECTED]
Subject: Help- logic:iterate tag


Hi

I am trying to understand the logic:iterate tag. I have gone thru the
docs
but could figure out some of the attributes of this tag.

My confusion is following attributes

1. property=some name 

so should this have a get and set methods in the ActionForm

2. Collection - when will this be used

3. indexID - when should this be used

Can some body throw some insight on these tags or some examples of
usage.

Thanks

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


RE: Help- logic:iterate tag

2003-06-09 Thread Kamholz, Keith (corp-staff) USX
As far as your question about rebuilding the table, I'm not sure exactly
what you're asking.  These sorts of things are generally done automatically.

I can answer your other question though.  The 'type' attribute of the
logic:iterate tag specifies the name of the class that is stored in your
collection that you are iterating through.  For example, if you just have an
ArrayList stored in the request with the attribute someList, and it stores
strings that you want to iterate through, you would use:

logic:iterate id=thisElement name=someList type=java.lang.String
(Do something with 'thisElement')
/logic:iterate

Does that help more?


Keith Kamholz
Programming and Architecture
Moog Inc.

Phone: (716) 687-7001



-Original Message-
From: Sashi Ravipati [mailto:[EMAIL PROTECTED]
Sent: Monday, June 09, 2003 1:26 PM
To: [EMAIL PROTECTED]
Subject: RE: Help- logic:iterate tag


Also could u tell me as what u defined ur action form (eg: ArrayList
storing type AnsmItem, and 
what is type used for  type=com.moog.us.app.ans.data.AnsmItem


 [EMAIL PROTECTED] 06/09/03 01:22PM 
This will definitely help me , but the reason for asking this question
..

In my application my requirement is to have multiple HTML elements with
the same name.

eg:

table
tr
tdhtml:text property=beginDate/td
tdhtml:text property=endDate/td
td
  html:select property=area
  html:option value=nbsp;/html:option
   html:option value=1 MH/html:option 
   html:option value=2 MSA/html:option 
   html:option value=3 NATIONAL/html:option 
/html:select 
/td
/tr
/table

But the above table can be 1 row or many rows (dynamic). Once the user
submits the page, and say there is some validation error, I want to
rebuild the table with the values from the action form.



Hope i am clear, if not I will further info.

 [EMAIL PROTECTED] 06/09/03 12:33PM 
Well, I'm not sure exactly what you want to know, but here's an example
of
how I used it in an application I'm currently working on:


table
logic:iterate id=ansm name=groups
type=com.moog.us.app.ans.data.AnsmItem
tr
td
html:link page=/GetFormatGroup.do?type=group
paramId=key paramName=ansm paramProperty=numberType
bean:write name=ansm property=numberType/
/html:link
/td
td
html:link page=/GetList.do?type=subformats paramId=key
paramName=ansm paramProperty=numberType
img src=subtypes.gif/
/html:link
/td
td
bean:write name=ansm property=typeDesc/
/td
/tr
/logic:iterate
/table


groups is an ArrayList that I put in the request from the preceding
action.  it stores variables of type AnsmItem.  ansm is the local bean
name that you use within the iterate tag to access the current element
of
the collection.

Let me know if you have any questions about it, or if you want to know
anything else.


Keith Kamholz
Programming and Architecture
Moog Inc.

Phone: (716) 687-7001



-Original Message-
From: Sashi Ravipati [mailto:[EMAIL PROTECTED]
Sent: Monday, June 09, 2003 11:22 AM
To: [EMAIL PROTECTED]
Subject: Help- logic:iterate tag


Hi

I am trying to understand the logic:iterate tag. I have gone thru the
docs
but could figure out some of the attributes of this tag.

My confusion is following attributes

1. property=some name 

so should this have a get and set methods in the ActionForm

2. Collection - when will this be used

3. indexID - when should this be used

Can some body throw some insight on these tags or some examples of
usage.

Thanks

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