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



Re: Issue: using logic:iterate to display rows and html:button to distinguish one of them

2006-11-07 Thread Pankaj Gupta

I am facing the same problem. I am trying to use the onclick approach but
not able to make it work. The parameter I pass to the javascript method does
not work. The problem is that the java parameter is not resolved to a value
here.

html:submit property=submitType
onclick=setFile('%=((FileInstance)nmeFile).getFileName()
%', this.form); 

regards,

Pankaj

On 10/26/06, Chris Pratt [EMAIL PROTECTED] wrote:


Another option would be using JavaScript and an onclick handler on the
delete button to update a single contactID hidden field before form
submission.
(*Chris*)

On 10/26/06, Gallagher, Jim (RBoS ITDS Dublin) [EMAIL PROTECTED]
wrote:

 Hi,

 I've discovered the answer, although it may not be the most
 elegant.


 Rather than having one form, have one form per row. This is
 achieved
 by placing the html:form tags inside the logic:iterate ones, then
the
 html:hidden tag will contain the correct value when the button is
 pressed.

 Thanks



  Regards,

  Jim


 -Original Message-
 From: Marcello Savino [mailto:[EMAIL PROTECTED]
 Sent: 26 October 2006 11:32
 To: Struts Users Mailing List
 Subject: R: Issue: using logic:iterate to display rows and html:button
to
 distinguish one of them

 *** WARNING : This message originates from the Internet ***

 Give to the hyperlink a button appereance , don't know other way to do
 this


 Marcello Savino
 ALDEBRA S.p.A.
 tel.  0461302441

 -Messaggio originale-
 Da: Gallagher, Jim (RBoS ITDS Dublin) [mailto:[EMAIL PROTECTED]
 Inviato: giovedì 26 ottobre 2006 12.27
 A: 'Struts Users Mailing List'
 Oggetto: RE: Issue: using logic:iterate to display rows and html:button
to
 distinguish one of them

 Thanks for this - unfortunately I'm required to use a button, not a
 hyperlink. Is it possible?



  Regards,

  Jim


 -Original Message-
 From: Marcello Savino [mailto:[EMAIL PROTECTED]
 Sent: 26 October 2006 11:21
 To: Struts Users Mailing List
 Subject: R: Issue: using logic:iterate to display rows and html:button
to
 distinguish one of them

 *** WARNING : This message originates from the Internet ***

 Sorry i forgot something in my code

 c:url value=/delete.do var=urldel
 c:param name=idToDeletebean:write name=index
property=id
 //c:param
 c:param name=page value=thisPage.do?method=Open/c:param
 /c:url
 a href=c:out value=${urldel}/Delete/a

 HIH
 Ciao, marcello



 -Messaggio originale-
 Da: Gallagher, Jim (RBoS ITDS Dublin) [mailto:[EMAIL PROTECTED]
 Inviato: giovedì 26 ottobre 2006 12.02
 A: 'user@struts.apache.org'
 Oggetto: Issue: using logic:iterate to display rows and html:button to
 distinguish one of them

 Hi
 Apologies if this is a simple issue, but it's driving me insane.

 In my web app (using Struts 1.1 on Java 1.4  Websphere) I have a jsp
that
 is using logic:iterate to display a sequence of records.

 On each row I have a Delete button, which should cause the object that
 row
 represents to be deleted. I have a form defined and the Delete button
 submits the form, currently with a html:hidden tag providing the key of
 the
 row to be deleted (contactID).

 The full jsp code is:

 html:form action=scDeleteOrder
 logic:iterate id=outstandinglist name=outstandingList
indexId=index
 property=arrayList type=temptest.OrderDetail bean:write
 name=outstandinglist property=contactID / bean:write
 name=outstandinglist property=contactFirstName / lt;bean:write
 name=outstandinglist property=contactLastName / bean:write
 name=outstandinglist property=organisationName / bean:write
 name=outstandinglist property=dateOrderSent / bean:write
 name=outstandinglist property=orderStatus / bean:write
 name=outstandinglist property=errorCode / bean:write
 name=outstandinglist property=serviceUserNo / bean:write
 name=outstandinglist property=billingSortCode / bean:write
 name=outstandinglist property=billingAccountNo / html:hidden
 name=outstandinglist property=contactID /html:submit
value=Delete
 /
 /logic:iterate /html:form

 My problem is that the contactID returned is always the first one
 displayed,
 not the one of the row selected. I changed the hidden tag to a text one
to
 see the value being written and it was the correct contactID, but on
 pressing the button the contactID retrieved in the Action is always the
 first row displayed.

 Could anybody suggest a) a solution to the above issue and/or b) a more
 elegant way to achieve what I'm trying to do?

 Thanks in advance

  Regards,

  Jim

 Jim Gallagher



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

 Authorised and regulated by the Financial Services Authority.

 This e-mail message is confidential and for use by the addressee only.
If
 the message

Re: Issue: using logic:iterate to display rows and html:button to distinguish one of them

2006-11-07 Thread Chris Pratt

What do you get when you try it?
 (*Chris*)

On 11/7/06, Pankaj Gupta [EMAIL PROTECTED] wrote:


I am facing the same problem. I am trying to use the onclick approach but
not able to make it work. The parameter I pass to the javascript method
does
not work. The problem is that the java parameter is not resolved to a
value
here.

html:submit property=submitType
onclick=setFile('%=((FileInstance)nmeFile).getFileName()
%', this.form); 

regards,

Pankaj

On 10/26/06, Chris Pratt [EMAIL PROTECTED] wrote:

 Another option would be using JavaScript and an onclick handler on the
 delete button to update a single contactID hidden field before form
 submission.
 (*Chris*)

 On 10/26/06, Gallagher, Jim (RBoS ITDS Dublin) [EMAIL PROTECTED]

 wrote:
 
  Hi,
 
  I've discovered the answer, although it may not be the most
  elegant.
 
 
  Rather than having one form, have one form per row. This is
  achieved
  by placing the html:form tags inside the logic:iterate ones, then
 the
  html:hidden tag will contain the correct value when the button is
  pressed.
 
  Thanks
 
 
 
   Regards,
 
   Jim
 
 
  -Original Message-
  From: Marcello Savino [mailto:[EMAIL PROTECTED]
  Sent: 26 October 2006 11:32
  To: Struts Users Mailing List
  Subject: R: Issue: using logic:iterate to display rows and html:button
 to
  distinguish one of them
 
  *** WARNING : This message originates from the Internet ***
 
  Give to the hyperlink a button appereance , don't know other way to do
  this
 
 
  Marcello Savino
  ALDEBRA S.p.A.
  tel.  0461302441
 
  -Messaggio originale-
  Da: Gallagher, Jim (RBoS ITDS Dublin) [mailto:[EMAIL PROTECTED]
]
  Inviato: giovedì 26 ottobre 2006 12.27
  A: 'Struts Users Mailing List'
  Oggetto: RE: Issue: using logic:iterate to display rows and
html:button
 to
  distinguish one of them
 
  Thanks for this - unfortunately I'm required to use a button, not a
  hyperlink. Is it possible?
 
 
 
   Regards,
 
   Jim
 
 
  -Original Message-
  From: Marcello Savino [mailto:[EMAIL PROTECTED]
  Sent: 26 October 2006 11:21
  To: Struts Users Mailing List
  Subject: R: Issue: using logic:iterate to display rows and html:button
 to
  distinguish one of them
 
  *** WARNING : This message originates from the Internet ***
 
  Sorry i forgot something in my code
 
  c:url value=/delete.do var=urldel
  c:param name=idToDeletebean:write name=index
 property=id
  //c:param
  c:param name=page value=thisPage.do
?method=Open/c:param
  /c:url
  a href=c:out value=${urldel}/Delete/a
 
  HIH
  Ciao, marcello
 
 
 
  -Messaggio originale-
  Da: Gallagher, Jim (RBoS ITDS Dublin) [mailto:[EMAIL PROTECTED]
]
  Inviato: giovedì 26 ottobre 2006 12.02
  A: 'user@struts.apache.org'
  Oggetto: Issue: using logic:iterate to display rows and html:button to
  distinguish one of them
 
  Hi
  Apologies if this is a simple issue, but it's driving me insane.
 
  In my web app (using Struts 1.1 on Java 1.4  Websphere) I have a jsp
 that
  is using logic:iterate to display a sequence of records.
 
  On each row I have a Delete button, which should cause the object
that
  row
  represents to be deleted. I have a form defined and the Delete button
  submits the form, currently with a html:hidden tag providing the key
of
  the
  row to be deleted (contactID).
 
  The full jsp code is:
 
  html:form action=scDeleteOrder
  logic:iterate id=outstandinglist name=outstandingList
 indexId=index
  property=arrayList type=temptest.OrderDetail bean:write
  name=outstandinglist property=contactID / bean:write
  name=outstandinglist property=contactFirstName / lt;bean:write
  name=outstandinglist property=contactLastName / bean:write
  name=outstandinglist property=organisationName / bean:write
  name=outstandinglist property=dateOrderSent / bean:write
  name=outstandinglist property=orderStatus / bean:write
  name=outstandinglist property=errorCode / bean:write
  name=outstandinglist property=serviceUserNo / bean:write
  name=outstandinglist property=billingSortCode / bean:write
  name=outstandinglist property=billingAccountNo / html:hidden
  name=outstandinglist property=contactID /html:submit
 value=Delete
  /
  /logic:iterate /html:form
 
  My problem is that the contactID returned is always the first one
  displayed,
  not the one of the row selected. I changed the hidden tag to a text
one
 to
  see the value being written and it was the correct contactID, but on
  pressing the button the contactID retrieved in the Action is always
the
  first row displayed.
 
  Could anybody suggest a) a solution to the above issue and/or b) a
more
  elegant way to achieve what I'm trying to do?
 
  Thanks in advance
 
   Regards,
 
   Jim
 
  Jim Gallagher
 
 
 
  The Royal Bank

Re: Issue: using logic:iterate to display rows and html:button to distinguish one of them

2006-11-07 Thread Pankaj Gupta
Thanks Chris for the response. I have fixed the bug. It works now the new 
code looks like this:
html:submit property=submitType onclick=%= return setFile(' + 
((FileInstance)nmeFile).getFileName() +')% 





Chris Pratt [EMAIL PROTECTED] 
11/08/2006 11:48 AM
Please respond to
Struts Users Mailing List user@struts.apache.org


To
Struts Users Mailing List user@struts.apache.org
cc

Subject
Re: Issue: using logic:iterate to display rows and html:button to 
distinguish one of them






What do you get when you try it?
  (*Chris*)

On 11/7/06, Pankaj Gupta [EMAIL PROTECTED] wrote:

 I am facing the same problem. I am trying to use the onclick approach 
but
 not able to make it work. The parameter I pass to the javascript method
 does
 not work. The problem is that the java parameter is not resolved to a
 value
 here.

 html:submit property=submitType
 onclick=setFile('%=((FileInstance)nmeFile).getFileName()
 %', this.form); 

 regards,

 Pankaj

 On 10/26/06, Chris Pratt [EMAIL PROTECTED] wrote:

  Another option would be using JavaScript and an onclick handler on the
  delete button to update a single contactID hidden field before form
  submission.
  (*Chris*)
 
  On 10/26/06, Gallagher, Jim (RBoS ITDS Dublin) 
[EMAIL PROTECTED]
 
  wrote:
  
   Hi,
  
   I've discovered the answer, although it may not be the most
   elegant.
  
  
   Rather than having one form, have one form per row. This is
   achieved
   by placing the html:form tags inside the logic:iterate ones, 
then
  the
   html:hidden tag will contain the correct value when the button is
   pressed.
  
   Thanks
  
  
  
Regards,
  
Jim
  
  
   -Original Message-
   From: Marcello Savino [mailto:[EMAIL PROTECTED]
   Sent: 26 October 2006 11:32
   To: Struts Users Mailing List
   Subject: R: Issue: using logic:iterate to display rows and 
html:button
  to
   distinguish one of them
  
   *** WARNING : This message originates from the Internet ***
  
   Give to the hyperlink a button appereance , don't know other way to 
do
   this
  
  
   Marcello Savino
   ALDEBRA S.p.A.
   tel.  0461302441
  
   -Messaggio originale-
   Da: Gallagher, Jim (RBoS ITDS Dublin) 
[mailto:[EMAIL PROTECTED]
 ]
   Inviato: giovedì 26 ottobre 2006 12.27
   A: 'Struts Users Mailing List'
   Oggetto: RE: Issue: using logic:iterate to display rows and
 html:button
  to
   distinguish one of them
  
   Thanks for this - unfortunately I'm required to use a button, not a
   hyperlink. Is it possible?
  
  
  
Regards,
  
Jim
  
  
   -Original Message-
   From: Marcello Savino [mailto:[EMAIL PROTECTED]
   Sent: 26 October 2006 11:21
   To: Struts Users Mailing List
   Subject: R: Issue: using logic:iterate to display rows and 
html:button
  to
   distinguish one of them
  
   *** WARNING : This message originates from the Internet ***
  
   Sorry i forgot something in my code
  
   c:url value=/delete.do var=urldel
   c:param name=idToDeletebean:write name=index
  property=id
   //c:param
   c:param name=page value=thisPage.do
 ?method=Open/c:param
   /c:url
   a href=c:out value=${urldel}/Delete/a
  
   HIH
   Ciao, marcello
  
  
  
   -Messaggio originale-
   Da: Gallagher, Jim (RBoS ITDS Dublin) 
[mailto:[EMAIL PROTECTED]
 ]
   Inviato: giovedì 26 ottobre 2006 12.02
   A: 'user@struts.apache.org'
   Oggetto: Issue: using logic:iterate to display rows and html:button 
to
   distinguish one of them
  
   Hi
   Apologies if this is a simple issue, but it's driving me insane.
  
   In my web app (using Struts 1.1 on Java 1.4  Websphere) I have a 
jsp
  that
   is using logic:iterate to display a sequence of records.
  
   On each row I have a Delete button, which should cause the object
 that
   row
   represents to be deleted. I have a form defined and the Delete 
button
   submits the form, currently with a html:hidden tag providing the key
 of
   the
   row to be deleted (contactID).
  
   The full jsp code is:
  
   html:form action=scDeleteOrder
   logic:iterate id=outstandinglist name=outstandingList
  indexId=index
   property=arrayList type=temptest.OrderDetail bean:write
   name=outstandinglist property=contactID / bean:write
   name=outstandinglist property=contactFirstName / lt;bean:write
   name=outstandinglist property=contactLastName / bean:write
   name=outstandinglist property=organisationName / bean:write
   name=outstandinglist property=dateOrderSent / bean:write
   name=outstandinglist property=orderStatus / bean:write
   name=outstandinglist property=errorCode / bean:write
   name=outstandinglist property=serviceUserNo / bean:write
   name=outstandinglist property=billingSortCode / bean:write
   name=outstandinglist property=billingAccountNo / html:hidden
   name=outstandinglist property=contactID /html:submit
  value=Delete

Re: Issue: using logic:iterate to display rows and html:button to dis tinguish one of them

2006-11-07 Thread WongTseng

It's bacause you have more than one hidden elements with the same name,so
whichever
row you choose to delete, your action will recive an array of parameter
values with the same  parameter name. That's the reason why you always get
the id of the first row. I suggest you to use a radio boxs to replace the
hidden elements,and only one delete button is enough.
2006/10/26, Gallagher, Jim (RBoS ITDS Dublin) [EMAIL PROTECTED]:


Hi
Apologies if this is a simple issue, but it's driving me insane.

In my web app (using Struts 1.1 on Java 1.4  Websphere) I have a jsp that
is using logic:iterate to display a sequence of records.

On each row I have a Delete button, which should cause the object that
row
represents to be deleted. I have a form defined and the Delete button
submits the form, currently with a html:hidden tag providing the key of
the
row to be deleted (contactID).

The full jsp code is:

html:form action=scDeleteOrder
logic:iterate id=outstandinglist name=outstandingList indexId=index
property=arrayList type=temptest.OrderDetail
bean:write name=outstandinglist property=contactID /
bean:write name=outstandinglist property=contactFirstName /
lt;bean:write name=outstandinglist property=contactLastName /
bean:write name=outstandinglist property=organisationName /
bean:write name=outstandinglist property=dateOrderSent /
bean:write name=outstandinglist property=orderStatus /
bean:write name=outstandinglist property=errorCode /
bean:write name=outstandinglist property=serviceUserNo /
bean:write name=outstandinglist property=billingSortCode /
bean:write name=outstandinglist property=billingAccountNo /
html:hidden name=outstandinglist property=contactID /html:submit
value=Delete /
/logic:iterate
/html:form

My problem is that the contactID returned is always the first one
displayed,
not the one of the row selected. I changed the hidden tag to a text one to
see the value being written and it was the correct contactID, but on
pressing the button the contactID retrieved in the Action is always the
first row displayed.

Could anybody suggest a) a solution to the above issue and/or b) a more
elegant way to achieve what I'm trying to do?

Thanks in advance

 Regards,

 Jim

Jim Gallagher



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

Authorised and regulated by the Financial Services Authority.

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

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


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





--
Wong Tseng
王曾


RE: Issue: using logic:iterate to display rows and html:button to distinguish one of them

2006-10-26 Thread Gallagher, Jim (RBoS ITDS Dublin)
Thanks for this - unfortunately I'm required to use a button, not a
hyperlink. Is it possible? 



 Regards,

 Jim

Jim Gallagher,
New BACS Team,
Domestic Payments,
Payments, Security  Fraud,
Royal Bank of Scotland,
Parkgate Business Park,
Parkgate Street,
Dublin 8.
RBS Depot Code: DUB

ITS:7-4171-7167
External:   +353-1-648 7167 
Internet mail:  [EMAIL PROTECTED]

-Original Message-
From: Marcello Savino [mailto:[EMAIL PROTECTED] 
Sent: 26 October 2006 11:21
To: Struts Users Mailing List
Subject: R: Issue: using logic:iterate to display rows and html:button to
distinguish one of them

*** WARNING : This message originates from the Internet ***

Sorry i forgot something in my code

c:url value=/delete.do var=urldel
c:param name=idToDeletebean:write name=index property=id
//c:param
c:param name=page value=thisPage.do?method=Open/c:param
/c:url
a href=c:out value=${urldel}/Delete/a

HIH
Ciao, marcello



-Messaggio originale-
Da: Gallagher, Jim (RBoS ITDS Dublin) [mailto:[EMAIL PROTECTED]
Inviato: giovedì 26 ottobre 2006 12.02
A: 'user@struts.apache.org'
Oggetto: Issue: using logic:iterate to display rows and html:button to
distinguish one of them

Hi
Apologies if this is a simple issue, but it's driving me insane. 

In my web app (using Struts 1.1 on Java 1.4  Websphere) I have a jsp that
is using logic:iterate to display a sequence of records.

On each row I have a Delete button, which should cause the object that row
represents to be deleted. I have a form defined and the Delete button
submits the form, currently with a html:hidden tag providing the key of the
row to be deleted (contactID). 

The full jsp code is: 

html:form action=scDeleteOrder
logic:iterate id=outstandinglist name=outstandingList indexId=index
property=arrayList type=temptest.OrderDetail bean:write
name=outstandinglist property=contactID / bean:write
name=outstandinglist property=contactFirstName / lt;bean:write
name=outstandinglist property=contactLastName / bean:write
name=outstandinglist property=organisationName / bean:write
name=outstandinglist property=dateOrderSent / bean:write
name=outstandinglist property=orderStatus / bean:write
name=outstandinglist property=errorCode / bean:write
name=outstandinglist property=serviceUserNo / bean:write
name=outstandinglist property=billingSortCode / bean:write
name=outstandinglist property=billingAccountNo / html:hidden
name=outstandinglist property=contactID /html:submit value=Delete /
/logic:iterate /html:form 

My problem is that the contactID returned is always the first one displayed,
not the one of the row selected. I changed the hidden tag to a text one to
see the value being written and it was the correct contactID, but on
pressing the button the contactID retrieved in the Action is always the
first row displayed. 

Could anybody suggest a) a solution to the above issue and/or b) a more
elegant way to achieve what I'm trying to do? 

Thanks in advance 

 Regards,

 Jim

Jim Gallagher



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

Authorised and regulated by the Financial Services Authority.

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

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


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


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


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



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

Authorised and regulated by the Financial Services Authority.

This e-mail message is confidential and for use by the addressee only. If the 
message is received by anyone other than 

RE: Issue: using logic:iterate to display rows and html:button to distinguish one of them

2006-10-26 Thread Gallagher, Jim (RBoS ITDS Dublin)
Hi,

I've discovered the answer, although it may not be the most elegant.


Rather than having one form, have one form per row. This is achieved
by placing the html:form tags inside the logic:iterate ones, then the
html:hidden tag will contain the correct value when the button is pressed.

Thanks 



 Regards,

 Jim


-Original Message-
From: Marcello Savino [mailto:[EMAIL PROTECTED] 
Sent: 26 October 2006 11:32
To: Struts Users Mailing List
Subject: R: Issue: using logic:iterate to display rows and html:button to
distinguish one of them

*** WARNING : This message originates from the Internet ***

Give to the hyperlink a button appereance , don't know other way to do this


Marcello Savino
ALDEBRA S.p.A. 
tel.  0461302441

-Messaggio originale-
Da: Gallagher, Jim (RBoS ITDS Dublin) [mailto:[EMAIL PROTECTED]
Inviato: giovedì 26 ottobre 2006 12.27
A: 'Struts Users Mailing List'
Oggetto: RE: Issue: using logic:iterate to display rows and html:button to
distinguish one of them

Thanks for this - unfortunately I'm required to use a button, not a
hyperlink. Is it possible? 



 Regards,

 Jim


-Original Message-
From: Marcello Savino [mailto:[EMAIL PROTECTED]
Sent: 26 October 2006 11:21
To: Struts Users Mailing List
Subject: R: Issue: using logic:iterate to display rows and html:button to
distinguish one of them

*** WARNING : This message originates from the Internet ***

Sorry i forgot something in my code

c:url value=/delete.do var=urldel
c:param name=idToDeletebean:write name=index property=id
//c:param
c:param name=page value=thisPage.do?method=Open/c:param
/c:url
a href=c:out value=${urldel}/Delete/a

HIH
Ciao, marcello



-Messaggio originale-
Da: Gallagher, Jim (RBoS ITDS Dublin) [mailto:[EMAIL PROTECTED]
Inviato: giovedì 26 ottobre 2006 12.02
A: 'user@struts.apache.org'
Oggetto: Issue: using logic:iterate to display rows and html:button to
distinguish one of them

Hi
Apologies if this is a simple issue, but it's driving me insane. 

In my web app (using Struts 1.1 on Java 1.4  Websphere) I have a jsp that
is using logic:iterate to display a sequence of records.

On each row I have a Delete button, which should cause the object that row
represents to be deleted. I have a form defined and the Delete button
submits the form, currently with a html:hidden tag providing the key of the
row to be deleted (contactID). 

The full jsp code is: 

html:form action=scDeleteOrder
logic:iterate id=outstandinglist name=outstandingList indexId=index
property=arrayList type=temptest.OrderDetail bean:write
name=outstandinglist property=contactID / bean:write
name=outstandinglist property=contactFirstName / lt;bean:write
name=outstandinglist property=contactLastName / bean:write
name=outstandinglist property=organisationName / bean:write
name=outstandinglist property=dateOrderSent / bean:write
name=outstandinglist property=orderStatus / bean:write
name=outstandinglist property=errorCode / bean:write
name=outstandinglist property=serviceUserNo / bean:write
name=outstandinglist property=billingSortCode / bean:write
name=outstandinglist property=billingAccountNo / html:hidden
name=outstandinglist property=contactID /html:submit value=Delete /
/logic:iterate /html:form 

My problem is that the contactID returned is always the first one displayed,
not the one of the row selected. I changed the hidden tag to a text one to
see the value being written and it was the correct contactID, but on
pressing the button the contactID retrieved in the Action is always the
first row displayed. 

Could anybody suggest a) a solution to the above issue and/or b) a more
elegant way to achieve what I'm trying to do? 

Thanks in advance 

 Regards,

 Jim

Jim Gallagher



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

Authorised and regulated by the Financial Services Authority.

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

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

Re: Issue: using logic:iterate to display rows and html:button to distinguish one of them

2006-10-26 Thread Chris Pratt

Another option would be using JavaScript and an onclick handler on the
delete button to update a single contactID hidden field before form
submission.
 (*Chris*)

On 10/26/06, Gallagher, Jim (RBoS ITDS Dublin) [EMAIL PROTECTED]
wrote:


Hi,

I've discovered the answer, although it may not be the most
elegant.


Rather than having one form, have one form per row. This is
achieved
by placing the html:form tags inside the logic:iterate ones, then the
html:hidden tag will contain the correct value when the button is
pressed.

Thanks



 Regards,

 Jim


-Original Message-
From: Marcello Savino [mailto:[EMAIL PROTECTED]
Sent: 26 October 2006 11:32
To: Struts Users Mailing List
Subject: R: Issue: using logic:iterate to display rows and html:button to
distinguish one of them

*** WARNING : This message originates from the Internet ***

Give to the hyperlink a button appereance , don't know other way to do
this


Marcello Savino
ALDEBRA S.p.A.
tel.  0461302441

-Messaggio originale-
Da: Gallagher, Jim (RBoS ITDS Dublin) [mailto:[EMAIL PROTECTED]
Inviato: giovedì 26 ottobre 2006 12.27
A: 'Struts Users Mailing List'
Oggetto: RE: Issue: using logic:iterate to display rows and html:button to
distinguish one of them

Thanks for this - unfortunately I'm required to use a button, not a
hyperlink. Is it possible?



 Regards,

 Jim


-Original Message-
From: Marcello Savino [mailto:[EMAIL PROTECTED]
Sent: 26 October 2006 11:21
To: Struts Users Mailing List
Subject: R: Issue: using logic:iterate to display rows and html:button to
distinguish one of them

*** WARNING : This message originates from the Internet ***

Sorry i forgot something in my code

c:url value=/delete.do var=urldel
c:param name=idToDeletebean:write name=index property=id
//c:param
c:param name=page value=thisPage.do?method=Open/c:param
/c:url
a href=c:out value=${urldel}/Delete/a

HIH
Ciao, marcello



-Messaggio originale-
Da: Gallagher, Jim (RBoS ITDS Dublin) [mailto:[EMAIL PROTECTED]
Inviato: giovedì 26 ottobre 2006 12.02
A: 'user@struts.apache.org'
Oggetto: Issue: using logic:iterate to display rows and html:button to
distinguish one of them

Hi
Apologies if this is a simple issue, but it's driving me insane.

In my web app (using Struts 1.1 on Java 1.4  Websphere) I have a jsp that
is using logic:iterate to display a sequence of records.

On each row I have a Delete button, which should cause the object that
row
represents to be deleted. I have a form defined and the Delete button
submits the form, currently with a html:hidden tag providing the key of
the
row to be deleted (contactID).

The full jsp code is:

html:form action=scDeleteOrder
logic:iterate id=outstandinglist name=outstandingList indexId=index
property=arrayList type=temptest.OrderDetail bean:write
name=outstandinglist property=contactID / bean:write
name=outstandinglist property=contactFirstName / lt;bean:write
name=outstandinglist property=contactLastName / bean:write
name=outstandinglist property=organisationName / bean:write
name=outstandinglist property=dateOrderSent / bean:write
name=outstandinglist property=orderStatus / bean:write
name=outstandinglist property=errorCode / bean:write
name=outstandinglist property=serviceUserNo / bean:write
name=outstandinglist property=billingSortCode / bean:write
name=outstandinglist property=billingAccountNo / html:hidden
name=outstandinglist property=contactID /html:submit value=Delete
/
/logic:iterate /html:form

My problem is that the contactID returned is always the first one
displayed,
not the one of the row selected. I changed the hidden tag to a text one to
see the value being written and it was the correct contactID, but on
pressing the button the contactID retrieved in the Action is always the
first row displayed.

Could anybody suggest a) a solution to the above issue and/or b) a more
elegant way to achieve what I'm trying to do?

Thanks in advance

 Regards,

 Jim

Jim Gallagher



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

Authorised and regulated by the Financial Services Authority.

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

Whilst all reasonable care has been taken to avoid the transmission of
viruses, it is the responsibility of the recipient to ensure that the
onward
transmission, opening or use of this message

RE: Issue with logic:iterate

2005-07-12 Thread Raj Tilak

%
break;
%


From: sadineni [EMAIL PROTECTED]
Reply-To: Struts Users Mailing List user@struts.apache.org
To: user@struts.apache.org
Subject: Issue with logic:iterate
Date: Tue, 12 Jul 2005 20:30:42 +0530

  Hi All,

Is there any way to break loop of logic:iterate loop based on a condition ?

Thanks in advance,

Anil.




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