RE: Checkbox values: how to substitute the value attribute by the book id?

2003-11-14 Thread Geert Van Landeghem
Sumit, 

I found a solution to this problem as following:

!-- presenting the selected checkbox values --
logic:present name=bookListForm property=selectedBook
logic:iterate id=sel name=bookListForm property=selectedBook
brindex = bean:write name=sel/
/logic:iterate
/logic:present

!-- the form with the checkbox for each row of the html table --
!-- refers to this page being executed again --
html:form action=/booklist
table width=95% border=1
tr
th bgcolor=#330066font color=#FFnbsp;/font/th
th bgcolor=#330066font color=#FFAuthorL/font/th
th bgcolor=#330066font color=#FFAuthorF/font/th
th bgcolor=#330066font color=#FFTitle/font/th
/tr
logic:iterate id=book name=BookListKey scope=request 
tr 
tdhtml:checkbox property=selectedBook value=??bean:write name=book 
property=id//html:checkbox/td
tdbean:write name=book property=authorLastName/nbsp;/td
tdbean:write name=book property=authorFirstName/nbsp;/td 
tdbean:write name=book property=title/nbsp;/td   
/tr
/logic:iterate
/table
html:submitProcess/html:submit
/html:form
-Original Message-
From: Sumit S. [mailto:[EMAIL PROTECTED]
Sent: vrijdag 14 november 2003 12:51
To: Struts Users Mailing List
Subject: RE: Checkbox values


Geert,
 this would create BookListKey[i].selectedBook = 1 for Checked Books

When you have to render this info try

logic:present name=BookListKey
logic:iterate id=book name=BookListKey
logic:equal name=book property=selectedBook value=1 
brselected index = bean:write name=book property=id/
/logic:equal
/logic:iterate
/logic:present


hope this helps

Regards
Sumit


-Original Message-
From: Geert Van Landeghem [mailto:[EMAIL PROTECTED]
Sent: Friday, November 14, 2003 4:56 PM
To: Struts Users Mailing List
Subject: Checkbox values


Hello all,
 
I'm trying to show the selected rows in a html table by using check
boxes. I'm using the same jsp to show the selected row indexes of the table.

What am I'm doing wrong because I'm not able to see the selected indexes:

logic:present name=selectedBook
logic:iterate id=sel name=selectedBook
brselected index = bean:write name=sel/
/logic:iterate
/logic:present

logic:iterate id=book name=BookListKey scope=request 
tr 
tdhtml:checkbox property=selectedBookbean:write name=book 
property=id//html:checkbox/td
tdbean:write name=book property=authorLastName/nbsp;/td
tdbean:write name=book property=authorFirstName/nbsp;/td 
tdbean:write name=book property=title/nbsp;/td   
/tr
/logic:iterate

tia,

met vriendelijke groeten,
salutations sincères,
kind regards,

Geert Van Landeghem
Reynders Etiketten NV
tel: +32 3 460.32.81
gsm: +32 477.75.95.33
mailto:[EMAIL PROTECTED]

Give me 
the power to accept the things i cannot change,
the strength to change the things i can change,
and the insight to tell the difference


-
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: Checkbox values: how to substitute the value attribute by the book id?

2003-11-14 Thread Geert Van Landeghem
But how to substitute the value=?? by the book id?

Geert

-Original Message-
From: Geert Van Landeghem 
Sent: vrijdag 14 november 2003 14:48
To: Struts Users Mailing List
Subject: RE: Checkbox values: how to substitute the value attribute by
the book id?


Sumit, 

I found a solution to this problem as following:

!-- presenting the selected checkbox values --
logic:present name=bookListForm property=selectedBook
logic:iterate id=sel name=bookListForm property=selectedBook
brindex = bean:write name=sel/
/logic:iterate
/logic:present

!-- the form with the checkbox for each row of the html table --
!-- refers to this page being executed again --
html:form action=/booklist
table width=95% border=1
tr
th bgcolor=#330066font color=#FFnbsp;/font/th
th bgcolor=#330066font color=#FFAuthorL/font/th
th bgcolor=#330066font color=#FFAuthorF/font/th
th bgcolor=#330066font color=#FFTitle/font/th
/tr
logic:iterate id=book name=BookListKey scope=request 
tr 
tdhtml:checkbox property=selectedBook value=??bean:write name=book 
property=id//html:checkbox/td
tdbean:write name=book property=authorLastName/nbsp;/td
tdbean:write name=book property=authorFirstName/nbsp;/td 
tdbean:write name=book property=title/nbsp;/td   
/tr
/logic:iterate
/table
html:submitProcess/html:submit
/html:form
-Original Message-
From: Sumit S. [mailto:[EMAIL PROTECTED]
Sent: vrijdag 14 november 2003 12:51
To: Struts Users Mailing List
Subject: RE: Checkbox values


Geert,
 this would create BookListKey[i].selectedBook = 1 for Checked Books

When you have to render this info try

logic:present name=BookListKey
logic:iterate id=book name=BookListKey
logic:equal name=book property=selectedBook value=1 
brselected index = bean:write name=book property=id/
/logic:equal
/logic:iterate
/logic:present


hope this helps

Regards
Sumit


-Original Message-
From: Geert Van Landeghem [mailto:[EMAIL PROTECTED]
Sent: Friday, November 14, 2003 4:56 PM
To: Struts Users Mailing List
Subject: Checkbox values


Hello all,
 
I'm trying to show the selected rows in a html table by using check
boxes. I'm using the same jsp to show the selected row indexes of the table.

What am I'm doing wrong because I'm not able to see the selected indexes:

logic:present name=selectedBook
logic:iterate id=sel name=selectedBook
brselected index = bean:write name=sel/
/logic:iterate
/logic:present

logic:iterate id=book name=BookListKey scope=request 
tr 
tdhtml:checkbox property=selectedBookbean:write name=book 
property=id//html:checkbox/td
tdbean:write name=book property=authorLastName/nbsp;/td
tdbean:write name=book property=authorFirstName/nbsp;/td 
tdbean:write name=book property=title/nbsp;/td   
/tr
/logic:iterate

tia,

met vriendelijke groeten,
salutations sincères,
kind regards,

Geert Van Landeghem
Reynders Etiketten NV
tel: +32 3 460.32.81
gsm: +32 477.75.95.33
mailto:[EMAIL PROTECTED]

Give me 
the power to accept the things i cannot change,
the strength to change the things i can change,
and the insight to tell the difference


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