Issue with logic:iterate Tag

2010-04-25 Thread Thangavel Loganathan
Hi !!

am newbie to struts taglib, my requirement is want display the values from
DB in which there many fields includes date,resource_name, time and
etc.. Based on these 3 criteria i want display in table.

i am getting the values from DB with request scope... and am iterating using
logic:iterate taglib, through this tag i can able to display the values
one by one for eache and every row am putting a line to separate...

when come to my requirement based on the date , resource name and time i
want display in one row. for example ,

---

Date   ResourceName Time

14-12-10 XXX  09:00
 05:00
-
 YYY  01:00
  02:00
---
ZZ   05:00

---

15-12-10   AAA   04:00
-
  BBB 01:00
  02:00
---
   CC 05:00
-




Like above want display in jsp..




but am using logic:iterate tagalib ,


---

Date ResourceName Time

14-12-10 XXX   09:00
--
14-12-10 XXX 05:00
-
14-12-10   YYY   01:00

14-12-1002:00
-
14-12-10 ZZ  05:00

---

15-12-10 AAA   04:00
---
15-12-10  BBB   01:00



Like this am getting in jsp .. and my jsp code is below ,


 http://www.coderanch.com/forums/jforum#


logic:iterate id=item name=list type=com.bean.AppoinmentInformation
 scope=request
li
div class=agenda_datebean:write name=item  property=startDate
//div
div class=agenda_content_container

div class=agenda_content_list
ul class=agenda_content

li class=agenda_schedule_name
divbean:write name=item  property=rsc_name/ /div
/li
li class=appointment_schedule_info
table class=schedule_list cellpadding=0 cellspacing=0
tr
td width=5%
div class=bean:write name=item  property=status
//div
/td
td width=18%bean:write name=item  property=
app_st_hr/  - bean:write name=item  property=app_end_hr/
/td
td width=77%---bean:write name=item
  property=service_name/  *** bean:write name=item  property=
cust_name/
( bean:write name=item  property=ctitle_add
/  )/td
/tr
/table
  /li
/ul
/div
/div
/li
/logic:iterate


waiting for ur reply

So i want break the condition and i want to compare two list date and
resource name.


how to achieve this in logic:iterate or want to use another tag...


suggest me plz ..


thanks in advance

---

Thanks  Regards,

Thangavel

my skype : thangavel.nathan
gtalk : lthangavel


Re: Issue with logic:iterate Tag

2010-04-25 Thread Denis Cabasson
I recommend using displaytag for displaying tables in JSP : 
http://displaytag.sourceforge.net/1.2/


It comes with support for Grouping (see 
http://displaytag.homeip.net/displaytag-examples-1.2/example-grouping.jsp ) 
which is the feature you are looking for.


I love displaytag for its ease of use, its clean implemtation which 
allows for extension if needed, and for its native support for paging / 
sorting which is pretty much always needed when it comes to long list of 
data. By using displaytag throughout our application we ensure the 
consistency of the user experience when it comes to dealing with tables.


Good luck!
Denis


Le 2010-04-24 11:39, Thangavel Loganathan a écrit :

Hi !!

am newbie to struts taglib, my requirement is want display the values from
DB in which there many fields includes date,resource_name, time and
etc.. Based on these 3 criteria i want display in table.

i am getting the values from DB with request scope... and am iterating using
logic:iterate  taglib, through this tag i can able to display the values
one by one for eache and every row am putting a line to separate...

when come to my requirement based on the date , resource name and time i
want display in one row. for example ,

---

Date   ResourceName Time

14-12-10 XXX  09:00
  05:00
 -
  YYY  01:00
   02:00
 ---
 ZZ   05:00

---

15-12-10   AAA   04:00
 -
   BBB 01:00
   02:00
 ---
CC 05:00
-




Like above want display in jsp..




but am usinglogic:iterate  tagalib ,


---

Date ResourceName Time

14-12-10 XXX   09:00
--
14-12-10 XXX 05:00
-
14-12-10   YYY   01:00

14-12-1002:00
-
14-12-10 ZZ  05:00

---

15-12-10 AAA   04:00
---
15-12-10  BBB   01:00



Like this am getting in jsp .. and my jsp code is below ,


  http://www.coderanch.com/forums/jforum#


logic:iterate id=item name=list type=com.bean.AppoinmentInformation
  scope=request
 li
 div class=agenda_datebean:write name=item  property=startDate
//div
 div class=agenda_content_container

 div class=agenda_content_list
 ul class=agenda_content

 li class=agenda_schedule_name
 divbean:write name=item  property=rsc_name/  /div
 /li
 li class=appointment_schedule_info
 table class=schedule_list cellpadding=0 cellspacing=0
 tr
 td width=5%
 div class=bean:write name=item  property=status
//div
 /td
 td width=18%bean:write name=item  property=
app_st_hr/   -bean:write name=item  property=app_end_hr/
 /td
 td width=77%---bean:write name=item
   property=service_name/   ***bean:write name=item  property=
cust_name/
 (bean:write name=item  property=ctitle_add
/   )/td
 /tr
 /table
   /li
 /ul
 /div
 /div
 /li
/logic:iterate


 waiting for ur reply

So i want break the condition and i want to compare two list date and
resource name.


how to achieve this inlogic:iterate  or want to use another tag...


suggest me plz ..


thanks in advance

---

Thanks  Regards,

Thangavel

my skype : thangavel.nathan
gtalk : lthangavel

   



-
To unsubscribe, e-mail: user-unsubscr...@struts.apache.org
For additional commands, e-mail: user-h...@struts.apache.org



Getting Context within logic:iterate/

2009-11-18 Thread Jon Wynacht
Hi,

So I think I have a better way to ask my question ;-)

Given something like this block of tags:

logic:iterate id=download name=Downloads
bean:write name=download property=displayName/br /
bean:write name=download property=description/
/logic:iterate

How can I do something like this inside the logic:iterate/:

%@ page import=com.oe.wa.cal.bean.DownloadBean %
%
DownloadBean db = (DownloadBean) request.getAttribute(download);
out.print(db.getSomeProperty());
%

Note that I want to do this with a scriptlet and not with tags.

Thanks!

Jon

-
To unsubscribe, e-mail: user-unsubscr...@struts.apache.org
For additional commands, e-mail: user-h...@struts.apache.org



Re: Getting Context within logic:iterate/

2009-11-18 Thread Brian Thompson
Something like the following should work (double-check the syntax though!):

%@ page import=com.oe.wa.cal.bean.DownloadBean %
 %

for (DownloadBean db: (ListDownloadBean)
request.getAttribute(downloadList).iterator()) {

out.print(db.getSomeProperty());

}

 %



-Brian


Re: Getting Context within logic:iterate/

2009-11-18 Thread Jon Wynacht
Yupthanks!

On Nov 18, 2009, at 8:30 AM, Brian Thompson wrote:

 Something like the following should work (double-check the syntax though!):
 
 %@ page import=com.oe.wa.cal.bean.DownloadBean %
 %
 
for (DownloadBean db: (ListDownloadBean)
 request.getAttribute(downloadList).iterator()) {
 
   out.print(db.getSomeProperty());
 
}
 
 %
 
 
 
 -Brian


-
To unsubscribe, e-mail: user-unsubscr...@struts.apache.org
For additional commands, e-mail: user-h...@struts.apache.org



logic:iterate

2009-09-03 Thread senderj

If I have a text input in my jsp named scoreNdays, I know I should declare my
variable scoreNdays in the struts formbean with getter and setter like
getScoreNdays(). Then it will work with the jsp. Now I have an iternation in
my jsp like 

logic:iterate name=MainControlForm property=scoreItems id=score
html:checkbox name=score property=scoreChkBox indexed=true/
html:text name=score property=scoreNdays size=2 readonly=true
indexed=true/
.

Since the two input are indexed, they generate a web form that post with
parameter like score[1].scoreNdays. Then I don't know how I should declare
the corresponding variables and getter setter in the formbean. Please help.

-- 
View this message in context: 
http://www.nabble.com/logic%3Aiterate-tp25270728p25270728.html
Sent from the Struts - User mailing list archive at Nabble.com.


-
To unsubscribe, e-mail: user-unsubscr...@struts.apache.org
For additional commands, e-mail: user-h...@struts.apache.org



Re: logic:iterate

2009-09-03 Thread Rusty Wright

http://struts.apache.org/2.1.6/docs/ognl-basics.html


senderj wrote:

If I have a text input in my jsp named scoreNdays, I know I should declare my
variable scoreNdays in the struts formbean with getter and setter like
getScoreNdays(). Then it will work with the jsp. Now I have an iternation in
my jsp like 


logic:iterate name=MainControlForm property=scoreItems id=score
html:checkbox name=score property=scoreChkBox indexed=true/
html:text name=score property=scoreNdays size=2 readonly=true
indexed=true/
.

Since the two input are indexed, they generate a web form that post with
parameter like score[1].scoreNdays. Then I don't know how I should declare
the corresponding variables and getter setter in the formbean. Please help.



-
To unsubscribe, e-mail: user-unsubscr...@struts.apache.org
For additional commands, e-mail: user-h...@struts.apache.org



Re: logic:iterate

2009-09-03 Thread Rusty Wright

Oops, sorry; I didn't realize this was a struts 1 question.


Rusty Wright wrote:

http://struts.apache.org/2.1.6/docs/ognl-basics.html


senderj wrote:
If I have a text input in my jsp named scoreNdays, I know I should 
declare my

variable scoreNdays in the struts formbean with getter and setter like
getScoreNdays(). Then it will work with the jsp. Now I have an 
iternation in

my jsp like
logic:iterate name=MainControlForm property=scoreItems id=score
html:checkbox name=score property=scoreChkBox indexed=true/
html:text name=score property=scoreNdays size=2 readonly=true
indexed=true/
.

Since the two input are indexed, they generate a web form that post with
parameter like score[1].scoreNdays. Then I don't know how I should 
declare
the corresponding variables and getter setter in the formbean. Please 
help.




-
To unsubscribe, e-mail: user-unsubscr...@struts.apache.org
For additional commands, e-mail: user-h...@struts.apache.org



Problem creating multiple radio buttons groups into an logic:iterate

2009-06-22 Thread Luis Ureña
First, thanks for your help

I am having problems to build JSP with multiple questions and some radio
buttons for each question.

I am using two logic:iterate, one for questions and anotherone for answer
for each question, like this:

 logic:iterate id=questions name=unicaBean indexId=index
TR id=trdark
TD
html:hidden name=questions property=seccion/
html:hidden name=questions property=pregunta/
bean:write name=questions property=descPregunta/
/TD
/TR
TR id=trclear
TD
table class=tableinfo
tr
td
logic:iterate id=answers name=questions
property=opciones
html:radio name=answers property=name
value=id idName=answers indexed=true/
bean:write name=answers property=name/
/logic:iterate
/td
/tr
/table
/TD
/TR
/logic:iterate


Re: logic:iterate issue

2009-03-11 Thread Paweł Wielgus
Hi Joe,
You can try to output authorId, without property set on, maybe these
objects are empty inside.
Also, did You imported logic tags into jsp?

Best greetings,
Pawel Wielgus.

2009/3/10, Russo, Joe rus...@cadmus.com:
 The following bean:write code outputs:
 [com.cadmus.rpm.domain.custom.authorsc...@d08faa]
 bean:write name=summaryArchiveForm property=allAdditionalAuthors/
 I am using a (allAdditionalAuthors) ArrayList to store AuthorsCDTO.
 Should I be using another collection type?
 Not sure why this is not working and would really appreciate any help.


 -Original Message-
 From: Russo, Joe [mailto:rus...@cadmus.com]
 Sent: Tuesday, March 10, 2009 2:28 PM
 To: Struts Users Mailing List
 Subject: logic:iterate issue


 Sorry forgot to change subject.

 -Original Message-
 From: Russo, Joe [mailto:rus...@cadmus.com]
 Sent: Tuesday, March 10, 2009 2:25 PM
 To: Struts Users Mailing List
 Subject: RE: Convention Plugin and Action Chaining

 I defined the below code and would like to use the iterate functionality
 witin the jsp.  This code does not cause any error, but does not display
 any data.  Any ideas why?

 package com.cadmus.rpm.domain.custom;

 import java.io.Serializable;
 import java.util.Date;
 import java.util.ArrayList;


 public class AuthorsCDTO implements Serializable {
 private String addAuthorFirstName;
 private String addAuthorLastName;
 private String addAuthorMiddleInitial;
 public String getAddAuthorFirstName() {
   return addAuthorFirstName;
 }
 public void setAddAuthorFirstName(String addAuthorFirstName) {
   this.addAuthorFirstName = addAuthorFirstName;
 }
 public String getAddAuthorLastName() {
   return addAuthorLastName;
 }
 public void setAddAuthorLastName(String addAuthorLastName) {
   this.addAuthorLastName = addAuthorLastName;
 }
 public String getAddAuthorMiddleInitial() {
   return addAuthorMiddleInitial;
 }
 public void setAddAuthorMiddleInitial(String addAuthorMiddleInitial) {
   this.addAuthorMiddleInitial = addAuthorMiddleInitial;
 }


 }

 private ArrayList allAdditionalAuthors;
 public ArrayList getAllAdditionalAuthors() {
   return allAdditionalAuthors;
 }
 public void setAllAdditionalAuthors(ArrayList allAdditionalAuthors) {
   this.allAdditionalAuthors = allAdditionalAuthors;
 }

 logic:present name=summaryArchiveForm property=allAdditionalAuthors
 scope=session
 logic:iterate id=authorId name=summaryArchiveForm
   property=allAdditionalAuthors
   type=com.cadmus.rpm.domain.custom.AuthorsCDTO scope=session
 tr bgcolor=#E6E6E6
   td align=center id=cell
   bean:write name=authorId
 property=addAuthorFirstName/
   /td
   td align=center id=cell/td
   bean:write name=authorId
 property=addAuthorMiddleInitial/
   td align=center id=cell/td
   bean:write name=authorId
 property=addAuthorLastName/
   td align=center id=cell/td
 /tr
 /logic:iterate
 /logic:present

 

 -
 To unsubscribe, e-mail: user-unsubscr...@struts.apache.org
 For additional commands, e-mail: user-h...@struts.apache.org


 

 

 -
 To unsubscribe, e-mail: user-unsubscr...@struts.apache.org
 For additional commands, e-mail: user-h...@struts.apache.org


 

 

 -
 To unsubscribe, e-mail: user-unsubscr...@struts.apache.org
 For additional commands, e-mail: user-h...@struts.apache.org



-
To unsubscribe, e-mail: user-unsubscr...@struts.apache.org
For additional commands, e-mail: user-h...@struts.apache.org



RE: logic:iterate issue

2009-03-11 Thread Russo, Joe
Pawel,
Thank you very much for responding.  
I tried the following and it worked.
Thanks again,
Joe


logic:present name=summaryArchiveForm
property=allAdditionalAuthors
logic:iterate id=allAdditionalAuthors name=summaryArchiveForm
property=allAdditionalAuthors
tr bgcolor=#E6E6E6
td align=center id=cell
bean:write name=allAdditionalAuthors roperty=addAuthorFirstName/ 
/td
td align=center id=cell
bean:write name=allAdditionalAuthors
property=addAuthorMiddleInitial/ 
/td
td align=center id=cell
bean:write name=allAdditionalAuthors property=addAuthorLastName/ 
/td
td align=center id=cell/td
/tr
/logic:iterate
logic:present

-Original Message-
From: Pawel Wielgus [mailto:poulw...@gmail.com] 
Sent: Wednesday, March 11, 2009 6:46 AM
To: Struts Users Mailing List
Subject: Re: logic:iterate issue

Hi Joe,
You can try to output authorId, without property set on, maybe these
objects are empty inside.
Also, did You imported logic tags into jsp?

Best greetings,
Pawel Wielgus.

2009/3/10, Russo, Joe rus...@cadmus.com:
 The following bean:write code outputs:
 [com.cadmus.rpm.domain.custom.authorsc...@d08faa]
 bean:write name=summaryArchiveForm
property=allAdditionalAuthors/
 I am using a (allAdditionalAuthors) ArrayList to store AuthorsCDTO.
 Should I be using another collection type?
 Not sure why this is not working and would really appreciate any help.


 -Original Message-
 From: Russo, Joe [mailto:rus...@cadmus.com]
 Sent: Tuesday, March 10, 2009 2:28 PM
 To: Struts Users Mailing List
 Subject: logic:iterate issue


 Sorry forgot to change subject.

 -Original Message-
 From: Russo, Joe [mailto:rus...@cadmus.com]
 Sent: Tuesday, March 10, 2009 2:25 PM
 To: Struts Users Mailing List
 Subject: RE: Convention Plugin and Action Chaining

 I defined the below code and would like to use the iterate
functionality
 witin the jsp.  This code does not cause any error, but does not
display
 any data.  Any ideas why?

 package com.cadmus.rpm.domain.custom;

 import java.io.Serializable;
 import java.util.Date;
 import java.util.ArrayList;


 public class AuthorsCDTO implements Serializable {
 private String addAuthorFirstName;
 private String addAuthorLastName;
 private String addAuthorMiddleInitial;
 public String getAddAuthorFirstName() {
   return addAuthorFirstName;
 }
 public void setAddAuthorFirstName(String addAuthorFirstName) {
   this.addAuthorFirstName = addAuthorFirstName;
 }
 public String getAddAuthorLastName() {
   return addAuthorLastName;
 }
 public void setAddAuthorLastName(String addAuthorLastName) {
   this.addAuthorLastName = addAuthorLastName;
 }
 public String getAddAuthorMiddleInitial() {
   return addAuthorMiddleInitial;
 }
 public void setAddAuthorMiddleInitial(String addAuthorMiddleInitial) {
   this.addAuthorMiddleInitial = addAuthorMiddleInitial;
 }


 }

 private ArrayList allAdditionalAuthors;
 public ArrayList getAllAdditionalAuthors() {
   return allAdditionalAuthors;
 }
 public void setAllAdditionalAuthors(ArrayList allAdditionalAuthors) {
   this.allAdditionalAuthors = allAdditionalAuthors;
 }

 logic:present name=summaryArchiveForm
property=allAdditionalAuthors
 scope=session
 logic:iterate id=authorId name=summaryArchiveForm
   property=allAdditionalAuthors
   type=com.cadmus.rpm.domain.custom.AuthorsCDTO scope=session
 tr bgcolor=#E6E6E6
   td align=center id=cell
   bean:write name=authorId
 property=addAuthorFirstName/
   /td
   td align=center id=cell/td
   bean:write name=authorId
 property=addAuthorMiddleInitial/
   td align=center id=cell/td
   bean:write name=authorId
 property=addAuthorLastName/
   td align=center id=cell/td
 /tr
 /logic:iterate
 /logic:present

 

 -
 To unsubscribe, e-mail: user-unsubscr...@struts.apache.org
 For additional commands, e-mail: user-h...@struts.apache.org


 

 

 -
 To unsubscribe, e-mail: user-unsubscr...@struts.apache.org
 For additional commands, e-mail: user-h...@struts.apache.org


 

 

 -
 To unsubscribe, e-mail: user-unsubscr...@struts.apache.org
 For additional commands, e-mail: user-h...@struts.apache.org



-
To unsubscribe, e-mail: user-unsubscr...@struts.apache.org
For additional commands, e-mail: user-h...@struts.apache.org






-
To unsubscribe, e-mail: user-unsubscr...@struts.apache.org
For additional commands, e-mail: user-h...@struts.apache.org



logic:iterate issue

2009-03-10 Thread Russo, Joe

Sorry forgot to change subject.

-Original Message-
From: Russo, Joe [mailto:rus...@cadmus.com] 
Sent: Tuesday, March 10, 2009 2:25 PM
To: Struts Users Mailing List
Subject: RE: Convention Plugin and Action Chaining

I defined the below code and would like to use the iterate functionality
witin the jsp.  This code does not cause any error, but does not display
any data.  Any ideas why?

package com.cadmus.rpm.domain.custom;

import java.io.Serializable;
import java.util.Date;
import java.util.ArrayList;


public class AuthorsCDTO implements Serializable {
private String addAuthorFirstName;
private String addAuthorLastName;
private String addAuthorMiddleInitial;
public String getAddAuthorFirstName() {
return addAuthorFirstName;
}
public void setAddAuthorFirstName(String addAuthorFirstName) {
this.addAuthorFirstName = addAuthorFirstName;
}
public String getAddAuthorLastName() {
return addAuthorLastName;
}
public void setAddAuthorLastName(String addAuthorLastName) {
this.addAuthorLastName = addAuthorLastName;
}
public String getAddAuthorMiddleInitial() {
return addAuthorMiddleInitial;
}
public void setAddAuthorMiddleInitial(String addAuthorMiddleInitial) {
this.addAuthorMiddleInitial = addAuthorMiddleInitial;
}


}

private ArrayList allAdditionalAuthors;
public ArrayList getAllAdditionalAuthors() {
return allAdditionalAuthors;
}
public void setAllAdditionalAuthors(ArrayList allAdditionalAuthors) {
this.allAdditionalAuthors = allAdditionalAuthors;
}

logic:present name=summaryArchiveForm property=allAdditionalAuthors
scope=session
logic:iterate id=authorId name=summaryArchiveForm
  property=allAdditionalAuthors
  type=com.cadmus.rpm.domain.custom.AuthorsCDTO scope=session
tr bgcolor=#E6E6E6
td align=center id=cell
bean:write name=authorId
property=addAuthorFirstName/
/td
td align=center id=cell/td
bean:write name=authorId
property=addAuthorMiddleInitial/
td align=center id=cell/td
bean:write name=authorId
property=addAuthorLastName/
td align=center id=cell/td
/tr
/logic:iterate
/logic:present



-
To unsubscribe, e-mail: user-unsubscr...@struts.apache.org
For additional commands, e-mail: user-h...@struts.apache.org






-
To unsubscribe, e-mail: user-unsubscr...@struts.apache.org
For additional commands, e-mail: user-h...@struts.apache.org



RE: logic:iterate issue

2009-03-10 Thread Russo, Joe
The following bean:write code outputs:
[com.cadmus.rpm.domain.custom.authorsc...@d08faa]
bean:write name=summaryArchiveForm property=allAdditionalAuthors/
I am using a (allAdditionalAuthors) ArrayList to store AuthorsCDTO.
Should I be using another collection type?
Not sure why this is not working and would really appreciate any help.


-Original Message-
From: Russo, Joe [mailto:rus...@cadmus.com] 
Sent: Tuesday, March 10, 2009 2:28 PM
To: Struts Users Mailing List
Subject: logic:iterate issue 


Sorry forgot to change subject.

-Original Message-
From: Russo, Joe [mailto:rus...@cadmus.com] 
Sent: Tuesday, March 10, 2009 2:25 PM
To: Struts Users Mailing List
Subject: RE: Convention Plugin and Action Chaining

I defined the below code and would like to use the iterate functionality
witin the jsp.  This code does not cause any error, but does not display
any data.  Any ideas why?

package com.cadmus.rpm.domain.custom;

import java.io.Serializable;
import java.util.Date;
import java.util.ArrayList;


public class AuthorsCDTO implements Serializable {
private String addAuthorFirstName;
private String addAuthorLastName;
private String addAuthorMiddleInitial;
public String getAddAuthorFirstName() {
return addAuthorFirstName;
}
public void setAddAuthorFirstName(String addAuthorFirstName) {
this.addAuthorFirstName = addAuthorFirstName;
}
public String getAddAuthorLastName() {
return addAuthorLastName;
}
public void setAddAuthorLastName(String addAuthorLastName) {
this.addAuthorLastName = addAuthorLastName;
}
public String getAddAuthorMiddleInitial() {
return addAuthorMiddleInitial;
}
public void setAddAuthorMiddleInitial(String addAuthorMiddleInitial) {
this.addAuthorMiddleInitial = addAuthorMiddleInitial;
}


}

private ArrayList allAdditionalAuthors;
public ArrayList getAllAdditionalAuthors() {
return allAdditionalAuthors;
}
public void setAllAdditionalAuthors(ArrayList allAdditionalAuthors) {
this.allAdditionalAuthors = allAdditionalAuthors;
}

logic:present name=summaryArchiveForm property=allAdditionalAuthors
scope=session
logic:iterate id=authorId name=summaryArchiveForm
  property=allAdditionalAuthors
  type=com.cadmus.rpm.domain.custom.AuthorsCDTO scope=session
tr bgcolor=#E6E6E6
td align=center id=cell
bean:write name=authorId
property=addAuthorFirstName/
/td
td align=center id=cell/td
bean:write name=authorId
property=addAuthorMiddleInitial/
td align=center id=cell/td
bean:write name=authorId
property=addAuthorLastName/
td align=center id=cell/td
/tr
/logic:iterate
/logic:present



-
To unsubscribe, e-mail: user-unsubscr...@struts.apache.org
For additional commands, e-mail: user-h...@struts.apache.org






-
To unsubscribe, e-mail: user-unsubscr...@struts.apache.org
For additional commands, e-mail: user-h...@struts.apache.org






-
To unsubscribe, e-mail: user-unsubscr...@struts.apache.org
For additional commands, e-mail: user-h...@struts.apache.org



logic:iterate not populating the values on submit

2008-12-24 Thread Prasanth Nair
Hi,
I need a urgent help. Could someone respond to

http://saloon.javaranch.com/cgi-bin/ubb/ultimatebb.cgi?ubb=get_topicf=58t=015067

regards
Prasanth


Re: logic:iterate not populating the values on submit

2008-12-24 Thread Yayo
I think it's wrong... you don't need an iterated in order to set a single
simple value. With a setter and getter pair for the property is just enough.
You should be expecting an String with the given value from the user input.

The again I may be wrong... ^^

Happy new year!

--
 *Yayo*
http://yayocaturas.blogspot.com
eduy...@gmail.com
--



On Wed, Dec 24, 2008 at 7:43 PM, Prasanth Nair pn8...@gmail.com wrote:

 Hi,
 I need a urgent help. Could someone respond to


 http://saloon.javaranch.com/cgi-bin/ubb/ultimatebb.cgi?ubb=get_topicf=58t=015067

 regards
 Prasanth




-- 
Noli nothis permittere te terere

http://yayocaturas.blogspot.com/


Struts logic:iterate does not recognize the collection.

2008-11-07 Thread SanJ.SANJAY

 I am trying to display the collection that I am setting in struts action to
the request scope.
 But when I try to use struts logic:iterate to display the collection,
 it says does not find xxxCollection bean in any scope.

In Action class:
 for (int i = 0; i  children.length; i++)
{ xxxCollection.add(filename); }
request.getSession().setAttribute(xxxCollection, xxxCollection);

I have getter and setters for this collection in the form.

 But In JSP, it does not recognize the collection:

logic:iterate id=iprecord indexId=ind name=xxxCollection 
 bean:write name=iprecord property=xxxCollection /
/logic:iterate

I am clueless about why the bean is invisible??

-- 
View this message in context: 
http://www.nabble.com/Struts-logic%3Aiterate-does-not-recognize-the-collection.-tp20385273p20385273.html
Sent from the Struts - User mailing list archive at Nabble.com.


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



Re: Struts logic:iterate does not recognize the collection.

2008-11-07 Thread Dave Newton
--- On Fri, 11/7/08, SanJ.SANJAY wrote:
 I am trying to display the collection that I am setting in
 struts action to the request scope.

The code is putting it in session scope, FWIW:

 request.getSession().setAttribute(xxxCollection, xxxCollection);
 [...]
 logic:iterate id=iprecord indexId=ind name=xxxCollection 
   bean:write name=iprecord property=xxxCollection /
 /logic:iterate

Does it not recognize the *collection*? In other words, is it not iterating at 
all? Or is the bean:write... funky: does each element of xxxCollection have 
an xxxCollection property and is printing that what you really mean to do?

Dave


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



Re: Struts logic:iterate does not recognize the collection.

2008-11-07 Thread SanJ.SANJAY



newton.dave wrote:
 
 --- On Fri, 11/7/08, SanJ.SANJAY wrote:
 I am trying to display the collection that I am setting in
 struts action to the request scope.
 
 The code is putting it in session scope, FWIW:
 
 request.getSession().setAttribute(xxxCollection, xxxCollection);
 [...]
 logic:iterate id=iprecord indexId=ind name=xxxCollection 
   bean:write name=iprecord property=xxxCollection /
 /logic:iterate
 
 Does it not recognize the *collection*? In other words, is it not
 iterating at all? Or is the bean:write... funky: does each element of
 xxxCollection have an xxxCollection property and is printing that what you
 really mean to do?
 
 Dave
 
 I changed to put that in direct request also and did'nt work:
  request.setAttribute(xxxCollection, xxxCollection);
 
 I could see the elements of collection when I use java in jsp using
 scriptlets (%%) and in the same page if I use struts logic:iterate ,
 it does'nt see the bean.
 
Does it not recognize the *collection*? In other words, is it not
iterating at all? Or is the bean:write... funky: does each element of
xxxCollection have an xxxCollection property and is printing that what you
really mean to do?
 
 Ok, I have this question, do we really need to have the property in
 collection? Can't I use collection with direct elements in it by setting
 that to request? 
 ex.
 
 for(int i=0;i=list.size();i++) {
 xxxCollection.add(i);
 }
 
 request.setAttribute(xxxCollection);   Can we do like that and use
 logic:iterator? I tried this 
 and it did'nt work.
 
 And if suppose  I use a property filename and add that to collection
 xxxCollection and set the xxxCollection to request, all I need to do
 is have this properties POJOS in form right? 
 
 ex:
 
 FileForm myForm = (FileForm) form;
 
 for(int i=0;i=list.size();i++) {
 
 myForm.setXXXElement()
 
 }
 
 Any insights??
 
 
 
 
 
 
 -
 To unsubscribe, e-mail: [EMAIL PROTECTED]
 For additional commands, e-mail: [EMAIL PROTECTED]
 
 
 

-- 
View this message in context: 
http://www.nabble.com/Struts-logic%3Aiterate-does-not-recognize-the-collection.-tp20385273p20385617.html
Sent from the Struts - User mailing list archive at Nabble.com.


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



Re: Struts logic:iterate does not recognize the collection.

2008-11-07 Thread Dave Newton
The  characters are normally used to differentiate what I said from what you 
said. Prefacing *every* line with  somewhat defeats the purpose and breaks 
with tradition.

--- On Fri, 11/7/08, SanJ.SANJAY wrote:
 I changed to put that in direct request also and did'nt work:
 request.setAttribute(xxxCollection, xxxCollection);

You didn't answer my question; if you logic:iterate... over the collection 
without the bean:write... is there an iteration taking place? You can find 
out by putting a simple string inside the iterate tag and see if it prints at 
all. IIRC the iterate tag should search the appropriate scopes for the named 
collection.

 Ok, I have this question, do we really need to have the 
 property in collection?

If you want the syntax you're using to work, yes. Your original code looked 
like this:

bean:write name=iprecord property=xxxCollection /

IIRC that (more or less) means iprecord.getXxxCollection(), no? If you don't 
want to access a property of the iprecord element then you should leave off the 
property attribute:

bean:write name=iprecord /

This will just emit each item being iterated over. I have no real way of 
knowing what your intention is, however, without more information.

See [1], or the version appropriate for whatever Struts 1 version you're using.

 Can't I use collection with direct elements in it by setting that to request? 

Sure, but that's not what you did.

 And if suppose  I use a property filename and add that to collection
 xxxCollection and set the xxxCollection to request, all I need to do
 is have this properties POJOS in form right? 

IIRC none of your sample code accessed the form, it just used scoped variables.

It might be easier to help if the missing bits of your example were posted.

Dave

[1] Struts 1.2.x bean:write... docs
http://struts.apache.org/1.2.x/userGuide/struts-bean.html#write


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



Re: Struts logic:iterate does not recognize the collection.

2008-11-07 Thread SanJ.SANJAY



newton.dave wrote:
 
 The  characters are normally used to differentiate what I said from
 what you said. Prefacing *every* line with  somewhat defeats the
 purpose and breaks with tradition.
 
 --- On Fri, 11/7/08, SanJ.SANJAY wrote:
 I changed to put that in direct request also and did'nt work:
 request.setAttribute(xxxCollection, xxxCollection);
 
 You didn't answer my question; if you logic:iterate... over the
 collection without the bean:write... is there an iteration taking place?
 You can find out by putting a simple string inside the iterate tag and see
 if it prints at all. IIRC the iterate tag should search the appropriate
 scopes for the named collection.
 
 Ok, I have this question, do we really need to have the 
 property in collection?
 
 If you want the syntax you're using to work, yes. Your original code
 looked like this:
 
 bean:write name=iprecord property=xxxCollection /
 
 IIRC that (more or less) means iprecord.getXxxCollection(), no? If you
 don't want to access a property of the iprecord element then you should
 leave off the property attribute:
 
 bean:write name=iprecord /
 
 This will just emit each item being iterated over. I have no real way of
 knowing what your intention is, however, without more information.
 
 See [1], or the version appropriate for whatever Struts 1 version you're
 using.
 
 Can't I use collection with direct elements in it by setting that to
 request? 
 
 Sure, but that's not what you did.
 
 And if suppose  I use a property filename and add that to collection
 xxxCollection and set the xxxCollection to request, all I need to do
 is have this properties POJOS in form right? 
 
 IIRC none of your sample code accessed the form, it just used scoped
 variables.
 
 It might be easier to help if the missing bits of your example were
 posted.
 
 Dave
 
 [1] Struts 1.2.x bean:write... docs
 http://struts.apache.org/1.2.x/userGuide/struts-bean.html#write
 
 
 -
 To unsubscribe, e-mail: [EMAIL PROTECTED]
 For additional commands, e-mail: [EMAIL PROTECTED]
 
 
 

Ok answer to your question  if you logic:iterate... over the collection
without the bean:write... is there an iteration taking place?  is
that it is not even goin inside the iterator I tried putting some string and
it did not show. I think the reason is that the moment it tries to read
proper xxxCollection in iterator tag, it throws error bean xxxCollection is
not found in any any scope 

logic:iterator id=iprecord name=xxxCollection
h1 Inside the iterator /h1
/logic:iterate

I am confused between id and name properties of this iterator tag. 

My requirement is very simple which is: 
I have a simple ArrayList xxxCollection that I populate in Action class and
set to the request.setAttribute(xxxCollection). This xxxCollection does not
contains any properties, it is just the collection of strings (filenames in
my case).

Now in JSP if I print this ArrayList xxxCollection using scriptlets 
% out.print(request.getAttribute(xxxCollection)) %  , it displays all
the values to the JSP page.

But if I use logic:iterator, it does'nt.

So what do you suggest here? what should be the id here if  
name=xxCollection 

 logic:iterate id=?? name=xxCollection
bean:write name=xxCollection /
/logic:iterate

 Do you see anything wrong here Dave?
-- 
View this message in context: 
http://www.nabble.com/Struts-logic%3Aiterate-does-not-recognize-the-collection.-tp20385273p20386602.html
Sent from the Struts - User mailing list archive at Nabble.com.


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



Re: Struts logic:iterate does not recognize the collection.

2008-11-07 Thread Dave Newton
--- On Fri, 11/7/08, SanJ.SANJAY wrote:
 [...] I think the reason is that the moment it tries to read
 proper xxxCollection in iterator tag, it throws error
 bean xxxCollection is not found in any any scope 

Such information is useful; I don't recall you mentioning that before.

 I am confused between id and name properties of this iterator tag. 

See [1] (or your appropriate version), which states:

id: The name of a page scope JSP bean that will contain the current element of 
the collection on each iteration, if it is not null.

name: The name of the JSP bean containing the collection to be iterated (if 
property is not specified) [...]

Name is the collection. id will be set to each element of the collection.

 what should be the id here if name=xxCollection 
 
 logic:iterate id=?? name=xxCollection
bean:write name=xxCollection /
 /logic:iterate

logic:iterate id=foo name=xxCollection
  bean:write name=foo /
/logic:iterate

But this isn't the issue.

It could just be that I'm completely mis-remembering how logic:iterate... 
works, because I don't see anything particularly wrong. You're including the 
taglib directives, right?

Dave

[1] 1.x logic:iterate... docs:
http://struts.apache.org/1.x/struts-taglib/tlddoc/logic/iterate.html


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



Re: Problem in using logic:iterate in struts

2008-09-24 Thread Laurie Harper
If the action isn't being called, that would explain why the data the 
action pushes into request scope can't be found... Sounds like the link 
is pointing to the JSP instead of the action, then. How are you 
rendering the links? What are they rendering as? (i.e. what is the 
generated HTML?)


L.

UITOT wrote:

Hello Laurie,
Thanx a lot for replying.Let me tell you the exact
scenario.I am developing a discussion forum for my Project.There is one JSP
called View_topic.jsp.This will display the list of all topics in the
Discussion Forum.Before this JSP one action class say view_topics_Action
is getting called which is setting the arraylist for topics say topic_list
in request scope.This list is getting displayed using logic:iterate in
view_topic.jsp.No problem till here.Now when user clicks on a particular
topic I want that all the threads related to that topic should get
displayed.So I have made each topic as a Hyperlink.Now when user clicks on a
particular topic I want the topic_id to get passed to some action class say
view_threads_Action which will take care of retrieving the Threads details
for that topic  if it is successful it will call another JSP say
View_threads.jsp.


Now I don't have any problem in displaying topic list.I am getting error
only when I am clicking on the hyperlink.The error is in JSP
view_topic.jsp only so it not going to action class view_threads_Action.
I hope I am able to explain my problem.Please help.Thanx.
 


Laurie Harper wrote:
Unfortunately your struts-config.xml and JSP code didn't make it through 
to the list properly. Make sure you're sending your message as plain text.


A couple of questions:

*) How are you accessing the page? (i.e. what URL are you typing?)

*) Are you sure you are calling the action before the JSP is rendered? 
What happens if you put a println at the top of execute()


L.

UITOT wrote:

Hello all,
I have developed 1 application using struts.I am getting this error in my
JSP.I have used logic:iterate.I have populated an arraylist in action
class
which I am using in my JSP.I am able to see the data from the arraylist
in
my JSP but I am getting error when I am clicking on the hyperlink in
JSP.This is the error.Please help me as I am pretty new to struts.Any
help
will be highly appreciated.Thanx in advance.

ApplicationDispatcher[/TGMC_DB1-2009] PWC1231: Servlet.service() for
servlet
jsp threw exception
javax.servlet.jsp.JspException: Cannot find bean: topic_list in any
scope
at org.apache.struts.taglib.TagUtils.lookup(TagUtils.java:935)
at
org.apache.struts.taglib.logic.IterateTag.doStartTag(IterateTag.java:232)
at org.apache.jsp.viewThreads_jsp._jspService(viewThreads_jsp.java from
:121)
at org.apache.jasper.runtime.HttpJspBase.service(HttpJspBase.java:93)
at javax.servlet.http.HttpServlet.service(HttpServlet.java:831)
at
org.apache.jasper.servlet.JspServletWrapper.service(JspServletWrapper.java:373)
at
org.apache.jasper.servlet.JspServlet.serviceJspFile(JspServlet.java:470)
at org.apache.jasper.servlet.JspServlet.service(JspServlet.java:364)
at javax.servlet.http.HttpServlet.service(HttpServlet.java:831)
at
org.apache.catalina.core.ApplicationFilterChain.servletService(ApplicationFilterChain.java:411)
at
org.apache.catalina.core.ApplicationFilterChain.internalDoFilter(ApplicationFilterChain.java:317)
at
org.apache.catalina.core.ApplicationFilterChain.doFilter(ApplicationFilterChain.java:198)
at
org.netbeans.modules.web.monitor.server.MonitorFilter.doFilter(MonitorFilter.java:390)
at
org.apache.catalina.core.ApplicationFilterChain.internalDoFilter(ApplicationFilterChain.java:230)
at
org.apache.catalina.core.ApplicationFilterChain.doFilter(ApplicationFilterChain.java:198)
at
org.apache.catalina.core.ApplicationDispatcher.doInvoke(ApplicationDispatcher.java:853)
at
org.apache.catalina.core.ApplicationDispatcher.invoke(ApplicationDispatcher.java:703)
at
org.apache.catalina.core.ApplicationDispatcher.processRequest(ApplicationDispatcher.java:542)
at
org.apache.catalina.core.ApplicationDispatcher.doForward(ApplicationDispatcher.java:474)
at
org.apache.catalina.core.ApplicationDispatcher.forward(ApplicationDispatcher.java:366)
at
org.apache.struts.action.RequestProcessor.doForward(RequestProcessor.java:1085)
at
org.apache.struts.tiles.TilesRequestProcessor.doForward(TilesRequestProcessor.java:263)
at
org.apache.struts.action.RequestProcessor.processForwardConfig(RequestProcessor.java:398)
at
org.apache.struts.tiles.TilesRequestProcessor.processForwardConfig(TilesRequestProcessor.java:318)
at
org.apache.struts.action.RequestProcessor.process(RequestProcessor.java:241)
at
org.apache.struts.action.ActionServlet.process(ActionServlet.java:1196)
at org.apache.struts.action.ActionServlet.doGet(ActionServlet.java:414)
at javax.servlet.http.HttpServlet.service(HttpServlet.java:718)
at javax.servlet.http.HttpServlet.service(HttpServlet.java:831)
at
org.apache.catalina.core.ApplicationFilterChain.servletService(ApplicationFilterChain.java:411

Problem in using logic:iterate in struts

2008-09-23 Thread UITOT

Hello all,
I have developed 1 application using struts.I am getting this error in my
JSP.I have used logic:iterate.I have populated an arraylist in action class
which I am using in my JSP.I am able to see the data from the arraylist in
my JSP but I am getting error when I am clicking on the hyperlink in
JSP.This is the error.Please help me as I am pretty new to struts.Any help
will be highly appreciated.Thanx in advance.

ApplicationDispatcher[/TGMC_DB1-2009] PWC1231: Servlet.service() for servlet
jsp threw exception
javax.servlet.jsp.JspException: Cannot find bean: topic_list in any scope
at org.apache.struts.taglib.TagUtils.lookup(TagUtils.java:935)
at org.apache.struts.taglib.logic.IterateTag.doStartTag(IterateTag.java:232)
at org.apache.jsp.viewThreads_jsp._jspService(viewThreads_jsp.java from
:121)
at org.apache.jasper.runtime.HttpJspBase.service(HttpJspBase.java:93)
at javax.servlet.http.HttpServlet.service(HttpServlet.java:831)
at
org.apache.jasper.servlet.JspServletWrapper.service(JspServletWrapper.java:373)
at org.apache.jasper.servlet.JspServlet.serviceJspFile(JspServlet.java:470)
at org.apache.jasper.servlet.JspServlet.service(JspServlet.java:364)
at javax.servlet.http.HttpServlet.service(HttpServlet.java:831)
at
org.apache.catalina.core.ApplicationFilterChain.servletService(ApplicationFilterChain.java:411)
at
org.apache.catalina.core.ApplicationFilterChain.internalDoFilter(ApplicationFilterChain.java:317)
at
org.apache.catalina.core.ApplicationFilterChain.doFilter(ApplicationFilterChain.java:198)
at
org.netbeans.modules.web.monitor.server.MonitorFilter.doFilter(MonitorFilter.java:390)
at
org.apache.catalina.core.ApplicationFilterChain.internalDoFilter(ApplicationFilterChain.java:230)
at
org.apache.catalina.core.ApplicationFilterChain.doFilter(ApplicationFilterChain.java:198)
at
org.apache.catalina.core.ApplicationDispatcher.doInvoke(ApplicationDispatcher.java:853)
at
org.apache.catalina.core.ApplicationDispatcher.invoke(ApplicationDispatcher.java:703)
at
org.apache.catalina.core.ApplicationDispatcher.processRequest(ApplicationDispatcher.java:542)
at
org.apache.catalina.core.ApplicationDispatcher.doForward(ApplicationDispatcher.java:474)
at
org.apache.catalina.core.ApplicationDispatcher.forward(ApplicationDispatcher.java:366)
at
org.apache.struts.action.RequestProcessor.doForward(RequestProcessor.java:1085)
at
org.apache.struts.tiles.TilesRequestProcessor.doForward(TilesRequestProcessor.java:263)
at
org.apache.struts.action.RequestProcessor.processForwardConfig(RequestProcessor.java:398)
at
org.apache.struts.tiles.TilesRequestProcessor.processForwardConfig(TilesRequestProcessor.java:318)
at
org.apache.struts.action.RequestProcessor.process(RequestProcessor.java:241)
at org.apache.struts.action.ActionServlet.process(ActionServlet.java:1196)
at org.apache.struts.action.ActionServlet.doGet(ActionServlet.java:414)
at javax.servlet.http.HttpServlet.service(HttpServlet.java:718)
at javax.servlet.http.HttpServlet.service(HttpServlet.java:831)
at
org.apache.catalina.core.ApplicationFilterChain.servletService(ApplicationFilterChain.java:411)
at
org.apache.catalina.core.ApplicationFilterChain.internalDoFilter(ApplicationFilterChain.java:317)
at
org.apache.catalina.core.ApplicationFilterChain.doFilter(ApplicationFilterChain.java:198)
at
org.netbeans.modules.web.monitor.server.MonitorFilter.doFilter(MonitorFilter.java:390)
at
org.apache.catalina.core.ApplicationFilterChain.internalDoFilter(ApplicationFilterChain.java:230)
at
org.apache.catalina.core.ApplicationFilterChain.doFilter(ApplicationFilterChain.java:198)
at
org.apache.catalina.core.StandardWrapperValve.invoke(StandardWrapperValve.java:288)
at
org.apache.catalina.core.StandardContextValve.invokeInternal(StandardContextValve.java:271)
at
org.apache.catalina.core.StandardContextValve.invoke(StandardContextValve.java:202)
at
org.apache.catalina.core.StandardPipeline.doInvoke(StandardPipeline.java:632)
at
org.apache.catalina.core.StandardPipeline.doInvoke(StandardPipeline.java:577)
at com.sun.enterprise.web.WebPipeline.invoke(WebPipeline.java:94)
at
org.apache.catalina.core.StandardHostValve.invoke(StandardHostValve.java:206)
at
org.apache.catalina.core.StandardPipeline.doInvoke(StandardPipeline.java:632)
at
org.apache.catalina.core.StandardPipeline.doInvoke(StandardPipeline.java:577)
at
org.apache.catalina.core.StandardPipeline.invoke(StandardPipeline.java:571)
at org.apache.catalina.core.ContainerBase.invoke(ContainerBase.java:1080)
at
org.apache.catalina.core.StandardEngineValve.invoke(StandardEngineValve.java:150)
at
org.apache.catalina.core.StandardPipeline.doInvoke(StandardPipeline.java:632)
at
org.apache.catalina.core.StandardPipeline.doInvoke(StandardPipeline.java:577)
at
org.apache.catalina.core.StandardPipeline.invoke(StandardPipeline.java:571)
at org.apache.catalina.core.ContainerBase.invoke(ContainerBase.java:1080)
at org.apache.coyote.tomcat5.CoyoteAdapter.service(CoyoteAdapter.java:270)
at

Re: Problem in using logic:iterate in struts

2008-09-23 Thread Alexander Baetz

UITOT schrieb:

Hello all,
I have developed 1 application using struts.I am getting this error in my
JSP.I have used logic:iterate.I have populated an arraylist in action class
which I am using in my JSP.I am able to see the data from the arraylist in
my JSP but I am getting error when I am clicking on the hyperlink in
JSP.This is the error.Please help me as I am pretty new to struts.Any help
will be highly appreciated.Thanx in advance.
javax.servlet.jsp.JspException: Cannot find bean: topic_list in any scope
  
I don't know anything about Struts 1 but this looks to me as if you 
didn't create a bean with the name topic_list anywhere in the code.
// this is the statement which is generating error 
get_threads.do?topic_id=bean:write name= 



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



Re: Problem in using logic:iterate in struts

2008-09-23 Thread UITOT

Hello Alexander,
First of all thanx for replying.My code looks very much
unclear here.You can refer this link
http://forums.sun.com/thread.jspa?threadID=5333420.Again topic_list is my
arraylist.I have created it in action class  I have set it in request
scope.Same arraylist I am using in logic:iterate.Why to create a bean for
topic_list?? please solve my doubt...Thanks in advance.


Alexander Baetz wrote:
 
 UITOT schrieb:
 Hello all,
 I have developed 1 application using struts.I am getting this error in my
 JSP.I have used logic:iterate.I have populated an arraylist in action
 class
 which I am using in my JSP.I am able to see the data from the arraylist
 in
 my JSP but I am getting error when I am clicking on the hyperlink in
 JSP.This is the error.Please help me as I am pretty new to struts.Any
 help
 will be highly appreciated.Thanx in advance.
 javax.servlet.jsp.JspException: Cannot find bean: topic_list in any
 scope
   
 I don't know anything about Struts 1 but this looks to me as if you 
 didn't create a bean with the name topic_list anywhere in the code.
 // this is the statement which is generating error   
   
 get_threads.do?topic_id=bean:write name= 
 
 
 -
 To unsubscribe, e-mail: [EMAIL PROTECTED]
 For additional commands, e-mail: [EMAIL PROTECTED]
 
 
 

-- 
View this message in context: 
http://www.nabble.com/Problem-in-using-logic%3Aiterate-in-struts-tp19622971p19628906.html
Sent from the Struts - User mailing list archive at Nabble.com.


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



Re: Problem in using logic:iterate in struts

2008-09-23 Thread Laurie Harper
Unfortunately your struts-config.xml and JSP code didn't make it through 
to the list properly. Make sure you're sending your message as plain text.


A couple of questions:

*) How are you accessing the page? (i.e. what URL are you typing?)

*) Are you sure you are calling the action before the JSP is rendered? 
What happens if you put a println at the top of execute()


L.

UITOT wrote:

Hello all,
I have developed 1 application using struts.I am getting this error in my
JSP.I have used logic:iterate.I have populated an arraylist in action class
which I am using in my JSP.I am able to see the data from the arraylist in
my JSP but I am getting error when I am clicking on the hyperlink in
JSP.This is the error.Please help me as I am pretty new to struts.Any help
will be highly appreciated.Thanx in advance.

ApplicationDispatcher[/TGMC_DB1-2009] PWC1231: Servlet.service() for servlet
jsp threw exception
javax.servlet.jsp.JspException: Cannot find bean: topic_list in any scope
at org.apache.struts.taglib.TagUtils.lookup(TagUtils.java:935)
at org.apache.struts.taglib.logic.IterateTag.doStartTag(IterateTag.java:232)
at org.apache.jsp.viewThreads_jsp._jspService(viewThreads_jsp.java from
:121)
at org.apache.jasper.runtime.HttpJspBase.service(HttpJspBase.java:93)
at javax.servlet.http.HttpServlet.service(HttpServlet.java:831)
at
org.apache.jasper.servlet.JspServletWrapper.service(JspServletWrapper.java:373)
at org.apache.jasper.servlet.JspServlet.serviceJspFile(JspServlet.java:470)
at org.apache.jasper.servlet.JspServlet.service(JspServlet.java:364)
at javax.servlet.http.HttpServlet.service(HttpServlet.java:831)
at
org.apache.catalina.core.ApplicationFilterChain.servletService(ApplicationFilterChain.java:411)
at
org.apache.catalina.core.ApplicationFilterChain.internalDoFilter(ApplicationFilterChain.java:317)
at
org.apache.catalina.core.ApplicationFilterChain.doFilter(ApplicationFilterChain.java:198)
at
org.netbeans.modules.web.monitor.server.MonitorFilter.doFilter(MonitorFilter.java:390)
at
org.apache.catalina.core.ApplicationFilterChain.internalDoFilter(ApplicationFilterChain.java:230)
at
org.apache.catalina.core.ApplicationFilterChain.doFilter(ApplicationFilterChain.java:198)
at
org.apache.catalina.core.ApplicationDispatcher.doInvoke(ApplicationDispatcher.java:853)
at
org.apache.catalina.core.ApplicationDispatcher.invoke(ApplicationDispatcher.java:703)
at
org.apache.catalina.core.ApplicationDispatcher.processRequest(ApplicationDispatcher.java:542)
at
org.apache.catalina.core.ApplicationDispatcher.doForward(ApplicationDispatcher.java:474)
at
org.apache.catalina.core.ApplicationDispatcher.forward(ApplicationDispatcher.java:366)
at
org.apache.struts.action.RequestProcessor.doForward(RequestProcessor.java:1085)
at
org.apache.struts.tiles.TilesRequestProcessor.doForward(TilesRequestProcessor.java:263)
at
org.apache.struts.action.RequestProcessor.processForwardConfig(RequestProcessor.java:398)
at
org.apache.struts.tiles.TilesRequestProcessor.processForwardConfig(TilesRequestProcessor.java:318)
at
org.apache.struts.action.RequestProcessor.process(RequestProcessor.java:241)
at org.apache.struts.action.ActionServlet.process(ActionServlet.java:1196)
at org.apache.struts.action.ActionServlet.doGet(ActionServlet.java:414)
at javax.servlet.http.HttpServlet.service(HttpServlet.java:718)
at javax.servlet.http.HttpServlet.service(HttpServlet.java:831)
at
org.apache.catalina.core.ApplicationFilterChain.servletService(ApplicationFilterChain.java:411)
at
org.apache.catalina.core.ApplicationFilterChain.internalDoFilter(ApplicationFilterChain.java:317)
at
org.apache.catalina.core.ApplicationFilterChain.doFilter(ApplicationFilterChain.java:198)
at
org.netbeans.modules.web.monitor.server.MonitorFilter.doFilter(MonitorFilter.java:390)
at
org.apache.catalina.core.ApplicationFilterChain.internalDoFilter(ApplicationFilterChain.java:230)
at
org.apache.catalina.core.ApplicationFilterChain.doFilter(ApplicationFilterChain.java:198)
at
org.apache.catalina.core.StandardWrapperValve.invoke(StandardWrapperValve.java:288)
at
org.apache.catalina.core.StandardContextValve.invokeInternal(StandardContextValve.java:271)
at
org.apache.catalina.core.StandardContextValve.invoke(StandardContextValve.java:202)
at
org.apache.catalina.core.StandardPipeline.doInvoke(StandardPipeline.java:632)
at
org.apache.catalina.core.StandardPipeline.doInvoke(StandardPipeline.java:577)
at com.sun.enterprise.web.WebPipeline.invoke(WebPipeline.java:94)
at
org.apache.catalina.core.StandardHostValve.invoke(StandardHostValve.java:206)
at
org.apache.catalina.core.StandardPipeline.doInvoke(StandardPipeline.java:632)
at
org.apache.catalina.core.StandardPipeline.doInvoke(StandardPipeline.java:577)
at
org.apache.catalina.core.StandardPipeline.invoke(StandardPipeline.java:571)
at org.apache.catalina.core.ContainerBase.invoke(ContainerBase.java:1080)
at
org.apache.catalina.core.StandardEngineValve.invoke(StandardEngineValve.java:150)
at

Re: Problem in using logic:iterate in struts

2008-09-23 Thread UITOT

Hello Laurie,
Thanx a lot for replying.Let me tell you the exact
scenario.I am developing a discussion forum for my Project.There is one JSP
called View_topic.jsp.This will display the list of all topics in the
Discussion Forum.Before this JSP one action class say view_topics_Action
is getting called which is setting the arraylist for topics say topic_list
in request scope.This list is getting displayed using logic:iterate in
view_topic.jsp.No problem till here.Now when user clicks on a particular
topic I want that all the threads related to that topic should get
displayed.So I have made each topic as a Hyperlink.Now when user clicks on a
particular topic I want the topic_id to get passed to some action class say
view_threads_Action which will take care of retrieving the Threads details
for that topic  if it is successful it will call another JSP say
View_threads.jsp.


Now I don't have any problem in displaying topic list.I am getting error
only when I am clicking on the hyperlink.The error is in JSP
view_topic.jsp only so it not going to action class view_threads_Action.
I hope I am able to explain my problem.Please help.Thanx.
 

Laurie Harper wrote:
 
 Unfortunately your struts-config.xml and JSP code didn't make it through 
 to the list properly. Make sure you're sending your message as plain text.
 
 A couple of questions:
 
 *) How are you accessing the page? (i.e. what URL are you typing?)
 
 *) Are you sure you are calling the action before the JSP is rendered? 
 What happens if you put a println at the top of execute()
 
 L.
 
 UITOT wrote:
 Hello all,
 I have developed 1 application using struts.I am getting this error in my
 JSP.I have used logic:iterate.I have populated an arraylist in action
 class
 which I am using in my JSP.I am able to see the data from the arraylist
 in
 my JSP but I am getting error when I am clicking on the hyperlink in
 JSP.This is the error.Please help me as I am pretty new to struts.Any
 help
 will be highly appreciated.Thanx in advance.
 
 ApplicationDispatcher[/TGMC_DB1-2009] PWC1231: Servlet.service() for
 servlet
 jsp threw exception
 javax.servlet.jsp.JspException: Cannot find bean: topic_list in any
 scope
 at org.apache.struts.taglib.TagUtils.lookup(TagUtils.java:935)
 at
 org.apache.struts.taglib.logic.IterateTag.doStartTag(IterateTag.java:232)
 at org.apache.jsp.viewThreads_jsp._jspService(viewThreads_jsp.java from
 :121)
 at org.apache.jasper.runtime.HttpJspBase.service(HttpJspBase.java:93)
 at javax.servlet.http.HttpServlet.service(HttpServlet.java:831)
 at
 org.apache.jasper.servlet.JspServletWrapper.service(JspServletWrapper.java:373)
 at
 org.apache.jasper.servlet.JspServlet.serviceJspFile(JspServlet.java:470)
 at org.apache.jasper.servlet.JspServlet.service(JspServlet.java:364)
 at javax.servlet.http.HttpServlet.service(HttpServlet.java:831)
 at
 org.apache.catalina.core.ApplicationFilterChain.servletService(ApplicationFilterChain.java:411)
 at
 org.apache.catalina.core.ApplicationFilterChain.internalDoFilter(ApplicationFilterChain.java:317)
 at
 org.apache.catalina.core.ApplicationFilterChain.doFilter(ApplicationFilterChain.java:198)
 at
 org.netbeans.modules.web.monitor.server.MonitorFilter.doFilter(MonitorFilter.java:390)
 at
 org.apache.catalina.core.ApplicationFilterChain.internalDoFilter(ApplicationFilterChain.java:230)
 at
 org.apache.catalina.core.ApplicationFilterChain.doFilter(ApplicationFilterChain.java:198)
 at
 org.apache.catalina.core.ApplicationDispatcher.doInvoke(ApplicationDispatcher.java:853)
 at
 org.apache.catalina.core.ApplicationDispatcher.invoke(ApplicationDispatcher.java:703)
 at
 org.apache.catalina.core.ApplicationDispatcher.processRequest(ApplicationDispatcher.java:542)
 at
 org.apache.catalina.core.ApplicationDispatcher.doForward(ApplicationDispatcher.java:474)
 at
 org.apache.catalina.core.ApplicationDispatcher.forward(ApplicationDispatcher.java:366)
 at
 org.apache.struts.action.RequestProcessor.doForward(RequestProcessor.java:1085)
 at
 org.apache.struts.tiles.TilesRequestProcessor.doForward(TilesRequestProcessor.java:263)
 at
 org.apache.struts.action.RequestProcessor.processForwardConfig(RequestProcessor.java:398)
 at
 org.apache.struts.tiles.TilesRequestProcessor.processForwardConfig(TilesRequestProcessor.java:318)
 at
 org.apache.struts.action.RequestProcessor.process(RequestProcessor.java:241)
 at
 org.apache.struts.action.ActionServlet.process(ActionServlet.java:1196)
 at org.apache.struts.action.ActionServlet.doGet(ActionServlet.java:414)
 at javax.servlet.http.HttpServlet.service(HttpServlet.java:718)
 at javax.servlet.http.HttpServlet.service(HttpServlet.java:831)
 at
 org.apache.catalina.core.ApplicationFilterChain.servletService(ApplicationFilterChain.java:411)
 at
 org.apache.catalina.core.ApplicationFilterChain.internalDoFilter(ApplicationFilterChain.java:317)
 at
 org.apache.catalina.core.ApplicationFilterChain.doFilter(ApplicationFilterChain.java:198

logic:iterate problem: NullPointerException

2008-09-06 Thread cacodemon79

Hi to all.
I have a problem with a logic:iterate tag. I'm using Struts 1.3.
I have to populate a select with data read from db (by invoking the first
Action). When a select option is selected in the jsp, I have to invoke a
second Action (on the same jsp page) which has to perform some operations
and remember the previous selected option (in the select).
I show you my source code for semplicity.

Here is my ActionForm.
***
CreazioneProfiloUtenteForm.java
***
public class CreazioneProfiloUtenteForm extends ActionForm
{
private String sport;

public ActionErrors validate(ActionMapping mapping,HttpServletRequest
request)
{
return null;
}

public void reset(ActionMapping mapping, HttpServletRequest request)
{

}

public String getSport() {
return sport;
}

public void setSport(String sport) {
this.sport = sport;
}

}

First, the ToCreazioneProfiloUtenteAction action is invoked. This action
reads data from db and insert them in the ArrayList 'listaSport'; at the
end, this ArrayList is setted in the request.
***
ToCreazioneProfiloUtenteAction.java
***
public class ToCreazioneProfiloUtenteAction extends Action
{

public ActionForward execute(ActionMapping mapping, ActionForm
form,HttpServletRequest request, HttpServletResponse response)
{
...
...
ArrayList listaSport = null;
listaSport = new ArrayList();
listaSport.add(new
org.apache.struts.util.LabelValueBean(defaultOptionSelect,));
while(db.getResultSet().next())
listaSport.add(new
org.apache.struts.util.LabelValueBean(db.getResultSet().getString(nomeSport),db.getResultSet().getString(idSport)));
request.setAttribute(listaSport, listaSport);
...
...
}
}

Then creazioneProfiloUtente.jsp is invoked. I have a select 'sport' that
reads the collections in the ArrayList 'listaSport'. Then, I have to store
in hidden fields the values of the 'listaSport' arraylist in order to avoid,
in the second Action, to re-access to db to read the same values. In order
to do so, I use logic:iterate but I have problems with it. I confirm that if
I delete from source code the tag logic:iterate, all works well.
**
creazioneProfiloUtente.jsp
**
...
...
html:select property=sport styleId=sport
o_nchange=javascript:submitForm('creazioneProfiloUtenteForm','caricamentoRuoliAttributiSport.do')

html:optionsCollection name=listaSport /
/html:select

logic:iterate 
id=sport name=listaSport
html:hidden 
name=sport property=label indexed=true /
html:hidden 
name=sport property=value indexed=true /
/logic:iterate
...
...

This is the second Action, which should be invoked when a select option is
selected by user. Unfortunately, this Action is never accessed because I got
a java NullPointerException before.
*
CaricamentoRuoliAttributiSportAction.java
*
public class CaricamentoRuoliAttributiSportAction extends Action
{   
public ActionForward execute(ActionMapping mapping, ActionForm
form,HttpServletRequest request, HttpServletResponse response)
{
System.out.println(X);
}
}

*
EXCEPTION
*
GRAVE: Servlet.service() for servlet action threw exception
java.lang.NullPointerException
at
org.apache.commons.beanutils.PropertyUtilsBean.getIndexedProperty(PropertyUtilsBean.java:427)
at
org.apache.commons.beanutils.PropertyUtilsBean.getIndexedProperty(PropertyUtilsBean.java:340)
at
org.apache.commons.beanutils.PropertyUtilsBean.getNestedProperty(PropertyUtilsBean.java:684)
at
org.apache.commons.beanutils.PropertyUtilsBean.getProperty(PropertyUtilsBean.java:715)
at
org.apache.commons.beanutils.BeanUtilsBean.setProperty(BeanUtilsBean.java:884)
at
org.apache.commons.beanutils.BeanUtilsBean.populate(BeanUtilsBean.java:811)
at org.apache.commons.beanutils.BeanUtils.populate(BeanUtils.java:298)
at org.apache.struts.util.RequestUtils.populate(RequestUtils.java:467)
at
org.apache.struts.chain.commands.servlet.PopulateActionForm.populate(PopulateActionForm.java:50

logic:iterate - editable table

2008-01-16 Thread Oliver Thoms
Hi,

I have searched the archive but havn't found any
solution for the following problem:

I have an array of entries to display, so I use the
logic:iterate tag.

But due to customer request, the data should not be
just displayed (bean:write) and afterwards edited by
the usual EDIT Button and an subsequent EditAction.

But the data should be displayed in html:text fields
and be editable directly in the table.

Since the Iterator is just a temporary reference to
the elements of the array for rendering, I can't
access the underlying objects after submit.

I thought about the indexId in the iterator an using
it in a scriplet in the 'onchange' parameter of the
html:text.
But this feels and looks realy nasty.


Any suggestions how to solve this elegantly?


   __  Ihre erste Baustelle? Wissenswertes 
für Bastler und Hobby Handwerker. www.yahoo.de/clever

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



AW: logic:iterate - editable table

2008-01-16 Thread Otto, Frank
hi, 

you can use the attribute indexed=true in html:text tag.

or in complex cases:

logic:iterate name=myForm property=myList id=list indexId=loop
  html:text name=myForm property=%=myList[ + (loop.intValue()) + 
].myProperty%/
/logic:iterate


kind regards,

frank

-Ursprüngliche Nachricht-
Von: Oliver Thoms [mailto:[EMAIL PROTECTED]
Gesendet: Mittwoch, 16. Januar 2008 12:42
An: user@struts.apache.org
Betreff: logic:iterate - editable table


Hi,

I have searched the archive but havn't found any
solution for the following problem:

I have an array of entries to display, so I use the
logic:iterate tag.

But due to customer request, the data should not be
just displayed (bean:write) and afterwards edited by
the usual EDIT Button and an subsequent EditAction.

But the data should be displayed in html:text fields
and be editable directly in the table.

Since the Iterator is just a temporary reference to
the elements of the array for rendering, I can't
access the underlying objects after submit.

I thought about the indexId in the iterator an using
it in a scriplet in the 'onchange' parameter of the
html:text.
But this feels and looks realy nasty.


Any suggestions how to solve this elegantly?


   __  Ihre erste Baustelle? Wissenswertes 
für Bastler und Hobby Handwerker. www.yahoo.de/clever

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


RE: AW: logic:iterate - editable table

2008-01-16 Thread Oliver Thoms

Hi,

vielen Dak für den Hint, ich erlaube mir, direkt
anzuschreiben:

ich nutze noch Struts 1.1 (ein Erbe einer großen
Firma)
Ich scheine mich echt blöd anzustellen:

Nutze ich den JAVA Typ ArrayList für meine Collection
dann funktioniert der Iterator, aber nicht das
indexed=true.

Nutze ich ein Object Array [] dann funktioniert noch
nichtmal der Iterator (vermute der kann nicht aus nem
Object Array gebildet werden) denn ich bekomme eine
Fehlermeldung die darauf schließen lässt dass die ID
des Iterators als Form gesucht wird (Can't find form
bean 'blabla' in any scope.)

Oder hab ich da was übersehen?!

Muss ich nen Wrapper schreiben der das ObjectArray als
ArrayList zurückliefert damit das JSP die rendern
kann?

Gruß,
Oliver





--- Otto, Frank [EMAIL PROTECTED] schrieb:

 hi, 
 
 you can use the attribute indexed=true in
 html:text tag.
 
 or in complex cases:
 
 logic:iterate name=myForm property=myList
 id=list indexId=loop
   html:text name=myForm property=%=myList[ +
 (loop.intValue()) + ].myProperty%/
 /logic:iterate
 
 
 kind regards,
 
 frank
 
 -Ursprüngliche Nachricht-
 Von: Oliver Thoms [mailto:[EMAIL PROTECTED]
 Gesendet: Mittwoch, 16. Januar 2008 12:42
 An: user@struts.apache.org
 Betreff: logic:iterate - editable table
 
 
 Hi,
 
 I have searched the archive but havn't found any
 solution for the following problem:
 
 I have an array of entries to display, so I use the
 logic:iterate tag.
 
 But due to customer request, the data should not be
 just displayed (bean:write) and afterwards edited by
 the usual EDIT Button and an subsequent EditAction.
 
 But the data should be displayed in html:text fields
 and be editable directly in the table.
 
 Since the Iterator is just a temporary reference to
 the elements of the array for rendering, I can't
 access the underlying objects after submit.
 
 I thought about the indexId in the iterator an using
 it in a scriplet in the 'onchange' parameter of the
 html:text.
 But this feels and looks realy nasty.
 
 
 Any suggestions how to solve this elegantly?
 
 
__  Ihre
 erste Baustelle? Wissenswertes für Bastler und Hobby
 Handwerker. www.yahoo.de/clever
 

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



  Machen Sie Yahoo! zu Ihrer Startseite. Los geht's: 
http://de.yahoo.com/set

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



Re: logic:iterate - editable table

2008-01-16 Thread Randy Burgess
I would check out the LazyActionForm for this which was added to Struts
1.2.6 and upwards in classic Struts.

http://www.niallp.pwp.blueyonder.co.uk/lazyactionform.html

Regards,
Randy Burgess
Sr. Web Applications Developer
Nuvox Communications



 From: Oliver Thoms [EMAIL PROTECTED]
 Reply-To: Struts Users Mailing List user@struts.apache.org
 Date: Wed, 16 Jan 2008 12:41:41 +0100 (CET)
 To: user@struts.apache.org
 Subject: logic:iterate - editable table
 
 Hi,
 
 I have searched the archive but havn't found any
 solution for the following problem:
 
 I have an array of entries to display, so I use the
 logic:iterate tag.
 
 But due to customer request, the data should not be
 just displayed (bean:write) and afterwards edited by
 the usual EDIT Button and an subsequent EditAction.
 
 But the data should be displayed in html:text fields
 and be editable directly in the table.
 
 Since the Iterator is just a temporary reference to
 the elements of the array for rendering, I can't
 access the underlying objects after submit.
 
 I thought about the indexId in the iterator an using
 it in a scriplet in the 'onchange' parameter of the
 html:text.
 But this feels and looks realy nasty.
 
 
 Any suggestions how to solve this elegantly?
 
 
__  Ihre erste Baustelle? Wissenswertes
 für Bastler und Hobby Handwerker. www.yahoo.de/clever
 
 -
 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]



Download button logic:iterate

2007-11-29 Thread SandipGaikwad

please can anybody tell me how to use Download button functionality
(DownloadAction) in logic:iterate of struts 1.2.9

-- 
View this message in context: 
http://www.nabble.com/Download-button-logic%3Aiterate-tf4901761.html#a14041195
Sent from the Struts - User mailing list archive at Nabble.com.


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



Re: logic:iterate question

2007-11-26 Thread Ingo Villnow
The class Book must have the getter-function getTitle()

Minghui Yu schrieb:
 in Action:
 ...
 SetBook books=bdao.findAllBooks();
   request.setAttribute(books, books);
 ...


 In JSP:

 logic:present name=books
   All Books:br/br/
   logic:iterate id=book name=books
   bean:write name=book property=title /br/
   /logic:iterate
   /logic:present
   

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

logic:iterate question

2007-11-25 Thread Minghui Yu
in Action:
...
SetBook books=bdao.findAllBooks();
request.setAttribute(books, books);
...


In JSP:

logic:present name=books
  All Books:br/br/
  logic:iterate id=book name=books
  bean:write name=book property=title /br/
  /logic:iterate
  /logic:present
-- 

The line ( bean:write name=book property=title /br/throws an exception:

Root Cause:
javax.servlet.ServletException: javax.servlet.jsp.JspException: Cannot
find bean: book in any scope

(there is getTitle method for Book)

Any idea why I made mistake?

Thanks,

Thanks  Have a good day,

YU, Minghui

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



Re: logic:iterate question

2007-11-25 Thread Fitzwilliam . Aaron
u sure the collection 'books' is not empty?

On 11/26/07, Minghui Yu [EMAIL PROTECTED] wrote:

 in Action:
 ...
 SetBook books=bdao.findAllBooks();
request.setAttribute(books, books);
 ...


 In JSP:

 logic:present name=books
 All Books:br/br/
 logic:iterate id=book name=books
 bean:write name=book property=title /br/
 /logic:iterate
 /logic:present
 --

 The line ( bean:write name=book property=title /br/throws an
 exception:

 Root Cause:
 javax.servlet.ServletException: javax.servlet.jsp.JspException: Cannot
 find bean: book in any scope

 (there is getTitle method for Book)

 Any idea why I made mistake?

 Thanks,

 Thanks  Have a good day,

 YU, Minghui

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




-- 
Fitzwilliam Python [EMAIL PROTECTED]


Re: logic:iterate question

2007-11-25 Thread Minghui Yu
I tried code below, still the same error:

 logic:present name=books

  logic:notEmpty name=books
  logic:iterate id=book name=books indexId=cnt
   Next element is bean:write name=book property=title/
  /logic:iterate
  /logic:notEmpty

logic:empty name=books
Database search does not return any result
/logic:empty

  /logic:present

On Nov 25, 2007 7:33 PM, Fitzwilliam. Aaron [EMAIL PROTECTED] wrote:
 u sure the collection 'books' is not empty?


 On 11/26/07, Minghui Yu [EMAIL PROTECTED] wrote:
 
  in Action:
  ...
  SetBook books=bdao.findAllBooks();
 request.setAttribute(books, books);
  ...
 
 
  In JSP:
 
  logic:present name=books
  All Books:br/br/
  logic:iterate id=book name=books
  bean:write name=book property=title /br/
  /logic:iterate
  /logic:present
  --
 
  The line ( bean:write name=book property=title /br/throws an
  exception:
 
  Root Cause:
  javax.servlet.ServletException: javax.servlet.jsp.JspException: Cannot
  find bean: book in any scope
 
  (there is getTitle method for Book)
 
  Any idea why I made mistake?
 
  Thanks,
 
  Thanks  Have a good day,
 
  YU, Minghui
 
  -
  To unsubscribe, e-mail: [EMAIL PROTECTED]
  For additional commands, e-mail: [EMAIL PROTECTED]
 
 


 --
 Fitzwilliam Python [EMAIL PROTECTED]




-- 
Thanks  Have a good day,

YU, Minghui

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



Re: logic:iterate question

2007-11-25 Thread Minghui Yu
I made this change , still does not work

  bean:define id=abook value=book/bean:define
   Next element is bean:write name=abook property=title/

Error:

No getter method for property: title of bean: abook

I do have getTitle method for Book object


On Nov 25, 2007 7:33 PM, Fitzwilliam. Aaron [EMAIL PROTECTED] wrote:
 u sure the collection 'books' is not empty?


 On 11/26/07, Minghui Yu [EMAIL PROTECTED] wrote:
 
  in Action:
  ...
  SetBook books=bdao.findAllBooks();
 request.setAttribute(books, books);
  ...
 
 
  In JSP:
 
  logic:present name=books
  All Books:br/br/
  logic:iterate id=book name=books
  bean:write name=book property=title /br/
  /logic:iterate
  /logic:present
  --
 
  The line ( bean:write name=book property=title /br/throws an
  exception:
 
  Root Cause:
  javax.servlet.ServletException: javax.servlet.jsp.JspException: Cannot
  find bean: book in any scope
 
  (there is getTitle method for Book)
 
  Any idea why I made mistake?
 
  Thanks,
 
  Thanks  Have a good day,
 
  YU, Minghui
 
  -
  To unsubscribe, e-mail: [EMAIL PROTECTED]
  For additional commands, e-mail: [EMAIL PROTECTED]
 
 


 --
 Fitzwilliam Python [EMAIL PROTECTED]




-- 
Thanks  Have a good day,

YU, Minghui

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



Re: problem with logic:iterate...

2007-09-14 Thread Laurie Harper

msg2ajay wrote:

hi,
Yaa i have done mistake. I have placed my ActionForm Name insted of
Confingfile form name. But the problem still there i am not able to get the
form (setLableParam())value to my jsp. I have created an object in my jsp
and tried to print the object, but it is returning null.
 
and one more thing is when i tried to print in the ActionClass it is

printing perfectly like below.

System.out.println (ActionForm object+form.getLableParam ());

when  setAttribute(),getAttribute is working fine.
i am giving my code.

my ActionClass:
---

 form.setLableParam (lableGenVect);
 System.out.println (ActionForm object+form.getLableParam ());// when i
tried to print it is printing

My FormBean:
--
Vector lableParam = new Vector();
 public Vector getLableParam (){
return lableParam;
}
public void setLableParam (Vector lables){
this.lableParam = lables;
System.out.println (X32 FORM __+lables); // tried to print
in form bean, its printing the vector data
}

my Jsp:
-

   tr
logic:iterate name=X32 id=lableParam property=lableParam 
 tr 
 td 
 bean:write name=X32 property=lableParam/ 
 /td 
 /tr 
   /logic:iterate 
/tr




i have tired in so many way's but i did not find out the problem.!!! can
u find out and tel me where i am doing error
Ajay


Well, you're iterating over X32.lableParam, but then printing 
X32.lableParam, which is the Vector you're iterating. Presumably you 
want to print the individual values of the iteration. Perhaps


  logic:iterate name=X32 property=lableParam id=item
bean:write name=item property=someProperty/
  /logic:iterate

where someProperty is the name of a property on whatever type of bean is 
in the vector.


L.


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



Re: problem with logic:iterate...

2007-09-13 Thread Paul Benedict
X32Form is the name of your java class, not the bean. You get the name of
the bean from the name attribute of your action mapping.

Paul

On 9/12/07, msg2ajay [EMAIL PROTECTED] wrote:


 hi,
 i am trying to get the collection object (Vector)  form Action
 Class
 to my Jsp. I already set to my FormBean and i am getting an error as..

 javax.servlet.jsp.JspException: Cannot find bean: X32Form in any scope
 my Action class is (X32Action.java):
 
 Vector lableGenVect = (Vector) xParser.xmlLableGen (Comm_vect);
 form.setLableParam (lableGenVect);

 my FormBean Class is (X32Form.java):
 
 public Vector getLableParam(){
 return lableParam;
 }
 public void setLableParam(Vector lables){
 this.lableParam = lables;
 System.out.println(X32 FORM __+lables); // I am able to
 set ie. i can print the values of the action class.
 }

 my jsp:
 -
 logic:iterate name=X32Form id=lableParam
 tr
 td
 bean:write name=X32Form property=lableParam/
 /td
 /tr
 /logic:iterate

 thanQ,
 Ajay
 --
 View this message in context:
 http://www.nabble.com/problem-with-%3Clogic%3Aiterate...-tf4433312.html#a12647969
 Sent from the Struts - User mailing list archive at Nabble.com.


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




Re: problem with logic:iterate...

2007-09-13 Thread msg2ajay

hi,
Yaa i have done mistake. I have placed my ActionForm Name insted of
Confingfile form name. But the problem still there i am not able to get the
form (setLableParam())value to my jsp. I have created an object in my jsp
and tried to print the object, but it is returning null.
 
and one more thing is when i tried to print in the ActionClass it is
printing perfectly like below.

System.out.println (ActionForm object+form.getLableParam ());

when  setAttribute(),getAttribute is working fine.
i am giving my code.

my ActionClass:
---

 form.setLableParam (lableGenVect);
 System.out.println (ActionForm object+form.getLableParam ());// when i
tried to print it is printing

My FormBean:
--
Vector lableParam = new Vector();
 public Vector getLableParam (){
return lableParam;
}
public void setLableParam (Vector lables){
this.lableParam = lables;
System.out.println (X32 FORM __+lables); // tried to print
in form bean, its printing the vector data
}

my Jsp:
-

   tr
logic:iterate name=X32 id=lableParam property=lableParam 
 tr 
 td 
 bean:write name=X32 property=lableParam/ 
 /td 
 /tr 
   /logic:iterate 
/tr



i have tired in so many way's but i did not find out the problem.!!! can
u find out and tel me where i am doing error
Ajay



-- 
View this message in context: 
http://www.nabble.com/problem-with-%3Clogic%3Aiterate...-tf4433312.html#a12667667
Sent from the Struts - User mailing list archive at Nabble.com.


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



problem with logic:iterate...

2007-09-12 Thread msg2ajay

hi,
i am trying to get the collection object (Vector)  form Action Class
to my Jsp. I already set to my FormBean and i am getting an error as..

javax.servlet.jsp.JspException: Cannot find bean: X32Form in any scope
my Action class is (X32Action.java):

 Vector lableGenVect = (Vector) xParser.xmlLableGen (Comm_vect);
 form.setLableParam (lableGenVect);

my FormBean Class is (X32Form.java):

public Vector getLableParam(){
return lableParam;
}
public void setLableParam(Vector lables){
this.lableParam = lables;
System.out.println(X32 FORM __+lables); // I am able to
set ie. i can print the values of the action class.
}

my jsp:
-
 logic:iterate name=X32Form id=lableParam
tr
td
bean:write name=X32Form property=lableParam/
/td
/tr
 /logic:iterate

thanQ,
Ajay
-- 
View this message in context: 
http://www.nabble.com/problem-with-%3Clogic%3Aiterate...-tf4433312.html#a12647969
Sent from the Struts - User mailing list archive at Nabble.com.


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



logic:iterate - Question

2007-08-09 Thread Mad Shop
I have following scenario.
   
   I have getExSummary() method in exForm which returns a arraylist of A 
object.  How to use logic:iterate tag to print all the values which methods in 
A object.
  getACount(),getBCount() are methods in A object.
   
  I tried following tag, which is not working.  Please suggest me the 
correct logic:iterate tag.
   
  logic:notEmpty name =exForm property=exSummary
  logic:iterate name =exForm property=exSummary id=e indexId=edx
  tr
  td
  bean:write name=exSummary property=aCount /
  /td
  td
  bean:write name=expSummary property=bCount /
  /td
  /tr
  /logic:iterate
  /logic:notEmpty
  /table
   
  Error which I am getting
   
  Aug 9, 2007 3:52:43 PM IST Error HTTP BEA-101020 
[weblogic.servlet.inte
[EMAIL PROTECTED] - appName: 'AAA', name: 'aaa', context-path: '/
eem'] Servlet failed with Exception
java.lang.NullPointerException
at weblogic.logging.commons.LogImpl.doLog(LogImpl.java:95)
at weblogic.logging.commons.LogImpl.debug(LogImpl.java:59)
at weblogic.logging.commons.LogImpl.debug(LogImpl.java:55)
at org.apache.struts.taglib.TagUtils.message(TagUtils.java:1036)
at org.apache.struts.taglib.TagUtils.message(TagUtils.java:999)
Truncated. see log file for complete stacktrace


   
-
Got a little couch potato? 
Check out fun summer activities for kids.

Re: logic:iterate - Question

2007-08-09 Thread Leon Rosenberg
you seems to have problems with logging configuration.
apparently your weblogic server isn't properly configured which log to
use with commons-logging adaptor.

On 8/9/07, Mad Shop [EMAIL PROTECTED] wrote:
 I have following scenario.

I have getExSummary() method in exForm which returns a arraylist of A 
 object.  How to use logic:iterate tag to print all the values which methods 
 in A object.
   getACount(),getBCount() are methods in A object.

   I tried following tag, which is not working.  Please suggest me the 
 correct logic:iterate tag.

   logic:notEmpty name =exForm property=exSummary
   logic:iterate name =exForm property=exSummary id=e indexId=edx
   tr
   td
   bean:write name=exSummary property=aCount /
   /td
   td
   bean:write name=expSummary property=bCount /
   /td
   /tr
   /logic:iterate
   /logic:notEmpty
   /table

   Error which I am getting

   Aug 9, 2007 3:52:43 PM IST Error HTTP BEA-101020 
 [weblogic.servlet.inte
 [EMAIL PROTECTED] - appName: 'AAA', name: 'aaa', context-path: '/
 eem'] Servlet failed with Exception
 java.lang.NullPointerException
 at weblogic.logging.commons.LogImpl.doLog(LogImpl.java:95)
 at weblogic.logging.commons.LogImpl.debug(LogImpl.java:59)
 at weblogic.logging.commons.LogImpl.debug(LogImpl.java:55)
 at org.apache.struts.taglib.TagUtils.message(TagUtils.java:1036)
 at org.apache.struts.taglib.TagUtils.message(TagUtils.java:999)
 Truncated. see log file for complete stacktrace
 


 -
 Got a little couch potato?
 Check out fun summer activities for kids.

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



Re: logic:iterate - Question

2007-08-09 Thread Mad Shop
Thanks Leon,
   
  We are using log4j for logging. Existing project is working fine and I added 
the following block for new requirement.  when I remove bean:write  tags then 
it won't give any error!!!


Leon Rosenberg [EMAIL PROTECTED] wrote:
  you seems to have problems with logging configuration.
apparently your weblogic server isn't properly configured which log to
use with commons-logging adaptor.

On 8/9/07, Mad Shop wrote:
 I have following scenario.

 I have getExSummary() method in exForm which returns a arraylist of A object. 
 How to use logic:iterate tag to print all the values which methods in A 
 object.
 getACount(),getBCount() are methods in A object.

 I tried following tag, which is not working. Please suggest me the correct 
 logic:iterate tag.

 
 
 
 
 
 
 
 
 
 
 
 
 

 Error which I am getting

 [weblogic.servlet.inte
 [EMAIL PROTECTED] - appName: 'AAA', name: 'aaa', context-path: '/
 eem'] Servlet failed with Exception
 java.lang.NullPointerException
 at weblogic.logging.commons.LogImpl.doLog(LogImpl.java:95)
 at weblogic.logging.commons.LogImpl.debug(LogImpl.java:59)
 at weblogic.logging.commons.LogImpl.debug(LogImpl.java:55)
 at org.apache.struts.taglib.TagUtils.message(TagUtils.java:1036)
 at org.apache.struts.taglib.TagUtils.message(TagUtils.java:999)
 Truncated. see log file for complete stacktrace
 


 -
 Got a little couch potato?
 Check out fun summer activities for kids.

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



   
-
Yahoo! oneSearch: Finally,  mobile search that gives answers, not web links. 

Concerning index on validating under logic:iterate

2007-08-06 Thread Hiroyuki Suzuki

Guys,i have this error saying that indexed is invalid for my multibox
attribute
this is my JSP

logic:iterate name=metaEntryConfirmForm indexId=index  id=item1
property=items1  
  tr
tdhtml:multibox indexed=true property=bitratebean:write  
name=item1//html:multibox/td
tdhtml:text property=filename indexed=true size=50
disabled=true//td
tdhtml:multibox property=haishin indexed=true
disabled=truebean:write name=metaEntryConfirmForm
property=haishinValue[0]//html:multibox/td
tdhtml:multibox property=haishin indexed=true
disabled=truebean:write name=metaEntryConfirmForm
property=haishinValue[1]//html:multibox/td
tdhtml:multibox property=haishin indexed=true
disabled=truebean:write name=metaEntryConfirmForm
property=haishinValue[2]//html:multibox/td  
  /tr
/logic:iterate

what seems to be the problem?

-- 
View this message in context: 
http://www.nabble.com/Concerning-index-on-validating-under-logic%3Aiterate-tf4223157.html#a12013480
Sent from the Struts - User mailing list archive at Nabble.com.


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



html:text inside logic:iterate

2007-08-01 Thread Hiroyuki Suzuki

hello guys..Im Hiroyuki and im new here..
Hope you could help me with some of my inquiries.

I have this JSP
logic:iterate name=metaEntryConfirmForm indexId=index  id=item1
property=items1  
tr 
  tdhtml:multibox property=bitrateboxbean:write
name=item1//html:multiboxbean:write name=item1//td
   tdhtml:text name=item1 property=bitrateTxt indexed=true
size=25//td
   tdhtml:multibox property=haishinselect
value=%=goohigashi+index%//td
   tdhtml:multibox property=haishinselect
value=%=goonishi+index%//td
   tdhtml:multibox property=haishinselect
value=%=gooBB+index%//td  
/tr
/logic:iterate

my action form contains:
private String[] bitratebox = {};
private String[] items1 = {500k,1M,2M,5M,6M};
public String[] getBitratebox() {
return this.bitratebox;
}
public void setBitratebox(String[] bitratebox) {
this.bitratebox = bitratebox;
}   
public String[] getItems1(){
return this.items1;
}

When i try to run it,  it produces the ff error
javax.servlet.ServletException: Bean items1 のプロパティ bitrateTxt
に対するゲッターメソッドがありません
which means no getter method for Bean item1 property bitrate.

What is wrong with my code?
please help me

-- 
View this message in context: 
http://www.nabble.com/html%3Atext-inside-logic%3Aiterate-tf4199265.html#a11943047
Sent from the Struts - User mailing list archive at Nabble.com.


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



Re: html:text inside logic:iterate

2007-08-01 Thread Nuwan Chandrasoma

Hi,

You dont have a getter method for bitrateTxt property in the bean your 
trying to access (item1).


Thanks,

Nuwan

Hiroyuki Suzuki wrote:

hello guys..Im Hiroyuki and im new here..
Hope you could help me with some of my inquiries.

I have this JSP
logic:iterate name=metaEntryConfirmForm indexId=index  id=item1
property=items1  
tr 
  tdhtml:multibox property=bitrateboxbean:write

name=item1//html:multiboxbean:write name=item1//td
   tdhtml:text name=item1 property=bitrateTxt indexed=true
size=25//td
   tdhtml:multibox property=haishinselect
value=%=goohigashi+index%//td
   tdhtml:multibox property=haishinselect
value=%=goonishi+index%//td
   tdhtml:multibox property=haishinselect
value=%=gooBB+index%//td  
/tr

/logic:iterate

my action form contains:
private String[] bitratebox = {};
private String[] items1 = {500k,1M,2M,5M,6M};
public String[] getBitratebox() {
return this.bitratebox;
}
public void setBitratebox(String[] bitratebox) {
this.bitratebox = bitratebox;
}   
public String[] getItems1(){
return this.items1;
}

When i try to run it,  it produces the ff error
javax.servlet.ServletException: Bean items1 のプロパティ bitrateTxt
に対するゲッターメソッドがありません
which means no getter method for Bean item1 property bitrate.

What is wrong with my code?
please help me

  



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



Re: html:text inside logic:iterate

2007-08-01 Thread Hiroyuki Suzuki

hi but I also declares bitrateText in my actionform..
Thank you for your reply..

nuwan chandrasoma-2 wrote:
 
 Hi,
 
 You dont have a getter method for bitrateTxt property in the bean your 
 trying to access (item1).
 
 Thanks,
 
 Nuwan
 
 Hiroyuki Suzuki wrote:
 hello guys..Im Hiroyuki and im new here..
 Hope you could help me with some of my inquiries.

 I have this JSP
 logic:iterate name=metaEntryConfirmForm indexId=index  id=item1
 property=items1  
 tr 
   tdhtml:multibox property=bitrateboxbean:write
 name=item1//html:multiboxbean:write name=item1//td
tdhtml:text name=item1 property=bitrateTxt indexed=true
 size=25//td
tdhtml:multibox property=haishinselect
 value=%=goohigashi+index%//td
tdhtml:multibox property=haishinselect
 value=%=goonishi+index%//td
tdhtml:multibox property=haishinselect
 value=%=gooBB+index%//td  
 /tr
 /logic:iterate

 my action form contains:
  private String[] bitratebox = {};
  private String[] items1 = {500k,1M,2M,5M,6M};
  public String[] getBitratebox() {
  return this.bitratebox;
  }
  public void setBitratebox(String[] bitratebox) {
  this.bitratebox = bitratebox;
  }   
  public String[] getItems1(){
  return this.items1;
  }

 When i try to run it,  it produces the ff error
 javax.servlet.ServletException: Bean items1 のプロパティ bitrateTxt
 に対するゲッターメソッドがありません
 which means no getter method for Bean item1 property bitrate.

 What is wrong with my code?
 please help me

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

-- 
View this message in context: 
http://www.nabble.com/html%3Atext-inside-logic%3Aiterate-tf4199265.html#a11946326
Sent from the Struts - User mailing list archive at Nabble.com.


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



Re: html:text inside logic:iterate

2007-08-01 Thread Hiroyuki Suzuki

here is the declaration of bitrateTxt in my actionform

private String bitrateTxt;
public String getBitrateTxt() {
return this.bitrateTxt;
}
public void setBitrateTxt(String bitrateTxt) {
this.bitrateTxt = bitrateTxt;
}
private String[] bitratebox = {};
private String[] items1 = {500k,1M,2M,5M,6M};
public String[] getBitratebox() {
return this.bitratebox;
}
public void setBitratebox(String[] bitratebox) {
this.bitratebox = bitratebox;
}   
public String[] getItems1(){
return this.items1;
}


Hiroyuki Suzuki wrote:
 
 hi but I also declares bitrateText in my actionform..
 Thank you for your reply..
 
 nuwan chandrasoma-2 wrote:
 
 Hi,
 
 You dont have a getter method for bitrateTxt property in the bean your 
 trying to access (item1).
 
 Thanks,
 
 Nuwan
 
 Hiroyuki Suzuki wrote:
 hello guys..Im Hiroyuki and im new here..
 Hope you could help me with some of my inquiries.

 I have this JSP
 logic:iterate name=metaEntryConfirmForm indexId=index  id=item1
 property=items1  
 tr 
   tdhtml:multibox property=bitrateboxbean:write
 name=item1//html:multiboxbean:write name=item1//td
tdhtml:text name=item1 property=bitrateTxt indexed=true
 size=25//td
tdhtml:multibox property=haishinselect
 value=%=goohigashi+index%//td
tdhtml:multibox property=haishinselect
 value=%=goonishi+index%//td
tdhtml:multibox property=haishinselect
 value=%=gooBB+index%//td  
 /tr
 /logic:iterate

 my action form contains:
 private String[] bitratebox = {};
 private String[] items1 = {500k,1M,2M,5M,6M};
 public String[] getBitratebox() {
 return this.bitratebox;
 }
 public void setBitratebox(String[] bitratebox) {
 this.bitratebox = bitratebox;
 }   
 public String[] getItems1(){
 return this.items1;
 }

 When i try to run it,  it produces the ff error
 javax.servlet.ServletException: Bean items1 のプロパティ bitrateTxt
 に対するゲッターメソッドがありません
 which means no getter method for Bean item1 property bitrate.

 What is wrong with my code?
 please help me

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

-- 
View this message in context: 
http://www.nabble.com/html%3Atext-inside-logic%3Aiterate-tf4199265.html#a11956936
Sent from the Struts - User mailing list archive at Nabble.com.


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



Re: html:text inside logic:iterate

2007-08-01 Thread Hiroyuki Suzuki

hello..it works properly now.

Ive changed html:text syntax to
tdhtml:text property=%=bitrateTxt[+index+]% size=25//td

and declared bitrateTxt in my actionform as
private String[] bitrateTxt = {};
public String[] getBitrateTxt() {
return this.bitrateTxt;
}
public void setBitrateTxt(String[] bitrateTxt) {
this.bitrateTxt = bitrateTxt;
}

Hiroyuki Suzuki wrote:
 
 here is the declaration of bitrateTxt in my actionform
 
   private String bitrateTxt;
   public String getBitrateTxt() {
   return this.bitrateTxt;
   }
   public void setBitrateTxt(String bitrateTxt) {
   this.bitrateTxt = bitrateTxt;
   }
   private String[] bitratebox = {};
   private String[] items1 = {500k,1M,2M,5M,6M};
   public String[] getBitratebox() {
   return this.bitratebox;
   }
   public void setBitratebox(String[] bitratebox) {
   this.bitratebox = bitratebox;
   }   
   public String[] getItems1(){
   return this.items1;
   }
 
 
 Hiroyuki Suzuki wrote:
 
 hi but I also declares bitrateText in my actionform..
 Thank you for your reply..
 
 nuwan chandrasoma-2 wrote:
 
 Hi,
 
 You dont have a getter method for bitrateTxt property in the bean your 
 trying to access (item1).
 
 Thanks,
 
 Nuwan
 
 Hiroyuki Suzuki wrote:
 hello guys..Im Hiroyuki and im new here..
 Hope you could help me with some of my inquiries.

 I have this JSP
 logic:iterate name=metaEntryConfirmForm indexId=index  id=item1
 property=items1  
 tr 
   tdhtml:multibox property=bitrateboxbean:write
 name=item1//html:multiboxbean:write name=item1//td
tdhtml:text name=item1 property=bitrateTxt indexed=true
 size=25//td
tdhtml:multibox property=haishinselect
 value=%=goohigashi+index%//td
tdhtml:multibox property=haishinselect
 value=%=goonishi+index%//td
tdhtml:multibox property=haishinselect
 value=%=gooBB+index%//td  
 /tr
 /logic:iterate

 my action form contains:
private String[] bitratebox = {};
private String[] items1 = {500k,1M,2M,5M,6M};
public String[] getBitratebox() {
return this.bitratebox;
}
public void setBitratebox(String[] bitratebox) {
this.bitratebox = bitratebox;
}   
public String[] getItems1(){
return this.items1;
}

 When i try to run it,  it produces the ff error
 javax.servlet.ServletException: Bean items1 のプロパティ bitrateTxt
 に対するゲッターメソッドがありません
 which means no getter method for Bean item1 property bitrate.

 What is wrong with my code?
 please help me

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

-- 
View this message in context: 
http://www.nabble.com/html%3Atext-inside-logic%3Aiterate-tf4199265.html#a11957193
Sent from the Struts - User mailing list archive at Nabble.com.


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



logic:iterate - problem

2007-07-10 Thread andihartmann
Hello!

I've got a problem to get a value within a logic:iterate construction 
(foo is an ArrayList Object):

logic:iterate name=foo id=object
   html:textarea ... rows='bean:write name=object property=rows/' /
/logic:iterate

This does not work.

How must it been written to address the method getRows() in the object,
which has been defined by id in logic:iterate?


Kind regards,
Andreas Hartmann



Jetzt Handykosten senken mit klarmobil - 14 Ct./Min.! Hier klicken
http://produkte.shopping.freenet.de/handy_voip_isdn/klarmobil/index.html?pid=730025


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



Re: logic:iterate - problem

2007-07-10 Thread Yoge

Try following tag...
html:textarea ... rows='%=
((YourObject)pageContext.getAttribute(object)).getRows()%' /

On 7/10/07, [EMAIL PROTECTED] [EMAIL PROTECTED] wrote:


Hello!

I've got a problem to get a value within a logic:iterate construction
(foo is an ArrayList Object):

logic:iterate name=foo id=object
   html:textarea ... rows='bean:write name=object property=rows/'
/
/logic:iterate

This does not work.

How must it been written to address the method getRows() in the object,
which has been defined by id in logic:iterate?


Kind regards,
Andreas Hartmann



Jetzt Handykosten senken mit klarmobil - 14 Ct./Min.! Hier klicken

http://produkte.shopping.freenet.de/handy_voip_isdn/klarmobil/index.html?pid=730025


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




--
Yoge,
AdventNet, Inc.
925-965-6528
[EMAIL PROTECTED]
site24x7.com


Re: logic:iterate - problem

2007-07-10 Thread Chad S. Lauritsen

Another way to do it (with a little bit less java) is:

logic:iterate name=foo id=object
  bean:define id=rows name=object property=rows /
  html:textarea ... rows='%=rows%' /
/logic:iterate



[EMAIL PROTECTED] wrote:

Hello!

I've got a problem to get a value within a logic:iterate construction 
(foo is an ArrayList Object):


logic:iterate name=foo id=object
   html:textarea ... rows='bean:write name=object property=rows/' /
/logic:iterate

This does not work.

How must it been written to address the method getRows() in the object,
which has been defined by id in logic:iterate?


Kind regards,
Andreas Hartmann



Jetzt Handykosten senken mit klarmobil - 14 Ct./Min.! Hier klicken
http://produkte.shopping.freenet.de/handy_voip_isdn/klarmobil/index.html?pid=730025


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

  


--
Chad S. Lauritsen
Ecommerce Enterprise Developer
The Sherwin-Williams Company
216-566-2166


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



Re: logic:iterate - problem

2007-07-10 Thread Andreas Hartmann
Hello Chad, hello Yoge,

thanks for your hints!
meanwhile, I could find a third solution:


logic:iterate name=foo id=object type=my.url.classname
html:textarea ... rows=%= object.getRows() % /
/logic:iterate

Another solution should be to use EL:

html:textarea ... rows=${object.rows}/

But this solution doesn't work for me (the string ${object.rows} appears
unchanged after rows=) , though I'm using tomcat 5.5 and struts 1.2.9..


May be, it should be written as:

%@ taglib uri=/WEB-INF/struts-html-el.tld prefix=html-el %
%@ taglib uri=/WEB-INF/struts-logic-el.tld prefix=logic-el %

logic-el:iterate name=foo id=object type=my.url.classname
html-el:textarea ... rows=${object.rows} /
/logic-el:iterate

(from: http://entwickler-forum.de/showthread.php?t=33417 )


Kind regards,
Andreas Hartmann


Chad S. Lauritsen wrote:
 Another way to do it (with a little bit less java) is:
 
 logic:iterate name=foo id=object
bean:define id=rows name=object property=rows /
html:textarea ... rows='%=rows%' /
 /logic:iterate
 
 
 
 [EMAIL PROTECTED] wrote:
 Hello!

 I've got a problem to get a value within a logic:iterate construction 
 (foo is an ArrayList Object):

 logic:iterate name=foo id=object
html:textarea ... rows='bean:write name=object property=rows/' /
 /logic:iterate

 This does not work.

 How must it been written to address the method getRows() in the object,
 which has been defined by id in logic:iterate?


 Kind regards,
 Andreas Hartmann

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



Re: Fw: logic:iterate how to test the 1st and last iteration ?

2007-05-02 Thread piloupy GOTTAPIL

Sorry guys, I don't know why the mailer tells me that my mail is spam...

I've answered 3 times to give the solution using the JSTL Core, but
the mailer blocked them. I think it's because of the code that I put.

---
This is an automatically generated Delivery Status Notification

Delivery to the following recipient failed permanently:

   user@struts.apache.org

Technical details of permanent failure:
PERM_FAILURE: SMTP Error (state 12): 552 spam score (5.5) exceeded threshold

(etc...)
---

piloupy

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



logic:iterate how to test the 1st and last iteration ?

2007-04-27 Thread piloupy GOTTAPIL

Hi,

What I want to do is quite simple. I'd like to know how to test in a
logic:iterate when I'm at the first or last iteration.

My present problem is to parse a collection of String and display the
results like this :

### CODE : begin ###
value1, value2, value3
### CODE : end ###

And as you can see, for the last iteration, I mustn't displey the
comma character.

My present code is :

### CODE : begin ###
logic:iterate id=e name=myCollection
 bean:write name=e property=name /,
/logic:iterate
### CODE : end ###

Thanks in advance :)

piloupy

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



Re: logic:iterate how to test the 1st and last iteration ?

2007-04-27 Thread Olivier THIERRY

You have an indexId attribute on the logic:iterate tag.
This indexId attribute sets the name of a JSP scope variable that will
contain the index in the loop.
Then you can test the value of this variable with the logic:equal.

Olivier

2007/4/27, piloupy GOTTAPIL [EMAIL PROTECTED]:


Hi,

What I want to do is quite simple. I'd like to know how to test in a
logic:iterate when I'm at the first or last iteration.

My present problem is to parse a collection of String and display the
results like this :

### CODE : begin ###
value1, value2, value3
### CODE : end ###

And as you can see, for the last iteration, I mustn't displey the
comma character.

My present code is :

### CODE : begin ###
logic:iterate id=e name=myCollection
  bean:write name=e property=name /,
/logic:iterate
### CODE : end ###

Thanks in advance :)

piloupy

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




Re: logic:iterate how to test the 1st and last iteration ?

2007-04-27 Thread piloupy GOTTAPIL

Thanks for the answer, but how I can get the collection's length ?

I try to avoid any use of scriptlet if possible.

piloupy

On 4/27/07, Olivier THIERRY [EMAIL PROTECTED] wrote:

You have an indexId attribute on the logic:iterate tag.
This indexId attribute sets the name of a JSP scope variable that will
contain the index in the loop.
Then you can test the value of this variable with the logic:equal.

Olivier

2007/4/27, piloupy GOTTAPIL [EMAIL PROTECTED]:

 Hi,

 What I want to do is quite simple. I'd like to know how to test in a
 logic:iterate when I'm at the first or last iteration.

 My present problem is to parse a collection of String and display the
 results like this :

 ### CODE : begin ###
 value1, value2, value3
 ### CODE : end ###

 And as you can see, for the last iteration, I mustn't displey the
 comma character.

 My present code is :

 ### CODE : begin ###
 logic:iterate id=e name=myCollection
   bean:write name=e property=name /,
 /logic:iterate
 ### CODE : end ###

 Thanks in advance :)

 piloupy

 -
 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: logic:iterate how to test the 1st and last iteration ?

2007-04-27 Thread Olivier THIERRY

Use bean:size tag to have the collection's length ;)

2007/4/27, piloupy GOTTAPIL [EMAIL PROTECTED]:


Thanks for the answer, but how I can get the collection's length ?

I try to avoid any use of scriptlet if possible.

piloupy

On 4/27/07, Olivier THIERRY [EMAIL PROTECTED] wrote:
 You have an indexId attribute on the logic:iterate tag.
 This indexId attribute sets the name of a JSP scope variable that will
 contain the index in the loop.
 Then you can test the value of this variable with the logic:equal.

 Olivier

 2007/4/27, piloupy GOTTAPIL [EMAIL PROTECTED]:
 
  Hi,
 
  What I want to do is quite simple. I'd like to know how to test in a
  logic:iterate when I'm at the first or last iteration.
 
  My present problem is to parse a collection of String and display the
  results like this :
 
  ### CODE : begin ###
  value1, value2, value3
  ### CODE : end ###
 
  And as you can see, for the last iteration, I mustn't displey the
  comma character.
 
  My present code is :
 
  ### CODE : begin ###
  logic:iterate id=e name=myCollection
bean:write name=e property=name /,
  /logic:iterate
  ### CODE : end ###
 
  Thanks in advance :)
 
  piloupy
 
  -
  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: logic:iterate how to test the 1st and last iteration ?

2007-04-27 Thread Martin Gainty

Morning All

c:forEach will support values in a comma delimited String but has problems 
with nulls


If you want to be more specific on what is used for delims then
load all of your values in to StringTokenizer object then do c:forEach
http://javaboutique.internet.com/tutorials/Struts_EL/index-3.html

HTH
M--
This email message and any files transmitted with it contain confidential
information intended only for the person(s) to whom this email message is
addressed.  If you have received this email message in error, please notify
the sender immediately by telephone or email and destroy the original
message without making a copy.  Thank you.

- Original Message - 
From: Olivier THIERRY [EMAIL PROTECTED]

To: Struts Users Mailing List user@struts.apache.org
Sent: Friday, April 27, 2007 9:25 AM
Subject: Re: logic:iterate how to test the 1st and last iteration ?



Use bean:size tag to have the collection's length ;)

2007/4/27, piloupy GOTTAPIL [EMAIL PROTECTED]:


Thanks for the answer, but how I can get the collection's length ?

I try to avoid any use of scriptlet if possible.

piloupy

On 4/27/07, Olivier THIERRY [EMAIL PROTECTED] wrote:
 You have an indexId attribute on the logic:iterate tag.
 This indexId attribute sets the name of a JSP scope variable that will
 contain the index in the loop.
 Then you can test the value of this variable with the logic:equal.

 Olivier

 2007/4/27, piloupy GOTTAPIL [EMAIL PROTECTED]:
 
  Hi,
 
  What I want to do is quite simple. I'd like to know how to test in a
  logic:iterate when I'm at the first or last iteration.
 
  My present problem is to parse a collection of String and display the
  results like this :
 
  ### CODE : begin ###
  value1, value2, value3
  ### CODE : end ###
 
  And as you can see, for the last iteration, I mustn't displey the
  comma character.
 
  My present code is :
 
  ### CODE : begin ###
  logic:iterate id=e name=myCollection
bean:write name=e property=name /,
  /logic:iterate
  ### CODE : end ###
 
  Thanks in advance :)
 
  piloupy
 
  -
  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: logic:iterate how to test the 1st and last iteration ?

2007-04-27 Thread Martin Gainty

last entry is c:forTokens

M--
This email message and any files transmitted with it contain confidential
information intended only for the person(s) to whom this email message is
addressed.  If you have received this email message in error, please notify
the sender immediately by telephone or email and destroy the original
message without making a copy.  Thank you.

- Original Message - 
From: Martin Gainty [EMAIL PROTECTED]

To: Struts Users Mailing List user@struts.apache.org
Sent: Friday, April 27, 2007 9:43 AM
Subject: Re: logic:iterate how to test the 1st and last iteration ?



Morning All

c:forEach will support values in a comma delimited String but has 
problems with nulls


If you want to be more specific on what is used for delims then
load all of your values in to StringTokenizer object then do c:forEach
http://javaboutique.internet.com/tutorials/Struts_EL/index-3.html

HTH
M--
This email message and any files transmitted with it contain confidential
information intended only for the person(s) to whom this email message is
addressed.  If you have received this email message in error, please 
notify

the sender immediately by telephone or email and destroy the original
message without making a copy.  Thank you.

- Original Message - 
From: Olivier THIERRY [EMAIL PROTECTED]

To: Struts Users Mailing List user@struts.apache.org
Sent: Friday, April 27, 2007 9:25 AM
Subject: Re: logic:iterate how to test the 1st and last iteration ?



Use bean:size tag to have the collection's length ;)

2007/4/27, piloupy GOTTAPIL [EMAIL PROTECTED]:


Thanks for the answer, but how I can get the collection's length ?

I try to avoid any use of scriptlet if possible.

piloupy

On 4/27/07, Olivier THIERRY [EMAIL PROTECTED] wrote:
 You have an indexId attribute on the logic:iterate tag.
 This indexId attribute sets the name of a JSP scope variable that will
 contain the index in the loop.
 Then you can test the value of this variable with the logic:equal.

 Olivier

 2007/4/27, piloupy GOTTAPIL [EMAIL PROTECTED]:
 
  Hi,
 
  What I want to do is quite simple. I'd like to know how to test in a
  logic:iterate when I'm at the first or last iteration.
 
  My present problem is to parse a collection of String and display 
  the

  results like this :
 
  ### CODE : begin ###
  value1, value2, value3
  ### CODE : end ###
 
  And as you can see, for the last iteration, I mustn't displey the
  comma character.
 
  My present code is :
 
  ### CODE : begin ###
  logic:iterate id=e name=myCollection
bean:write name=e property=name /,
  /logic:iterate
  ### CODE : end ###
 
  Thanks in advance :)
 
  piloupy
 
  -
  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: logic:iterate how to test the 1st and last iteration ?

2007-04-27 Thread piloupy GOTTAPIL

To Olivier :


Here's what I've done :

### CODE  : begin ###
bean:size id=colSize name=myCollection/
logic:iterate id=e indexId=eid name=myCollection
 logic:equal name=eid value=colSize
   bean:write name=e property=name /,
 /logic:equal
 logic:notEqual name=eid value=colSize
   bean:write name=e property=name /,
 /logic:notEqual
/logic:iterate
### CODE  : end ###

But it doesn't work. I don't know how to use correctly the logic:equal tag :-(

I thought I may try the logic-el:equal name=eid
value=${colSize}, but the logic-el:equal tag doesn't exist...

If it is possible, I'd like to only use Struts tags, but if there's no
way to do what I need, I'll use the JTSL tags...

Geez, if it was Java code, it'd be so simple... these Struts tags make
me think that I'm a stupid guy... *sigh*

By the way, Olivier, if you're french, Merci pour ton aide ;-)

piloupy

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



RE: logic:iterate how to test the 1st and last iteration ?

2007-04-27 Thread Rod Bollinger

Hi Piloupy,

You can do this using JSTL as such:

c:forEach var=item items=myCollection varStatus=status
c:set var=myOutput value=${myOutput}${item} /
c:if test=${not status.last}
c:set var=myOutput value=${myOutput}, /
/c:if 
/c:forEach

Then you can reference ${myOutput} anywhere you like.

HTH,
-Rod

-Original Message-
From: [EMAIL PROTECTED] [mailto:[EMAIL PROTECTED] On Behalf Of piloupy
GOTTAPIL
Sent: Friday, April 27, 2007 10:14
To: Struts Users Mailing List; Martin Gainty
Subject: Re: logic:iterate how to test the 1st and last iteration ?

 To Olivier :

Here's what I've done :

### CODE  : begin ###
bean:size id=colSize name=myCollection/
logic:iterate id=e indexId=eid name=myCollection
  logic:equal name=eid value=colSize
bean:write name=e property=name /,
  /logic:equal
  logic:notEqual name=eid value=colSize
bean:write name=e property=name /,
  /logic:notEqual
/logic:iterate
### CODE  : end ###

But it doesn't work. I don't know how to use correctly the logic:equal tag
:-(

I thought I may try the logic-el:equal name=eid
value=${colSize}, but the logic-el:equal tag doesn't exist...

If it is possible, I'd like to only use Struts tags, but if there's no
way to do what I need, I'll use the JTSL tags...

Geez, if it was Java code, it'd be so simple... these Struts tags make
me think that I'm a stupid guy... *sigh*

By the way, Olivier, if you're french, Merci pour ton aide ;-)

piloupy

-
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: logic:iterate how to test the 1st and last iteration ?

2007-04-27 Thread Olivier THIERRY

De rien lol
For what I know, the logic:equal tag can only compare with a constant
value.
So you have to use a scriptlet :(
Try this :

logic:equal name=eid value=%=colSize%

Olivier

2007/4/27, piloupy GOTTAPIL [EMAIL PROTECTED]:


 To Olivier :

Here's what I've done :

### CODE  : begin ###
bean:size id=colSize name=myCollection/
logic:iterate id=e indexId=eid name=myCollection
  logic:equal name=eid value=colSize
bean:write name=e property=name /,
  /logic:equal
  logic:notEqual name=eid value=colSize
bean:write name=e property=name /,
  /logic:notEqual
/logic:iterate
### CODE  : end ###

But it doesn't work. I don't know how to use correctly the logic:equal
tag :-(

I thought I may try the logic-el:equal name=eid
value=${colSize}, but the logic-el:equal tag doesn't exist...

If it is possible, I'd like to only use Struts tags, but if there's no
way to do what I need, I'll use the JTSL tags...

Geez, if it was Java code, it'd be so simple... these Struts tags make
me think that I'm a stupid guy... *sigh*

By the way, Olivier, if you're french, Merci pour ton aide ;-)

piloupy

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




Re: logic:iterate how to test the 1st and last iteration ?

2007-04-27 Thread Laxmikant

Hi

Try to use following code, might be helpful
logic:iterate id=e name=myCollection indexId=index 
  bean:write name=e property=name /${index},
/logic:iterate


Laxmikant



piloupy GOTTAPIL wrote:
 
 Hi,
 
 What I want to do is quite simple. I'd like to know how to test in a
 logic:iterate when I'm at the first or last iteration.
 
 My present problem is to parse a collection of String and display the
 results like this :
 
 ### CODE : begin ###
 value1, value2, value3
 ### CODE : end ###
 
 And as you can see, for the last iteration, I mustn't displey the
 comma character.
 
 My present code is :
 
 ### CODE : begin ###
 logic:iterate id=e name=myCollection
   bean:write name=e property=name /,
 /logic:iterate
 ### CODE : end ###
 
 Thanks in advance :)
 
 piloupy
 
 -
 To unsubscribe, e-mail: [EMAIL PROTECTED]
 For additional commands, e-mail: [EMAIL PROTECTED]
 
 
 

-- 
View this message in context: 
http://www.nabble.com/%3Clogic%3Aiterate%3E-how-to-test-the-1st-and-last-iteration---tf3657445.html#a10224066
Sent from the Struts - User mailing list archive at Nabble.com.


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



Re: logic:iterate how to test the 1st and last iteration ?

2007-04-27 Thread Affan Qureshi
 piloupy GOTTAPIL wrote:
  
  Hi,
  
  What I want to do is quite simple. I'd like to know how to test in a
  logic:iterate when I'm at the first or last iteration.
  
  My present problem is to parse a collection of String and display the
  results like this :
  
  ### CODE : begin ###
  value1, value2, value3
  ### CODE : end ###
  
  And as you can see, for the last iteration, I mustn't displey the
  comma character.
  
  My present code is :
  
  ### CODE : begin ###
  logic:iterate id=e name=myCollection
bean:write name=e property=name /,
  /logic:iterate
  ### CODE : end ###
  
  Thanks in advance :)
  


Declare a counter variable in the loop. You can get the size of the 
collection in a page variable with the bean:size  tag and use that to 
compare the current iteration. And then dont display the comma at the last 
iteration. 

HTH.


Re: logic:iterate how to test the 1st and last iteration ?

2007-04-27 Thread Laurie Harper

Affan Qureshi wrote:

piloupy GOTTAPIL wrote:

Hi,

What I want to do is quite simple. I'd like to know how to test in a
logic:iterate when I'm at the first or last iteration.

My present problem is to parse a collection of String and display the
results like this :

### CODE : begin ###
value1, value2, value3
### CODE : end ###

And as you can see, for the last iteration, I mustn't displey the
comma character.

My present code is :

### CODE : begin ###
logic:iterate id=e name=myCollection
  bean:write name=e property=name /,
/logic:iterate
### CODE : end ###

Thanks in advance :)




Declare a counter variable in the loop. You can get the size of the 
collection in a page variable with the bean:size  tag and use that to 
compare the current iteration. And then dont display the comma at the last 
iteration. 


This is trivial to do with JSTL; something like this should work:

  c:forEach items='myCollection' var='e' varStatus='status'
c:out value='e'
c:if test='${not status.last}'
  c:out value=','/
/c:if
  /c:forEach

Strut 1's logic:iterate tag only provides a simple integer status 
variable, which is why you have to jump through a few extra hoops using 
that. Just one of the reasons JSTL is preferred over the logic: 
collection :-)


L.


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



Re: logic:iterate how to test the 1st and last iteration ?

2007-04-27 Thread Tim B

piloupy GOTTAPIL [EMAIL PROTECTED] wrote in message
news:[EMAIL PROTECTED]
 Hi,

 What I want to do is quite simple. I'd like to know how to test in a
 logic:iterate when I'm at the first or last iteration.

 My present problem is to parse a collection of String and display the
 results like this :

 ### CODE : begin ###
 value1, value2, value3
 ### CODE : end ###

 And as you can see, for the last iteration, I mustn't displey the
 comma character.

 My present code is :

 ### CODE : begin ###
 logic:iterate id=e name=myCollection
   bean:write name=e property=name /,
 /logic:iterate
 ### CODE : end ###

 Thanks in advance :)

 piloupy


how about using the length and offset attributes like so:

!--display first item of list with no comma--
 logic:iterate id=e name=myCollection length=1
  bean:write name=e property=name /
/logic:iterate

!--display remaining items of list with a  comma and space prepended to
each-- 
logic:iterate id=e name=myCollection offset=1
  , bean:write name=e property=name /
/logic:iterate




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



Fw: logic:iterate how to test the 1st and last iteration ?

2007-04-27 Thread Martin Gainty
Tim 
for 2.x use the 
ww:iterator 
 ww:if test=#foo=bar

http://struts.apache.org/2.x/docs/iteration-tags.html

M--
This email message and any files transmitted with it contain confidential
information intended only for the person(s) to whom this email message is
addressed.  If you have received this email message in error, please notify
the sender immediately by telephone or email and destroy the original
message without making a copy.  Thank you.

- Original Message - 
From: Tim B [EMAIL PROTECTED]

To: user@struts.apache.org
Sent: Friday, April 27, 2007 9:09 PM
Subject: Re: logic:iterate how to test the 1st and last iteration ?




piloupy GOTTAPIL [EMAIL PROTECTED] wrote in message
news:[EMAIL PROTECTED]

Hi,

What I want to do is quite simple. I'd like to know how to test in a
logic:iterate when I'm at the first or last iteration.

My present problem is to parse a collection of String and display the
results like this :

### CODE : begin ###
value1, value2, value3
### CODE : end ###

And as you can see, for the last iteration, I mustn't displey the
comma character.

My present code is :

### CODE : begin ###
logic:iterate id=e name=myCollection
  bean:write name=e property=name /,
/logic:iterate
### CODE : end ###

Thanks in advance :)

piloupy



how about using the length and offset attributes like so:

!--display first item of list with no comma--
logic:iterate id=e name=myCollection length=1
 bean:write name=e property=name /
/logic:iterate

!--display remaining items of list with a  comma and space prepended to
each-- 
logic:iterate id=e name=myCollection offset=1
 , bean:write name=e property=name /
/logic:iterate




-
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: Iterate and write indexed properties in place using logic:iterate

2007-03-26 Thread Karr, David
What container are you using?  If you're using Tomcat 5, or any
container that supports JSP 2.0, and you're using the Servlet 2.4 schema
in your web.xml, then EL expressions in your JSP will be natively
supported, without any additional jar files.

Also, if you're using a JSP 2.0 container, you should NOT use Struts-EL,
as it won't work properly.  You wouldn't need to anyway, as the normal
Struts tags would work fine with EL expressions in that container.

Concerning dependency on the JSTL, there is no other tag library that
should be higher on your no-brainer list of dependencies.  Without it,
your code will be messier and harder to maintain. 

 -Original Message-
 From: Francesco Pretto [mailto:[EMAIL PROTECTED] 
 Sent: Sunday, March 25, 2007 7:53 AM
 To: user@struts.apache.org
 Subject: Iterate and write indexed properties in place using 
 logic:iterate
 
 Hi! What i'm trying to obtain is somewhat described in the 
 faqs here, 
 http://struts.apache.org/1.2.9/faqs/indexedprops.html , using 
 the struts EL extension.
 
 This is the problem: i have an ArrayList of objects, called 
 list, all of type Type. I want to individually write on 
 the field field1
 of each objects in the ArrayList.
 
 Using EL extensions, code would probably like this (i haven't tryed):
 
 logic.el:iterate id=idIterate name=MyForm property=list
 type=Type index=index
 html-el:text name=MyForm 
 property=list[${index}].field1 / /logic-el:iterate
 
 The problem i absolutely don't want to add another dependency 
 to my project, if not strictly necessary, and i have the 
 sensation i can obtain the same using only logic:iterate. 
 Unfortunately, this:
 
 logic:iterate id=idIterate name=MyForm property=list 
 type=Type 
 html:text name=IdIterate property=field1 / /logic:iterate
 
 doesn't work, as the iteration is not in-place, in the same 
 property of the bean MyForm, but probably is copied somewhere 
 and remain in the page context, so user written fields are 
 lost when go on with other pages of the form. What i want to 
 obtain is to write directly on the form bean properties.
 I saw that from struts 1.1 exist indexed tags, but i'm 
 unable to use them, if they can give me the functionality i need.
 
 I tryed something like:
 
 logic:iterate id=idIterate name=MyForm property=list 
 type=Type 
 html:text name=MyForm property=list[].field1 
 indexed=true / /logic:iterate
 
 or similars, but it doesn't work as i expected, and in the 
 reference there aren't examples of use :-( . Please, can you 
 tell me how to obtain this using only logic:iterate (if 
 possible)? Please note i must use struts 1.2.9 only for my 
 project, unfortunately.
 
 Thanks for the help!
 
 Francesco
 
 -
 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]



Iterate and write indexed properties in place using logic:iterate

2007-03-25 Thread Francesco Pretto

Hi! What i'm trying to obtain is somewhat described in the faqs here,
http://struts.apache.org/1.2.9/faqs/indexedprops.html , using the
struts EL extension.

This is the problem: i have an ArrayList of objects, called list,
all of type Type. I want to individually write on the field field1
of each objects in the ArrayList.

Using EL extensions, code would probably like this (i haven't tryed):

logic.el:iterate id=idIterate name=MyForm property=list
type=Type index=index
   html-el:text name=MyForm property=list[${index}].field1 /
/logic-el:iterate

The problem i absolutely don't want to add another dependency to my
project, if not strictly necessary, and i have the sensation i can
obtain the same using only logic:iterate. Unfortunately, this:

logic:iterate id=idIterate name=MyForm property=list type=Type 
   html:text name=IdIterate property=field1 /
/logic:iterate

doesn't work, as the iteration is not in-place, in the same property
of the bean MyForm, but probably is copied somewhere and remain in the
page context, so user written fields are lost when go on with other
pages of the form. What i want to obtain is to write directly on the
form bean properties.
I saw that from struts 1.1 exist indexed tags, but i'm unable to use
them, if they can give me the functionality i need.

I tryed something like:

logic:iterate id=idIterate name=MyForm property=list type=Type 
   html:text name=MyForm property=list[].field1 indexed=true /
/logic:iterate

or similars, but it doesn't work as i expected, and in the reference
there aren't examples of use :-( . Please, can you tell me how to
obtain this using only logic:iterate (if possible)? Please note i must
use struts 1.2.9 only for my project, unfortunately.

Thanks for the help!

Francesco

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



Re: Iterate and write indexed properties in place using logic:iterate

2007-03-25 Thread Francesco Pretto

Hey, nested tags should be actually cited, at least in the 1.3.5 faqs
at http://struts.apache.org/1.3.5/struts-taglib/indexedprops.html !

However, found a very simple solution that works perfectly!

nested:iterate id=idIterate name=MyForm property=list 
   nested:text property=field1/
/html:select

Thanks with nabble.com and it's powerful search function :-)

Bye,

Francesco

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



Re: logic:iterate tag!

2007-03-10 Thread Laurie Harper
OK, so you have an object in session scope under the key 'AFFFiles', 
which is an ArrayList containing FileObj instances. Did you mean to fill 
it with the FileReceiptFormBean instances instead maybe? If not, what 
properties does a FileObj have?


L.

Swaminathan Subramanian wrote:

Hi Laurie!
Thanks for the prompt response. I am pasting code snippets at every level 
(ActionForm, Action class and view). This did not work. Please let me know if I 
am missing something here.
Thanks again!


//*ActionForm class
//core java classes
import java.util.ArrayList;
import java.util.Collection;

// Java extension classes
import javax.servlet.http.HttpServletRequest;
// third-party classes
import org.apache.struts.action.ActionError;
import org.apache.struts.action.ActionErrors;
import org.apache.struts.action.ActionForm;
import org.apache.struts.action.ActionMapping;
// local project classes
import com.foo.foo1.web.Constants;
import com.foo.foo1.soapcalls.FileObj;
public final class FileReceiptFormBean extends ActionForm
{
 
 // File specific property variables
 
 private String  fileName;

 private String  fileType;
 private String  fileSize;
 private String  fileModifiedDate;
 private String  multipleFiles;
 private String  fileURL;
 private ArrayList alObjFile;
 private FileObj objFile;

 public String  getFileName()

 {
   return (this.fileName);
  }
  public void setFileName(String fileName)
  {
   this.fileName = fileName;
 }
 public String  getfileType()
  {
   return (this.fileType);
  }
  public void setfileType(String fileType)
  {
   this.fileType = fileType;
 }
 public String  getfileSize()
  {
   return (this.fileSize);
  }
  public void setfileSize(String fileSize)
  {
   this.fileSize = fileSize;
 }
  public String  getfileModifiedDate()
  {
   return (this.fileModifiedDate);
  }
  public void setfileModifiedDate(String fileModifiedDate)
  {
   this.fileModifiedDate = fileModifiedDate;
 }
  public String  getmultipleFiles()
  {
   return (this.multipleFiles);
  }
  public void setmultipleFiles(String multipleFiles)
  {
   this.multipleFiles = multipleFiles;
 }
  public String  getfileURL()
  {
   return (this.fileURL);
  }
  public void setfileURL(String fileURL)
  {
   this.fileURL = fileURL;
 }
  public ArrayList  getAlObjFile()
  {
   return (this.alObjFile);
  }
  public void setAlObjFile(ArrayList alObjFile)
  {
   this.alObjFile = alObjFile;
 }
 public FileObj  getObjFile()
  {
   return (this.objFile);
  }
  public void setObjFile(FileObj FileObj)
  {
   this.objFile = objFile;
 }   
   
}


//*End ActionForm class

//*Action class

ArrayList alAFFFile = new ArrayList();
FileObj[] objFiles = null;
objFiles = intf.getFiles(ctx, filename);
String affUrl = ;
for ( int i=0; i  objAFFFiles.length; i++)
{
 affUrl = objFiles[i].fileURL;
 FileReceiptFormBean frfBean = new FileReceiptFormBean();
 frfBean.setFileName(objFiles[i].fileName);
 frfBean.setfileType(objFiles[i].fileType);
 frfBean.setfileSize(objFiles[i].fileSize);
 frfBean.setfileModifiedDate(objFiles[i].fileModifiedDate);
 frfBean.setmultipleFiles(objFiles[i].multipleFiles);
 objFiles[i].fileURL = LoadFileUrlCreator.create(affUrl, application/zip, 
true);
 frfBean.setfileURL(objAFFFiles[i].fileURL);   
 alFile.add(objAFFFiles[i]);

}
session.setAttribute(AFFFiles, alAFFFile);
//*End Action class
//*view.jsp
logic:iterate id=afffiles name=AFFFiles 
 bean:write name=afffiles property=fileName/
/logic:iterate

- Original Message 
From: Laurie Harper [EMAIL PROTECTED]
To: user@struts.apache.org
Sent: Thursday, March 8, 2007 5:11:20 PM
Subject: Re: logic:iterate tag!


Swaminathan Subramanian wrote:

All,
I am working on application using Struts 1.0. I am trying to display an 
ArrayList of complex objects using the logic:iterate tag..
Here's some more details - 


FileObj
 fileName
 fileSize
 fileType
 fileModifiedDate

Action class
FileObj[] objFiles = null;
objFiles = intf.getFiles(ctx, filename);

I tried several approaches as mentioned in different posts but I am not 
able to display this ArrayList of FileObjects. If somebody could outline a list 
of steps to be followed to do this, I would apprecuate it.
Thanks in advance!
-SS


Well, you'll need to expose the objFiles property to the JSP somehow (by 
putting it in request/session scope, or in your form bean, for example). 
Asuming you've done that, and that you have appropriate getters on your 
FileObj, you can access it like this:


logic:iterate id=file name=yourFileObjRef
 bean:write name=file property=fileName/
/logic:iterate

L.


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

Re: logic:iterate tag!

2007-03-09 Thread Swaminathan Subramanian
Hi Laurie!
Thanks for the prompt response. I am pasting code snippets at every level 
(ActionForm, Action class and view). This did not work. Please let me know if I 
am missing something here.
Thanks again!


//*ActionForm class
//core java classes
import java.util.ArrayList;
import java.util.Collection;

// Java extension classes
import javax.servlet.http.HttpServletRequest;
// third-party classes
import org.apache.struts.action.ActionError;
import org.apache.struts.action.ActionErrors;
import org.apache.struts.action.ActionForm;
import org.apache.struts.action.ActionMapping;
// local project classes
import com.foo.foo1.web.Constants;
import com.foo.foo1.soapcalls.FileObj;
public final class FileReceiptFormBean extends ActionForm
{
 
 // File specific property variables
 
 private String  fileName;
 private String  fileType;
 private String  fileSize;
 private String  fileModifiedDate;
 private String  multipleFiles;
 private String  fileURL;
 private ArrayList alObjFile;
 private FileObj objFile;

 public String  getFileName()
 {
   return (this.fileName);
  }
  public void setFileName(String fileName)
  {
   this.fileName = fileName;
 }
 public String  getfileType()
  {
   return (this.fileType);
  }
  public void setfileType(String fileType)
  {
   this.fileType = fileType;
 }
 public String  getfileSize()
  {
   return (this.fileSize);
  }
  public void setfileSize(String fileSize)
  {
   this.fileSize = fileSize;
 }
  public String  getfileModifiedDate()
  {
   return (this.fileModifiedDate);
  }
  public void setfileModifiedDate(String fileModifiedDate)
  {
   this.fileModifiedDate = fileModifiedDate;
 }
  public String  getmultipleFiles()
  {
   return (this.multipleFiles);
  }
  public void setmultipleFiles(String multipleFiles)
  {
   this.multipleFiles = multipleFiles;
 }
  public String  getfileURL()
  {
   return (this.fileURL);
  }
  public void setfileURL(String fileURL)
  {
   this.fileURL = fileURL;
 }
  public ArrayList  getAlObjFile()
  {
   return (this.alObjFile);
  }
  public void setAlObjFile(ArrayList alObjFile)
  {
   this.alObjFile = alObjFile;
 }
 public FileObj  getObjFile()
  {
   return (this.objFile);
  }
  public void setObjFile(FileObj FileObj)
  {
   this.objFile = objFile;
 }   
   
}

//*End ActionForm class

//*Action class

ArrayList alAFFFile = new ArrayList();
FileObj[] objFiles = null;
objFiles = intf.getFiles(ctx, filename);
String affUrl = ;
for ( int i=0; i  objAFFFiles.length; i++)
{
 affUrl = objFiles[i].fileURL;
 FileReceiptFormBean frfBean = new FileReceiptFormBean();
 frfBean.setFileName(objFiles[i].fileName);
 frfBean.setfileType(objFiles[i].fileType);
 frfBean.setfileSize(objFiles[i].fileSize);
 frfBean.setfileModifiedDate(objFiles[i].fileModifiedDate);
 frfBean.setmultipleFiles(objFiles[i].multipleFiles);
 objFiles[i].fileURL = LoadFileUrlCreator.create(affUrl, application/zip, 
true);
 frfBean.setfileURL(objAFFFiles[i].fileURL);   
 alFile.add(objAFFFiles[i]);
}
session.setAttribute(AFFFiles, alAFFFile);
//*End Action class
//*view.jsp
logic:iterate id=afffiles name=AFFFiles 
 bean:write name=afffiles property=fileName/
/logic:iterate

- Original Message 
From: Laurie Harper [EMAIL PROTECTED]
To: user@struts.apache.org
Sent: Thursday, March 8, 2007 5:11:20 PM
Subject: Re: logic:iterate tag!


Swaminathan Subramanian wrote:
 All,
 I am working on application using Struts 1.0. I am trying to display 
 an ArrayList of complex objects using the logic:iterate tag.
 Here's some more details - 
 
 FileObj
  fileName
  fileSize
  fileType
  fileModifiedDate
 
 Action class
 FileObj[] objFiles = null;
 objFiles = intf.getFiles(ctx, filename);
 
 I tried several approaches as mentioned in different posts but I am 
 not able to display this ArrayList of FileObjects. If somebody could outline 
 a list of steps to be followed to do this, I would apprecuate it.
 Thanks in advance!
 -SS

Well, you'll need to expose the objFiles property to the JSP somehow (by 
putting it in request/session scope, or in your form bean, for example). 
Asuming you've done that, and that you have appropriate getters on your 
FileObj, you can access it like this:

logic:iterate id=file name=yourFileObjRef
 bean:write name=file property=fileName/
/logic:iterate

L.


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


 

Be a PS3 game guru.
Get your game face on with the latest PS3 news and previews at Yahoo! Games.
http://videogames.yahoo.com/platform?platform=120121

Re: logic:iterate tag!

2007-03-09 Thread Dave Newton
--- Swaminathan Subramanian wrote:
 ArrayList alAFFFile = new ArrayList();
  alFile.add(objAFFFiles[i]);
 session.setAttribute(AFFFiles, alAFFFile);

Is the alFile.add a typo?

d.



 

Finding fabulous fares is fun.  
Let Yahoo! FareChase search your favorite travel sites to find flight and hotel 
bargains.
http://farechase.yahoo.com/promo-generic-14795097

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



Re: logic:iterate tag!

2007-03-09 Thread Swaminathan Subramanian
I am sorry! It is a typo.

- Original Message 
From: Dave Newton [EMAIL PROTECTED]
To: Struts Users Mailing List user@struts.apache.org
Sent: Friday, March 9, 2007 2:34:26 PM
Subject: Re: logic:iterate tag!


--- Swaminathan Subramanian wrote:
 ArrayList alAFFFile = new ArrayList();
  alFile.add(objAFFFiles[i]);
 session.setAttribute(AFFFiles, alAFFFile);

Is the alFile.add a typo?

d.





Finding fabulous fares is fun.  
Let Yahoo! FareChase search your favorite travel sites to find flight and hotel 
bargains.
http://farechase.yahoo.com/promo-generic-14795097

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


 

Don't get soaked.  Take a quick peek at the forecast
with the Yahoo! Search weather shortcut.
http://tools.search.yahoo.com/shortcuts/#loc_weather

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



logic:iterate tag!

2007-03-08 Thread Swaminathan Subramanian
All,
I am working on application using Struts 1.0. I am trying to display an 
ArrayList of complex objects using the logic:iterate tag.
Here's some more details - 

FileObj
 fileName
 fileSize
 fileType
 fileModifiedDate

Action class
FileObj[] objFiles = null;
objFiles = intf.getFiles(ctx, filename);

I tried several approaches as mentioned in different posts but I am not 
able to display this ArrayList of FileObjects. If somebody could outline a list 
of steps to be followed to do this, I would apprecuate it.
Thanks in advance!
-SS


 

Sucker-punch spam with award-winning protection. 
Try the free Yahoo! Mail Beta.
http://advision.webevents.yahoo.com/mailbeta/features_spam.html

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



Re: logic:iterate tag!

2007-03-08 Thread Laurie Harper

Swaminathan Subramanian wrote:

All,
I am working on application using Struts 1.0. I am trying to display an 
ArrayList of complex objects using the logic:iterate tag.
Here's some more details - 


FileObj
 fileName
 fileSize
 fileType
 fileModifiedDate

Action class
FileObj[] objFiles = null;
objFiles = intf.getFiles(ctx, filename);

I tried several approaches as mentioned in different posts but I am not 
able to display this ArrayList of FileObjects. If somebody could outline a list 
of steps to be followed to do this, I would apprecuate it.
Thanks in advance!
-SS


Well, you'll need to expose the objFiles property to the JSP somehow (by 
putting it in request/session scope, or in your form bean, for example). 
Asuming you've done that, and that you have appropriate getters on your 
FileObj, you can access it like this:


logic:iterate id=file name=yourFileObjRef
bean:write name=file property=fileName/
/logic:iterate

L.


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



logic:iterate is not compiling on Websphere6

2007-02-27 Thread Trasca Virgil
Hi all,

   I have this piece of struts html:logic code

logic:iterate id=addlInfoLabel name=registrationForm
property=addlInfoLabels indexId=i
   tr
   td class=smallbean:write
name=addlInfoLabel//td
   td
   html:text styleClass=textbox
size=30 maxlength=50
   property='
%=addlInfoValues[ + i.intValue() + ] %'
   /html:text
   /td
   /tr
 /logic:iterate

where
registrationForm is a struts form defined in struts-config.xml, and 2
array properties for my form
form-property
   name=addlInfoLabels
   type=java.lang.Object[]/
form-property
   name=addlInfoValues
   type=java.lang.Object[]/

When compiling on WS6 I get
!--
D([mb,br /[wsJspC] JSPG0091E: An error occurred at line: 110 in the file: 
/br /templates/selfreg/jsp/userRegiwbr /stration.jspbr / nbsp;[wsJspC] 
JSPG0093E: Generated servlet error from file: /templates/br 
/selfreg/jsp/userRegistrationwbr /.jspbr / nbsp;[wsJspC] 
D:/Partner_Portal_D1/bbwbr //prmonline/v75_0/distWebspherewbr //br 
/classes/jsp/templates/selfregwbr //jsp/_userRegistration.javawbr 
/:241:br /addlInfoLabel is already defined inbr 
/_jspService(javax.servlet.http.HttpServletwbr 
/Request,javax.servlet.http.HttpServletwbr /Response)br / nbsp;[wsJspC] 
nbsp; nbsp; nbsp; nbsp; nbsp; nbsp; nbsp; nbsp; java.lang.Object 
addlInfoLabel \u003d null;br / nbsp;[wsJspC] nbsp; nbsp; nbsp; nbsp; 
nbsp; nbsp; nbsp; nbsp; nbsp; nbsp; nbsp; nbsp; nbsp; nbsp; nbsp; 
nbsp; nbsp;^br / nbsp;[wsJspC] 1 errorbr / nbsp;[wsJspC] ]br /br 
/Build and functionallity is working perfect on Weblogic. Please assistbr 
/me with this problem.br /br /Thank you,br //div,1]
);
D([mb,div style\u003d\direction:ltr\span class\u003dsgVirgilbr /br 
//span/div,0]
);
D([ce]);

//--
[wsJspC] JSPG0091E: An error occurred at line: 110 in the file: /
templates/selfreg/jsp/userRegistration.jsp
  [wsJspC] JSPG0093E: Generated servlet error from file: /templates/
selfreg/jsp/userRegistration.jsp
  [wsJspC] D:/Partner_Portal_D1/bb/prmonline/v75_0/distWebsphere/
classes/jsp/templates/selfreg/jsp/_userRegistration.java:241:
addlInfoLabel is already defined in
_jspService(javax.servlet.http.HttpServletRequest,javax.servlet.http.HttpServletResponse)
  [wsJspC] java.lang.Object addlInfoLabel = null;
  [wsJspC]  ^
  [wsJspC] 1 error
  [wsJspC] ]

Build and functionallity is working perfect on Weblogic. Please assist
me with this problem.

Thank you,

Virgil


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



Nesting logic:iterate tags and indexed=true

2007-01-25 Thread Oscar Guindzberg

I have a problem nesting logic:iterate tags along with using indexed=true

I have a form that extends ActionForm which has a Car array. Car class
has in turn a type and a Components array. Component has 2 fields:
name and qty.

This is the jsp:

html:form 
logic:iterate id=cars name=myForm property=cars indexId=carsIndex
 bean:write name=cars property=type /
 logic:iterate id=components name=cars property=components
indexId=componentsIndex
   html:text name=components property=name indexed=true/
   html:text name=components property=qty indexed=true/
 /logic:iterate
/logic:iterate
/html:form


This is the generated html:

form ...
 Standard
 input type=text name=components[0].name value=door/
 input type=text name=components[0].qty value=4/
 input type=text name=components[1].name value=engine/
 input type=text name=components[1].qty value=1/
 Superb
 input type=text name=components[0].name value=door/
 input type=text name=components[0].qty value=5/
 input type=text name=components[1].name value=engine/
 input type=text name=components[1].qty value=2/
 
/form

If I submit the form, Struts won't be able to rebuild the Car array
with its components.

This is what I expect the html to be:

form ...
 Standard
 input type=text name=cars[0].components[0].name value=door/
 input type=text name=cars[0].components[0].qty value=4/
 input type=text name=cars[0].components[1].name value=engine/
 input type=text name=cars[0].components[1].qty value=1/
 Superb
 input type=text name=cars[1].components[0].name value=door/
 input type=text name=cars[1].components[0].qty value=5/
 input type=text name=cars[1].components[1].name value=engine/
 input type=text name=cars[1].components[1].qty value=2/
 
/form


How can I achieve that?

Am I on the right path?


Oscar




--
Oscar Guindzberg
http://www.latbrain.com

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



Re: Nesting logic:iterate tags and indexed=true

2007-01-25 Thread Nuwan Chandrasoma

Hi,

Have a look on struts nested tags.

Regards,

Nuwan

- Original Message - 
From: Oscar Guindzberg [EMAIL PROTECTED]

To: user@struts.apache.org
Sent: Thursday, January 25, 2007 6:29 PM
Subject: Nesting logic:iterate tags and indexed=true



I have a problem nesting logic:iterate tags along with using indexed=true

I have a form that extends ActionForm which has a Car array. Car class
has in turn a type and a Components array. Component has 2 fields:
name and qty.

This is the jsp:

html:form 
logic:iterate id=cars name=myForm property=cars 
indexId=carsIndex

 bean:write name=cars property=type /
 logic:iterate id=components name=cars property=components
indexId=componentsIndex
   html:text name=components property=name indexed=true/
   html:text name=components property=qty indexed=true/
 /logic:iterate
/logic:iterate
/html:form


This is the generated html:

form ...
 Standard
 input type=text name=components[0].name value=door/
 input type=text name=components[0].qty value=4/
 input type=text name=components[1].name value=engine/
 input type=text name=components[1].qty value=1/
 Superb
 input type=text name=components[0].name value=door/
 input type=text name=components[0].qty value=5/
 input type=text name=components[1].name value=engine/
 input type=text name=components[1].qty value=2/
 
/form

If I submit the form, Struts won't be able to rebuild the Car array
with its components.

This is what I expect the html to be:

form ...
 Standard
 input type=text name=cars[0].components[0].name value=door/
 input type=text name=cars[0].components[0].qty value=4/
 input type=text name=cars[0].components[1].name value=engine/
 input type=text name=cars[0].components[1].qty value=1/
 Superb
 input type=text name=cars[1].components[0].name value=door/
 input type=text name=cars[1].components[0].qty value=5/
 input type=text name=cars[1].components[1].name value=engine/
 input type=text name=cars[1].components[1].qty value=2/
 
/form


How can I achieve that?

Am I on the right path?


Oscar




--
Oscar Guindzberg
http://www.latbrain.com

-
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: nested:select to logic:iterate or nested:iterate

2007-01-20 Thread Bhanu Valasa
Nuwan,

Infact I tried thisbut did not help.
I could see a small select box, nothing is displayed in it. I Guess it
expects only options to be provided inside nested:select
Even after providing the value for bean:write it's the same

Regards


-Original Message-
From: Nuwan Chandrasoma [mailto:[EMAIL PROTECTED] 
Sent: Saturday, January 20, 2007 3:29 AM
To: Struts Users Mailing List
Subject: Re: nested:select to logic:iterate or nested:iterate

nested:select property='%=dataFrom+Bean.prdIdsList%'
multiple=true size=3 styleId='%=dataFrom+prdIds+(index)%'
styleClass=textField 

logic:iterate name=%=IConstants.SESSION_ATTR_SCR_PRODUCTS% 
id=product
bean:write name=product/
/logic:iterate

/nested:select


Thanks,

Nuwan

- Original Message - 
From: Bhanu Valasa [EMAIL PROTECTED]
To: user@struts.apache.org
Sent: Friday, January 19, 2007 7:20 PM
Subject: nested:select to logic:iterate or nested:iterate


Hello gurus



I have struts tag in my jsp, which displays HTML select option box with
selected (a String array in the bean)



nested:select property='%=dataFrom+Bean.prdIdsList%'
multiple=true size=3 styleId='%=dataFrom+prdIds+(index)%'
styleClass=textField 

html:options collection=%=IConstants.SESSION_ATTR_SCR_PRODUCTS%
property=id labelProperty=value/

/nested:select



Instead HTML Select box I want to print the String array elements in
text format.



Could some one please help me how to use logic:iterate or nested:iterate



Please suggest



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]



Re: nested:select to logic:iterate or nested:iterate

2007-01-20 Thread Nuwan Chandrasoma

Hi,

According to the code sample you have given below. i dont think the 
ArrayList you are iterating contains strings. it must be having some bean 
collction.

in that bean there should be 2 attributes called id and value.

so find the bean type that is in this ArrayList and then iterate those and 
see.. for eg:-


nested:select property='%=dataFrom+Bean.prdIdsList%'
multiple=true size=3 styleId='%=dataFrom+prdIds+(index)%'
styleClass=textField 

logic:iterate name=%=IConstants.SESSION_ATTR_SCR_PRODUCTS%
id=product type=the class name of the bean that is in this list
bean:write name=product property=value/
/logic:iterate

/nested:select

Thanks,

Nuwan



- Original Message - 
From: Bhanu Valasa [EMAIL PROTECTED]

To: Struts Users Mailing List user@struts.apache.org
Sent: Saturday, January 20, 2007 4:02 PM
Subject: RE: nested:select to logic:iterate or nested:iterate


Nuwan,

Infact I tried thisbut did not help.
I could see a small select box, nothing is displayed in it. I Guess it
expects only options to be provided inside nested:select
Even after providing the value for bean:write it's the same

Regards


-Original Message-
From: Nuwan Chandrasoma [mailto:[EMAIL PROTECTED]
Sent: Saturday, January 20, 2007 3:29 AM
To: Struts Users Mailing List
Subject: Re: nested:select to logic:iterate or nested:iterate

nested:select property='%=dataFrom+Bean.prdIdsList%'
multiple=true size=3 styleId='%=dataFrom+prdIds+(index)%'
styleClass=textField 

logic:iterate name=%=IConstants.SESSION_ATTR_SCR_PRODUCTS%
id=product
bean:write name=product/
/logic:iterate

/nested:select


Thanks,

Nuwan

- Original Message - 
From: Bhanu Valasa [EMAIL PROTECTED]

To: user@struts.apache.org
Sent: Friday, January 19, 2007 7:20 PM
Subject: nested:select to logic:iterate or nested:iterate


Hello gurus



I have struts tag in my jsp, which displays HTML select option box with
selected (a String array in the bean)



nested:select property='%=dataFrom+Bean.prdIdsList%'
multiple=true size=3 styleId='%=dataFrom+prdIds+(index)%'
styleClass=textField 

html:options collection=%=IConstants.SESSION_ATTR_SCR_PRODUCTS%
property=id labelProperty=value/

/nested:select



Instead HTML Select box I want to print the String array elements in
text format.



Could some one please help me how to use logic:iterate or nested:iterate



Please suggest



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]


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



Re: nested:select to logic:iterate or nested:iterate

2007-01-20 Thread Nuwan Chandrasoma

Omg.. what i am writeing here..,

your are correct.. how could this code have displayed a option values for 
the select box.


where is the options tag.. , its missing...

try this and see

nested:select property='%=dataFrom+Bean.prdIdsList%'
multiple=true size=3 styleId='%=dataFrom+prdIds+(index)%'
styleClass=textField 

logic:iterate name=%=IConstants.SESSION_ATTR_SCR_PRODUCTS%
id=product
optionbean:write name=product//option
/logic:iterate

/nested:select

Thanks,

Nuwan



- Original Message - 
From: Nuwan Chandrasoma [EMAIL PROTECTED]

To: Struts Users Mailing List user@struts.apache.org
Sent: Saturday, January 20, 2007 9:47 PM
Subject: Re: nested:select to logic:iterate or nested:iterate



Hi,

According to the code sample you have given below. i dont think the 
ArrayList you are iterating contains strings. it must be having some bean 
collction.

in that bean there should be 2 attributes called id and value.

so find the bean type that is in this ArrayList and then iterate those and 
see.. for eg:-


nested:select property='%=dataFrom+Bean.prdIdsList%'
multiple=true size=3 styleId='%=dataFrom+prdIds+(index)%'
styleClass=textField 

logic:iterate name=%=IConstants.SESSION_ATTR_SCR_PRODUCTS%
id=product type=the class name of the bean that is in this list
bean:write name=product property=value/
/logic:iterate

/nested:select

Thanks,

Nuwan



- Original Message - 
From: Bhanu Valasa [EMAIL PROTECTED]

To: Struts Users Mailing List user@struts.apache.org
Sent: Saturday, January 20, 2007 4:02 PM
Subject: RE: nested:select to logic:iterate or nested:iterate


Nuwan,

Infact I tried thisbut did not help.
I could see a small select box, nothing is displayed in it. I Guess it
expects only options to be provided inside nested:select
Even after providing the value for bean:write it's the same

Regards


-Original Message-
From: Nuwan Chandrasoma [mailto:[EMAIL PROTECTED]
Sent: Saturday, January 20, 2007 3:29 AM
To: Struts Users Mailing List
Subject: Re: nested:select to logic:iterate or nested:iterate

nested:select property='%=dataFrom+Bean.prdIdsList%'
multiple=true size=3 styleId='%=dataFrom+prdIds+(index)%'
styleClass=textField 

logic:iterate name=%=IConstants.SESSION_ATTR_SCR_PRODUCTS%
id=product
bean:write name=product/
/logic:iterate

/nested:select


Thanks,

Nuwan

- Original Message - 
From: Bhanu Valasa [EMAIL PROTECTED]

To: user@struts.apache.org
Sent: Friday, January 19, 2007 7:20 PM
Subject: nested:select to logic:iterate or nested:iterate


Hello gurus



I have struts tag in my jsp, which displays HTML select option box with
selected (a String array in the bean)



nested:select property='%=dataFrom+Bean.prdIdsList%'
multiple=true size=3 styleId='%=dataFrom+prdIds+(index)%'
styleClass=textField 

html:options collection=%=IConstants.SESSION_ATTR_SCR_PRODUCTS%
property=id labelProperty=value/

/nested:select



Instead HTML Select box I want to print the String array elements in
text format.



Could some one please help me how to use logic:iterate or nested:iterate



Please suggest



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]




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



RE: nested:select to logic:iterate or nested:iterate

2007-01-20 Thread Bhanu Valasa
Nuwan,

Yes, with out option I con't go further in this. This did not serve
the purpose.

'%=dataFrom+Bean.prdIdsList%' is String array with ids in it.

IConstants.SESSION_ATTR_SCR_PRODUCTS% has bean collection (bean has id
and value).

If the id matches in both I want to print the value of it in the plain
text format on the page. Using select/options will not help here.

Regards


-Original Message-
From: Nuwan Chandrasoma [mailto:[EMAIL PROTECTED] 
Sent: Saturday, January 20, 2007 4:53 PM
To: Nuwan Chandrasoma; Struts Users Mailing List
Subject: Re: nested:select to logic:iterate or nested:iterate

Omg.. what i am writeing here..,

your are correct.. how could this code have displayed a option values
for 
the select box.

where is the options tag.. , its missing...

try this and see

nested:select property='%=dataFrom+Bean.prdIdsList%'
multiple=true size=3 styleId='%=dataFrom+prdIds+(index)%'
styleClass=textField 

logic:iterate name=%=IConstants.SESSION_ATTR_SCR_PRODUCTS%
id=product
optionbean:write name=product//option
/logic:iterate

/nested:select

Thanks,

Nuwan



- Original Message - 
From: Nuwan Chandrasoma [EMAIL PROTECTED]
To: Struts Users Mailing List user@struts.apache.org
Sent: Saturday, January 20, 2007 9:47 PM
Subject: Re: nested:select to logic:iterate or nested:iterate


 Hi,

 According to the code sample you have given below. i dont think the 
 ArrayList you are iterating contains strings. it must be having some
bean 
 collction.
 in that bean there should be 2 attributes called id and value.

 so find the bean type that is in this ArrayList and then iterate those
and 
 see.. for eg:-

 nested:select property='%=dataFrom+Bean.prdIdsList%'
 multiple=true size=3 styleId='%=dataFrom+prdIds+(index)%'
 styleClass=textField 

 logic:iterate name=%=IConstants.SESSION_ATTR_SCR_PRODUCTS%
 id=product type=the class name of the bean that is in this list
 bean:write name=product property=value/
 /logic:iterate

 /nested:select

 Thanks,

 Nuwan



 - Original Message - 
 From: Bhanu Valasa [EMAIL PROTECTED]
 To: Struts Users Mailing List user@struts.apache.org
 Sent: Saturday, January 20, 2007 4:02 PM
 Subject: RE: nested:select to logic:iterate or nested:iterate


 Nuwan,

 Infact I tried thisbut did not help.
 I could see a small select box, nothing is displayed in it. I Guess it
 expects only options to be provided inside nested:select
 Even after providing the value for bean:write it's the same

 Regards


 -Original Message-
 From: Nuwan Chandrasoma [mailto:[EMAIL PROTECTED]
 Sent: Saturday, January 20, 2007 3:29 AM
 To: Struts Users Mailing List
 Subject: Re: nested:select to logic:iterate or nested:iterate

 nested:select property='%=dataFrom+Bean.prdIdsList%'
 multiple=true size=3 styleId='%=dataFrom+prdIds+(index)%'
 styleClass=textField 

 logic:iterate name=%=IConstants.SESSION_ATTR_SCR_PRODUCTS%
 id=product
 bean:write name=product/
 /logic:iterate

 /nested:select


 Thanks,

 Nuwan

 - Original Message - 
 From: Bhanu Valasa [EMAIL PROTECTED]
 To: user@struts.apache.org
 Sent: Friday, January 19, 2007 7:20 PM
 Subject: nested:select to logic:iterate or nested:iterate


 Hello gurus



 I have struts tag in my jsp, which displays HTML select option box
with
 selected (a String array in the bean)



 nested:select property='%=dataFrom+Bean.prdIdsList%'
 multiple=true size=3 styleId='%=dataFrom+prdIds+(index)%'
 styleClass=textField 

 html:options collection=%=IConstants.SESSION_ATTR_SCR_PRODUCTS%
 property=id labelProperty=value/

 /nested:select



 Instead HTML Select box I want to print the String array elements in
 text format.



 Could some one please help me how to use logic:iterate or
nested:iterate



 Please suggest



 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]
 


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



nested:select to logic:iterate or nested:iterate

2007-01-19 Thread Bhanu Valasa
Hello gurus

 

I have struts tag in my jsp, which displays HTML select option box with
selected (a String array in the bean)

 

nested:select property='%=dataFrom+Bean.prdIdsList%'
multiple=true size=3 styleId='%=dataFrom+prdIds+(index)%'
styleClass=textField 

html:options collection=%=IConstants.SESSION_ATTR_SCR_PRODUCTS%
property=id labelProperty=value/

/nested:select

 

Instead HTML Select box I want to print the String array elements in
text format.

 

Could some one please help me how to use logic:iterate or nested:iterate

 

Please suggest

 

thanks

 



Re: nested:select to logic:iterate or nested:iterate

2007-01-19 Thread Nuwan Chandrasoma

nested:select property='%=dataFrom+Bean.prdIdsList%'
multiple=true size=3 styleId='%=dataFrom+prdIds+(index)%'
styleClass=textField 

logic:iterate name=%=IConstants.SESSION_ATTR_SCR_PRODUCTS% 
id=product

bean:write name=product/
/logic:iterate

/nested:select


Thanks,

Nuwan

- Original Message - 
From: Bhanu Valasa [EMAIL PROTECTED]

To: user@struts.apache.org
Sent: Friday, January 19, 2007 7:20 PM
Subject: nested:select to logic:iterate or nested:iterate


Hello gurus



I have struts tag in my jsp, which displays HTML select option box with
selected (a String array in the bean)



nested:select property='%=dataFrom+Bean.prdIdsList%'
multiple=true size=3 styleId='%=dataFrom+prdIds+(index)%'
styleClass=textField 

html:options collection=%=IConstants.SESSION_ATTR_SCR_PRODUCTS%
property=id labelProperty=value/

/nested:select



Instead HTML Select box I want to print the String array elements in
text format.



Could some one please help me how to use logic:iterate or nested:iterate



Please suggest



thanks





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



logic:iterate for arraylist of beans

2006-12-13 Thread Kranti Parisa

hi,

i am facing proble for the following
=
assigning value to check box

say logic:iterate is having arraylist
this arraylist is with beans
means for example employee bean
i want to view all emps in jsp
what we will do is we create a bean for each employee
and add tht bean to arraylist
so tht we have this arraylist in jsp
then we use logic:iterate
to iterate the arraylist
now we need to print the rows
each row contains a check box
this check box should get the value as empid
so tht when i select the checkbox
we can do delete or modify..etc


plz suggest/help from this.
stuck up completely with this.


RE: logic:iterate for arraylist of beans

2006-12-13 Thread mano dasanayake
Hi,
As I understood what you have to do is,
Iterate through your list and add checkboxes as folllwing...

logic:iterate id=Emp type=...

html:checkbox  property=prop1 value=true
onclick=submitForm(editaction.do?id=bean:write name=Emp
property=ID/) /
bean:write name=Emp property=name/


/logic:iterate

Regards,
Mano




-Original Message-
From: Kranti Parisa [mailto:[EMAIL PROTECTED] 
Sent: Wednesday, December 13, 2006 2:07 PM
To: Struts Users Mailing List
Subject: logic:iterate for arraylist of beans

hi,

i am facing proble for the following
=
assigning value to check box

say logic:iterate is having arraylist
this arraylist is with beans
means for example employee bean
i want to view all emps in jsp
what we will do is we create a bean for each employee
and add tht bean to arraylist
so tht we have this arraylist in jsp
then we use logic:iterate
to iterate the arraylist
now we need to print the rows
each row contains a check box
this check box should get the value as empid
so tht when i select the checkbox
we can do delete or modify..etc


plz suggest/help from this.
stuck up completely with this.



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



Re: logic:iterate for arraylist of beans

2006-12-13 Thread Kranti Parisa

Hi Mano,

In the code you have written logic:iterate id=Emp type=...

Emp should be the name of the ArrayList right?

and in logic:iterate type is there? i hope you mean to say collection= ..

and i need to submit the form after selecting what ever checkboxes that i
need to delete and then click on the detele button.but in the code that you
gave me will submit the orm when i click on the checkbox i think.

the problem is for the value of the checkbox
i should assign the value of the checkbox as empid. so that when i submit
the form we can capture all the checked empid using req.gerParamaterValues

please suggest something


On 12/14/06, mano dasanayake [EMAIL PROTECTED] wrote:


Hi,
As I understood what you have to do is,
Iterate through your list and add checkboxes as folllwing...

logic:iterate id=Emp type=...

html:checkbox  property=prop1 value=true
onclick=submitForm(editaction.do?id=bean:write name=Emp
property=ID/) /
bean:write name=Emp property=name/


/logic:iterate

Regards,
Mano




-Original Message-
From: Kranti Parisa [mailto:[EMAIL PROTECTED]
Sent: Wednesday, December 13, 2006 2:07 PM
To: Struts Users Mailing List
Subject: logic:iterate for arraylist of beans

hi,

i am facing proble for the following
=
assigning value to check box

say logic:iterate is having arraylist
this arraylist is with beans
means for example employee bean
i want to view all emps in jsp
what we will do is we create a bean for each employee
and add tht bean to arraylist
so tht we have this arraylist in jsp
then we use logic:iterate
to iterate the arraylist
now we need to print the rows
each row contains a check box
this check box should get the value as empid
so tht when i select the checkbox
we can do delete or modify..etc


plz suggest/help from this.
stuck up completely with this.



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





--
--
Best Regards
Kranti Kiran Kumar Parisa
Mobile: +91 - 9849 - 625 - 625 +91 - 9391 - 438 - 738


logic:iterate, tfoot and sum

2006-12-13 Thread Marcello Savino
Hi, i've a questione regarding sum calculation in a table:
The jsp look like this one:

logic:present name=lista
div class=listac:set var=recCount value=${0} /
table class=scrollable id=lista
thead
tr
th id=hNr colspan=2Nr/th

/tr
/thead
tfoot
tr
tdc:out
value=${recCount}/c:out/td
/tr
/tfoot
tbody
logic:iterate id=index name=lista
c:set var=recCount
value=${recCount+1} /
tr
td headers=hNr
class=Numericbean:write
name=index
property=number //td
/tr
/logic:iterate
/tbody
/table
/div
/logic:present
/html:form

Obviously the recCount outputted is 0. To output the right value i have
to put the tfoot after the tbody section but this is not allowed by the
DTD. I would not pre-calculate the rowCount due performance problem.
Does anybody have some ideas to solve this problem ?
Thanks in advance
Ciao, Marcello

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



RE: logic:iterate for arraylist of beans

2006-12-13 Thread mano dasanayake
Hi ,
I'm using 1.2 any how...what I mean in the Iterate code is that you simply 
Define an ID for the bean that you are about to iterate...

For an instance,


logic:iterate id=EMp name=YourFormBean property=EmplyList
type=com.yourCom.common.beans.Employee 


/logic:iterate

So you'r going to iterate thru your EmplyList and refer 
Each of ur bean by name EMp.
 Then you can get whatever the attribute you want from your Bean,(Employee).

For this case I think better to use html:multibox,,,
Can you explain your requirement specifically?

Regards,
Mano







-Original Message-
From: Kranti Parisa [mailto:[EMAIL PROTECTED] 
Sent: Wednesday, December 13, 2006 3:06 PM
To: Struts Users Mailing List
Subject: Re: logic:iterate for arraylist of beans

Hi Mano,

In the code you have written logic:iterate id=Emp type=...

Emp should be the name of the ArrayList right?

and in logic:iterate type is there? i hope you mean to say collection= ..

and i need to submit the form after selecting what ever checkboxes that i
need to delete and then click on the detele button.but in the code that you
gave me will submit the orm when i click on the checkbox i think.

the problem is for the value of the checkbox
i should assign the value of the checkbox as empid. so that when i submit
the form we can capture all the checked empid using req.gerParamaterValues

please suggest something


On 12/14/06, mano dasanayake [EMAIL PROTECTED] wrote:

 Hi,
 As I understood what you have to do is,
 Iterate through your list and add checkboxes as folllwing...

 logic:iterate id=Emp type=...

 html:checkbox  property=prop1 value=true
 onclick=submitForm(editaction.do?id=bean:write name=Emp
 property=ID/) /
 bean:write name=Emp property=name/


 /logic:iterate

 Regards,
 Mano




 -Original Message-
 From: Kranti Parisa [mailto:[EMAIL PROTECTED]
 Sent: Wednesday, December 13, 2006 2:07 PM
 To: Struts Users Mailing List
 Subject: logic:iterate for arraylist of beans

 hi,

 i am facing proble for the following
 =
 assigning value to check box

 say logic:iterate is having arraylist
 this arraylist is with beans
 means for example employee bean
 i want to view all emps in jsp
 what we will do is we create a bean for each employee
 and add tht bean to arraylist
 so tht we have this arraylist in jsp
 then we use logic:iterate
 to iterate the arraylist
 now we need to print the rows
 each row contains a check box
 this check box should get the value as empid
 so tht when i select the checkbox
 we can do delete or modify..etc
 

 plz suggest/help from this.
 stuck up completely with this.



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




-- 
--
Best Regards
Kranti Kiran Kumar Parisa
Mobile: +91 - 9849 - 625 - 625 +91 - 9391 - 438 - 738



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



Re: logic:iterate for arraylist of beans

2006-12-13 Thread Kranti Parisa

Dear Mano,

I need to display the employees from the emp table
emp table is having following columns
1) empid
2) fname
3) lname
4) email
5) mobile ...etc

so when i fire a query i will be getting Result Set. while looping the
result set i am creating EmployeeBean

eg:

while(rs.next()){
EmployeeBean objEmployee= new EmployeeBean();
objEmployee.setEmpID(rs.getString(1));

similarly for other properties of the bean
then add this to ArrayList
al.add(objEmployee);

} // end of while loop

after that sending the arraylist to jsp thru request.setAttribute

in JSP now i need to iterate the ArrayList of Employee Beans
and display in a form

hope this is clear now. in this case not using any FormBean. directly
getting ArrayList and sending thru request.

so please give me the code template that i need to use
my arraylist name : al
my employee bean name : EmployeeBean
properties in bean: empID,firstName,middleName,...etc



On 12/14/06, mano dasanayake [EMAIL PROTECTED] wrote:


Hi ,
I'm using 1.2 any how...what I mean in the Iterate code is that you simply
Define an ID for the bean that you are about to iterate...

For an instance,


logic:iterate id=EMp name=YourFormBean property=EmplyList
type=com.yourCom.common.beans.Employee 


/logic:iterate

So you'r going to iterate thru your EmplyList and refer
Each of ur bean by name EMp.
Then you can get whatever the attribute you want from your
Bean,(Employee).

For this case I think better to use html:multibox,,,
Can you explain your requirement specifically?

Regards,
Mano







-Original Message-
From: Kranti Parisa [mailto:[EMAIL PROTECTED]
Sent: Wednesday, December 13, 2006 3:06 PM
To: Struts Users Mailing List
Subject: Re: logic:iterate for arraylist of beans

Hi Mano,

In the code you have written logic:iterate id=Emp type=...

Emp should be the name of the ArrayList right?

and in logic:iterate type is there? i hope you mean to say collection=
..

and i need to submit the form after selecting what ever checkboxes that i
need to delete and then click on the detele button.but in the code that
you
gave me will submit the orm when i click on the checkbox i think.

the problem is for the value of the checkbox
i should assign the value of the checkbox as empid. so that when i submit
the form we can capture all the checked empid using req.gerParamaterValues

please suggest something


On 12/14/06, mano dasanayake [EMAIL PROTECTED] wrote:

 Hi,
 As I understood what you have to do is,
 Iterate through your list and add checkboxes as folllwing...

 logic:iterate id=Emp type=...

 html:checkbox  property=prop1 value=true
 onclick=submitForm(editaction.do?id=bean:write name=Emp
 property=ID/) /
 bean:write name=Emp property=name/


 /logic:iterate

 Regards,
 Mano




 -Original Message-
 From: Kranti Parisa [mailto:[EMAIL PROTECTED]
 Sent: Wednesday, December 13, 2006 2:07 PM
 To: Struts Users Mailing List
 Subject: logic:iterate for arraylist of beans

 hi,

 i am facing proble for the following
 =
 assigning value to check box

 say logic:iterate is having arraylist
 this arraylist is with beans
 means for example employee bean
 i want to view all emps in jsp
 what we will do is we create a bean for each employee
 and add tht bean to arraylist
 so tht we have this arraylist in jsp
 then we use logic:iterate
 to iterate the arraylist
 now we need to print the rows
 each row contains a check box
 this check box should get the value as empid
 so tht when i select the checkbox
 we can do delete or modify..etc
 

 plz suggest/help from this.
 stuck up completely with this.



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




--
--
Best Regards
Kranti Kiran Kumar Parisa
Mobile: +91 - 9849 - 625 - 625 +91 - 9391 - 438 - 738



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





--
--
Best Regards
Kranti Kiran Kumar Parisa
Mobile: +91 - 9849 - 625 - 625 +91 - 9391 - 438 - 738


RE: logic:iterate for arraylist of beans

2006-12-13 Thread Anil Kumar T

Hi Kranti,

I also had a similar requirement. But I did it in bad way.. which is ...

input type=checkbox name=EMPIDS value=%=((( EmployeeBean)
EMp).getEmpID())%/


See if this helps you as a quick fix. But if you get a better solution
do let the group know
Thanks  regards,
Anil.


-Original Message-
From: Kranti Parisa [mailto:[EMAIL PROTECTED]
Sent: Wednesday, December 13, 2006 3:23 PM
To: Struts Users Mailing List
Subject: Re: logic:iterate for arraylist of beans

Dear Mano,

I need to display the employees from the emp table
emp table is having following columns
1) empid
2) fname
3) lname
4) email
5) mobile ...etc

so when i fire a query i will be getting Result Set. while looping the
result set i am creating EmployeeBean

eg:

while(rs.next()){
EmployeeBean objEmployee= new EmployeeBean();
objEmployee.setEmpID(rs.getString(1));

similarly for other properties of the bean
then add this to ArrayList
al.add(objEmployee);

} // end of while loop

after that sending the arraylist to jsp thru request.setAttribute

in JSP now i need to iterate the ArrayList of Employee Beans
and display in a form

hope this is clear now. in this case not using any FormBean. directly
getting ArrayList and sending thru request.

so please give me the code template that i need to use
my arraylist name : al
my employee bean name : EmployeeBean
properties in bean: empID,firstName,middleName,...etc



On 12/14/06, mano dasanayake [EMAIL PROTECTED] wrote:

 Hi ,
 I'm using 1.2 any how...what I mean in the Iterate code is that you
simply
 Define an ID for the bean that you are about to iterate...

 For an instance,


 logic:iterate id=EMp name=YourFormBean property=EmplyList
 type=com.yourCom.common.beans.Employee 


 /logic:iterate

 So you'r going to iterate thru your EmplyList and refer
 Each of ur bean by name EMp.
 Then you can get whatever the attribute you want from your
 Bean,(Employee).

 For this case I think better to use html:multibox,,,
 Can you explain your requirement specifically?

 Regards,
 Mano







 -Original Message-
 From: Kranti Parisa [mailto:[EMAIL PROTECTED]
 Sent: Wednesday, December 13, 2006 3:06 PM
 To: Struts Users Mailing List
 Subject: Re: logic:iterate for arraylist of beans

 Hi Mano,

 In the code you have written logic:iterate id=Emp type=...

 Emp should be the name of the ArrayList right?

 and in logic:iterate type is there? i hope you mean to say
collection=
 ..

 and i need to submit the form after selecting what ever checkboxes
that i
 need to delete and then click on the detele button.but in the code
that
 you
 gave me will submit the orm when i click on the checkbox i think.

 the problem is for the value of the checkbox
 i should assign the value of the checkbox as empid. so that when i
submit
 the form we can capture all the checked empid using
req.gerParamaterValues

 please suggest something


 On 12/14/06, mano dasanayake [EMAIL PROTECTED] wrote:
 
  Hi,
  As I understood what you have to do is,
  Iterate through your list and add checkboxes as folllwing...
 
  logic:iterate id=Emp type=...
 
  html:checkbox  property=prop1 value=true
  onclick=submitForm(editaction.do?id=bean:write name=Emp
  property=ID/) /
  bean:write name=Emp property=name/
 
 
  /logic:iterate
 
  Regards,
  Mano
 
 
 
 
  -Original Message-
  From: Kranti Parisa [mailto:[EMAIL PROTECTED]
  Sent: Wednesday, December 13, 2006 2:07 PM
  To: Struts Users Mailing List
  Subject: logic:iterate for arraylist of beans
 
  hi,
 
  i am facing proble for the following
  =
  assigning value to check box
 
  say logic:iterate is having arraylist
  this arraylist is with beans
  means for example employee bean
  i want to view all emps in jsp
  what we will do is we create a bean for each employee
  and add tht bean to arraylist
  so tht we have this arraylist in jsp
  then we use logic:iterate
  to iterate the arraylist
  now we need to print the rows
  each row contains a check box
  this check box should get the value as empid
  so tht when i select the checkbox
  we can do delete or modify..etc
  
 
  plz suggest/help from this.
  stuck up completely with this.
 
 
 
 
-
  To unsubscribe, e-mail: [EMAIL PROTECTED]
  For additional commands, e-mail: [EMAIL PROTECTED]
 
 


 --
 --
 Best Regards
 Kranti Kiran Kumar Parisa
 Mobile: +91 - 9849 - 625 - 625 +91 - 9391 - 438 - 738



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




--
--
Best Regards
Kranti Kiran Kumar Parisa
Mobile: +91 - 9849 - 625 - 625 +91 - 9391 - 438 - 738

Information transmitted by this e-mail is proprietary to Infinite Computer 
Solutions and / or its Customers and is intended for use only by the individual 
or the entity

Re: logic:iterate for arraylist of beans

2006-12-13 Thread Kranti Parisa

Dear Anil,
thanks for the information.

but the one you are doing is a traditional way of getting the data.

but as we are using struts there should be some good way to get this done.
if i get any solution i will update the forum


On 12/13/06, Anil Kumar T [EMAIL PROTECTED] wrote:



Hi Kranti,

I also had a similar requirement. But I did it in bad way.. which is ...

input type=checkbox name=EMPIDS value=%=((( EmployeeBean)
EMp).getEmpID())%/


See if this helps you as a quick fix. But if you get a better solution
do let the group know
Thanks  regards,
Anil.


-Original Message-
From: Kranti Parisa [mailto:[EMAIL PROTECTED]
Sent: Wednesday, December 13, 2006 3:23 PM
To: Struts Users Mailing List
Subject: Re: logic:iterate for arraylist of beans

Dear Mano,

I need to display the employees from the emp table
emp table is having following columns
1) empid
2) fname
3) lname
4) email
5) mobile ...etc

so when i fire a query i will be getting Result Set. while looping the
result set i am creating EmployeeBean

eg:

while(rs.next()){
EmployeeBean objEmployee= new EmployeeBean();
objEmployee.setEmpID(rs.getString(1));

similarly for other properties of the bean
then add this to ArrayList
al.add(objEmployee);

} // end of while loop

after that sending the arraylist to jsp thru request.setAttribute

in JSP now i need to iterate the ArrayList of Employee Beans
and display in a form

hope this is clear now. in this case not using any FormBean. directly
getting ArrayList and sending thru request.

so please give me the code template that i need to use
my arraylist name : al
my employee bean name : EmployeeBean
properties in bean: empID,firstName,middleName,...etc



On 12/14/06, mano dasanayake [EMAIL PROTECTED] wrote:

 Hi ,
 I'm using 1.2 any how...what I mean in the Iterate code is that you
simply
 Define an ID for the bean that you are about to iterate...

 For an instance,


 logic:iterate id=EMp name=YourFormBean property=EmplyList
 type=com.yourCom.common.beans.Employee 


 /logic:iterate

 So you'r going to iterate thru your EmplyList and refer
 Each of ur bean by name EMp.
 Then you can get whatever the attribute you want from your
 Bean,(Employee).

 For this case I think better to use html:multibox,,,
 Can you explain your requirement specifically?

 Regards,
 Mano







 -Original Message-
 From: Kranti Parisa [mailto:[EMAIL PROTECTED]
 Sent: Wednesday, December 13, 2006 3:06 PM
 To: Struts Users Mailing List
 Subject: Re: logic:iterate for arraylist of beans

 Hi Mano,

 In the code you have written logic:iterate id=Emp type=...

 Emp should be the name of the ArrayList right?

 and in logic:iterate type is there? i hope you mean to say
collection=
 ..

 and i need to submit the form after selecting what ever checkboxes
that i
 need to delete and then click on the detele button.but in the code
that
 you
 gave me will submit the orm when i click on the checkbox i think.

 the problem is for the value of the checkbox
 i should assign the value of the checkbox as empid. so that when i
submit
 the form we can capture all the checked empid using
req.gerParamaterValues

 please suggest something


 On 12/14/06, mano dasanayake [EMAIL PROTECTED] wrote:
 
  Hi,
  As I understood what you have to do is,
  Iterate through your list and add checkboxes as folllwing...
 
  logic:iterate id=Emp type=...
 
  html:checkbox  property=prop1 value=true
  onclick=submitForm(editaction.do?id=bean:write name=Emp
  property=ID/) /
  bean:write name=Emp property=name/
 
 
  /logic:iterate
 
  Regards,
  Mano
 
 
 
 
  -Original Message-
  From: Kranti Parisa [mailto:[EMAIL PROTECTED]
  Sent: Wednesday, December 13, 2006 2:07 PM
  To: Struts Users Mailing List
  Subject: logic:iterate for arraylist of beans
 
  hi,
 
  i am facing proble for the following
  =
  assigning value to check box
 
  say logic:iterate is having arraylist
  this arraylist is with beans
  means for example employee bean
  i want to view all emps in jsp
  what we will do is we create a bean for each employee
  and add tht bean to arraylist
  so tht we have this arraylist in jsp
  then we use logic:iterate
  to iterate the arraylist
  now we need to print the rows
  each row contains a check box
  this check box should get the value as empid
  so tht when i select the checkbox
  we can do delete or modify..etc
  
 
  plz suggest/help from this.
  stuck up completely with this.
 
 
 
 
-
  To unsubscribe, e-mail: [EMAIL PROTECTED]
  For additional commands, e-mail: [EMAIL PROTECTED]
 
 


 --
 --
 Best Regards
 Kranti Kiran Kumar Parisa
 Mobile: +91 - 9849 - 625 - 625 +91 - 9391 - 438 - 738



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

Re: logic:iterate for arraylist of beans

2006-12-13 Thread Kranti Parisa

hi

i am using the following code in jsp


ArrayList alEmpList = (ArrayList) request.getAttribute(alemp);


logic:iterate id=empbean property=alEmpList type=com.emp.EmployeeBean




bean:write name=empbean property=strEmpName/


/logic:iterate
but i am not getting the value from the bean that is there in the List
Please do suggest me





On 12/13/06, Kranti Parisa [EMAIL PROTECTED] wrote:


Dear Anil,
thanks for the information.

but the one you are doing is a traditional way of getting the data.

but as we are using struts there should be some good way to get this done.
if i get any solution i will update the forum


 On 12/13/06, Anil Kumar T [EMAIL PROTECTED] wrote:


 Hi Kranti,

 I also had a similar requirement. But I did it in bad way.. which is ...

 input type=checkbox name=EMPIDS value=%=((( EmployeeBean)
 EMp).getEmpID())%/


 See if this helps you as a quick fix. But if you get a better solution
 do let the group know
 Thanks  regards,
 Anil.


 -Original Message-
 From: Kranti Parisa [mailto:[EMAIL PROTECTED]
 Sent: Wednesday, December 13, 2006 3:23 PM
 To: Struts Users Mailing List
 Subject: Re: logic:iterate for arraylist of beans

 Dear Mano,

 I need to display the employees from the emp table
 emp table is having following columns
 1) empid
 2) fname
 3) lname
 4) email
 5) mobile ...etc

 so when i fire a query i will be getting Result Set. while looping the
 result set i am creating EmployeeBean

 eg:

 while(rs.next()){
 EmployeeBean objEmployee= new EmployeeBean();
 objEmployee.setEmpID(rs.getString(1));

 similarly for other properties of the bean
 then add this to ArrayList
 al.add(objEmployee);

 } // end of while loop

 after that sending the arraylist to jsp thru request.setAttribute

 in JSP now i need to iterate the ArrayList of Employee Beans
 and display in a form

 hope this is clear now. in this case not using any FormBean. directly
 getting ArrayList and sending thru request.

 so please give me the code template that i need to use
 my arraylist name : al
 my employee bean name : EmployeeBean
 properties in bean: empID,firstName,middleName,...etc



 On 12/14/06, mano dasanayake [EMAIL PROTECTED] wrote:
 
  Hi ,
  I'm using 1.2 any how...what I mean in the Iterate code is that you
 simply
  Define an ID for the bean that you are about to iterate...
 
  For an instance,
 
 
  logic:iterate id=EMp name=YourFormBean property=EmplyList
  type=com.yourCom.common.beans.Employee 
 
 
  /logic:iterate
 
  So you'r going to iterate thru your EmplyList and refer
  Each of ur bean by name EMp.
  Then you can get whatever the attribute you want from your
  Bean,(Employee).
 
  For this case I think better to use html:multibox,,,
  Can you explain your requirement specifically?
 
  Regards,
  Mano
 
 
 
 
 
 
 
  -Original Message-
  From: Kranti Parisa [mailto:[EMAIL PROTECTED] ]
  Sent: Wednesday, December 13, 2006 3:06 PM
  To: Struts Users Mailing List
  Subject: Re: logic:iterate for arraylist of beans
 
  Hi Mano,
 
  In the code you have written logic:iterate id=Emp type=...
 
  Emp should be the name of the ArrayList right?
 
  and in logic:iterate type is there? i hope you mean to say
 collection=
  ..
 
  and i need to submit the form after selecting what ever checkboxes
 that i
  need to delete and then click on the detele button.but in the code
 that
  you
  gave me will submit the orm when i click on the checkbox i think.
 
  the problem is for the value of the checkbox
  i should assign the value of the checkbox as empid. so that when i
 submit
  the form we can capture all the checked empid using
 req.gerParamaterValues
 
  please suggest something
 
 
  On 12/14/06, mano dasanayake [EMAIL PROTECTED] wrote:
  
   Hi,
   As I understood what you have to do is,
   Iterate through your list and add checkboxes as folllwing...
  
   logic:iterate id=Emp type=...
  
   html:checkbox  property=prop1 value=true
   onclick=submitForm( editaction.do?id=bean:write name=Emp
   property=ID/) /
   bean:write name=Emp property=name/
  
  
   /logic:iterate
  
   Regards,
   Mano
  
  
  
  
   -Original Message-
   From: Kranti Parisa [mailto: [EMAIL PROTECTED]
   Sent: Wednesday, December 13, 2006 2:07 PM
   To: Struts Users Mailing List
   Subject: logic:iterate for arraylist of beans
  
   hi,
  
   i am facing proble for the following
   =
   assigning value to check box
  
   say logic:iterate is having arraylist
   this arraylist is with beans
   means for example employee bean
   i want to view all emps in jsp
   what we will do is we create a bean for each employee
   and add tht bean to arraylist
   so tht we have this arraylist in jsp
   then we use logic:iterate
   to iterate the arraylist
   now we need to print the rows
   each row contains a check box
   this check box should get the value as empid
   so tht when i select the checkbox
   we can do delete or modify..etc
   
  
   plz

how get index value at logic:iterate

2006-12-12 Thread Po Po
Hello,

I've a collection and i iterate using logic:iterate,
inside the iterate, put a html:select.

logic:iterate name=form property=coll id=idx
indexId=indexId
...
html:select name=idx property=grade
onchange=onchangeGrade(${indexId}); 
/html:select
...
/logic:iterate


In the html:select, I add an javascript onchange
event. the event call onchangeGrade. 
I need the indexId is write as parameter in javascript
onchangeGrade.
But when I run, it's javascript error. When view the
html source see, the ${indexId} is not convert to a
number (just as string).

Expected: onchange=onchangeGrade(0);
  onchange=onchangeGrade(1);
  ... etc


Anyone can help?

Thanks,
Popo


 

Need a quick answer? Get one in minutes from people who know.
Ask your question on www.Answers.yahoo.com

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



Re: how get index value at logic:iterate

2006-12-12 Thread Nikhil Walvekar

try

onchange='%= onchangeGrade( + indexId.intValue() + ); %'


Regards,
Nikhil

On 12/12/06, Po Po [EMAIL PROTECTED] wrote:


Hello,

I've a collection and i iterate using logic:iterate,
inside the iterate, put a html:select.

logic:iterate name=form property=coll id=idx
indexId=indexId
...
html:select name=idx property=grade
onchange=onchangeGrade(${indexId}); 
/html:select
...
/logic:iterate


In the html:select, I add an javascript onchange
event. the event call onchangeGrade.
I need the indexId is write as parameter in javascript
onchangeGrade.
But when I run, it's javascript error. When view the
html source see, the ${indexId} is not convert to a
number (just as string).

Expected: onchange=onchangeGrade(0);
  onchange=onchangeGrade(1);
  ... etc


Anyone can help?

Thanks,
Popo





Need a quick answer? Get one in minutes from people who know.
Ask your question on www.Answers.yahoo.com

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





--
Nikhil


Re: how get index value at logic:iterate

2006-12-12 Thread Antonio Petrelli

Po Po ha scritto:

But when I run, it's javascript error. When view the
html source see, the ${indexId} is not convert to a
number (just as string).
  


Do you use a JSP 2.0 compliant app server, such as Tomcat 5.5?

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



  1   2   3   4   >