Logic Iterate - Cannot Create iterator for this collection
Hi All, I have a List collection (paymntTrnsctns) which contains an adminReceipts objects. One of the properties of adminReceipts is a list. So I display the normal string properties of the object, such as receiptNumber and transactionDate, but can't then get the list adminPaymentDetails within the adminReceipts object. I am trying to execute the following code: logic:iterate id=adminReceipts name=paymntTrnsctns div id=ExtractResults style=width: 760px; background-color: #FF; border: 1px; padding: 1px; margin: 0px auto; table width=100% border=1 cellpadding=0 cellspacing=0 tr class=extractResultsTRHeading bgcolor=#FF td class=extractResultsTD bean:message key=prompt.label.receiptNumber/ /td td class=extractResultsTD bean:message key=prompt.label.dateTime/ /td /tr tr class=extractResultsTRHeading bgcolor=jsp:getProperty name=colour property=next/ td class=extractResultsTD bean:write name=adminReceipts property=receiptNumber/ /td td class=extractResultsTD bean:write name=adminReceipts property=transactionDate/ /td /tr /table /div logic:iterate id=adminPaymentDetails name=adminReceipts /logic:iterate /logic:iterate Can anyone please tell me what I'm doing wrong. Thanks, Jackie. - To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED]
Logic Iterate - Cannot Create iterator for this collection
I have a List collection (paymntTrnsctns) which contains an adminReceipts objects. One of the properties of adminReceipts is a list. So I display the normal string properties of the object, such as receiptNumber and transactionDate, but can't then get the list adminPaymentDetails within the adminReceipts object. I am trying to execute the following code: logic:iterate id=adminReceipts name=paymntTrnsctns div id=ExtractResults style=width: 760px; background-color: #FF; border: 1px; padding: 1px; margin: 0px auto; table width=100% border=1 cellpadding=0 cellspacing=0 tr class=extractResultsTRHeading bgcolor=#FF td class=extractResultsTD bean:message key=prompt.label.receiptNumber/ /td td class=extractResultsTD bean:message key=prompt.label.dateTime/ /td /tr tr class=extractResultsTRHeading bgcolor=jsp:getProperty name=colour property=next/ td class=extractResultsTD bean:write name=adminReceipts property=receiptNumber/ /td td class=extractResultsTD bean:write name=adminReceipts property=transactionDate/ /td /tr /table /div logic:iterate id=adminPaymentDetails name=adminReceipts /logic:iterate /logic:iterate Can anyone please tell me what I'm doing wrong. Thanks, Jackie. - To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED]
Re: Logic Iterate - Cannot Create iterator for this collection
I have not looked at this closely, but I notice there is no write in the nested iterator. Can you say what happens with this when you run it? At 01:06 AM 2/4/2004, you wrote: Hi All, I have a List collection (paymntTrnsctns) which contains an adminReceipts objects. One of the properties of adminReceipts is a list. So I display the normal string properties of the object, such as receiptNumber and transactionDate, but can't then get the list adminPaymentDetails within the adminReceipts object. I am trying to execute the following code: logic:iterate id=adminReceipts name=paymntTrnsctns div id=ExtractResults style=width: 760px; background-color: #FF; border: 1px; padding: 1px; margin: 0px auto; table width=100% border=1 cellpadding=0 cellspacing=0 tr class=extractResultsTRHeading bgcolor=#FF td class=extractResultsTD bean:message key=prompt.label.receiptNumber/ /td td class=extractResultsTD bean:message key=prompt.label.dateTime/ /td /tr tr class=extractResultsTRHeading bgcolor=jsp:getProperty name=colour property=next/ td class=extractResultsTD bean:write name=adminReceipts property=receiptNumber/ /td td class=extractResultsTD bean:write name=adminReceipts property=transactionDate/ /td /tr /table /div logic:iterate id=adminPaymentDetails name=adminReceipts /logic:iterate /logic:iterate Can anyone please tell me what I'm doing wrong. Thanks, Jackie. - 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 - Cannot Create iterator for this collection
I did put a bean:write in there and it still doesn't work. -Original Message- From: Michael McGrady [mailto:[EMAIL PROTECTED] Sent: Wednesday, 4 February 2004 5:35 PM To: Struts Users Mailing List Subject: Re: Logic Iterate - Cannot Create iterator for this collection I have not looked at this closely, but I notice there is no write in the nested iterator. Can you say what happens with this when you run it? At 01:06 AM 2/4/2004, you wrote: Hi All, I have a List collection (paymntTrnsctns) which contains an adminReceipts objects. One of the properties of adminReceipts is a list. So I display the normal string properties of the object, such as receiptNumber and transactionDate, but can't then get the list adminPaymentDetails within the adminReceipts object. I am trying to execute the following code: logic:iterate id=adminReceipts name=paymntTrnsctns div id=ExtractResults style=width: 760px; background-color: #FF; border: 1px; padding: 1px; margin: 0px auto; table width=100% border=1 cellpadding=0 cellspacing=0 tr class=extractResultsTRHeading bgcolor=#FF td class=extractResultsTD bean:message key=prompt.label.receiptNumber/ /td td class=extractResultsTD bean:message key=prompt.label.dateTime/ /td /tr tr class=extractResultsTRHeading bgcolor=jsp:getProperty name=colour property=next/ td class=extractResultsTD bean:write name=adminReceipts property=receiptNumber/ /td td class=extractResultsTD bean:write name=adminReceipts property=transactionDate/ /td /tr /table /div logic:iterate id=adminPaymentDetails name=adminReceipts /logic:iterate /logic:iterate Can anyone please tell me what I'm doing wrong. Thanks, Jackie. - 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 - Cannot Create iterator for this collection
What happens? At 01:36 AM 2/4/2004, you wrote: I did put a bean:write in there and it still doesn't work. -Original Message- From: Michael McGrady [mailto:[EMAIL PROTECTED] Sent: Wednesday, 4 February 2004 5:35 PM To: Struts Users Mailing List Subject: Re: Logic Iterate - Cannot Create iterator for this collection I have not looked at this closely, but I notice there is no write in the nested iterator. Can you say what happens with this when you run it? At 01:06 AM 2/4/2004, you wrote: Hi All, I have a List collection (paymntTrnsctns) which contains an adminReceipts objects. One of the properties of adminReceipts is a list. So I display the normal string properties of the object, such as receiptNumber and transactionDate, but can't then get the list adminPaymentDetails within the adminReceipts object. I am trying to execute the following code: logic:iterate id=adminReceipts name=paymntTrnsctns div id=ExtractResults style=width: 760px; background-color: #FF; border: 1px; padding: 1px; margin: 0px auto; table width=100% border=1 cellpadding=0 cellspacing=0 tr class=extractResultsTRHeading bgcolor=#FF td class=extractResultsTD bean:message key=prompt.label.receiptNumber/ /td td class=extractResultsTD bean:message key=prompt.label.dateTime/ /td /tr tr class=extractResultsTRHeading bgcolor=jsp:getProperty name=colour property=next/ td class=extractResultsTD bean:write name=adminReceipts property=receiptNumber/ /td td class=extractResultsTD bean:write name=adminReceipts property=transactionDate/ /td /tr /table /div logic:iterate id=adminPaymentDetails name=adminReceipts /logic:iterate /logic:iterate Can anyone please tell me what I'm doing wrong. Thanks, Jackie. - 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 - Cannot Create iterator for this collection
What happens? At 01:36 AM 2/4/2004, you wrote: I did put a bean:write in there and it still doesn't work. -Original Message- From: Michael McGrady [mailto:[EMAIL PROTECTED] Sent: Wednesday, 4 February 2004 5:35 PM To: Struts Users Mailing List Subject: Re: Logic Iterate - Cannot Create iterator for this collection I have not looked at this closely, but I notice there is no write in the nested iterator. Can you say what happens with this when you run it? At 01:06 AM 2/4/2004, you wrote: Hi All, I have a List collection (paymntTrnsctns) which contains an adminReceipts objects. One of the properties of adminReceipts is a list. So I display the normal string properties of the object, such as receiptNumber and transactionDate, but can't then get the list adminPaymentDetails within the adminReceipts object. I am trying to execute the following code: logic:iterate id=adminReceipts name=paymntTrnsctns div id=ExtractResults style=width: 760px; background-color: #FF; border: 1px; padding: 1px; margin: 0px auto; table width=100% border=1 cellpadding=0 cellspacing=0 tr class=extractResultsTRHeading bgcolor=#FF td class=extractResultsTD bean:message key=prompt.label.receiptNumber/ /td td class=extractResultsTD bean:message key=prompt.label.dateTime/ /td /tr tr class=extractResultsTRHeading bgcolor=jsp:getProperty name=colour property=next/ td class=extractResultsTD bean:write name=adminReceipts property=receiptNumber/ /td td class=extractResultsTD bean:write name=adminReceipts property=transactionDate/ /td /tr /table /div logic:iterate id=adminPaymentDetails name=adminReceipts /logic:iterate /logic:iterate Can anyone please tell me what I'm doing wrong. Thanks, Jackie. - 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 - Cannot Create iterator for this collection
I am still getting Cannot Create Iterator for this collection error. -Original Message- From: Michael McGrady [mailto:[EMAIL PROTECTED] Sent: Wednesday, 4 February 2004 5:42 PM To: Struts Users Mailing List Subject: RE: Logic Iterate - Cannot Create iterator for this collection What happens? At 01:36 AM 2/4/2004, you wrote: I did put a bean:write in there and it still doesn't work. -Original Message- From: Michael McGrady [mailto:[EMAIL PROTECTED] Sent: Wednesday, 4 February 2004 5:35 PM To: Struts Users Mailing List Subject: Re: Logic Iterate - Cannot Create iterator for this collection I have not looked at this closely, but I notice there is no write in the nested iterator. Can you say what happens with this when you run it? At 01:06 AM 2/4/2004, you wrote: Hi All, I have a List collection (paymntTrnsctns) which contains an adminReceipts objects. One of the properties of adminReceipts is a list. So I display the normal string properties of the object, such as receiptNumber and transactionDate, but can't then get the list adminPaymentDetails within the adminReceipts object. I am trying to execute the following code: logic:iterate id=adminReceipts name=paymntTrnsctns div id=ExtractResults style=width: 760px; background-color: #FF; border: 1px; padding: 1px; margin: 0px auto; table width=100% border=1 cellpadding=0 cellspacing=0 tr class=extractResultsTRHeading bgcolor=#FF td class=extractResultsTD bean:message key=prompt.label.receiptNumber/ /td td class=extractResultsTD bean:message key=prompt.label.dateTime/ /td /tr tr class=extractResultsTRHeading bgcolor=jsp:getProperty name=colour property=next/ td class=extractResultsTD bean:write name=adminReceipts property=receiptNumber/ /td td class=extractResultsTD bean:write name=adminReceipts property=transactionDate/ /td /tr /table /div logic:iterate id=adminPaymentDetails name=adminReceipts /logic:iterate /logic:iterate Can anyone please tell me what I'm doing wrong. Thanks, Jackie. - To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED] - To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED] - To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED] - To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED] - To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED]
RE: Logic Iterate - Cannot Create iterator for this collection
) at jrun.servlet.ServletEngineService.dispatch(ServletEngineService.java: 527) at jrun.servlet.http.WebService.invokeRunnable(WebService.java:172) at jrunx.scheduler.ThreadPool$DownstreamMetrics.invokeRunnable(ThreadPoo l.java:348) at jrunx.scheduler.ThreadPool$ThreadThrottle.invokeRunnable(ThreadPool.j ava:451) at jrunx.scheduler.ThreadPool$UpstreamMetrics.invokeRunnable(ThreadPool. java:294) at jrunx.scheduler.WorkerThread.run(WorkerThread.java:66) [0]jrun.jsp.runtime.UncaughtPageException: Unhandled exception thrown from /admi n/adm_obtain_extract_results.jsp:81 at jrun.jsp.runtime.Utils.handleException(Utils.java:57) at jrun.jsp.runtime.JRunPageContext.handlePageException(JRunPageContext. java:381) at jrun__admin__adm_obtain_extract_results2ejsp25._jspService(jrun__admi n__adm_obtain_extract_results2ejsp25.java:540) at jrun.jsp.runtime.HttpJSPServlet.service(HttpJSPServlet.java:43) at jrun.jsp.JSPServlet.service(JSPServlet.java:106) at jrun.servlet.ServletInvoker.invoke(ServletInvoker.java:106) at jrun.servlet.JRunInvokerChain.invokeNext(JRunInvokerChain.java:42) at jrun.servlet.JRunRequestDispatcher.invokeNext(JRunRequestDispatcher.j ava:414) at jrun.servlet.JRunRequestDispatcher.forwardInvoke(JRunRequestDispatche r.java:387) at jrun.servlet.JRunRequestDispatcher.forward(JRunRequestDispatcher.java :172) at org.apache.struts.action.RequestProcessor.doForward(RequestProcessor. java:1069) at org.apache.struts.action.RequestProcessor.processForwardConfig(Reques tProcessor.java:455) at org.apache.struts.action.RequestProcessor.process(RequestProcessor.ja va:279) at org.apache.struts.action.ActionServlet.process(ActionServlet.java:148 2) at org.apache.struts.action.ActionServlet.doGet(ActionServlet.java:507) at javax.servlet.http.HttpServlet.service(HttpServlet.java:740) at javax.servlet.http.HttpServlet.service(HttpServlet.java:853) at jrun.servlet.ServletInvoker.invoke(ServletInvoker.java:106) at jrun.servlet.JRunInvokerChain.invokeNext(JRunInvokerChain.java:42) at jrun.servlet.JRunRequestDispatcher.invoke(JRunRequestDispatcher.java: 241) at jrun.servlet.ServletEngineService.dispatch(ServletEngineService.java: 527) at jrun.servlet.http.WebService.invokeRunnable(WebService.java:172) at jrunx.scheduler.ThreadPool$DownstreamMetrics.invokeRunnable(ThreadPoo l.java:348) at jrunx.scheduler.ThreadPool$ThreadThrottle.invokeRunnable(ThreadPool.j ava:451) at jrunx.scheduler.ThreadPool$UpstreamMetrics.invokeRunnable(ThreadPool. java:294) at jrunx.scheduler.WorkerThread.run(WorkerThread.java:66) -Original Message- From: Michael McGrady [mailto:[EMAIL PROTECTED] Sent: Wednesday, 4 February 2004 5:50 PM To: Struts Users Mailing List Subject: RE: Logic Iterate - Cannot Create iterator for this collection Could you please give more details? Show me the stack trace or whatever you are seeing. At 01:44 AM 2/4/2004, you wrote: I am still getting Cannot Create Iterator for this collection error. -Original Message- From: Michael McGrady [mailto:[EMAIL PROTECTED] Sent: Wednesday, 4 February 2004 5:42 PM To: Struts Users Mailing List Subject: RE: Logic Iterate - Cannot Create iterator for this collection What happens? At 01:36 AM 2/4/2004, you wrote: I did put a bean:write in there and it still doesn't work. -Original Message- From: Michael McGrady [mailto:[EMAIL PROTECTED] Sent: Wednesday, 4 February 2004 5:35 PM To: Struts Users Mailing List Subject: Re: Logic Iterate - Cannot Create iterator for this collection I have not looked at this closely, but I notice there is no write in the nested iterator. Can you say what happens with this when you run it? At 01:06 AM 2/4/2004, you wrote: Hi All, I have a List collection (paymntTrnsctns) which contains an adminReceipts objects. One of the properties of adminReceipts is a list. So I display the normal string properties of the object, such as receiptNumber and transactionDate, but can't then get the list adminPaymentDetails within the adminReceipts object. I am trying to execute the following code: logic:iterate id=adminReceipts name=paymntTrnsctns div id=ExtractResults style=width: 760px; background-color: #FF; border: 1px; padding: 1px; margin: 0px auto; table width=100% border=1 cellpadding=0 cellspacing=0 tr class=extractResultsTRHeading bgcolor=#FF td class=extractResultsTD bean:message key=prompt.label.receiptNumber/ /td td class=extractResultsTD bean:message key=prompt.label.dateTime/ /td /tr tr class=extractResultsTRHeading bgcolor=jsp:getProperty name
RE: Logic Iterate - Cannot Create iterator for this collection
If you do this where? You are not giving enough information. Either give it up or I have to retire. Thanks. At 02:07 AM 2/4/2004, you wrote: if I do a bean:write name=adminReceipts property=adminPaymentDetails/ I get [EMAIL PROTECTED] So I know that the element is there!! I will send a stack trace in a second. -Original Message- From: Michael McGrady [mailto:[EMAIL PROTECTED] Sent: Wednesday, 4 February 2004 5:50 PM To: Struts Users Mailing List Subject: RE: Logic Iterate - Cannot Create iterator for this collection Could you please give more details? Show me the stack trace or whatever you are seeing. At 01:44 AM 2/4/2004, you wrote: I am still getting Cannot Create Iterator for this collection error. -Original Message- From: Michael McGrady [mailto:[EMAIL PROTECTED] Sent: Wednesday, 4 February 2004 5:42 PM To: Struts Users Mailing List Subject: RE: Logic Iterate - Cannot Create iterator for this collection What happens? At 01:36 AM 2/4/2004, you wrote: I did put a bean:write in there and it still doesn't work. -Original Message- From: Michael McGrady [mailto:[EMAIL PROTECTED] Sent: Wednesday, 4 February 2004 5:35 PM To: Struts Users Mailing List Subject: Re: Logic Iterate - Cannot Create iterator for this collection I have not looked at this closely, but I notice there is no write in the nested iterator. Can you say what happens with this when you run it? At 01:06 AM 2/4/2004, you wrote: Hi All, I have a List collection (paymntTrnsctns) which contains an adminReceipts objects. One of the properties of adminReceipts is a list. So I display the normal string properties of the object, such as receiptNumber and transactionDate, but can't then get the list adminPaymentDetails within the adminReceipts object. I am trying to execute the following code: logic:iterate id=adminReceipts name=paymntTrnsctns div id=ExtractResults style=width: 760px; background-color: #FF; border: 1px; padding: 1px; margin: 0px auto; table width=100% border=1 cellpadding=0 cellspacing=0 tr class=extractResultsTRHeading bgcolor=#FF td class=extractResultsTD bean:message key=prompt.label.receiptNumber/ /td td class=extractResultsTD bean:message key=prompt.label.dateTime/ /td /tr tr class=extractResultsTRHeading bgcolor=jsp:getProperty name=colour property=next/ td class=extractResultsTD bean:write name=adminReceipts property=receiptNumber/ /td td class=extractResultsTD bean:write name=adminReceipts property=transactionDate/ /td /tr /table /div logic:iterate id=adminPaymentDetails name=adminReceipts /logic:iterate /logic:iterate Can anyone please tell me what I'm doing wrong. Thanks, Jackie. - To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED] - To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED] - To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED] - To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED] - To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED] - 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 - Cannot Create iterator for this collection
Sorry Michael. I do that in a jsp page. logic:iterate id=adminReceipts name=paymntTrnsctns div id=ExtractResults style=width: 760px; background-color: #FF; border: 1px; padding: 1px; margin: 0px auto; table width=100% border=1 cellpadding=0 cellspacing=0 tr class=extractResultsTRHeading bgcolor=#FF td class=extractResultsTD bean:message key=prompt.label.receiptNumber/ /td td class=extractResultsTD bean:message key=prompt.label.dateTime/ /td /tr tr class=extractResultsTRHeading bgcolor=jsp:getProperty name=colour property=next/ td class=extractResultsTD bean:write name=adminReceipts property=receiptNumber/ /td td class=extractResultsTD bean:write name=adminReceipts property=transactionDate/ /td /tr /table /div bean:write name=adminReceipts property=adminPaymentDetails/ /logic:iterate -Original Message- From: Michael McGrady [mailto:[EMAIL PROTECTED] Sent: Wednesday, 4 February 2004 6:14 PM To: Struts Users Mailing List Subject: RE: Logic Iterate - Cannot Create iterator for this collection If you do this where? You are not giving enough information. Either give it up or I have to retire. Thanks. At 02:07 AM 2/4/2004, you wrote: if I do a bean:write name=adminReceipts property=adminPaymentDetails/ I get [EMAIL PROTECTED] So I know that the element is there!! I will send a stack trace in a second. -Original Message- From: Michael McGrady [mailto:[EMAIL PROTECTED] Sent: Wednesday, 4 February 2004 5:50 PM To: Struts Users Mailing List Subject: RE: Logic Iterate - Cannot Create iterator for this collection Could you please give more details? Show me the stack trace or whatever you are seeing. At 01:44 AM 2/4/2004, you wrote: I am still getting Cannot Create Iterator for this collection error. -Original Message- From: Michael McGrady [mailto:[EMAIL PROTECTED] Sent: Wednesday, 4 February 2004 5:42 PM To: Struts Users Mailing List Subject: RE: Logic Iterate - Cannot Create iterator for this collection What happens? At 01:36 AM 2/4/2004, you wrote: I did put a bean:write in there and it still doesn't work. -Original Message- From: Michael McGrady [mailto:[EMAIL PROTECTED] Sent: Wednesday, 4 February 2004 5:35 PM To: Struts Users Mailing List Subject: Re: Logic Iterate - Cannot Create iterator for this collection I have not looked at this closely, but I notice there is no write in the nested iterator. Can you say what happens with this when you run it? At 01:06 AM 2/4/2004, you wrote: Hi All, I have a List collection (paymntTrnsctns) which contains an adminReceipts objects. One of the properties of adminReceipts is a list. So I display the normal string properties of the object, such as receiptNumber and transactionDate, but can't then get the list adminPaymentDetails within the adminReceipts object. I am trying to execute the following code: logic:iterate id=adminReceipts name=paymntTrnsctns div id=ExtractResults style=width: 760px; background-color: #FF; border: 1px; padding: 1px; margin: 0px auto; table width=100% border=1 cellpadding=0 cellspacing=0 tr class=extractResultsTRHeading bgcolor=#FF td class=extractResultsTD bean:message key=prompt.label.receiptNumber/ /td td class=extractResultsTD bean:message key=prompt.label.dateTime/ /td /tr tr class=extractResultsTRHeading bgcolor=jsp:getProperty name=colour property=next/ td class=extractResultsTD bean:write name=adminReceipts property=receiptNumber/ /td td class=extractResultsTD bean:write name=adminReceipts property=transactionDate/ /td /tr /table /div logic:iterate id=adminPaymentDetails name=adminReceipts /logic:iterate /logic:iterate Can anyone please tell me what I'm doing wrong. Thanks, Jackie. - 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 - Cannot Create iterator for this collection
) at jrun.servlet.JRunRequestDispatcher.invoke(JRunRequestDispatcher.java: 241) at jrun.servlet.ServletEngineService.dispatch(ServletEngineService.java: 527) at jrun.servlet.http.WebService.invokeRunnable(WebService.java:172) at jrunx.scheduler.ThreadPool$DownstreamMetrics.invokeRunnable(ThreadPoo l.java:348) at jrunx.scheduler.ThreadPool$ThreadThrottle.invokeRunnable(ThreadPool.j ava:451) at jrunx.scheduler.ThreadPool$UpstreamMetrics.invokeRunnable(ThreadPool. java:294) at jrunx.scheduler.WorkerThread.run(WorkerThread.java:66) [0]jrun.jsp.runtime.UncaughtPageException: Unhandled exception thrown from /admi n/adm_obtain_extract_results.jsp:81 at jrun.jsp.runtime.Utils.handleException(Utils.java:57) at jrun.jsp.runtime.JRunPageContext.handlePageException(JRunPageContext. java:381) at jrun__admin__adm_obtain_extract_results2ejsp25._jspService(jrun__admi n__adm_obtain_extract_results2ejsp25.java:540) at jrun.jsp.runtime.HttpJSPServlet.service(HttpJSPServlet.java:43) at jrun.jsp.JSPServlet.service(JSPServlet.java:106) at jrun.servlet.ServletInvoker.invoke(ServletInvoker.java:106) at jrun.servlet.JRunInvokerChain.invokeNext(JRunInvokerChain.java:42) at jrun.servlet.JRunRequestDispatcher.invokeNext(JRunRequestDispatcher.j ava:414) at jrun.servlet.JRunRequestDispatcher.forwardInvoke(JRunRequestDispatche r.java:387) at jrun.servlet.JRunRequestDispatcher.forward(JRunRequestDispatcher.java :172) at org.apache.struts.action.RequestProcessor.doForward(RequestProcessor. java:1069) at org.apache.struts.action.RequestProcessor.processForwardConfig(Reques tProcessor.java:455) at org.apache.struts.action.RequestProcessor.process(RequestProcessor.ja va:279) at org.apache.struts.action.ActionServlet.process(ActionServlet.java:148 2) at org.apache.struts.action.ActionServlet.doGet(ActionServlet.java:507) at javax.servlet.http.HttpServlet.service(HttpServlet.java:740) at javax.servlet.http.HttpServlet.service(HttpServlet.java:853) at jrun.servlet.ServletInvoker.invoke(ServletInvoker.java:106) at jrun.servlet.JRunInvokerChain.invokeNext(JRunInvokerChain.java:42) at jrun.servlet.JRunRequestDispatcher.invoke(JRunRequestDispatcher.java: 241) at jrun.servlet.ServletEngineService.dispatch(ServletEngineService.java: 527) at jrun.servlet.http.WebService.invokeRunnable(WebService.java:172) at jrunx.scheduler.ThreadPool$DownstreamMetrics.invokeRunnable(ThreadPoo l.java:348) at jrunx.scheduler.ThreadPool$ThreadThrottle.invokeRunnable(ThreadPool.j ava:451) at jrunx.scheduler.ThreadPool$UpstreamMetrics.invokeRunnable(ThreadPool. java:294) at jrunx.scheduler.WorkerThread.run(WorkerThread.java:66) -Original Message- From: Michael McGrady [mailto:[EMAIL PROTECTED] Sent: Wednesday, 4 February 2004 5:50 PM To: Struts Users Mailing List Subject: RE: Logic Iterate - Cannot Create iterator for this collection Could you please give more details? Show me the stack trace or whatever you are seeing. At 01:44 AM 2/4/2004, you wrote: I am still getting Cannot Create Iterator for this collection error. -Original Message- From: Michael McGrady [mailto:[EMAIL PROTECTED] Sent: Wednesday, 4 February 2004 5:42 PM To: Struts Users Mailing List Subject: RE: Logic Iterate - Cannot Create iterator for this collection What happens? At 01:36 AM 2/4/2004, you wrote: I did put a bean:write in there and it still doesn't work. -Original Message- From: Michael McGrady [mailto:[EMAIL PROTECTED] Sent: Wednesday, 4 February 2004 5:35 PM To: Struts Users Mailing List Subject: Re: Logic Iterate - Cannot Create iterator for this collection I have not looked at this closely, but I notice there is no write in the nested iterator. Can you say what happens with this when you run it? At 01:06 AM 2/4/2004, you wrote: Hi All, I have a List collection (paymntTrnsctns) which contains an adminReceipts objects. One of the properties of adminReceipts is a list. So I display the normal string properties of the object, such as receiptNumber and transactionDate, but can't then get the list adminPaymentDetails within the adminReceipts object. I am trying to execute the following code: logic:iterate id=adminReceipts name=paymntTrnsctns div id=ExtractResults style=width: 760px; background-color: #FF; border: 1px; padding: 1px; margin: 0px auto; table width=100% border=1 cellpadding=0 cellspacing=0 tr class=extractResultsTRHeading bgcolor=#FF td class=extractResultsTD bean:message key=prompt.label.receiptNumber/ /td td class=extractResultsTD bean:message key=prompt.label.dateTime
Re: Logic Iterate - Cannot Create iterator for this collection
You need to specify the name of the collection in the nested iterator (the getter). Add another parameter to the nested iterator line called property. logic:iterate id=adminPaymentDetails name=adminReceipts property=Property name of collection/ /logic:iterate I'm having trouble referencing properties of the nested iterator. On Wed, 2004-02-04 at 11:06, Jacqueline Gomes wrote: Hi All, I have a List collection (paymntTrnsctns) which contains an adminReceipts objects. One of the properties of adminReceipts is a list. So I display the normal string properties of the object, such as receiptNumber and transactionDate, but can't then get the list adminPaymentDetails within the adminReceipts object. I am trying to execute the following code: logic:iterate id=adminReceipts name=paymntTrnsctns div id=ExtractResults style=width: 760px; background-color: #FF; border: 1px; padding: 1px; margin: 0px auto; table width=100% border=1 cellpadding=0 cellspacing=0 tr class=extractResultsTRHeading bgcolor=#FF td class=extractResultsTD bean:message key=prompt.label.receiptNumber/ /td td class=extractResultsTD bean:message key=prompt.label.dateTime/ /td /tr tr class=extractResultsTRHeading bgcolor=jsp:getProperty name=colour property=next/ td class=extractResultsTD bean:write name=adminReceipts property=receiptNumber/ /td td class=extractResultsTD bean:write name=adminReceipts property=transactionDate/ /td /tr /table /div logic:iterate id=adminPaymentDetails name=adminReceipts /logic:iterate /logic:iterate Can anyone please tell me what I'm doing wrong. Thanks, Jackie. - To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED] Read our disclaimer at: http://www.picknpay.co.za/email-disclaimer.htm If you don't have web access, the disclaimer can be mailed to you on request. Disclaimer requests to be sent to [EMAIL PROTECTED] -- Michael Wiles [EMAIL PROTECTED] Pick 'n Pay IS - 1665 Read our disclaimer at: http://www.picknpay.co.za/email-disclaimer.htm If you don't have web access, the disclaimer can be mailed to you on request. Disclaimer requests to be sent to [EMAIL PROTECTED] - To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED]
RE: Logic Iterate - Cannot Create iterator for this collection
Oh, i see. Nope, it isn't. Its an object that should be in a collection! doh!! Thanks very much Michael. -Original Message- From: Michael McGrady [mailto:[EMAIL PROTECTED] Sent: Wednesday, 4 February 2004 6:22 PM To: Struts Users Mailing List Subject: RE: Logic Iterate - Cannot Create iterator for this collection Is [EMAIL PROTECTED] a collection? At 02:07 AM 2/4/2004, you wrote: if I do a bean:write name=adminReceipts property=adminPaymentDetails/ I get [EMAIL PROTECTED] So I know that the element is there!! I will send a stack trace in a second. -Original Message- From: Michael McGrady [mailto:[EMAIL PROTECTED] Sent: Wednesday, 4 February 2004 5:50 PM To: Struts Users Mailing List Subject: RE: Logic Iterate - Cannot Create iterator for this collection Could you please give more details? Show me the stack trace or whatever you are seeing. At 01:44 AM 2/4/2004, you wrote: I am still getting Cannot Create Iterator for this collection error. -Original Message- From: Michael McGrady [mailto:[EMAIL PROTECTED] Sent: Wednesday, 4 February 2004 5:42 PM To: Struts Users Mailing List Subject: RE: Logic Iterate - Cannot Create iterator for this collection What happens? At 01:36 AM 2/4/2004, you wrote: I did put a bean:write in there and it still doesn't work. -Original Message- From: Michael McGrady [mailto:[EMAIL PROTECTED] Sent: Wednesday, 4 February 2004 5:35 PM To: Struts Users Mailing List Subject: Re: Logic Iterate - Cannot Create iterator for this collection I have not looked at this closely, but I notice there is no write in the nested iterator. Can you say what happens with this when you run it? At 01:06 AM 2/4/2004, you wrote: Hi All, I have a List collection (paymntTrnsctns) which contains an adminReceipts objects. One of the properties of adminReceipts is a list. So I display the normal string properties of the object, such as receiptNumber and transactionDate, but can't then get the list adminPaymentDetails within the adminReceipts object. I am trying to execute the following code: logic:iterate id=adminReceipts name=paymntTrnsctns div id=ExtractResults style=width: 760px; background-color: #FF; border: 1px; padding: 1px; margin: 0px auto; table width=100% border=1 cellpadding=0 cellspacing=0 tr class=extractResultsTRHeading bgcolor=#FF td class=extractResultsTD bean:message key=prompt.label.receiptNumber/ /td td class=extractResultsTD bean:message key=prompt.label.dateTime/ /td /tr tr class=extractResultsTRHeading bgcolor=jsp:getProperty name=colour property=next/ td class=extractResultsTD bean:write name=adminReceipts property=receiptNumber/ /td td class=extractResultsTD bean:write name=adminReceipts property=transactionDate/ /td /tr /table /div logic:iterate id=adminPaymentDetails name=adminReceipts /logic:iterate /logic:iterate Can anyone please tell me what I'm doing wrong. Thanks, Jackie. - To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED] - To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED] - To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED] - To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED] - To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED] - 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 - Cannot Create iterator for this collection
I did not mean that J. I meant let's see the code. Stop being so private. LOL. Give it up! At 02:19 AM 2/4/2004, you wrote: Sorry Michael. I do that in a jsp page. logic:iterate id=adminReceipts name=paymntTrnsctns div id=ExtractResults style=width: 760px; background-color: #FF; border: 1px; padding: 1px; margin: 0px auto; table width=100% border=1 cellpadding=0 cellspacing=0 tr class=extractResultsTRHeading bgcolor=#FF td class=extractResultsTD bean:message key=prompt.label.receiptNumber/ /td td class=extractResultsTD bean:message key=prompt.label.dateTime/ /td /tr tr class=extractResultsTRHeading bgcolor=jsp:getProperty name=colour property=next/ td class=extractResultsTD bean:write name=adminReceipts property=receiptNumber/ /td td class=extractResultsTD bean:write name=adminReceipts property=transactionDate/ /td /tr /table /div bean:write name=adminReceipts property=adminPaymentDetails/ /logic:iterate -Original Message- From: Michael McGrady [mailto:[EMAIL PROTECTED] Sent: Wednesday, 4 February 2004 6:14 PM To: Struts Users Mailing List Subject: RE: Logic Iterate - Cannot Create iterator for this collection If you do this where? You are not giving enough information. Either give it up or I have to retire. Thanks. At 02:07 AM 2/4/2004, you wrote: if I do a bean:write name=adminReceipts property=adminPaymentDetails/ I get [EMAIL PROTECTED] So I know that the element is there!! I will send a stack trace in a second. -Original Message- From: Michael McGrady [mailto:[EMAIL PROTECTED] Sent: Wednesday, 4 February 2004 5:50 PM To: Struts Users Mailing List Subject: RE: Logic Iterate - Cannot Create iterator for this collection Could you please give more details? Show me the stack trace or whatever you are seeing. At 01:44 AM 2/4/2004, you wrote: I am still getting Cannot Create Iterator for this collection error. -Original Message- From: Michael McGrady [mailto:[EMAIL PROTECTED] Sent: Wednesday, 4 February 2004 5:42 PM To: Struts Users Mailing List Subject: RE: Logic Iterate - Cannot Create iterator for this collection What happens? At 01:36 AM 2/4/2004, you wrote: I did put a bean:write in there and it still doesn't work. -Original Message- From: Michael McGrady [mailto:[EMAIL PROTECTED] Sent: Wednesday, 4 February 2004 5:35 PM To: Struts Users Mailing List Subject: Re: Logic Iterate - Cannot Create iterator for this collection I have not looked at this closely, but I notice there is no write in the nested iterator. Can you say what happens with this when you run it? At 01:06 AM 2/4/2004, you wrote: Hi All, I have a List collection (paymntTrnsctns) which contains an adminReceipts objects. One of the properties of adminReceipts is a list. So I display the normal string properties of the object, such as receiptNumber and transactionDate, but can't then get the list adminPaymentDetails within the adminReceipts object. I am trying to execute the following code: logic:iterate id=adminReceipts name=paymntTrnsctns div id=ExtractResults style=width: 760px; background-color: #FF; border: 1px; padding: 1px; margin: 0px auto; table width=100% border=1 cellpadding=0 cellspacing=0 tr class=extractResultsTRHeading bgcolor=#FF td class=extractResultsTD bean:message key=prompt.label.receiptNumber/ /td td class=extractResultsTD bean:message key=prompt.label.dateTime/ /td /tr tr class=extractResultsTRHeading bgcolor=jsp:getProperty name=colour property=next/ td class=extractResultsTD bean:write name=adminReceipts property=receiptNumber/ /td td class=extractResultsTD bean:write name=adminReceipts property=transactionDate/ /td /tr /table /div logic:iterate id=adminPaymentDetails name=adminReceipts /logic:iterate /logic:iterate Can anyone please tell me what I'm doing wrong. Thanks, Jackie. - To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED
problem in javascript for select enabled/disabled by checkbox in a list with in logic iterate
Hi All, Please help me on select enabled/disabled by checkbox in a list with in logic iterate I am not able to pass the index for disableing select box basing on check box enale/disable please look at the code part onclick=this.form.subscriptions['%=index %'].selectedWalletItemId.disabled=this.checked?false:true; in the following code. I tried it different ways ...but no success. Other wise also if I want to use simple onclick= sumbit(), to do something action class and refresh, I do not know how to pass the index or other parameters through Any amount of help is really appreciated as this is code in production. Thank you -Udaya Allu logic:iterate name=safeRenewForm property=subscriptions id=subscriptions indexId=index td html:select name=subscriptions property=selectedWalletItemId indexed=true onchange=alert(this.name); html:option value=Select Credit CardSelect Credit Card/html:option logic:iterate id=idx name=safeRenewForm property=walletItems indexId=index bean:define id=blah name=idx property=walletItemID/ html:option value=%= + blah % bbean:write name=idx property=tender.cardType.cardName//b -bean:write name=idx property=tender.last4Digits/nbsp; bean:write name=idx property=tender.expMonth //bean:write name=idx property=tender.expYear/ /html:option /logic:iterate /html:select /td td align=centerhtml:checkbox name=subscriptions property=statusEnabled indexed=true onclick=this.form.subscriptions['%=index %'].selectedWalletItemId.disabled=this.checked?false:true;//td logic:iterate - To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED]
Re: problem in javascript for select enabled/disabled by checkbox in a list with in logic iterate
Well, sorry but you can't use the disabled property for one of a select element's options, you can use it for the whole select. F. - Original Message - From: Udaya Allu [EMAIL PROTECTED] To: [EMAIL PROTECTED] Sent: Thursday, December 11, 2003 5:17 PM Subject: problem in javascript for select enabled/disabled by checkbox in a list with in logic iterate Hi All, Please help me on select enabled/disabled by checkbox in a list with in logic iterate I am not able to pass the index for disableing select box basing on check box enale/disable please look at the code part onclick=this.form.subscriptions['%=index %'].selectedWalletItemId.disabled=this.checked?false:true; in the following code. I tried it different ways ...but no success. Other wise also if I want to use simple onclick= sumbit(), to do something action class and refresh, I do not know how to pass the index or other parameters through Any amount of help is really appreciated as this is code in production. Thank you -Udaya Allu logic:iterate name=safeRenewForm property=subscriptions id=subscriptions indexId=index td html:select name=subscriptions property=selectedWalletItemId indexed=true onchange=alert(this.name); html:option value=Select Credit CardSelect Credit Card/html:option logic:iterate id=idx name=safeRenewForm property=walletItems indexId=index bean:define id=blah name=idx property=walletItemID/ html:option value=%= + blah % bbean:write name=idx property=tender.cardType.cardName//b -bean:write name=idx property=tender.last4Digits/nbsp; bean:write name=idx property=tender.expMonth //bean:write name=idx property=tender.expYear/ /html:option /logic:iterate /html:select /td td align=centerhtml:checkbox name=subscriptions property=statusEnabled indexed=true onclick=this.form.subscriptions['%=index %'].selectedWalletItemId.disabled=this.checked?false:true;//td 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: problem in javascript for select enabled/disabled by checkbox in a list with in logic iterate
HI Firat, I am using it for for the whole select. It is working fine out side logic iterate in normal html select when I tried as follws. But in logic iterate I could not provide reference of name for select like sampleSelect in indexed way like sampleSelectArray[index].sampleSelect dynamically. Thank you for understanding. -Udaya Allu td select name=sampleSelect disabled=true option value=Select Card/option option value=bVisa/b -5678 10/2005/option option value=bAmex/b -6854 12/2005/option option value=bAmex/b -4211 10/2005/option option value=bVisa/b -5678 10/2004/option /select /td td align=centerinput type=checkbox onclick=sampleSelect.disabled=this.checked?false:true/td -Original Message- From: Firat TIRYAKI [mailto:[EMAIL PROTECTED] Sent: Thursday, December 11, 2003 10:25 AM To: Struts Users Mailing List Subject: Re: problem in javascript for select enabled/disabled by checkbox in a list with in logic iterate Well, sorry but you can't use the disabled property for one of a select element's options, you can use it for the whole select. F. - Original Message - From: Udaya Allu [EMAIL PROTECTED] To: [EMAIL PROTECTED] Sent: Thursday, December 11, 2003 5:17 PM Subject: problem in javascript for select enabled/disabled by checkbox in a list with in logic iterate Hi All, Please help me on select enabled/disabled by checkbox in a list with in logic iterate I am not able to pass the index for disableing select box basing on check box enale/disable please look at the code part onclick=this.form.subscriptions['%=index %'].selectedWalletItemId.disabled=this.checked?false:true; in the following code. I tried it different ways ...but no success. Other wise also if I want to use simple onclick= sumbit(), to do something action class and refresh, I do not know how to pass the index or other parameters through Any amount of help is really appreciated as this is code in production. Thank you -Udaya Allu logic:iterate name=safeRenewForm property=subscriptions id=subscriptions indexId=index td html:select name=subscriptions property=selectedWalletItemId indexed=true onchange=alert(this.name); html:option value=Select Credit CardSelect Credit Card/html:option logic:iterate id=idx name=safeRenewForm property=walletItems indexId=index bean:define id=blah name=idx property=walletItemID/ html:option value=%= + blah % bbean:write name=idx property=tender.cardType.cardName//b -bean:write name=idx property=tender.last4Digits/nbsp; bean:write name=idx property=tender.expMonth //bean:write name=idx property=tender.expYear/ /html:option /logic:iterate /html:select /td td align=centerhtml:checkbox name=subscriptions property=statusEnabled indexed=true onclick=this.form.subscriptions['%=index %'].selectedWalletItemId.disabled=this.checked?false:true;//td 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] - To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED]
RE: logic iterate
No, in the same page i have to display tr td value1/tdtd value2 /tdtd value3 /td tr for the next 3 values i should display in next row.using logic iterate and only with struts not with jstl. thanks naveen. -Original Message- From: David Friedman [mailto:[EMAIL PROTECTED] Sent: Monday, December 01, 2003 12:24 PM To: Struts Users Mailing List Subject: RE: logic iterate Are you talking about pagination? Show 3 on a page and then skip to the next page? Sounds like you want the displaytag taglib. This examples does 10 items per page: http://www.displaytag.org/example-paging.jsp Regards, David -Original Message- From: Naveen S. Kumar [mailto:[EMAIL PROTECTED] Sent: Monday, December 01, 2003 1:43 AM To: Struts Users Mailing List Subject: logic iterate hi, how do i break the row according the number of data displayed, i.e i have 3 values in a row after 3 rows i have to go next row for display how can i do using only struts without scriptlets. any example or link would be great help for me thanks naveen. - 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
Are you trying to do this to save space: value1 value2 value3 value4 value5 value6 value7 value8 value9 Or this to show 3 properties of any one bean at a time: bean1.value1 bean1.value2 bean1.value3 bean2.value1 bean2.value2 bean2.value3 bean3.value1 bean3.value2 bean3.value3 Regards, David -Original Message- From: Naveen S. Kumar [mailto:[EMAIL PROTECTED] Sent: Monday, December 01, 2003 2:02 AM To: Struts Users Mailing List Subject: RE: logic iterate No, in the same page i have to display tr td value1/tdtd value2 /tdtd value3 /td tr for the next 3 values i should display in next row.using logic iterate and only with struts not with jstl. thanks naveen. -Original Message- From: David Friedman [mailto:[EMAIL PROTECTED] Sent: Monday, December 01, 2003 12:24 PM To: Struts Users Mailing List Subject: RE: logic iterate Are you talking about pagination? Show 3 on a page and then skip to the next page? Sounds like you want the displaytag taglib. This examples does 10 items per page: http://www.displaytag.org/example-paging.jsp Regards, David -Original Message- From: Naveen S. Kumar [mailto:[EMAIL PROTECTED] Sent: Monday, December 01, 2003 1:43 AM To: Struts Users Mailing List Subject: logic iterate hi, how do i break the row according the number of data displayed, i.e i have 3 values in a row after 3 rows i have to go next row for display how can i do using only struts without scriptlets. any example or link would be great help for me thanks naveen. - 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
i mean when i am displaying the value from collection using logic iterate i display values in tr with 4 td for the 5th value i have to go for next tr with 4 td value to be displayed.as i showed in last mail thanks naveen. -Original Message- From: David Friedman [mailto:[EMAIL PROTECTED] Sent: Monday, December 01, 2003 12:38 PM To: Struts Users Mailing List Subject: RE: logic iterate Are you trying to do this to save space: value1 value2 value3 value4 value5 value6 value7 value8 value9 Or this to show 3 properties of any one bean at a time: bean1.value1 bean1.value2 bean1.value3 bean2.value1 bean2.value2 bean2.value3 bean3.value1 bean3.value2 bean3.value3 Regards, David -Original Message- From: Naveen S. Kumar [mailto:[EMAIL PROTECTED] Sent: Monday, December 01, 2003 2:02 AM To: Struts Users Mailing List Subject: RE: logic iterate No, in the same page i have to display tr td value1/tdtd value2 /tdtd value3 /td tr for the next 3 values i should display in next row.using logic iterate and only with struts not with jstl. thanks naveen. -Original Message- From: David Friedman [mailto:[EMAIL PROTECTED] Sent: Monday, December 01, 2003 12:24 PM To: Struts Users Mailing List Subject: RE: logic iterate Are you talking about pagination? Show 3 on a page and then skip to the next page? Sounds like you want the displaytag taglib. This examples does 10 items per page: http://www.displaytag.org/example-paging.jsp Regards, David -Original Message- From: Naveen S. Kumar [mailto:[EMAIL PROTECTED] Sent: Monday, December 01, 2003 1:43 AM To: Struts Users Mailing List Subject: logic iterate hi, how do i break the row according the number of data displayed, i.e i have 3 values in a row after 3 rows i have to go next row for display how can i do using only struts without scriptlets. any example or link would be great help for me thanks naveen. - To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED] - To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED] - To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED] - To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED] - To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED]
logic iterate
hi, how do i break the row according the number of data displayed, i.e i have 3 values in a row after 3 rows i have to go next row for display how can i do using only struts without scriptlets. any example or link would be great help for me thanks naveen. - To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED]
RE: logic iterate
Are you talking about pagination? Show 3 on a page and then skip to the next page? Sounds like you want the displaytag taglib. This examples does 10 items per page: http://www.displaytag.org/example-paging.jsp Regards, David -Original Message- From: Naveen S. Kumar [mailto:[EMAIL PROTECTED] Sent: Monday, December 01, 2003 1:43 AM To: Struts Users Mailing List Subject: logic iterate hi, how do i break the row according the number of data displayed, i.e i have 3 values in a row after 3 rows i have to go next row for display how can i do using only struts without scriptlets. any example or link would be great help for me thanks naveen. - 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]
Logic Iterate problem:
Logic Iterate problem: Can we have nested logic iterates? e.g. if I want to show list of products under all Categories. how can i implement that? I am having problem in setting the values of attributes for inner logic iterate loop logic:iterate id=category name=categorylist bean:write name=category property=categoryname/ logic:iterate id=products bean:write name=products / /logic:iterate /logic:iterate I have a bean catergory class which has productlist[] and catergoryname as its properties Thanks in advance Raman Garg
Re: Logic Iterate problem:
Look at the nested:iterate tag. Nice http://jakarta.apache.org/struts/userGuide/struts-nested.html -jeff On Monday, November 24, 2003, at 09:44 AM, Raman wrote: Logic Iterate problem: Can we have nested logic iterates? e.g. if I want to show list of products under all Categories. how can i implement that? I am having problem in setting the values of attributes for inner logic iterate loop logic:iterate id=category name=categorylist bean:write name=category property=categoryname/ logic:iterate id=products bean:write name=products / /logic:iterate /logic:iterate I have a bean catergory class which has productlist[] and catergoryname as its properties Thanks in advance Raman Garg - To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED]
Problem in grouping using logic iterate logic equal
Hi, MyTeamFormBean contains an arraylist allTeams having MyTeamRowBean with attributes : String teamName, first, middle last logic:iterate id=myteam name=myTeamFormBean property=allTeams tr td Bbean:write name=myteam property=teamName //B/td tdnbsp;/td /tr tr tdnbsp;/td tdnbsp;bean:write name=myteam property=Firstname/nbsp;bean:write name=myteam property=Midinitial/nbsp;bean:write name=myteam property=Lastname/ /td /tr /logic:iterate Which produces something like this Team Name 1 Firstname1 1 Midinitial1 1 Lastname 1 1 Team Name 1 Firstname1 2 Midinitial1 2 Lastname 1 2 Team Name 1 Firstname1 3 Midinitial1 3 Lastname 1 3 Team Name 2 Firstname2 1 Midinitial2 1 Lastname 2 1 Team Name 2 Firstname2 2 Midinitial2 2 Lastname 2 2 Team Name 2 Firstname2 3 Midinitial2 3 Lastname 2 3 Team Name 3 Firstname3 1 Midinitial3 1 Lastname 3 1 Team Name 3 Firstname3 2 Midinitial3 2 Lastname 3 2 Team Name 3 Firstname3 3 Midinitial3 3 Lastname 3 3 Team Name 4 Firstname4 1 Midinitial4 1 Lastname 4 1 Team Name 4 Firstname4 2 Midinitial4 2 Lastname 4 2 Team Name 4 Firstname4 3 Midinitial4 3 Lastname 4 3 Team Name 5 Firstname5 1 Midinitial5 1 Lastname 5 1 Team Name 5 Firstname5 2 Midinitial5 2 Lastname 5 2 Team Name 5 Firstname5 3 Midinitial5 3 Lastname 5 3 but i want something like this. .. Team Name 1 Firstname1 1 Midinitial1 1 Lastname 1 1 Firstname1 2 Midinitial1 2 Lastname 1 2 Firstname1 3 Midinitial1 3 Lastname 1 3 Team Name 2 Firstname2 1 Midinitial2 1 Lastname 2 1 Firstname2 2 Midinitial2 2 Lastname 2 2 Firstname2 3 Midinitial2 3 Lastname 2 3 Team Name 3 Firstname3 1 Midinitial3 1 Lastname 3 1 Firstname3 2 Midinitial3 2 Lastname 3 2 Firstname3 3 Midinitial3 3 Lastname 3 3 Team Name 4 Firstname4 1 Midinitial4 1 Lastname 4 1 Firstname4 2 Midinitial4 2 Lastname 4 2 Firstname4 3 Midinitial4 3 Lastname 4 3 Team Name 5 Firstname5 1 Midinitial5 1 Lastname 5 1 Firstname5 2 Midinitial5 2 Lastname 5 2 Firstname5 3 Midinitial5 3 Lastname 5 3 can anyone plz help me out in this ... Thanks in advance .. Shakti.. - To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED]
Still no reply for :Problem in grouping using logic iterate logic equal
Hi, MyTeamFormBean contains an arraylist allTeams having MyTeamRowBean with attributes : String teamName, first, middle last logic:iterate id=myteam name=myTeamFormBean property=allTeams tr td Bbean:write name=myteam property=teamName //B/td tdnbsp;/td /tr tr tdnbsp;/td tdnbsp;bean:write name=myteam property=Firstname/nbsp;bean:write name=myteam property=Midinitial/nbsp;bean:write name=myteam property=Lastname/ /td /tr /logic:iterate Which produces something like this Team Name 1 Firstname1 1 Midinitial1 1 Lastname 1 1 Team Name 1 Firstname1 2 Midinitial1 2 Lastname 1 2 Team Name 1 Firstname1 3 Midinitial1 3 Lastname 1 3 Team Name 2 Firstname2 1 Midinitial2 1 Lastname 2 1 Team Name 2 Firstname2 2 Midinitial2 2 Lastname 2 2 Team Name 2 Firstname2 3 Midinitial2 3 Lastname 2 3 Team Name 3 Firstname3 1 Midinitial3 1 Lastname 3 1 Team Name 3 Firstname3 2 Midinitial3 2 Lastname 3 2 Team Name 3 Firstname3 3 Midinitial3 3 Lastname 3 3 Team Name 4 Firstname4 1 Midinitial4 1 Lastname 4 1 Team Name 4 Firstname4 2 Midinitial4 2 Lastname 4 2 Team Name 4 Firstname4 3 Midinitial4 3 Lastname 4 3 Team Name 5 Firstname5 1 Midinitial5 1 Lastname 5 1 Team Name 5 Firstname5 2 Midinitial5 2 Lastname 5 2 Team Name 5 Firstname5 3 Midinitial5 3 Lastname 5 3 but i want something like this. .. Team Name 1 Firstname1 1 Midinitial1 1 Lastname 1 1 Firstname1 2 Midinitial1 2 Lastname 1 2 Firstname1 3 Midinitial1 3 Lastname 1 3 Team Name 2 Firstname2 1 Midinitial2 1 Lastname 2 1 Firstname2 2 Midinitial2 2 Lastname 2 2 Firstname2 3 Midinitial2 3 Lastname 2 3 Team Name 3 Firstname3 1 Midinitial3 1 Lastname 3 1 Firstname3 2 Midinitial3 2 Lastname 3 2 Firstname3 3 Midinitial3 3 Lastname 3 3 Team Name 4 Firstname4 1 Midinitial4 1 Lastname 4 1 Firstname4 2 Midinitial4 2 Lastname 4 2 Firstname4 3 Midinitial4 3 Lastname 4 3 Team Name 5 Firstname5 1 Midinitial5 1 Lastname 5 1 Firstname5 2 Midinitial5 2 Lastname 5 2 Firstname5 3 Midinitial5 3 Lastname 5 3 can anyone plz help me out in this ... Thanks in advance .. Shakti.. - To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED]
RE: Still no reply for :Problem in grouping using logic iterate logic equal
Your doing a bean:write of the team name inside of your iterate, so yeah, the team name is going to show up on every iteration. What approaches have you tried already? Which is the part your not getting? -Original Message- From: Shakti [mailto:[EMAIL PROTECTED] Sent: Saturday, November 22, 2003 4:11 AM To: Struts Users Mailing List Subject: Still no reply for :Problem in grouping using logic iterate logic equal Hi, MyTeamFormBean contains an arraylist allTeams having MyTeamRowBean with attributes : String teamName, first, middle last logic:iterate id=myteam name=myTeamFormBean property=allTeams tr td Bbean:write name=myteam property=teamName //B/td tdnbsp;/td /tr tr tdnbsp;/td tdnbsp;bean:write name=myteam property=Firstname/nbsp;bean:write name=myteam property=Midinitial/nbsp;bean:write name=myteam property=Lastname/ /td /tr /logic:iterate Which produces something like this Team Name 1 Firstname1 1 Midinitial1 1 Lastname 1 1 Team Name 1 Firstname1 2 Midinitial1 2 Lastname 1 2 Team Name 1 Firstname1 3 Midinitial1 3 Lastname 1 3 Team Name 2 Firstname2 1 Midinitial2 1 Lastname 2 1 Team Name 2 Firstname2 2 Midinitial2 2 Lastname 2 2 Team Name 2 Firstname2 3 Midinitial2 3 Lastname 2 3 Team Name 3 Firstname3 1 Midinitial3 1 Lastname 3 1 Team Name 3 Firstname3 2 Midinitial3 2 Lastname 3 2 Team Name 3 Firstname3 3 Midinitial3 3 Lastname 3 3 Team Name 4 Firstname4 1 Midinitial4 1 Lastname 4 1 Team Name 4 Firstname4 2 Midinitial4 2 Lastname 4 2 Team Name 4 Firstname4 3 Midinitial4 3 Lastname 4 3 Team Name 5 Firstname5 1 Midinitial5 1 Lastname 5 1 Team Name 5 Firstname5 2 Midinitial5 2 Lastname 5 2 Team Name 5 Firstname5 3 Midinitial5 3 Lastname 5 3 but i want something like this. .. Team Name 1 Firstname1 1 Midinitial1 1 Lastname 1 1 Firstname1 2 Midinitial1 2 Lastname 1 2 Firstname1 3 Midinitial1 3 Lastname 1 3 Team Name 2 Firstname2 1 Midinitial2 1 Lastname 2 1 Firstname2 2 Midinitial2 2 Lastname 2 2 Firstname2 3 Midinitial2 3 Lastname 2 3 Team Name 3 Firstname3 1 Midinitial3 1 Lastname 3 1 Firstname3 2 Midinitial3 2 Lastname 3 2 Firstname3 3 Midinitial3 3 Lastname 3 3 Team Name 4 Firstname4 1 Midinitial4 1 Lastname 4 1 Firstname4 2 Midinitial4 2 Lastname 4 2 Firstname4 3 Midinitial4 3 Lastname 4 3 Team Name 5 Firstname5 1 Midinitial5 1 Lastname 5 1 Firstname5 2 Midinitial5 2 Lastname 5 2 Firstname5 3 Midinitial5 3 Lastname 5 3 can anyone plz help me out in this ... Thanks in advance .. Shakti.. - 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: Still no reply for :Problem in grouping using logic iterate logic equal
As i told u earlier .. In MyTeamRowBean i have TeamNameFirstName MiddleName LastName In MyTeamFormBean i have an arraylist which contains MyTeamRowBean Now in the jsp i have to show them according to a group that is Team Name 1 Firstname1 1 Midinitial1 1 Lastname 1 1 Firstname1 2 Midinitial1 2 Lastname 1 2 Firstname1 3 Midinitial1 3 Lastname 1 3 Team Name 2 Firstname2 1 Midinitial2 1 Lastname 2 1 Firstname2 2 Midinitial2 2 Lastname 2 2 Firstname2 3 Midinitial2 3 Lastname 2 3 Team Name 3 Firstname3 1 Midinitial3 1 Lastname 3 1 Firstname3 2 Midinitial3 2 Lastname 3 2 Firstname3 3 Midinitial3 3 Lastname 3 3 1)Wht i am not getting is the exact struts logic tags so that my output comes as shown above ??? 2)How do i keep a flag in my jsp so that .. if there is a repetetion of the team name then it should not get printed ( i am sorting the team members in my action class so once one Team name is gone it won't come back .. uff .. ( half of problem was solved there ... ) .. now i need help on the rest of the half ... ) Thanks Regards, shakti. P.S I don't know much of jsp or struts.. so if possible plz giv me the exact code .. :-) .. I know . i am asking t much .. ;-) - Original Message - From: Joe Hertz [EMAIL PROTECTED] To: 'Struts Users Mailing List' [EMAIL PROTECTED] Sent: Saturday, November 22, 2003 3:09 PM Subject: RE: Still no reply for :Problem in grouping using logic iterate logic equal Your doing a bean:write of the team name inside of your iterate, so yeah, the team name is going to show up on every iteration. What approaches have you tried already? Which is the part your not getting? -Original Message- From: Shakti [mailto:[EMAIL PROTECTED] Sent: Saturday, November 22, 2003 4:11 AM To: Struts Users Mailing List Subject: Still no reply for :Problem in grouping using logic iterate logic equal Hi, MyTeamFormBean contains an arraylist allTeams having MyTeamRowBean with attributes : String teamName, first, middle last logic:iterate id=myteam name=myTeamFormBean property=allTeams tr td Bbean:write name=myteam property=teamName //B/td tdnbsp;/td /tr tr tdnbsp;/td tdnbsp;bean:write name=myteam property=Firstname/nbsp;bean:write name=myteam property=Midinitial/nbsp;bean:write name=myteam property=Lastname/ /td /tr /logic:iterate Which produces something like this Team Name 1 Firstname1 1 Midinitial1 1 Lastname 1 1 Team Name 1 Firstname1 2 Midinitial1 2 Lastname 1 2 Team Name 1 Firstname1 3 Midinitial1 3 Lastname 1 3 Team Name 2 Firstname2 1 Midinitial2 1 Lastname 2 1 Team Name 2 Firstname2 2 Midinitial2 2 Lastname 2 2 Team Name 2 Firstname2 3 Midinitial2 3 Lastname 2 3 Team Name 3 Firstname3 1 Midinitial3 1 Lastname 3 1 Team Name 3 Firstname3 2 Midinitial3 2 Lastname 3 2 Team Name 3 Firstname3 3 Midinitial3 3 Lastname 3 3 Team Name 4 Firstname4 1 Midinitial4 1 Lastname 4 1 Team Name 4 Firstname4 2 Midinitial4 2 Lastname 4 2 Team Name 4 Firstname4 3 Midinitial4 3 Lastname 4 3 Team Name 5 Firstname5 1 Midinitial5 1 Lastname 5 1 Team Name 5 Firstname5 2 Midinitial5 2 Lastname 5 2 Team Name 5 Firstname5 3 Midinitial5 3 Lastname 5 3 but i want something like this. .. Team Name 1 Firstname1 1 Midinitial1 1 Lastname 1 1 Firstname1 2 Midinitial1 2 Lastname 1 2 Firstname1 3 Midinitial1 3 Lastname 1 3 Team Name 2 Firstname2 1 Midinitial2 1 Lastname 2 1 Firstname2 2 Midinitial2 2 Lastname 2 2 Firstname2 3 Midinitial2 3 Lastname 2 3 Team Name 3 Firstname3 1 Midinitial3 1 Lastname 3 1 Firstname3 2 Midinitial3 2 Lastname 3 2 Firstname3 3 Midinitial3 3 Lastname 3 3 Team Name 4 Firstname4 1 Midinitial4 1 Lastname 4 1 Firstname4 2 Midinitial4 2 Lastname 4 2 Firstname4 3 Midinitial4 3 Lastname 4 3 Team Name 5 Firstname5 1 Midinitial5 1 Lastname 5 1 Firstname5 2 Midinitial5 2 Lastname 5 2 Firstname5 3 Midinitial5 3 Lastname 5 3 can anyone plz help me out in this ... Thanks in advance .. Shakti.. - 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: Still no reply for :Problem in grouping using logic iterate logic equal
This sounds like a job for ... the DisplayTag Taglib. See this example page: http://www.displaytag.org/example-grouping.jsp Your formbean looks pretty simple: (Should I ask why your properties start with a capital letter?) myteam.teamName myteam.Firstname myteam.Midinitial myteam.Lastname If so it's practically build for the displaytag library, might even work a bit like this: displaytag:table name=myTeamFormBean.allTeams displaytag:column property=teamName title=Team Name group=1/ displaytag:column property=Firstname title=First Name / displaytag:column property=Midinitial title=Middle Initial / displaytag:column property=Lastname title=Last Name / /displaytag:table If you use the displaytag library, follow their directions about the handful of apache commons .jar files that need to be updated!! Regards, David -Original Message- From: Joe Hertz [mailto:[EMAIL PROTECTED] Sent: Saturday, November 22, 2003 4:39 AM To: 'Struts Users Mailing List' Subject: RE: Still no reply for :Problem in grouping using logic iterate logic equal Your doing a bean:write of the team name inside of your iterate, so yeah, the team name is going to show up on every iteration. What approaches have you tried already? Which is the part your not getting? -Original Message- From: Shakti [mailto:[EMAIL PROTECTED] Sent: Saturday, November 22, 2003 4:11 AM To: Struts Users Mailing List Subject: Still no reply for :Problem in grouping using logic iterate logic equal Hi, MyTeamFormBean contains an arraylist allTeams having MyTeamRowBean with attributes : String teamName, first, middle last logic:iterate id=myteam name=myTeamFormBean property=allTeams tr td Bbean:write name=myteam property=teamName //B/td tdnbsp;/td /tr tr tdnbsp;/td tdnbsp;bean:write name=myteam property=Firstname/nbsp;bean:write name=myteam property=Midinitial/nbsp;bean:write name=myteam property=Lastname/ /td /tr /logic:iterate Which produces something like this Team Name 1 Firstname1 1 Midinitial1 1 Lastname 1 1 Team Name 1 Firstname1 2 Midinitial1 2 Lastname 1 2 Team Name 1 Firstname1 3 Midinitial1 3 Lastname 1 3 Team Name 2 Firstname2 1 Midinitial2 1 Lastname 2 1 Team Name 2 Firstname2 2 Midinitial2 2 Lastname 2 2 Team Name 2 Firstname2 3 Midinitial2 3 Lastname 2 3 Team Name 3 Firstname3 1 Midinitial3 1 Lastname 3 1 Team Name 3 Firstname3 2 Midinitial3 2 Lastname 3 2 Team Name 3 Firstname3 3 Midinitial3 3 Lastname 3 3 Team Name 4 Firstname4 1 Midinitial4 1 Lastname 4 1 Team Name 4 Firstname4 2 Midinitial4 2 Lastname 4 2 Team Name 4 Firstname4 3 Midinitial4 3 Lastname 4 3 Team Name 5 Firstname5 1 Midinitial5 1 Lastname 5 1 Team Name 5 Firstname5 2 Midinitial5 2 Lastname 5 2 Team Name 5 Firstname5 3 Midinitial5 3 Lastname 5 3 but i want something like this. .. Team Name 1 Firstname1 1 Midinitial1 1 Lastname 1 1 Firstname1 2 Midinitial1 2 Lastname 1 2 Firstname1 3 Midinitial1 3 Lastname 1 3 Team Name 2 Firstname2 1 Midinitial2 1 Lastname 2 1 Firstname2 2 Midinitial2 2 Lastname 2 2 Firstname2 3 Midinitial2 3 Lastname 2 3 Team Name 3 Firstname3 1 Midinitial3 1 Lastname 3 1 Firstname3 2 Midinitial3 2 Lastname 3 2 Firstname3 3 Midinitial3 3 Lastname 3 3 Team Name 4 Firstname4 1 Midinitial4 1 Lastname 4 1 Firstname4 2 Midinitial4 2 Lastname 4 2 Firstname4 3 Midinitial4 3 Lastname 4 3 Team Name 5 Firstname5 1 Midinitial5 1 Lastname 5 1 Firstname5 2 Midinitial5 2 Lastname 5 2 Firstname5 3 Midinitial5 3 Lastname 5 3 can anyone plz help me out in this ... Thanks in advance .. Shakti.. - 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: :Problem in grouping using logic iterate logic equal: Somewht solved
Hi, it was really a gr8 reference for my problem ... but i am not sure whether my Team will allow new libs to be added to the current version ... still i will try n find out some other ( CRUDE SOLUTION .. ) for this grouping. . but in new projects i think we will consider these libraries as they will be really useful in reducing the presentation probs that we face .. :-) .. Thanks David :-) .. bye Shakti - Original Message - From: David Friedman [EMAIL PROTECTED] To: Struts Users Mailing List [EMAIL PROTECTED]; [EMAIL PROTECTED] Sent: Saturday, November 22, 2003 3:21 PM Subject: RE: Still no reply for :Problem in grouping using logic iterate logic equal This sounds like a job for ... the DisplayTag Taglib. See this example page: http://www.displaytag.org/example-grouping.jsp Your formbean looks pretty simple: (Should I ask why your properties start with a capital letter?) myteam.teamName myteam.Firstname myteam.Midinitial myteam.Lastname If so it's practically build for the displaytag library, might even work a bit like this: displaytag:table name=myTeamFormBean.allTeams displaytag:column property=teamName title=Team Name group=1/ displaytag:column property=Firstname title=First Name / displaytag:column property=Midinitial title=Middle Initial / displaytag:column property=Lastname title=Last Name / /displaytag:table If you use the displaytag library, follow their directions about the handful of apache commons .jar files that need to be updated!! Regards, David -Original Message- From: Joe Hertz [mailto:[EMAIL PROTECTED] Sent: Saturday, November 22, 2003 4:39 AM To: 'Struts Users Mailing List' Subject: RE: Still no reply for :Problem in grouping using logic iterate logic equal Your doing a bean:write of the team name inside of your iterate, so yeah, the team name is going to show up on every iteration. What approaches have you tried already? Which is the part your not getting? -Original Message- From: Shakti [mailto:[EMAIL PROTECTED] Sent: Saturday, November 22, 2003 4:11 AM To: Struts Users Mailing List Subject: Still no reply for :Problem in grouping using logic iterate logic equal Hi, MyTeamFormBean contains an arraylist allTeams having MyTeamRowBean with attributes : String teamName, first, middle last logic:iterate id=myteam name=myTeamFormBean property=allTeams tr td Bbean:write name=myteam property=teamName //B/td tdnbsp;/td /tr tr tdnbsp;/td tdnbsp;bean:write name=myteam property=Firstname/nbsp;bean:write name=myteam property=Midinitial/nbsp;bean:write name=myteam property=Lastname/ /td /tr /logic:iterate Which produces something like this Team Name 1 Firstname1 1 Midinitial1 1 Lastname 1 1 Team Name 1 Firstname1 2 Midinitial1 2 Lastname 1 2 Team Name 1 Firstname1 3 Midinitial1 3 Lastname 1 3 Team Name 2 Firstname2 1 Midinitial2 1 Lastname 2 1 Team Name 2 Firstname2 2 Midinitial2 2 Lastname 2 2 Team Name 2 Firstname2 3 Midinitial2 3 Lastname 2 3 Team Name 3 Firstname3 1 Midinitial3 1 Lastname 3 1 Team Name 3 Firstname3 2 Midinitial3 2 Lastname 3 2 Team Name 3 Firstname3 3 Midinitial3 3 Lastname 3 3 Team Name 4 Firstname4 1 Midinitial4 1 Lastname 4 1 Team Name 4 Firstname4 2 Midinitial4 2 Lastname 4 2 Team Name 4 Firstname4 3 Midinitial4 3 Lastname 4 3 Team Name 5 Firstname5 1 Midinitial5 1 Lastname 5 1 Team Name 5 Firstname5 2 Midinitial5 2 Lastname 5 2 Team Name 5 Firstname5 3 Midinitial5 3 Lastname 5 3 but i want something like this. .. Team Name 1 Firstname1 1 Midinitial1 1 Lastname 1 1 Firstname1 2 Midinitial1 2 Lastname 1 2 Firstname1 3 Midinitial1 3 Lastname 1 3 Team Name 2 Firstname2 1 Midinitial2 1 Lastname 2 1 Firstname2 2 Midinitial2 2 Lastname 2 2 Firstname2 3 Midinitial2 3 Lastname 2 3 Team Name 3 Firstname3 1 Midinitial3 1 Lastname 3 1 Firstname3 2 Midinitial3 2 Lastname 3 2 Firstname3 3 Midinitial3 3 Lastname 3 3 Team Name 4 Firstname4 1 Midinitial4 1 Lastname 4 1 Firstname4 2 Midinitial4 2 Lastname 4 2 Firstname4 3 Midinitial4 3 Lastname 4 3 Team Name 5 Firstname5 1 Midinitial5 1 Lastname 5 1 Firstname5 2 Midinitial5 2 Lastname 5 2 Firstname5 3 Midinitial5 3 Lastname 5 3 can anyone plz help me out in this ... Thanks in advance .. Shakti.. - To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED
Re: Still no reply for :Problem in grouping using logic iterate logic equal
I'm not sure how you've got things arranged but sounds like you could do with having you team objects having a getMembers() method. If you don't have this in you model then I guess its going to smart somewhat. List teamList = someModelStuff.getTeams(); request.setAttribute(teams, teamList.toArray()); ... logic:iterate id=team name=teams Team: bean:write name=team property=name / logic:iterate id=member name=teams property=members bean:write name=member property=firstName / or in jstl c:forEach var=team items=${teams} Team: c:out value=${team.name} / c:forEach var=member items=${team.members} c:out value=${member.firstName} / Cheers Mark On 22 Nov 2003, at 09:44, Shakti wrote: As i told u earlier .. In MyTeamRowBean i have TeamNameFirstName MiddleName LastName In MyTeamFormBean i have an arraylist which contains MyTeamRowBean Now in the jsp i have to show them according to a group that is Team Name 1 Firstname1 1 Midinitial1 1 Lastname 1 1 Firstname1 2 Midinitial1 2 Lastname 1 2 Firstname1 3 Midinitial1 3 Lastname 1 3 Team Name 2 Firstname2 1 Midinitial2 1 Lastname 2 1 Firstname2 2 Midinitial2 2 Lastname 2 2 Firstname2 3 Midinitial2 3 Lastname 2 3 Team Name 3 Firstname3 1 Midinitial3 1 Lastname 3 1 Firstname3 2 Midinitial3 2 Lastname 3 2 Firstname3 3 Midinitial3 3 Lastname 3 3 1)Wht i am not getting is the exact struts logic tags so that my output comes as shown above ??? 2)How do i keep a flag in my jsp so that .. if there is a repetetion of the team name then it should not get printed ( i am sorting the team members in my action class so once one Team name is gone it won't come back .. uff .. ( half of problem was solved there ... ) .. now i need help on the rest of the half ... ) Thanks Regards, shakti. P.S I don't know much of jsp or struts.. so if possible plz giv me the exact code .. :-) .. I know . i am asking t much .. ;-) - Original Message - From: Joe Hertz [EMAIL PROTECTED] To: 'Struts Users Mailing List' [EMAIL PROTECTED] Sent: Saturday, November 22, 2003 3:09 PM Subject: RE: Still no reply for :Problem in grouping using logic iterate logic equal Your doing a bean:write of the team name inside of your iterate, so yeah, the team name is going to show up on every iteration. What approaches have you tried already? Which is the part your not getting? -Original Message- From: Shakti [mailto:[EMAIL PROTECTED] Sent: Saturday, November 22, 2003 4:11 AM To: Struts Users Mailing List Subject: Still no reply for :Problem in grouping using logic iterate logic equal Hi, MyTeamFormBean contains an arraylist allTeams having MyTeamRowBean with attributes : String teamName, first, middle last logic:iterate id=myteam name=myTeamFormBean property=allTeams tr td Bbean:write name=myteam property=teamName //B/td tdnbsp;/td /tr tr tdnbsp;/td tdnbsp;bean:write name=myteam property=Firstname/nbsp;bean:write name=myteam property=Midinitial/nbsp;bean:write name=myteam property=Lastname/ /td /tr /logic:iterate Which produces something like this Team Name 1 Firstname1 1 Midinitial1 1 Lastname 1 1 Team Name 1 Firstname1 2 Midinitial1 2 Lastname 1 2 Team Name 1 Firstname1 3 Midinitial1 3 Lastname 1 3 Team Name 2 Firstname2 1 Midinitial2 1 Lastname 2 1 Team Name 2 Firstname2 2 Midinitial2 2 Lastname 2 2 Team Name 2 Firstname2 3 Midinitial2 3 Lastname 2 3 Team Name 3 Firstname3 1 Midinitial3 1 Lastname 3 1 Team Name 3 Firstname3 2 Midinitial3 2 Lastname 3 2 Team Name 3 Firstname3 3 Midinitial3 3 Lastname 3 3 Team Name 4 Firstname4 1 Midinitial4 1 Lastname 4 1 Team Name 4 Firstname4 2 Midinitial4 2 Lastname 4 2 Team Name 4 Firstname4 3 Midinitial4 3 Lastname 4 3 Team Name 5 Firstname5 1 Midinitial5 1 Lastname 5 1 Team Name 5 Firstname5 2 Midinitial5 2 Lastname 5 2 Team Name 5 Firstname5 3 Midinitial5 3 Lastname 5 3 but i want something like this. .. Team Name 1 Firstname1 1 Midinitial1 1 Lastname 1 1 Firstname1 2 Midinitial1 2 Lastname 1 2 Firstname1 3 Midinitial1 3 Lastname 1 3 Team Name 2 Firstname2 1 Midinitial2 1 Lastname 2 1 Firstname2 2 Midinitial2 2 Lastname 2 2 Firstname2 3 Midinitial2 3 Lastname 2 3 Team Name 3 Firstname3 1 Midinitial3 1 Lastname 3 1 Firstname3 2 Midinitial3 2 Lastname 3 2 Firstname3 3 Midinitial3 3 Lastname 3 3 Team Name 4 Firstname4 1 Midinitial4 1 Lastname 4 1 Firstname4 2 Midinitial4 2 Lastname 4 2 Firstname4 3 Midinitial4 3 Lastname 4 3 Team Name 5 Firstname5 1 Midinitial5 1 Lastname 5 1 Firstname5 2 Midinitial5 2 Lastname 5 2 Firstname5 3
logic iterate + radio
hi! i have a code segment that displays a form. part of the form consists of a selection from a bunch of plans that can be selected through a radio button tag here's how it goes html:form action=/saveServiceAccount .. logic:iterate name=serviceTypes id=serviceType tr tdhtml:radio idName=serviceType value=code property=serviceTypeId/ /td /tr /logic:iterate what that is supposed to do is 'serviceTypes' contains a list of service plans. the plans are of type ServiceType an empty bean of which is stored in the session under serviceType the form bean is ServiceAccountForm and has a field called serviceTypeId. the user is basically supposed to select a plan through the radio button and the code for the plan should become the serviceTypeId. i am however getting an error when i run this saying it cant find a getter for 'code' however i have getCode in ServiceType please help thanks ajay _ Hot chart ringtones and polyphonics. Go to http://ninemsn.com.au/mobilemania/default.asp - To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED]
Logic Iterate --URGENT Please
Hi all, I have a doubt using logic iterate: Is it possible to display a row in a different color based on a value of the bean while iterating it? Actually, I am displaying the tax history of a person and I want to highlight the row or a field (tax owed) to red color if the tax paid column shows delinquent. Please let me know if u have any suggestions or ideas. Thanks in Advance, Srikanth Gubba. - To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED]
RE: Logic Iterate
Here is sample code snippet. c:forEach var=item items='${itemList}' c:choose c:when test=${item.delinquent} Display Red color /c:when c:otherwise Display green color /c:otherwise /c:choose /c:forEach -Original Message- From: Srikanth Gubba [mailto:[EMAIL PROTECTED] Sent: Wednesday, October 22, 2003 12:24 PM To: '[EMAIL PROTECTED]' Subject: Logic Iterate --URGENT Please Hi all, I have a doubt using logic iterate: Is it possible to display a row in a different color based on a value of the bean while iterating it? Actually, I am displaying the tax history of a person and I want to highlight the row or a field (tax owed) to red color if the tax paid column shows delinquent. Please let me know if u have any suggestions or ideas. Thanks in Advance, Srikanth Gubba. - 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 --URGENT Please
logic:iterate id=myBean name=MyBeans type=com.mine.bean.MyBean ... logic:lessThan name=myBean property=taxOwed value=0 td bgcolor=red /logic:lessThan logic:greaterEqual name=myBean property=taxOwed value=0 td bgcolor=white /logic:greaterEqual ... /logic:iterate You could also do it with JSTL: c:forEach items=sessionScope.myBeans var=myBean ... c:if test=${myBean.taxOwed 0}td bgcolor=red/c:if c:if test=${myBean.taxOwed = 0}td bgcolor=white/c:if ... /c:forEach Greg -Original Message- From: Srikanth Gubba [mailto:[EMAIL PROTECTED] Sent: Wednesday, October 22, 2003 2:24 PM To: '[EMAIL PROTECTED]' Subject: Logic Iterate --URGENT Please Hi all, I have a doubt using logic iterate: Is it possible to display a row in a different color based on a value of the bean while iterating it? Actually, I am displaying the tax history of a person and I want to highlight the row or a field (tax owed) to red color if the tax paid column shows delinquent. Please let me know if u have any suggestions or ideas. Thanks in Advance, Srikanth Gubba. - 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 --URGENT Please
logic:iterate name=taxHistoryArray id=source type=org.gubba.TaxHistory indexId=i tr align=center % if (history.isDelinquent) { % bgcolor=red % } % . other stuff in row /tr /logic:iterate Maybe not as pretty as you want Lukas Srikanth Gubba [EMAIL PROTECTED] wrote in message news:[EMAIL PROTECTED] Hi all, I have a doubt using logic iterate: Is it possible to display a row in a different color based on a value of the bean while iterating it? Actually, I am displaying the tax history of a person and I want to highlight the row or a field (tax owed) to red color if the tax paid column shows delinquent. Please let me know if u have any suggestions or ideas. Thanks in Advance, Srikanth Gubba. - To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED]
Logic Iterate
Hi , Can anyone help me with this iterate Tag ? logic:iterate id=managers name=NewCategoryConfirm property=categoryMangers bean:write name=managers/ /logic:iterate the categoryManagers property returns a Collection os Strings I want to print all the values in the collection on screen. Is it possible using bean:write or there any alternatives. Thanks, Vikram This message contains information that may be privileged or confidential and is the property of the Cap Gemini Ernst Young Group. It is intended only for the person to whom it is addressed. If you are not the intended recipient, you are not authorised to read, print, retain, copy, disseminate, distribute, or use this message or any part thereof. If you receive this message in error, please notify the sender immediately and delete all copies of this message. - To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED]
RE: Logic Iterate
logic:iterate id=managers name=NewCategoryConfirm property=categoryMangers bean:write name=managers property=fieldname/ /logic:iterate try this -Original Message- From: Thakur, Vikram [mailto:[EMAIL PROTECTED] Sent: Friday, October 17, 2003 3:57 PM To: Struts (E-mail) Subject: Logic Iterate Hi , Can anyone help me with this iterate Tag ? logic:iterate id=managers name=NewCategoryConfirm property=categoryMangers bean:write name=managers/ /logic:iterate the categoryManagers property returns a Collection os Strings I want to print all the values in the collection on screen. Is it possible using bean:write or there any alternatives. Thanks, Vikram This message contains information that may be privileged or confidential and is the property of the Cap Gemini Ernst Young Group. It is intended only for the person to whom it is addressed. If you are not the intended recipient, you are not authorised to read, print, retain, copy, disseminate, distribute, or use this message or any part thereof. If you receive this message in error, please notify the sender immediately and delete all copies of this message. - 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
No, It does not work. It says , Cannot find bean managers in any scope. Thanks anywayz. -Original Message- From: Ramesh Kannery [mailto:[EMAIL PROTECTED] Sent: Friday, October 17, 2003 3:55 PM To: Struts Users Mailing List Subject: RE: Logic Iterate logic:iterate id=managers name=NewCategoryConfirm property=categoryMangers bean:write name=managers property=fieldname/ /logic:iterate try this -Original Message- From: Thakur, Vikram [mailto:[EMAIL PROTECTED] Sent: Friday, October 17, 2003 3:57 PM To: Struts (E-mail) Subject: Logic Iterate Hi , Can anyone help me with this iterate Tag ? logic:iterate id=managers name=NewCategoryConfirm property=categoryMangers bean:write name=managers/ /logic:iterate the categoryManagers property returns a Collection os Strings I want to print all the values in the collection on screen. Is it possible using bean:write or there any alternatives. Thanks, Vikram This message contains information that may be privileged or confidential and is the property of the Cap Gemini Ernst Young Group. It is intended only for the person to whom it is addressed. If you are not the intended recipient, you are not authorised to read, print, retain, copy, disseminate, distribute, or use this message or any part thereof. If you receive this message in error, please notify the sender immediately and delete all copies of this message. - 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] This message contains information that may be privileged or confidential and is the property of the Cap Gemini Ernst Young Group. It is intended only for the person to whom it is addressed. If you are not the intended recipient, you are not authorised to read, print, retain, copy, disseminate, distribute, or use this message or any part thereof. If you receive this message in error, please notify the sender immediately and delete all copies of this message. - To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED]
RE: Logic Iterate
may be ur collection may be empty or null check ur collection object whether its contains anything?? -Original Message- From: Thakur, Vikram [mailto:[EMAIL PROTECTED] Sent: Friday, October 17, 2003 4:09 PM To: 'Struts Users Mailing List' Subject: RE: Logic Iterate No, It does not work. It says , Cannot find bean managers in any scope. Thanks anywayz. -Original Message- From: Ramesh Kannery [mailto:[EMAIL PROTECTED] Sent: Friday, October 17, 2003 3:55 PM To: Struts Users Mailing List Subject: RE: Logic Iterate logic:iterate id=managers name=NewCategoryConfirm property=categoryMangers bean:write name=managers property=fieldname/ /logic:iterate try this -Original Message- From: Thakur, Vikram [mailto:[EMAIL PROTECTED] Sent: Friday, October 17, 2003 3:57 PM To: Struts (E-mail) Subject: Logic Iterate Hi , Can anyone help me with this iterate Tag ? logic:iterate id=managers name=NewCategoryConfirm property=categoryMangers bean:write name=managers/ /logic:iterate the categoryManagers property returns a Collection os Strings I want to print all the values in the collection on screen. Is it possible using bean:write or there any alternatives. Thanks, Vikram This message contains information that may be privileged or confidential and is the property of the Cap Gemini Ernst Young Group. It is intended only for the person to whom it is addressed. If you are not the intended recipient, you are not authorised to read, print, retain, copy, disseminate, distribute, or use this message or any part thereof. If you receive this message in error, please notify the sender immediately and delete all copies of this message. - 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] This message contains information that may be privileged or confidential and is the property of the Cap Gemini Ernst Young Group. It is intended only for the person to whom it is addressed. If you are not the intended recipient, you are not authorised to read, print, retain, copy, disseminate, distribute, or use this message or any part thereof. If you receive this message in error, please notify the sender immediately and delete all copies of this message. - 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
If it is collection of Strings only then you can write the collection on page using bean:write name=managers/ itself. There is No need to provide property attribute. property attribute is required if you have collection of objects. Check the name of Formbean name=NewCategoryConfirm. Should be from struts-config.xml file. logic:iterate id=managers name=NewCategoryConfirm property=categoryMangers bean:write name=managers property=fieldname/ /logic:iterate -Original Message- From: Ramesh Kannery [mailto:[EMAIL PROTECTED] Sent: Friday, October 17, 2003 4:07 PM To: Struts Users Mailing List Subject: RE: Logic Iterate may be ur collection may be empty or null check ur collection object whether its contains anything?? -Original Message- From: Thakur, Vikram [mailto:[EMAIL PROTECTED] Sent: Friday, October 17, 2003 4:09 PM To: 'Struts Users Mailing List' Subject: RE: Logic Iterate No, It does not work. It says , Cannot find bean managers in any scope. Thanks anywayz. -Original Message- From: Ramesh Kannery [mailto:[EMAIL PROTECTED] Sent: Friday, October 17, 2003 3:55 PM To: Struts Users Mailing List Subject: RE: Logic Iterate logic:iterate id=managers name=NewCategoryConfirm property=categoryMangers bean:write name=managers property=fieldname/ /logic:iterate try this -Original Message- From: Thakur, Vikram [mailto:[EMAIL PROTECTED] Sent: Friday, October 17, 2003 3:57 PM To: Struts (E-mail) Subject: Logic Iterate Hi , Can anyone help me with this iterate Tag ? logic:iterate id=managers name=NewCategoryConfirm property=categoryMangers bean:write name=managers/ /logic:iterate the categoryManagers property returns a Collection os Strings I want to print all the values in the collection on screen. Is it possible using bean:write or there any alternatives. Thanks, Vikram This message contains information that may be privileged or confidential and is the property of the Cap Gemini Ernst Young Group. It is intended only for the person to whom it is addressed. If you are not the intended recipient, you are not authorised to read, print, retain, copy, disseminate, distribute, or use this message or any part thereof. If you receive this message in error, please notify the sender immediately and delete all copies of this message. - 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] This message contains information that may be privileged or confidential and is the property of the Cap Gemini Ernst Young Group. It is intended only for the person to whom it is addressed. If you are not the intended recipient, you are not authorised to read, print, retain, copy, disseminate, distribute, or use this message or any part thereof. If you receive this message in error, please notify the sender immediately and delete all copies of this message. - 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] **Disclaimer Information contained in this E-MAIL being proprietary to Wipro Limited is 'privileged' and 'confidential' and intended for use only by the individual or entity to which it is addressed. You are notified that any use, copying or dissemination of the information contained in the E-MAIL in any manner whatsoever is strictly prohibited. *** - To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED]
Re: Logic Iterate
The id is the name of whatever you want to call each object thats being spat out during the iteration. Have a play with this in a jsp page to get used to the tags. And then you can move the scriptlet out when your a bit more familiar with stuff. % java.util.Map mapOne = new java.util.HashMap(); mapOne.put(fieldOne,valueOne ); mapOne.put(fieldTwo,valueTwo ); java.util.Map mapTwo = new java.util.HashMap(); mapTwo.put(fieldOne,valueOne ); mapTwo.put(fieldTwo,valueTwo ); java.util.ArrayList list = new java.util.ArrayList(); list.add(mapOne); list.add(mapTwo); request.setAttribute(mylist,list.toArray()); % pre logic:iterate id=item name=mylist bean:write name=items property=fieldOne / /logic:iterate or in jstl c:forEach var=item items=${mylist} c:out value=${item. fieldOne} / /c:forEach /pre Cheers Mark On Friday, October 17, 2003, at 11:38 AM, Thakur, Vikram wrote: No, It does not work. It says , Cannot find bean managers in any scope. Thanks anywayz. -Original Message- From: Ramesh Kannery [mailto:[EMAIL PROTECTED] Sent: Friday, October 17, 2003 3:55 PM To: Struts Users Mailing List Subject: RE: Logic Iterate logic:iterate id=managers name=NewCategoryConfirm property=categoryMangers bean:write name=managers property=fieldname/ /logic:iterate try this -Original Message- From: Thakur, Vikram [mailto:[EMAIL PROTECTED] Sent: Friday, October 17, 2003 3:57 PM To: Struts (E-mail) Subject: Logic Iterate Hi , Can anyone help me with this iterate Tag ? logic:iterate id=managers name=NewCategoryConfirm property=categoryMangers bean:write name=managers/ /logic:iterate the categoryManagers property returns a Collection os Strings I want to print all the values in the collection on screen. Is it possible using bean:write or there any alternatives. Thanks, Vikram This message contains information that may be privileged or confidential and is the property of the Cap Gemini Ernst Young Group. It is intended only for the person to whom it is addressed. If you are not the intended recipient, you are not authorised to read, print, retain, copy, disseminate, distribute, or use this message or any part thereof. If you receive this message in error, please notify the sender immediately and delete all copies of this message. - 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] This message contains information that may be privileged or confidential and is the property of the Cap Gemini Ernst Young Group. It is intended only for the person to whom it is addressed. If you are not the intended recipient, you are not authorised to read, print, retain, copy, disseminate, distribute, or use this message or any part thereof. If you receive this message in error, please notify the sender immediately and delete all copies of this message. - 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
My Form Bean is configured properly and It does contain values. The only thing that I am not understanding is , why is struts looking for the bean with name as managers. I get this error , Cannot find bean managers in any scope. Thanks, Vikram -Original Message- From: Khalid Umar [mailto:[EMAIL PROTECTED] Sent: Friday, October 17, 2003 4:15 PM To: Struts Users Mailing List Subject: RE: Logic Iterate If it is collection of Strings only then you can write the collection on page using bean:write name=managers/ itself. There is No need to provide property attribute. property attribute is required if you have collection of objects. Check the name of Formbean name=NewCategoryConfirm. Should be from struts-config.xml file. logic:iterate id=managers name=NewCategoryConfirm property=categoryMangers bean:write name=managers property=fieldname/ /logic:iterate -Original Message- From: Ramesh Kannery [mailto:[EMAIL PROTECTED] Sent: Friday, October 17, 2003 4:07 PM To: Struts Users Mailing List Subject: RE: Logic Iterate may be ur collection may be empty or null check ur collection object whether its contains anything?? -Original Message- From: Thakur, Vikram [mailto:[EMAIL PROTECTED] Sent: Friday, October 17, 2003 4:09 PM To: 'Struts Users Mailing List' Subject: RE: Logic Iterate No, It does not work. It says , Cannot find bean managers in any scope. Thanks anywayz. -Original Message- From: Ramesh Kannery [mailto:[EMAIL PROTECTED] Sent: Friday, October 17, 2003 3:55 PM To: Struts Users Mailing List Subject: RE: Logic Iterate logic:iterate id=managers name=NewCategoryConfirm property=categoryMangers bean:write name=managers property=fieldname/ /logic:iterate try this -Original Message- From: Thakur, Vikram [mailto:[EMAIL PROTECTED] Sent: Friday, October 17, 2003 3:57 PM To: Struts (E-mail) Subject: Logic Iterate Hi , Can anyone help me with this iterate Tag ? logic:iterate id=managers name=NewCategoryConfirm property=categoryMangers bean:write name=managers/ /logic:iterate the categoryManagers property returns a Collection os Strings I want to print all the values in the collection on screen. Is it possible using bean:write or there any alternatives. Thanks, Vikram This message contains information that may be privileged or confidential and is the property of the Cap Gemini Ernst Young Group. It is intended only for the person to whom it is addressed. If you are not the intended recipient, you are not authorised to read, print, retain, copy, disseminate, distribute, or use this message or any part thereof. If you receive this message in error, please notify the sender immediately and delete all copies of this message. - 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] This message contains information that may be privileged or confidential and is the property of the Cap Gemini Ernst Young Group. It is intended only for the person to whom it is addressed. If you are not the intended recipient, you are not authorised to read, print, retain, copy, disseminate, distribute, or use this message or any part thereof. If you receive this message in error, please notify the sender immediately and delete all copies of this message. - 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] **Disclaimer Information contained in this E-MAIL being proprietary to Wipro Limited is 'privileged' and 'confidential' and intended for use only by the individual or entity to which it is addressed. You are notified that any use, copying or dissemination of the information contained in the E-MAIL in any manner whatsoever is strictly prohibited. *** - To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED] This message contains information that may be privileged or confidential and is the property of the Cap Gemini Ernst Young Group. It is intended only for the person to whom it is addressed. If you are not the intended
RE: Logic Iterate
Probably check if you are setting the collection properly in the formbean. -Original Message- From: Thakur, Vikram [mailto:[EMAIL PROTECTED] Sent: Friday, October 17, 2003 4:31 PM To: 'Struts Users Mailing List' Subject: RE: Logic Iterate My Form Bean is configured properly and It does contain values. The only thing that I am not understanding is , why is struts looking for the bean with name as managers. I get this error , Cannot find bean managers in any scope. Thanks, Vikram -Original Message- From: Khalid Umar [mailto:[EMAIL PROTECTED] Sent: Friday, October 17, 2003 4:15 PM To: Struts Users Mailing List Subject: RE: Logic Iterate If it is collection of Strings only then you can write the collection on page using bean:write name=managers/ itself. There is No need to provide property attribute. property attribute is required if you have collection of objects. Check the name of Formbean name=NewCategoryConfirm. Should be from struts-config.xml file. logic:iterate id=managers name=NewCategoryConfirm property=categoryMangers bean:write name=managers property=fieldname/ /logic:iterate -Original Message- From: Ramesh Kannery [mailto:[EMAIL PROTECTED] Sent: Friday, October 17, 2003 4:07 PM To: Struts Users Mailing List Subject: RE: Logic Iterate may be ur collection may be empty or null check ur collection object whether its contains anything?? -Original Message- From: Thakur, Vikram [mailto:[EMAIL PROTECTED] Sent: Friday, October 17, 2003 4:09 PM To: 'Struts Users Mailing List' Subject: RE: Logic Iterate No, It does not work. It says , Cannot find bean managers in any scope. Thanks anywayz. -Original Message- From: Ramesh Kannery [mailto:[EMAIL PROTECTED] Sent: Friday, October 17, 2003 3:55 PM To: Struts Users Mailing List Subject: RE: Logic Iterate logic:iterate id=managers name=NewCategoryConfirm property=categoryMangers bean:write name=managers property=fieldname/ /logic:iterate try this -Original Message- From: Thakur, Vikram [mailto:[EMAIL PROTECTED] Sent: Friday, October 17, 2003 3:57 PM To: Struts (E-mail) Subject: Logic Iterate Hi , Can anyone help me with this iterate Tag ? logic:iterate id=managers name=NewCategoryConfirm property=categoryMangers bean:write name=managers/ /logic:iterate the categoryManagers property returns a Collection os Strings I want to print all the values in the collection on screen. Is it possible using bean:write or there any alternatives. Thanks, Vikram This message contains information that may be privileged or confidential and is the property of the Cap Gemini Ernst Young Group. It is intended only for the person to whom it is addressed. If you are not the intended recipient, you are not authorised to read, print, retain, copy, disseminate, distribute, or use this message or any part thereof. If you receive this message in error, please notify the sender immediately and delete all copies of this message. - 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] This message contains information that may be privileged or confidential and is the property of the Cap Gemini Ernst Young Group. It is intended only for the person to whom it is addressed. If you are not the intended recipient, you are not authorised to read, print, retain, copy, disseminate, distribute, or use this message or any part thereof. If you receive this message in error, please notify the sender immediately and delete all copies of this message. - 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] **Disclaimer Information contained in this E-MAIL being proprietary to Wipro Limited is 'privileged' and 'confidential' and intended for use only by the individual or entity to which it is addressed. You are notified that any use, copying or dissemination of the information contained in the E-MAIL in any manner whatsoever is strictly prohibited. *** - To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED
Logic Iterate in Struts
Can some body some body tell me about logic iterate tag Thanks Deepak This e-mail may contain confidential or privileged information. If you think you have received this e-mail in error, please advise the sender by reply e-mail and then delete this e-mail immediately. Thank you. Aetna - To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED]
RE: Logic Iterate in Struts
That's not overly general or anything ** Note the sarcasm ** What do you want to know? -Original Message- From: Yinti, Deepak [mailto:[EMAIL PROTECTED] Sent: Wednesday, July 09, 2003 2:13 PM To: Struts Users Mailing List Subject: Logic Iterate in Struts Can some body some body tell me about logic iterate tag Thanks Deepak This e-mail may contain confidential or privileged information. If you think you have received this e-mail in error, please advise the sender by reply e-mail and then delete this e-mail immediately. Thank you. Aetna - 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 in Struts
logic iterate was very great for looping collections with no quelm but now there's jstl and forEach can take the helm The Struts team suggests with gleam http://jakarta.apache.org/struts/userGuide/dev_logic.html http://jakarta.apache.org/struts/userGuide/struts-logic.html#iterate http://www.manning.com/bayern/appendixA.pdf -Tim -Original Message- From: Yinti, Deepak [mailto:[EMAIL PROTECTED] Sent: Wednesday, July 09, 2003 2:13 PM To: Struts Users Mailing List Subject: Logic Iterate in Struts Can some body some body tell me about logic iterate tag Thanks Deepak This e-mail may contain confidential or privileged information. If you think you have received this e-mail in error, please advise the sender by reply e-mail and then delete this e-mail immediately. Thank you. Aetna - 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 in Struts
I want to iterate thru by bean and retrieve all values in JSP thru this tag Deepak -Original Message- From: Kamholz, Keith (corp-staff) USX [mailto:[EMAIL PROTECTED] Sent: Wednesday, July 09, 2003 2:20 PM To: 'Struts Users Mailing List' Subject: RE: Logic Iterate in Struts That's not overly general or anything ** Note the sarcasm ** What do you want to know? -Original Message- From: Yinti, Deepak [mailto:[EMAIL PROTECTED] Sent: Wednesday, July 09, 2003 2:13 PM To: Struts Users Mailing List Subject: Logic Iterate in Struts Can some body some body tell me about logic iterate tag Thanks Deepak This e-mail may contain confidential or privileged information. If you think you have received this e-mail in error, please advise the sender by reply e-mail and then delete this e-mail immediately. Thank you. Aetna - 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]
[OT]Re: Logic Iterate in Struts
logic iterate was very great for looping collections with no quelm but now there's jstl and forEach can take the helm The Struts team suggests with gleam http://jakarta.apache.org/struts/userGuide/dev_logic.html http://jakarta.apache.org/struts/userGuide/struts-logic.html#iterate http://www.manning.com/bayern/appendixA.pdf -Tim now if this isn't a candidate for StrutsPoetry ;-) http://nagoya.apache.org/wiki/apachewiki.cgi?StrutsPoetry - To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED]
RE: Logic Iterate in Struts
Deepak, Yesterday I posted a link containing source code on how to use the iterate tag. http://moosejaw.org/java/struts-iterate/ I hope it helps you. Matt -Original Message- From: Yinti, Deepak [mailto:[EMAIL PROTECTED] Sent: Wednesday, July 09, 2003 2:25 PM To: Struts Users Mailing List Subject: RE: Logic Iterate in Struts I want to iterate thru by bean and retrieve all values in JSP thru this tag Deepak -Original Message- From: Kamholz, Keith (corp-staff) USX [mailto:[EMAIL PROTECTED] Sent: Wednesday, July 09, 2003 2:20 PM To: 'Struts Users Mailing List' Subject: RE: Logic Iterate in Struts That's not overly general or anything ** Note the sarcasm ** What do you want to know? -Original Message- From: Yinti, Deepak [mailto:[EMAIL PROTECTED] Sent: Wednesday, July 09, 2003 2:13 PM To: Struts Users Mailing List Subject: Logic Iterate in Struts Can some body some body tell me about logic iterate tag Thanks Deepak This e-mail may contain confidential or privileged information. If you think you have received this e-mail in error, please advise the sender by reply e-mail and then delete this e-mail immediately. Thank you. Aetna - 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 in Struts
I am having a problem with this tag as well. My issue it that I set a collection (List) object in the session, the list is not empty yet the result I get is cannot create an iterator... Every example i see says that you should have a bean that holds the collection so the tag uses the property attribute to retrieve the collection but I thought I could just throw a collection object into session and use it with the tag. What am I missing? -Original Message- From: Matthew J. Vincent [mailto:[EMAIL PROTECTED] Sent: Wednesday, July 09, 2003 1:33 PM To: Struts Users Mailing List Subject: RE: Logic Iterate in Struts Deepak, Yesterday I posted a link containing source code on how to use the iterate tag. http://moosejaw.org/java/struts-iterate/ I hope it helps you. Matt -Original Message- From: Yinti, Deepak [mailto:[EMAIL PROTECTED] Sent: Wednesday, July 09, 2003 2:25 PM To: Struts Users Mailing List Subject: RE: Logic Iterate in Struts I want to iterate thru by bean and retrieve all values in JSP thru this tag Deepak -Original Message- From: Kamholz, Keith (corp-staff) USX [mailto:[EMAIL PROTECTED] Sent: Wednesday, July 09, 2003 2:20 PM To: 'Struts Users Mailing List' Subject: RE: Logic Iterate in Struts That's not overly general or anything ** Note the sarcasm ** What do you want to know? -Original Message- From: Yinti, Deepak [mailto:[EMAIL PROTECTED] Sent: Wednesday, July 09, 2003 2:13 PM To: Struts Users Mailing List Subject: Logic Iterate in Struts Can some body some body tell me about logic iterate tag Thanks Deepak This e-mail may contain confidential or privileged information. If you think you have received this e-mail in error, please advise the sender by reply e-mail and then delete this e-mail immediately. Thank you. Aetna - To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED] - To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED] - To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED] - To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED] - To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED]
RE: Logic Iterate in Struts
It all depends on how you use the tag. Show us how you tried to do this and what error was returned. -Tim -Original Message- From: Mike Ash [mailto:[EMAIL PROTECTED] Sent: Wednesday, July 09, 2003 4:07 PM To: 'Struts Users Mailing List' Subject: RE: Logic Iterate in Struts I am having a problem with this tag as well. My issue it that I set a collection (List) object in the session, the list is not empty yet the result I get is cannot create an iterator... Every example i see says that you should have a bean that holds the collection so the tag uses the property attribute to retrieve the collection but I thought I could just throw a collection object into session and use it with the tag. What am I missing? -Original Message- From: Matthew J. Vincent [mailto:[EMAIL PROTECTED] Sent: Wednesday, July 09, 2003 1:33 PM To: Struts Users Mailing List Subject: RE: Logic Iterate in Struts Deepak, Yesterday I posted a link containing source code on how to use the iterate tag. http://moosejaw.org/java/struts-iterate/ I hope it helps you. Matt -Original Message- From: Yinti, Deepak [mailto:[EMAIL PROTECTED] Sent: Wednesday, July 09, 2003 2:25 PM To: Struts Users Mailing List Subject: RE: Logic Iterate in Struts I want to iterate thru by bean and retrieve all values in JSP thru this tag Deepak -Original Message- From: Kamholz, Keith (corp-staff) USX [mailto:[EMAIL PROTECTED] Sent: Wednesday, July 09, 2003 2:20 PM To: 'Struts Users Mailing List' Subject: RE: Logic Iterate in Struts That's not overly general or anything ** Note the sarcasm ** What do you want to know? -Original Message- From: Yinti, Deepak [mailto:[EMAIL PROTECTED] Sent: Wednesday, July 09, 2003 2:13 PM To: Struts Users Mailing List Subject: Logic Iterate in Struts Can some body some body tell me about logic iterate tag Thanks Deepak This e-mail may contain confidential or privileged information. If you think you have received this e-mail in error, please advise the sender by reply e-mail and then delete this e-mail immediately. Thank you. Aetna - To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED] - To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED] - To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED] - To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED] - To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED] - To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED]
RE: Logic Iterate in Struts
logic:iterate id=details name=txndetails ... /logic:iterate java code was like List list = some_business_layer_call to return a list session.setAttribute(txndetails, list); error is cannot create iterator for collection -Original Message- From: Chen, Gin [mailto:[EMAIL PROTECTED] Sent: Wednesday, July 09, 2003 3:16 PM To: 'Struts Users Mailing List' Subject: RE: Logic Iterate in Struts It all depends on how you use the tag. Show us how you tried to do this and what error was returned. -Tim -Original Message- From: Mike Ash [mailto:[EMAIL PROTECTED] Sent: Wednesday, July 09, 2003 4:07 PM To: 'Struts Users Mailing List' Subject: RE: Logic Iterate in Struts I am having a problem with this tag as well. My issue it that I set a collection (List) object in the session, the list is not empty yet the result I get is cannot create an iterator... Every example i see says that you should have a bean that holds the collection so the tag uses the property attribute to retrieve the collection but I thought I could just throw a collection object into session and use it with the tag. What am I missing? -Original Message- From: Matthew J. Vincent [mailto:[EMAIL PROTECTED] Sent: Wednesday, July 09, 2003 1:33 PM To: Struts Users Mailing List Subject: RE: Logic Iterate in Struts Deepak, Yesterday I posted a link containing source code on how to use the iterate tag. http://moosejaw.org/java/struts-iterate/ I hope it helps you. Matt -Original Message- From: Yinti, Deepak [mailto:[EMAIL PROTECTED] Sent: Wednesday, July 09, 2003 2:25 PM To: Struts Users Mailing List Subject: RE: Logic Iterate in Struts I want to iterate thru by bean and retrieve all values in JSP thru this tag Deepak -Original Message- From: Kamholz, Keith (corp-staff) USX [mailto:[EMAIL PROTECTED] Sent: Wednesday, July 09, 2003 2:20 PM To: 'Struts Users Mailing List' Subject: RE: Logic Iterate in Struts That's not overly general or anything ** Note the sarcasm ** What do you want to know? -Original Message- From: Yinti, Deepak [mailto:[EMAIL PROTECTED] Sent: Wednesday, July 09, 2003 2:13 PM To: Struts Users Mailing List Subject: Logic Iterate in Struts Can some body some body tell me about logic iterate tag Thanks Deepak This e-mail may contain confidential or privileged information. If you think you have received this e-mail in error, please advise the sender by reply e-mail and then delete this e-mail immediately. Thank you. Aetna - To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED] - To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED] - To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED] - To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED] - To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED] - 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 in Struts
have you tried: logic:iterate id=details collection=txndetails ... /logic:iterate ? Better yet.. why not just use JSTL? c:forEach var=details items=${txndetails} ... /c:forEach -Tim -Original Message- From: Mike Ash [mailto:[EMAIL PROTECTED] Sent: Wednesday, July 09, 2003 4:31 PM To: 'Struts Users Mailing List' Subject: RE: Logic Iterate in Struts logic:iterate id=details name=txndetails ... /logic:iterate java code was like List list = some_business_layer_call to return a list session.setAttribute(txndetails, list); error is cannot create iterator for collection -Original Message- From: Chen, Gin [mailto:[EMAIL PROTECTED] Sent: Wednesday, July 09, 2003 3:16 PM To: 'Struts Users Mailing List' Subject: RE: Logic Iterate in Struts It all depends on how you use the tag. Show us how you tried to do this and what error was returned. -Tim -Original Message- From: Mike Ash [mailto:[EMAIL PROTECTED] Sent: Wednesday, July 09, 2003 4:07 PM To: 'Struts Users Mailing List' Subject: RE: Logic Iterate in Struts I am having a problem with this tag as well. My issue it that I set a collection (List) object in the session, the list is not empty yet the result I get is cannot create an iterator... Every example i see says that you should have a bean that holds the collection so the tag uses the property attribute to retrieve the collection but I thought I could just throw a collection object into session and use it with the tag. What am I missing? -Original Message- From: Matthew J. Vincent [mailto:[EMAIL PROTECTED] Sent: Wednesday, July 09, 2003 1:33 PM To: Struts Users Mailing List Subject: RE: Logic Iterate in Struts Deepak, Yesterday I posted a link containing source code on how to use the iterate tag. http://moosejaw.org/java/struts-iterate/ I hope it helps you. Matt -Original Message- From: Yinti, Deepak [mailto:[EMAIL PROTECTED] Sent: Wednesday, July 09, 2003 2:25 PM To: Struts Users Mailing List Subject: RE: Logic Iterate in Struts I want to iterate thru by bean and retrieve all values in JSP thru this tag Deepak -Original Message- From: Kamholz, Keith (corp-staff) USX [mailto:[EMAIL PROTECTED] Sent: Wednesday, July 09, 2003 2:20 PM To: 'Struts Users Mailing List' Subject: RE: Logic Iterate in Struts That's not overly general or anything ** Note the sarcasm ** What do you want to know? -Original Message- From: Yinti, Deepak [mailto:[EMAIL PROTECTED] Sent: Wednesday, July 09, 2003 2:13 PM To: Struts Users Mailing List Subject: Logic Iterate in Struts Can some body some body tell me about logic iterate tag Thanks Deepak This e-mail may contain confidential or privileged information. If you think you have received this e-mail in error, please advise the sender by reply e-mail and then delete this e-mail immediately. Thank you. Aetna - To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED] - To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED] - To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED] - To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED] - To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED] - 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 in Struts
I am looking int the jstl stuff, I honestly just haven't used it yet, sounds like the thing to do its just hard to get managers to agree to let you use new stuff :( -Original Message- From: Chen, Gin [mailto:[EMAIL PROTECTED] Sent: Wednesday, July 09, 2003 4:11 PM To: 'Struts Users Mailing List' Subject: RE: Logic Iterate in Struts have you tried: logic:iterate id=details collection=txndetails ... /logic:iterate ? Better yet.. why not just use JSTL? c:forEach var=details items=${txndetails} ... /c:forEach -Tim -Original Message- From: Mike Ash [mailto:[EMAIL PROTECTED] Sent: Wednesday, July 09, 2003 4:31 PM To: 'Struts Users Mailing List' Subject: RE: Logic Iterate in Struts logic:iterate id=details name=txndetails ... /logic:iterate java code was like List list = some_business_layer_call to return a list session.setAttribute(txndetails, list); error is cannot create iterator for collection -Original Message- From: Chen, Gin [mailto:[EMAIL PROTECTED] Sent: Wednesday, July 09, 2003 3:16 PM To: 'Struts Users Mailing List' Subject: RE: Logic Iterate in Struts It all depends on how you use the tag. Show us how you tried to do this and what error was returned. -Tim -Original Message- From: Mike Ash [mailto:[EMAIL PROTECTED] Sent: Wednesday, July 09, 2003 4:07 PM To: 'Struts Users Mailing List' Subject: RE: Logic Iterate in Struts I am having a problem with this tag as well. My issue it that I set a collection (List) object in the session, the list is not empty yet the result I get is cannot create an iterator... Every example i see says that you should have a bean that holds the collection so the tag uses the property attribute to retrieve the collection but I thought I could just throw a collection object into session and use it with the tag. What am I missing? -Original Message- From: Matthew J. Vincent [mailto:[EMAIL PROTECTED] Sent: Wednesday, July 09, 2003 1:33 PM To: Struts Users Mailing List Subject: RE: Logic Iterate in Struts Deepak, Yesterday I posted a link containing source code on how to use the iterate tag. http://moosejaw.org/java/struts-iterate/ I hope it helps you. Matt -Original Message- From: Yinti, Deepak [mailto:[EMAIL PROTECTED] Sent: Wednesday, July 09, 2003 2:25 PM To: Struts Users Mailing List Subject: RE: Logic Iterate in Struts I want to iterate thru by bean and retrieve all values in JSP thru this tag Deepak -Original Message- From: Kamholz, Keith (corp-staff) USX [mailto:[EMAIL PROTECTED] Sent: Wednesday, July 09, 2003 2:20 PM To: 'Struts Users Mailing List' Subject: RE: Logic Iterate in Struts That's not overly general or anything ** Note the sarcasm ** What do you want to know? -Original Message- From: Yinti, Deepak [mailto:[EMAIL PROTECTED] Sent: Wednesday, July 09, 2003 2:13 PM To: Struts Users Mailing List Subject: Logic Iterate in Struts Can some body some body tell me about logic iterate tag Thanks Deepak This e-mail may contain confidential or privileged information. If you think you have received this e-mail in error, please advise the sender by reply e-mail and then delete this e-mail immediately. Thank you. Aetna - To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED] - To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED] - To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED] - To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED] - To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED] - 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 in Struts
Mike wrote: I am looking int the jstl stuff, I honestly just haven't used it yet, sounds like the thing to do its just hard to get managers to agree to let you use new stuff :( It's easier to beg forgiveness than to ask permission. Anyway, how do you evaluate new stuff if you have to get permission to use it, which would entail knowing enough about it to make a case for it? Goes along with all those poor souls stuck on Struts 1.0 because 1.1 didn't officially have the word Final next to it. Meanwhile my webapp went live on July 1 with RC2 and I'll switch over to 1.1 Final next maintenance period. Struts-EL and JSTL make life much MUCH easier, give them a try! -- Wendy Smoak Applications Systems Analyst, Sr. Arizona State University, PA, IRM
Logic Iterate
Hi: I want to edit an array of objects. I use logic:iterate , when it display the page, all values are displayed, but when I submit the form, it doesn't reflect the values on my bean ? Can anybody give me an example ? Thanks Delio The bean testbean have an array of object OptionBean and setter an getter methods. ... html:form action=html-setters.do table border=0 width=100% logic:iterate scope=session id=element name=testbean property=opciones indexId=index tr td align=left html:text name=element property=label / /td td align=left html:text name=element property=value/ /td /tr /logic:iterate tr td align=right html:submitSave/html:submit /td td align=left html:resetReset/html:reset html:cancelCancel/html:cancel /td /tr /table /html:form - To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED]
RE: Struts Logic iterate vs JSTL Code forEach
It will stay in the contrib directory, or move out to a separate release. It will never go into the base Struts distribution, for good reason. Once JSP 2.0 is commonly available, the EL notation will be natively supported, and Struts-EL won't be needed. -Original Message- From: Derek Richardson [mailto:[EMAIL PROTECTED] Thanks. I submitted a patch to bugzilla. What does it mean that struts-el is still in the contrib directory? At what point will it migrate to struts-proper? I find it amazingly useful and forward-looking and so am puzzled that it is placed in an apparently peripheral position. Is this just on hold until after 1.1 final? - To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED]
Struts Logic iterate vs JSTL Code forEach
The Logic taglib iterate tag was ported to struts-el. This indicates that it has some functionality that cannot be reproduced by the JSTL forEach. However, after reading through the documentation for these tags, I cannot find anything that iterate can do that forEach cannot. So I am clearly missing the boat. Can someone help me out and explain what cases require using iterate instead of forEach? If someone will enlighten me, I'll write it up and figure out how to submit a patch for the README.txt in the struts-el directory. :) Thanks, Derek Richardson - To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED]
RE: Struts Logic iterate vs JSTL Code forEach
The iterate tag was originally ported because the indexed tag functionality wouldn't work with c:forEach. This has since been rectified, but I didn't think it would be a good idea to remove it from the library after I released it (even though it's never been in a released version of Struts). -Original Message- From: Derek Richardson [mailto:[EMAIL PROTECTED] Sent: Wednesday, June 04, 2003 2:23 PM To: Struts Users Mailing List Subject: Struts Logic iterate vs JSTL Code forEach The Logic taglib iterate tag was ported to struts-el. This indicates that it has some functionality that cannot be reproduced by the JSTL forEach. However, after reading through the documentation for these tags, I cannot find anything that iterate can do that forEach cannot. So I am clearly missing the boat. Can someone help me out and explain what cases require using iterate instead of forEach? If someone will enlighten me, I'll write it up and figure out how to submit a patch for the README.txt in the struts-el directory. :) Thanks, Derek Richardson - 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: Struts Logic iterate vs JSTL Code forEach
Thanks. I submitted a patch to bugzilla. What does it mean that struts-el is still in the contrib directory? At what point will it migrate to struts-proper? I find it amazingly useful and forward-looking and so am puzzled that it is placed in an apparently peripheral position. Is this just on hold until after 1.1 final? Derek Richardson -Original Message- From: Karr, David [mailto:[EMAIL PROTECTED] Sent: Wednesday, June 04, 2003 5:41 PM To: Struts Users Mailing List Subject: RE: Struts Logic iterate vs JSTL Code forEach The iterate tag was originally ported because the indexed tag functionality wouldn't work with c:forEach. This has since been rectified, but I didn't think it would be a good idea to remove it from the library after I released it (even though it's never been in a released version of Struts). -Original Message- From: Derek Richardson [mailto:[EMAIL PROTECTED] Sent: Wednesday, June 04, 2003 2:23 PM To: Struts Users Mailing List Subject: Struts Logic iterate vs JSTL Code forEach The Logic taglib iterate tag was ported to struts-el. This indicates that it has some functionality that cannot be reproduced by the JSTL forEach. However, after reading through the documentation for these tags, I cannot find anything that iterate can do that forEach cannot. So I am clearly missing the boat. Can someone help me out and explain what cases require using iterate instead of forEach? If someone will enlighten me, I'll write it up and figure out how to submit a patch for the README.txt in the struts-el directory. :) Thanks, Derek Richardson - 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]
logic iterate with nested class (I think that's the term)
Hi there, this is my problem, I hap a Map, namely a hashtable, that I want struts to iterate through, Now the bean class of each entry in the map is com.crm.util.TemplateBeans.IMGTemplateBean where TemplateBeans is a class itself. using the following tag logic:iterate name=RenderHTMLForm id=imfFile type=com.crm.util.TemplateBeans.IMGTemplateBean property=imageFields causes a ClassCastException, even though, I have checked and the object class matches. I then tried logic:iterate name=RenderHTMLForm id=imfFile type=com.crm.util.TemplateBeans$IMGTemplateBean property=imageFields this didn't work, I got a error stating that It was expecting a value of class com.crm.util.TemplateBeans.IMGTemplateBean but got one of type java.lang.Object If I can, I would like to keep these classes nested under com.crm.util.TemplateBeans, just of eas of use and neatness. Is there a way to properly reference these classes in the iterate tag?? Thaks in advance Steve - To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED]
RE: logic iterate with nested class (I think that's the term)
Ignore this one, It seems that Struts doesn't know to go into the Hashtable entry and just get the value, Very strange, but basically it was looking to cast the whole entry rather than just the value. Will have to convert it to use a list instead STeve -Original Message- From: Steve Vanspall [mailto:[EMAIL PROTECTED] Sent: Friday, 7 March 2003 10:08 AM To: Struts User Mailing List Subject: logic iterate with nested class (I think that's the term) Hi there, this is my problem, I hap a Map, namely a hashtable, that I want struts to iterate through, Now the bean class of each entry in the map is com.crm.util.TemplateBeans.IMGTemplateBean where TemplateBeans is a class itself. using the following tag logic:iterate name=RenderHTMLForm id=imfFile type=com.crm.util.TemplateBeans.IMGTemplateBean property=imageFields causes a ClassCastException, even though, I have checked and the object class matches. I then tried logic:iterate name=RenderHTMLForm id=imfFile type=com.crm.util.TemplateBeans$IMGTemplateBean property=imageFields this didn't work, I got a error stating that It was expecting a value of class com.crm.util.TemplateBeans.IMGTemplateBean but got one of type java.lang.Object If I can, I would like to keep these classes nested under com.crm.util.TemplateBeans, just of eas of use and neatness. Is there a way to properly reference these classes in the iterate tag?? Thaks in advance Steve - 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 with nested class (I think that's the term)
On Fri, 7 Mar 2003 10:31:08 +1100 Steve Vanspall [EMAIL PROTECTED] wrote: Ignore this one, It seems that Struts doesn't know to go into the Hashtable entry and just get the value, You can iterate through a map and display the keys and values just fine: logic:iterate id=element name=someMapInScope bean:write name=element property=key/ - bean:write name=element property=value/BR /logic:iterate Or better yet use JSTL tags: c:forEach var=element items=${someMapInScope} c:out value=${element.key}/ - c:out value=${element.value}/br /c:forEach -- Rick Reumann - To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED]
RE: logic iterate with nested class (I think that's the term)
Yeah, I am trying to make input tags out of them Thanks anywa Steve -Original Message- From: Rick Reumann [mailto:[EMAIL PROTECTED] Sent: Friday, 7 March 2003 10:54 AM To: Struts Users Mailing List Subject: Re: logic iterate with nested class (I think that's the term) On Fri, 7 Mar 2003 10:31:08 +1100 Steve Vanspall [EMAIL PROTECTED] wrote: Ignore this one, It seems that Struts doesn't know to go into the Hashtable entry and just get the value, You can iterate through a map and display the keys and values just fine: logic:iterate id=element name=someMapInScope bean:write name=element property=key/ - bean:write name=element property=value/BR /logic:iterate Or better yet use JSTL tags: c:forEach var=element items=${someMapInScope} c:out value=${element.key}/ - c:out value=${element.value}/br /c:forEach -- Rick Reumann - 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]
Help using the logic iterate tag in struts
Hi, I am new to struts and I trying to use the logic iterate tag. The task that I have to do is to loop through a collection and display some properties. I am obtaining the collection on my jsp page itself. The collection is made of objects. Here is how I obtain the collection: % Collection uriLanguages= UriFactory.getInstance().getUri(257).getUriLanguages().values(); % Below is how my iterate tag is defined: jsp:useBean id=uriLanguage class=com.ford.hr.framework.uri.UriLanguage scope=request/ logic:iterate id=uriLanguage name=uriLanguages type=com.ford.hr.framework.uri.UriLanguage tr td align=left html:link page=/logon.dobean:write name=uriLanguage property=linkLabel//html:link /td td align=left html:link page=/logon.doSet as Default/html:link /td /tr /logic:iterate I have two questions regarding this. 1.Do I have to use the useBean tag to define uriLanguage.If I don't specify that I get the error message that uriLanguage is not defined in any scope. 2.Am I using iterate tag correctly? After I started using the useBean tag I no longer get exceptions, but I do not get the value for link label property in uriLanguage class. Thanks in advance for your help.
index of logic-iterate
Hi, The following code is JSTL. How do I do this with struts logic tags ? No struts-el. c:when test=%= value % 2 == 0 % I am looping with logic-iterate. 'value' in the above code should be the 'index' of the looped over arraylist. I am just checking for alternate rows and changing the color. It could be something like logic:iterate id=item name=table1 indexId=index offset=1 logic:equal value=bean:write name=index/ /logic:iterate Is this possible ? Thanks, Mohan -- To unsubscribe, e-mail: mailto:[EMAIL PROTECTED] For additional commands, e-mail: mailto:[EMAIL PROTECTED]
RE: Making peace between Struts logic iterate and Ed Hill's display tag...
Both of these solutions are a little cleaner in terms of JSP, but my real problem is the underlying Java code with its 30 property getter and setters (this was the code which set off the code review alarm bells). Ideally, I think I need to combine something similar to the examples you two supplied in combination with a Java array in the bean which links to an associated array in my data object. I was hoping to avoid the use of scriptlets altogether (which is why I resorted to individual properties like this to begin with), but I don't see that happening due to the apparent problems combining the display tag with the Struts iterate tag. This is the real problem, but life is a story full of Workarounds. Thanks! Dave McLure -Original Message- From: edgar [mailto:edgar;blue-moose.net] Sent: Saturday, November 09, 2002 11:15 AM To: 'Struts Users Mailing List' Subject: RE: Making peace between Struts logic iterate and Ed Hill's display tag... Wouldn't this work. Still ugly but if you use XML syntax might be passable. % FooBarBean fooBarBean = (FooBarBean)request.getAttribute(FooBarBean.LOOKUP_KEY); % display:table name=FooBarBean property=fundList cellspacing=1 cellpadding=0 border=0 width=569 styleClass=DataTableBorder scope=request !-- display : table name=FooBarBean cellpadding=4 property=fundList width=550 scope=request -- trtd class=FooBarTableTitle height=20nbsp;Beautiful Looking Spreadsheet in the Broswer Brought to you by Hideously Ugly Looking Code/td/tr display:setProperty name=basic.show.header value=true / display:column property=fundCode align=right styleClass=FooBarStyle headerStyleClass=FooBarDataHeader title=FooBar Code / % for (int j = 0 ; j 30 ; j++ ) { if (FooBarBean.isExistingColumn(j)) { String fillJ = (j 10 ? 0 + j : j); % display:column property=stuff%=fillJ% align=right styleClass=FooBarStyle headerStyleClass=FooBarDataHeader title=Stuff %=fillJ% / % } } % display:column property=fundTotal align=right styleClass=FooBarStyle headerStyleClass=FooBarDataHeader title=FooBar Total / /display:table -Original Message- From: Antoni Reus [mailto:antoni.reus;wanadoo.es] Sent: Saturday, November 09, 2002 11:19 AM To: Struts Users Mailing List Subject: Re: Making peace between Struts logic iterate and Ed Hill's display tag... I don't understant why you can't use logic:iterate tag. Anyway, why don't you use a for instead of all those if, something like this ? %! // Convert a int to a 2 digit String private String int2DString(int i) { String number = new Integer(i).toString(); if ( i 10) { number = 0 + number; } } private String propName(int i) { i++; // i was zero-based return stuff + int2DString(++i); } private String propTitle(int i) { i++; // i was zero-based return Stuff + int2DString(++i); } % % FooBarBean FooBarBean = (FooBarBean)request.getAttribute(FooBarBean.LOOKUP_KEY); % display:table name=FooBarBean property=fundList cellspacing=1 cellpadding=0 border=0 width=569 styleClass=DataTableBorder scope=request tr td class=FooBarTableTitle height=20 nbsp;Beautiful Looking Spreadsheet in the Broswer Brought to you by Hideously Ugly Looking Code /td /tr display:setProperty name=basic.show.header value=true / display:column property=fundCode align=right styleClass=FooBarStyle headerStyleClass=FooBarDataHeader title=FooBar Code / % for (int i = 0; i 30 ; i++) { % % if (FooBarBean.isExistingColumn(i)) { % display:column property=%=propName(i)% align=right styleClass=FooBarStyle headerStyleClass=FooBarDataHeader title=%=propTitle(i)% / % } // end If % % } // End For % display:column property=fundTotal align=right styleClass=FooBarStyle headerStyleClass=FooBarDataHeader title=FooBar Total / /display:table -- To unsubscribe, e-mail: mailto:struts-user-unsubscribe;jakarta.apache.org For additional commands, e-mail: mailto:struts-user-help;jakarta.apache.org
Re: Making peace between Struts logic iterate and Ed Hill's displ ay tag...
I hope you think this helps, because I do not think you have a technical issue, just a design issue: have variable columns which may or may not appear Yes that would be a problem for any design review, not something that is a good design. Like how would you unit test the bean outside of the view/JSP? Field1, field2, etc..? Tech: Struts can and does work with collections, my formbeans implement collection so they can multi row update and multi row validate, this includes working the the logic iterate tag and html indexed tag. (you know where this bean implementation is) I can't see why you would mix logic iterate w/ display tag. Maybe it is easier to write several JSP/bean combos to do the same? Also, I imagine a good sql command could resolve your issue, optional joins, renamed columns, unions, correlated, etc. etc. Hope you have SQL experience, to help you with design that matches your view requirement. .V McLure, David wrote: Both of these solutions are a little cleaner in terms of JSP, but my real problem is the underlying Java code with its 30 property getter and setters (this was the code which set off the code review alarm bells). Ideally, I think I need to combine something similar to the examples you two supplied in combination with a Java array in the bean which links to an associated array in my data object. I was hoping to avoid the use of scriptlets altogether (which is why I resorted to individual properties like this to begin with), but I don't see that happening due to the apparent problems combining the display tag with the Struts iterate tag. This is the real problem, but life is a story full of Workarounds. Thanks! Dave McLure -Original Message- From: edgar [mailto:edgar;blue-moose.net] Sent: Saturday, November 09, 2002 11:15 AM To: 'Struts Users Mailing List' Subject: RE: Making peace between Struts logic iterate and Ed Hill's display tag... Wouldn't this work. Still ugly but if you use XML syntax might be passable. % FooBarBean fooBarBean = (FooBarBean)request.getAttribute(FooBarBean.LOOKUP_KEY); % display:table name=FooBarBean property=fundList cellspacing=1 cellpadding=0 border=0 width=569 styleClass=DataTableBorder scope=request !-- display : table name=FooBarBean cellpadding=4 property=fundList width=550 scope=request -- trtd class=FooBarTableTitle height=20nbsp;Beautiful Looking Spreadsheet in the Broswer Brought to you by Hideously Ugly Looking Code/td/tr display:setProperty name=basic.show.header value=true / display:column property=fundCode align=right styleClass=FooBarStyle headerStyleClass=FooBarDataHeader title=FooBar Code / % for (int j = 0 ; j 30 ; j++ ) { if (FooBarBean.isExistingColumn(j)) { String fillJ = (j 10 ? 0 + j : j); % display:column property=stuff%=fillJ% align=right styleClass=FooBarStyle headerStyleClass=FooBarDataHeader title=Stuff %=fillJ% / % } } % display:column property=fundTotal align=right styleClass=FooBarStyle headerStyleClass=FooBarDataHeader title=FooBar Total / /display:table -Original Message- From: Antoni Reus [mailto:antoni.reus;wanadoo.es] Sent: Saturday, November 09, 2002 11:19 AM To: Struts Users Mailing List Subject: Re: Making peace between Struts logic iterate and Ed Hill's display tag... I don't understant why you can't use logic:iterate tag. Anyway, why don't you use a for instead of all those if, something like this ? %! // Convert a int to a 2 digit String private String int2DString(int i) { String number = new Integer(i).toString(); if ( i 10) { number = 0 + number; } } private String propName(int i) { i++; // i was zero-based return stuff + int2DString(++i); } private String propTitle(int i) { i++; // i was zero-based return Stuff + int2DString(++i); } % % FooBarBean FooBarBean = (FooBarBean)request.getAttribute(FooBarBean.LOOKUP_KEY); % display:table name=FooBarBean property=fundList cellspacing=1 cellpadding=0 border=0 width=569 styleClass=DataTableBorder scope=request tr td class=FooBarTableTitle height=20 nbsp;Beautiful Looking Spreadsheet in the Broswer Brought to you by Hideously Ugly Looking Code /td /tr display:setProperty name=basic.show.header value=true / display:column property=fundCode align=right styleClass=FooBarStyle headerStyleClass=FooBarDataHeader title=FooBar Code / % for (int i = 0; i 30 ; i++) { % % if (FooBarBean.isExistingColumn(i)) { % display:column property=%=propName(i)% align=right styleClass=FooBarStyle headerStyleClass=FooBarDataHeader title=%=propTitle(i)% / % } // end If % % } // End For % display:column property=fundTotal align=right styleClass=FooBarStyle headerStyleClass=FooBarDataHeader title=FooBar Total
Making peace between Struts logic iterate and Ed Hill's display tag...
Last month a fellow by the name of Rick Ruemann [[EMAIL PROTECTED]] posted a reply to an email inquiry of mine, turning me on to Ed Hill's marvelous display tag library (Hi Rick!). It turns out that Ed's web site URL is actually http://edhill.its.uiowa.edu/display-0.8/ (implying that Ed might have even a newer version of the tag library now, but I digress...) : From: Rick Reumann [[EMAIL PROTECTED]] Sent: Thursday, October 10, 2002 8:02 PM To: Struts Users Mailing List Subject: Re: Ideas for doing a spreadsheet-styled tables using Struts tags On Thursday, October 10, 2002, 7:55:21 PM, David wrote: DM I am currently looking for ideas on ways to display potentially DM large amounts of data in a spreadsheet format using Struts. Check out using this display tag: http://edhill.its.uiowa.edu/display/ I couldn't live without it:) (Even will provide a link that you can click on to export the display to Excel). Excellent tag. -- Rick mailto:maillist;reumann.net Since then, with Rick's help (and Rick deserves a lot of credit for figuring out how to use this display tag library by the way), I have managed to implement the display tag in my Struts based application and it seems to work just fine. The problem? My code is ugly as sin! It's so bad, that after glancing over my shoulder the other day, one of my best friends at work (Hi Russ!) has already warned me that it will undoubtedly fail the upcoming code review. He's got a point too - it is Coyote Ugly Code! The reason is that neither Rick nor I have figured out a way to make Ed Hill's display tag live peacefully with Struts logic iterate tags. As a result, I have JSP code which looks something like the following : % FooBarBean FooBarBean = (FooBarBean)request.getAttribute(FooBarBean.LOOKUP_KEY); % display:table name=FooBarBean property=fundList cellspacing=1 cellpadding=0 border=0 width=569 styleClass=DataTableBorder scope=request !-- display : table name=FooBarBean cellpadding=4 property=fundList width=550 scope=request -- trtd class=FooBarTableTitle height=20nbsp;Beautiful Looking Spreadsheet in the Broswer Brought to you by Hideously Ugly Looking Code/td/tr display:setProperty name=basic.show.header value=true / display:column property=fundCode align=right styleClass=FooBarStyle headerStyleClass=FooBarDataHeader title=FooBar Code / % if (FooBarBean.isExistingColumn(0)) { % display:column property=stuff01 align=right styleClass=FooBarStyle headerStyleClass=FooBarDataHeader title=Stuff 01 / % } if (FooBarBean.isExistingColumn(1)) { % display:column property=stuff02 align=right styleClass=FooBarStyle headerStyleClass=FooBarDataHeader title=Stuff 02 / % } if (FooBarBean.isExistingColumn(2)) { % display:column property=stuff03 align=right styleClass=FooBarStyle headerStyleClass=FooBarDataHeader title=Stuff 03 / ...etc., etc... % } if (FooBarBean.isExistingColumn(29)) { % display:column property=stuff30 align=right styleClass=FooBarStyle headerStyleClass=FooBarDataHeader title=Stuff 30 / % } % display:column property=fundTotal align=right styleClass=FooBarStyle headerStyleClass=FooBarDataHeader title=FooBar Total / /display:table ... and Java code to support this which is simply to hideous looking to post in front of a family audience... (Russ happened to catch me desparately trying to prettify the most hideous looking class of the bunch! There are some things which simply no combination of comments can help :-). So please, just shoot me already! Either that, or help me with this agonizing problem which is causing me to lose sleep (normally I sleep late on Saturday mornings if I stay up late the night before). Of course, it doesn't help that in this case, I have variable columns which may or may not appear (causing the need for the additional if (FooBarBean.isExistingColumn(x)) scriptlet code. Even without that problem though, it seems that I would still end up having to in line my display columns with silly looking class properties like stuff00, stuff01, stuff02, etc., all the way to stuff29 for each of my 30 possible data columns when I would normally write a much sexier loop through an array (or even sexier - a collection) - all because Struts logic:iterate tags don't seem to want to play with the display:column tags! We have tried asking Ed Hill about this problem, but Ed has been pretty busy lately (either that, or it is entirely possible that our emails to him at his email address posted on his web site are being lost in mountains of junk mail - which is the problem I am faced with on one of my more well known web site email accounts - making useful correspondence with me almost impossible to that email address). Ed, are you still with us? Anyway, as my code review approaches, I thought I'd try one last time to spare this otherwise extremely powerful display tag library from the hungry jaws of the code reviewers at work. Of course, I could just rip out the display
RE: Making peace between Struts logic iterate and Ed Hill's display tag...
Wouldn't this work. Still ugly but if you use XML syntax might be passable. % FooBarBean fooBarBean = (FooBarBean)request.getAttribute(FooBarBean.LOOKUP_KEY); % display:table name=FooBarBean property=fundList cellspacing=1 cellpadding=0 border=0 width=569 styleClass=DataTableBorder scope=request !-- display : table name=FooBarBean cellpadding=4 property=fundList width=550 scope=request -- trtd class=FooBarTableTitle height=20nbsp;Beautiful Looking Spreadsheet in the Broswer Brought to you by Hideously Ugly Looking Code/td/tr display:setProperty name=basic.show.header value=true / display:column property=fundCode align=right styleClass=FooBarStyle headerStyleClass=FooBarDataHeader title=FooBar Code / % for (int j = 0 ; j 30 ; j++ ) { if (FooBarBean.isExistingColumn(j)) { String fillJ = (j 10 ? 0 + j : j); % display:column property=stuff%=fillJ% align=right styleClass=FooBarStyle headerStyleClass=FooBarDataHeader title=Stuff %=fillJ% / % } } % display:column property=fundTotal align=right styleClass=FooBarStyle headerStyleClass=FooBarDataHeader title=FooBar Total / /display:table -Original Message- From: David McLure [mailto:david;mclures.net] Sent: Saturday, November 09, 2002 9:59 AM To: '[EMAIL PROTECTED]'; '[EMAIL PROTECTED]'; '[EMAIL PROTECTED]'; '[EMAIL PROTECTED]' Subject: Making peace between Struts logic iterate and Ed Hill's display tag... Last month a fellow by the name of Rick Ruemann [[EMAIL PROTECTED]] posted a reply to an email inquiry of mine, turning me on to Ed Hill's marvelous display tag library (Hi Rick!). It turns out that Ed's web site URL is actually http://edhill.its.uiowa.edu/display-0.8/ (implying that Ed might have even a newer version of the tag library now, but I digress...) : From: Rick Reumann [[EMAIL PROTECTED]] Sent: Thursday, October 10, 2002 8:02 PM To: Struts Users Mailing List Subject: Re: Ideas for doing a spreadsheet-styled tables using Struts tags On Thursday, October 10, 2002, 7:55:21 PM, David wrote: DM I am currently looking for ideas on ways to display potentially DM large amounts of data in a spreadsheet format using Struts. Check out using this display tag: http://edhill.its.uiowa.edu/display/ I couldn't live without it:) (Even will provide a link that you can click on to export the display to Excel). Excellent tag. -- Rick mailto:maillist;reumann.net Since then, with Rick's help (and Rick deserves a lot of credit for figuring out how to use this display tag library by the way), I have managed to implement the display tag in my Struts based application and it seems to work just fine. The problem? My code is ugly as sin! It's so bad, that after glancing over my shoulder the other day, one of my best friends at work (Hi Russ!) has already warned me that it will undoubtedly fail the upcoming code review. He's got a point too - it is Coyote Ugly Code! The reason is that neither Rick nor I have figured out a way to make Ed Hill's display tag live peacefully with Struts logic iterate tags. As a result, I have JSP code which looks something like the following : % FooBarBean FooBarBean = (FooBarBean)request.getAttribute(FooBarBean.LOOKUP_KEY); % display:table name=FooBarBean property=fundList cellspacing=1 cellpadding=0 border=0 width=569 styleClass=DataTableBorder scope=request !-- display : table name=FooBarBean cellpadding=4 property=fundList width=550 scope=request -- trtd class=FooBarTableTitle height=20nbsp;Beautiful Looking Spreadsheet in the Broswer Brought to you by Hideously Ugly Looking Code/td/tr display:setProperty name=basic.show.header value=true / display:column property=fundCode align=right styleClass=FooBarStyle headerStyleClass=FooBarDataHeader title=FooBar Code / % if (FooBarBean.isExistingColumn(0)) { % display:column property=stuff01 align=right styleClass=FooBarStyle headerStyleClass=FooBarDataHeader title=Stuff 01 / % } if (FooBarBean.isExistingColumn(1)) { % display:column property=stuff02 align=right styleClass=FooBarStyle headerStyleClass=FooBarDataHeader title=Stuff 02 / % } if (FooBarBean.isExistingColumn(2)) { % display:column property=stuff03 align=right styleClass=FooBarStyle headerStyleClass=FooBarDataHeader title=Stuff 03 / ...etc., etc... % } if (FooBarBean.isExistingColumn(29)) { % display:column property=stuff30 align=right styleClass=FooBarStyle
Re: Making peace between Struts logic iterate and Ed Hill's display tag...
I don't understant why you can't use logic:iterate tag. Anyway, why don't you use a for instead of all those if, something like this ? %! // Convert a int to a 2 digit String private String int2DString(int i) { String number = new Integer(i).toString(); if ( i 10) { number = 0 + number; } } private String propName(int i) { i++; // i was zero-based return stuff + int2DString(++i); } private String propTitle(int i) { i++; // i was zero-based return Stuff + int2DString(++i); } % % FooBarBean FooBarBean = (FooBarBean)request.getAttribute(FooBarBean.LOOKUP_KEY); % display:table name=FooBarBean property=fundList cellspacing=1 cellpadding=0 border=0 width=569 styleClass=DataTableBorder scope=request tr td class=FooBarTableTitle height=20 nbsp;Beautiful Looking Spreadsheet in the Broswer Brought to you by Hideously Ugly Looking Code /td /tr display:setProperty name=basic.show.header value=true / display:column property=fundCode align=right styleClass=FooBarStyle headerStyleClass=FooBarDataHeader title=FooBar Code / % for (int i = 0; i 30 ; i++) { % % if (FooBarBean.isExistingColumn(i)) { % display:column property=%=propName(i)% align=right styleClass=FooBarStyle headerStyleClass=FooBarDataHeader title=%=propTitle(i)% / % } // end If % % } // End For % display:column property=fundTotal align=right styleClass=FooBarStyle headerStyleClass=FooBarDataHeader title=FooBar Total / /display:table A Dissabte 09 Novembre 2002 15:59, David McLure va escriure: Last month a fellow by the name of Rick Ruemann [[EMAIL PROTECTED]] posted a reply to an email inquiry of mine, turning me on to Ed Hill's marvelous display tag library (Hi Rick!). It turns out that Ed's web site URL is actually http://edhill.its.uiowa.edu/display-0.8/ (implying that Ed might have even a newer version of the tag library now, but I digress...) : From: Rick Reumann [[EMAIL PROTECTED]] Sent: Thursday, October 10, 2002 8:02 PM To: Struts Users Mailing List Subject: Re: Ideas for doing a spreadsheet-styled tables using Struts tags On Thursday, October 10, 2002, 7:55:21 PM, David wrote: DM I am currently looking for ideas on ways to display potentially DM large amounts of data in a spreadsheet format using Struts. Check out using this display tag: http://edhill.its.uiowa.edu/display/ I couldn't live without it:) (Even will provide a link that you can click on to export the display to Excel). Excellent tag. -- Rick mailto:maillist;reumann.net Since then, with Rick's help (and Rick deserves a lot of credit for figuring out how to use this display tag library by the way), I have managed to implement the display tag in my Struts based application and it seems to work just fine. The problem? My code is ugly as sin! It's so bad, that after glancing over my shoulder the other day, one of my best friends at work (Hi Russ!) has already warned me that it will undoubtedly fail the upcoming code review. He's got a point too - it is Coyote Ugly Code! The reason is that neither Rick nor I have figured out a way to make Ed Hill's display tag live peacefully with Struts logic iterate tags. As a result, I have JSP code which looks something like the following : % FooBarBean FooBarBean = (FooBarBean)request.getAttribute(FooBarBean.LOOKUP_KEY); % display:table name=FooBarBean property=fundList cellspacing=1 cellpadding=0 border=0 width=569 styleClass=DataTableBorder scope=request !-- display : table name=FooBarBean cellpadding=4 property=fundList width=550 scope=request -- trtd class=FooBarTableTitle height=20nbsp;Beautiful Looking Spreadsheet in the Broswer Brought to you by Hideously Ugly Looking Code/td/tr display:setProperty name=basic.show.header value=true / display:column property=fundCode align=right styleClass=FooBarStyle headerStyleClass=FooBarDataHeader title=FooBar Code / % if (FooBarBean.isExistingColumn(0)) { % display:column property=stuff01 align=right styleClass=FooBarStyle headerStyleClass=FooBarDataHeader title=Stuff 01 / % } if (FooBarBean.isExistingColumn(1)) { % display:column property=stuff02 align=right styleClass=FooBarStyle headerStyleClass=FooBarDataHeader title=Stuff 02 / % } if (FooBarBean.isExistingColumn(2)) { % display:column property=stuff03 align=right styleClass=FooBarStyle headerStyleClass=FooBarDataHeader title=Stuff 03 / ...etc., etc... % } if (FooBarBean.isExistingColumn(29)) { % display:column property=stuff30 align=right styleClass=FooBarStyle headerStyleClass=FooBarDataHeader title=Stuff 30 / % } % display:column property=fundTotal align=right styleClass=FooBarStyle headerStyleClass=FooBarDataHeader title=FooBar Total
logic : iterate is driving me mad
jsp code snippet logic:iterate id=reviewer name=revFormTeamVO property=reviewers bean:write name=reviewer property=emp_name / bean:write name=reviewer property=mail_id_v / bean:write name=reviewer property=role_n / /logic:iterate property reviewers is TreeMap that stores beans i get an error javax.servlet.ServletException: No getter method for property emp_name of bean reviewer at org.apache.jasper.runtime.PageContextImpl.handlePageException(PageContextImpl.java:471) at org.apache.jsp.ReviewTeam$jsp._jspService(ReviewTeam$jsp.java:988) at org.apache.jasper.runtime.HttpJspBase.service(HttpJspBase.java:107) at javax.servlet.http.HttpServlet.service(HttpServlet.java:853) at org.apache.jasper.servlet.JspServlet$JspServletWrapper.service(JspServlet.java:201) at org.apache.jasper.servlet.JspServlet.serviceJspFile(JspServlet.ja i have getter methods for all the properties in the bean, for example public void setEmp_name(String emp_name) { this.emp_name = emp_name; } public String getEmp_name() { return this.emp_name; } STILL I AM GETTING THIS ERROR IF I DO logic:iterate id=reviewer name=revFormTeamVO property=reviewers P HELLO WORLD!/P /logic:iterate The loop works correctly, only the getter methods give error SOME BODY PLEASE HELP Deepank
RE: logic : iterate is driving me mad
Hi Deepak I can't remember the exact syntax but the Struts docs on the web mention that you get a key and value object when you iterate over a Map. So try: logic:iterate id=reviewer name=revFormTeamVO property=reviewers bean:write name=reviewer property=value.emp_name / bean:write name=reviewer property=value.mail_id_v / bean:write name=reviewer property=value.role_n / /logic:iterate Jon Ridgway -Original Message- From: deepank [mailto:[EMAIL PROTECTED]] Sent: 24 September 2002 16:09 To: Struts Users Mailing List Subject: logic : iterate is driving me mad jsp code snippet logic:iterate id=reviewer name=revFormTeamVO property=reviewers bean:write name=reviewer property=emp_name / bean:write name=reviewer property=mail_id_v / bean:write name=reviewer property=role_n / /logic:iterate property reviewers is TreeMap that stores beans i get an error javax.servlet.ServletException: No getter method for property emp_name of bean reviewer at org.apache.jasper.runtime.PageContextImpl.handlePageException(PageContextImp l.java:471) at org.apache.jsp.ReviewTeam$jsp._jspService(ReviewTeam$jsp.java:988) at org.apache.jasper.runtime.HttpJspBase.service(HttpJspBase.java:107) at javax.servlet.http.HttpServlet.service(HttpServlet.java:853) at org.apache.jasper.servlet.JspServlet$JspServletWrapper.service(JspServlet.ja va:201) at org.apache.jasper.servlet.JspServlet.serviceJspFile(JspServlet.ja i have getter methods for all the properties in the bean, for example public void setEmp_name(String emp_name) { this.emp_name = emp_name; } public String getEmp_name() { return this.emp_name; } STILL I AM GETTING THIS ERROR IF I DO logic:iterate id=reviewer name=revFormTeamVO property=reviewers P HELLO WORLD!/P /logic:iterate The loop works correctly, only the getter methods give error SOME BODY PLEASE HELP Deepank The contents of this email are intended only for the named addressees and may contain confidential and/or privileged material. If received in error please contact UPCO on +44 (0) 113 201 0600 and then delete the entire e-mail from your system. Unauthorised review, distribution, disclosure or other use of this information could constitute a breach of confidence. Your co-operation in this matter is greatly appreciated. -- To unsubscribe, e-mail: mailto:[EMAIL PROTECTED] For additional commands, e-mail: mailto:[EMAIL PROTECTED]
Re: logic : iterate is driving me mad
IT WORKED THANKS VERY VERY VERY MUCH Deepank - Original Message - From: Jon.Ridgway [EMAIL PROTECTED] To: 'Struts Users Mailing List' [EMAIL PROTECTED] Sent: Tuesday, September 24, 2002 8:39 PM Subject: RE: logic : iterate is driving me mad Hi Deepak I can't remember the exact syntax but the Struts docs on the web mention that you get a key and value object when you iterate over a Map. So try: logic:iterate id=reviewer name=revFormTeamVO property=reviewers bean:write name=reviewer property=value.emp_name / bean:write name=reviewer property=value.mail_id_v / bean:write name=reviewer property=value.role_n / /logic:iterate Jon Ridgway -Original Message- From: deepank [mailto:[EMAIL PROTECTED]] Sent: 24 September 2002 16:09 To: Struts Users Mailing List Subject: logic : iterate is driving me mad jsp code snippet logic:iterate id=reviewer name=revFormTeamVO property=reviewers bean:write name=reviewer property=emp_name / bean:write name=reviewer property=mail_id_v / bean:write name=reviewer property=role_n / /logic:iterate property reviewers is TreeMap that stores beans i get an error javax.servlet.ServletException: No getter method for property emp_name of bean reviewer at org.apache.jasper.runtime.PageContextImpl.handlePageException(PageContextImp l.java:471) at org.apache.jsp.ReviewTeam$jsp._jspService(ReviewTeam$jsp.java:988) at org.apache.jasper.runtime.HttpJspBase.service(HttpJspBase.java:107) at javax.servlet.http.HttpServlet.service(HttpServlet.java:853) at org.apache.jasper.servlet.JspServlet$JspServletWrapper.service(JspServlet.ja va:201) at org.apache.jasper.servlet.JspServlet.serviceJspFile(JspServlet.ja i have getter methods for all the properties in the bean, for example public void setEmp_name(String emp_name) { this.emp_name = emp_name; } public String getEmp_name() { return this.emp_name; } STILL I AM GETTING THIS ERROR IF I DO logic:iterate id=reviewer name=revFormTeamVO property=reviewers P HELLO WORLD!/P /logic:iterate The loop works correctly, only the getter methods give error SOME BODY PLEASE HELP Deepank The contents of this email are intended only for the named addressees and may contain confidential and/or privileged material. If received in error please contact UPCO on +44 (0) 113 201 0600 and then delete the entire e-mail from your system. Unauthorised review, distribution, disclosure or other use of this information could constitute a breach of confidence. Your co-operation in this matter is greatly appreciated. -- To unsubscribe, e-mail: mailto:[EMAIL PROTECTED] For additional commands, e-mail: mailto:[EMAIL PROTECTED] -- To unsubscribe, e-mail: mailto:[EMAIL PROTECTED] For additional commands, e-mail: mailto:[EMAIL PROTECTED]
RE: Logic Iterate not finding my bean
I don't know if this will solve your problem, but you're making a common mistake. In the bean:write tag, the name attribute should be the same as the id attribute in the logic:iterate tag. So use name=refnum in your bean:write. Hope this helps. ~ Keith -Original Message- From: [EMAIL PROTECTED] [mailto:[EMAIL PROTECTED]] Sent: Monday, July 01, 2002 2:35 PM To: [EMAIL PROTECTED] Subject: RE: Logic Iterate not finding my bean You mean this one: %@ taglib uri=/WEB-INF/struts-logic.tld prefix=logic % Nope, got that in there... -Original Message- From: Chris.Treglio [mailto:[EMAIL PROTECTED]] Sent: Monday, July 01, 2002 2:27 PM To: struts-user Subject: Re: Logic Iterate not finding my bean I just got over a bout with this same error, and after a day of tail-chasing and not a little profanity I realized that I had not defined the logic taglib. That error was coming from the write tag, because the iterate tag was being ignored entirely. [EMAIL PROTECTED] 07/01/02 02:25 PM Please respond to Struts Users Mailing List To: [EMAIL PROTECTED] cc: Subject:Logic Iterate not finding my bean [ServletException in:/WEB-INF/jsp/projects/mainmenu.jsp] Cannot find bean rowset in scope session' These are for DynaBeans incidentally... I am stuffing an array list and then setting it like so: --- System.out.println(Name is: + ((BasicDynaBean) results.get(0)).get(name)); session.setAttribute(rowset,results); --- In my jsp I have tried a kabillion combinations for the logic iteratate and all yield the error above: logic:iterate id=refnum name=rowset Next element is bean:write name=rowset property=refnum/ /logic:iterate Here is the simplest I tried... I've added type, etc.. All to no avail -- To unsubscribe, e-mail: mailto:[EMAIL PROTECTED] For additional commands, e-mail: mailto:[EMAIL PROTECTED] -- To unsubscribe, e-mail: mailto:[EMAIL PROTECTED] For additional commands, e-mail: mailto:[EMAIL PROTECTED] -- To unsubscribe, e-mail: mailto:[EMAIL PROTECTED] For additional commands, e-mail: mailto:[EMAIL PROTECTED] -- To unsubscribe, e-mail: mailto:[EMAIL PROTECTED] For additional commands, e-mail: mailto:[EMAIL PROTECTED]
RE: Logic Iterate not finding my bean
This was one of the many iterations I tried logic:iterate id=bean name=rowset type=org.apache.commons.beanutils.BasicDynaBean Next element is bean:write name=bean property=refnum/ /logic:iterate -Original Message- From: kkamholz [mailto:[EMAIL PROTECTED]] Sent: Tuesday, July 02, 2002 8:45 AM To: struts-user Subject: RE: Logic Iterate not finding my bean I don't know if this will solve your problem, but you're making a common mistake. In the bean:write tag, the name attribute should be the same as the id attribute in the logic:iterate tag. So use name=refnum in your bean:write. Hope this helps. ~ Keith -Original Message- From: [EMAIL PROTECTED] [mailto:[EMAIL PROTECTED]] Sent: Monday, July 01, 2002 2:35 PM To: [EMAIL PROTECTED] Subject: RE: Logic Iterate not finding my bean You mean this one: %@ taglib uri=/WEB-INF/struts-logic.tld prefix=logic % Nope, got that in there... -Original Message- From: Chris.Treglio [mailto:[EMAIL PROTECTED]] Sent: Monday, July 01, 2002 2:27 PM To: struts-user Subject: Re: Logic Iterate not finding my bean I just got over a bout with this same error, and after a day of tail-chasing and not a little profanity I realized that I had not defined the logic taglib. That error was coming from the write tag, because the iterate tag was being ignored entirely. [EMAIL PROTECTED] 07/01/02 02:25 PM Please respond to Struts Users Mailing List To: [EMAIL PROTECTED] cc: Subject:Logic Iterate not finding my bean [ServletException in:/WEB-INF/jsp/projects/mainmenu.jsp] Cannot find bean rowset in scope session' These are for DynaBeans incidentally... I am stuffing an array list and then setting it like so: --- System.out.println(Name is: + ((BasicDynaBean) results.get(0)).get(name)); session.setAttribute(rowset,results); --- In my jsp I have tried a kabillion combinations for the logic iteratate and all yield the error above: logic:iterate id=refnum name=rowset Next element is bean:write name=rowset property=refnum/ /logic:iterate Here is the simplest I tried... I've added type, etc.. All to no avail -- To unsubscribe, e-mail: mailto:[EMAIL PROTECTED] For additional commands, e-mail: mailto:[EMAIL PROTECTED] -- To unsubscribe, e-mail: mailto:[EMAIL PROTECTED] For additional commands, e-mail: mailto:[EMAIL PROTECTED] -- To unsubscribe, e-mail: mailto:[EMAIL PROTECTED] For additional commands, e-mail: mailto:[EMAIL PROTECTED] -- To unsubscribe, e-mail: mailto:[EMAIL PROTECTED] For additional commands, e-mail: mailto:[EMAIL PROTECTED] -- To unsubscribe, e-mail: mailto:[EMAIL PROTECTED] For additional commands, e-mail: mailto:[EMAIL PROTECTED]
RE: Logic Iterate not finding my bean
How is the bean that is being used in the iteration structured? It may be helpful if you send some code from your bean class. ~ Keith http://www.buffalo.edu/~kkamholz -Original Message- From: [EMAIL PROTECTED] [mailto:[EMAIL PROTECTED]] Sent: Tuesday, July 02, 2002 9:21 AM To: [EMAIL PROTECTED] Subject: RE: Logic Iterate not finding my bean This was one of the many iterations I tried logic:iterate id=bean name=rowset type=org.apache.commons.beanutils.BasicDynaBean Next element is bean:write name=bean property=refnum/ /logic:iterate -Original Message- From: kkamholz [mailto:[EMAIL PROTECTED]] Sent: Tuesday, July 02, 2002 8:45 AM To: struts-user Subject: RE: Logic Iterate not finding my bean I don't know if this will solve your problem, but you're making a common mistake. In the bean:write tag, the name attribute should be the same as the id attribute in the logic:iterate tag. So use name=refnum in your bean:write. Hope this helps. ~ Keith -Original Message- From: [EMAIL PROTECTED] [mailto:[EMAIL PROTECTED]] Sent: Monday, July 01, 2002 2:35 PM To: [EMAIL PROTECTED] Subject: RE: Logic Iterate not finding my bean You mean this one: %@ taglib uri=/WEB-INF/struts-logic.tld prefix=logic % Nope, got that in there... -Original Message- From: Chris.Treglio [mailto:[EMAIL PROTECTED]] Sent: Monday, July 01, 2002 2:27 PM To: struts-user Subject: Re: Logic Iterate not finding my bean I just got over a bout with this same error, and after a day of tail-chasing and not a little profanity I realized that I had not defined the logic taglib. That error was coming from the write tag, because the iterate tag was being ignored entirely. [EMAIL PROTECTED] 07/01/02 02:25 PM Please respond to Struts Users Mailing List To: [EMAIL PROTECTED] cc: Subject:Logic Iterate not finding my bean [ServletException in:/WEB-INF/jsp/projects/mainmenu.jsp] Cannot find bean rowset in scope session' These are for DynaBeans incidentally... I am stuffing an array list and then setting it like so: --- System.out.println(Name is: + ((BasicDynaBean) results.get(0)).get(name)); session.setAttribute(rowset,results); --- In my jsp I have tried a kabillion combinations for the logic iteratate and all yield the error above: logic:iterate id=refnum name=rowset Next element is bean:write name=rowset property=refnum/ /logic:iterate Here is the simplest I tried... I've added type, etc.. All to no avail -- To unsubscribe, e-mail: mailto:[EMAIL PROTECTED] For additional commands, e-mail: mailto:[EMAIL PROTECTED] -- To unsubscribe, e-mail: mailto:[EMAIL PROTECTED] For additional commands, e-mail: mailto:[EMAIL PROTECTED] -- To unsubscribe, e-mail: mailto:[EMAIL PROTECTED] For additional commands, e-mail: mailto:[EMAIL PROTECTED] -- To unsubscribe, e-mail: mailto:[EMAIL PROTECTED] For additional commands, e-mail: mailto:[EMAIL PROTECTED] -- To unsubscribe, e-mail: mailto:[EMAIL PROTECTED] For additional commands, e-mail: mailto:[EMAIL PROTECTED] -- To unsubscribe, e-mail: mailto:[EMAIL PROTECTED] For additional commands, e-mail: mailto:[EMAIL PROTECTED]
Logic Iterate not finding my bean
[ServletException in:/WEB-INF/jsp/projects/mainmenu.jsp] Cannot find bean rowset in scope session' These are for DynaBeans incidentally... I am stuffing an array list and then setting it like so: --- System.out.println(Name is: + ((BasicDynaBean) results.get(0)).get(name)); session.setAttribute(rowset,results); --- In my jsp I have tried a kabillion combinations for the logic iteratate and all yield the error above: logic:iterate id=refnum name=rowset Next element is bean:write name=rowset property=refnum/ /logic:iterate Here is the simplest I tried... I've added type, etc.. All to no avail -- To unsubscribe, e-mail: mailto:[EMAIL PROTECTED] For additional commands, e-mail: mailto:[EMAIL PROTECTED]
Re: Logic Iterate not finding my bean
I just got over a bout with this same error, and after a day of tail-chasing and not a little profanity I realized that I had not defined the logic taglib. That error was coming from the write tag, because the iterate tag was being ignored entirely. [EMAIL PROTECTED] 07/01/02 02:25 PM Please respond to Struts Users Mailing List To: [EMAIL PROTECTED] cc: Subject:Logic Iterate not finding my bean [ServletException in:/WEB-INF/jsp/projects/mainmenu.jsp] Cannot find bean rowset in scope session' These are for DynaBeans incidentally... I am stuffing an array list and then setting it like so: --- System.out.println(Name is: + ((BasicDynaBean) results.get(0)).get(name)); session.setAttribute(rowset,results); --- In my jsp I have tried a kabillion combinations for the logic iteratate and all yield the error above: logic:iterate id=refnum name=rowset Next element is bean:write name=rowset property=refnum/ /logic:iterate Here is the simplest I tried... I've added type, etc.. All to no avail -- To unsubscribe, e-mail: mailto:[EMAIL PROTECTED] For additional commands, e-mail: mailto:[EMAIL PROTECTED] -- To unsubscribe, e-mail: mailto:[EMAIL PROTECTED] For additional commands, e-mail: mailto:[EMAIL PROTECTED]
RE: Logic Iterate not finding my bean
You mean this one: %@ taglib uri=/WEB-INF/struts-logic.tld prefix=logic % Nope, got that in there... -Original Message- From: Chris.Treglio [mailto:[EMAIL PROTECTED]] Sent: Monday, July 01, 2002 2:27 PM To: struts-user Subject: Re: Logic Iterate not finding my bean I just got over a bout with this same error, and after a day of tail-chasing and not a little profanity I realized that I had not defined the logic taglib. That error was coming from the write tag, because the iterate tag was being ignored entirely. [EMAIL PROTECTED] 07/01/02 02:25 PM Please respond to Struts Users Mailing List To: [EMAIL PROTECTED] cc: Subject:Logic Iterate not finding my bean [ServletException in:/WEB-INF/jsp/projects/mainmenu.jsp] Cannot find bean rowset in scope session' These are for DynaBeans incidentally... I am stuffing an array list and then setting it like so: --- System.out.println(Name is: + ((BasicDynaBean) results.get(0)).get(name)); session.setAttribute(rowset,results); --- In my jsp I have tried a kabillion combinations for the logic iteratate and all yield the error above: logic:iterate id=refnum name=rowset Next element is bean:write name=rowset property=refnum/ /logic:iterate Here is the simplest I tried... I've added type, etc.. All to no avail -- To unsubscribe, e-mail: mailto:[EMAIL PROTECTED] For additional commands, e-mail: mailto:[EMAIL PROTECTED] -- To unsubscribe, e-mail: mailto:[EMAIL PROTECTED] For additional commands, e-mail: mailto:[EMAIL PROTECTED] -- To unsubscribe, e-mail: mailto:[EMAIL PROTECTED] For additional commands, e-mail: mailto:[EMAIL PROTECTED]
Problem with Logic-iterate and enumeration
hi, I have a List of Numbers and I like to use 3 columns and n rows. Is there a possible way to realise this via Logic-iteration. Normally, it look like that every next step in the iteration there is always another row. Like this: table width=100% border=0 cellspacing=1 cellpadding=1 logic:iterate id=element name=bla_f property=numberss type=app.Data tr bordercolor=#66 td bean:write name=element property=number/ /td td ** this should be the next element of Data, but how increment the element?? * bean:write name=element property=number/ /td /tr /logic:iterate /table any ideas? -- To unsubscribe, e-mail: mailto:[EMAIL PROTECTED] For additional commands, e-mail: mailto:[EMAIL PROTECTED]
Re: Problem with Logic-iterate and enumeration
I hate using scriptlets, but had to do so in the end for the problem - although could have made a custom tag I guess. Here's what I do: TABLE BORDER=0 CELLPADDING=8 CELLSPACING=8 TR logic:iterate id=category name=mfdCategoriesForm property=categories indexId=index TD bean:write name='category' property='name'/ /TD % //insert rows where necessary int categoriesInRow = 3; if ((index.intValue() 0 ((index.intValue()+1) % categoriesInRow == 0))) { % /TR TR % } % /logic:iterate /TR /html:form /TABLE HTH, cheers, Dave struts (H2Opilot) [EMAIL PROTECTED] on 06/06/2002 10:40:07 AM Please respond to Struts Users Mailing List [EMAIL PROTECTED]; Please respond to [EMAIL PROTECTED] To: Struts Users Mailing List [EMAIL PROTECTED] cc:(bcc: David Hay/Lex/Lexmark) Subject: Problem with Logic-iterate and enumeration hi, I have a List of Numbers and I like to use 3 columns and n rows. Is there a possible way to realise this via Logic-iteration. Normally, it look like that every next step in the iteration there is always another row. Like this: table width=100% border=0 cellspacing=1 cellpadding=1 logic:iterate id=element name=bla_f property=numberss type=app.Data tr bordercolor=#66 td bean:write name=element property=number/ /td td ** this should be the next element of Data, but how increment the element?? * bean:write name=element property=number/ /td /tr /logic:iterate /table any ideas? -- To unsubscribe, e-mail: mailto:[EMAIL PROTECTED] For additional commands, e-mail: mailto:[EMAIL PROTECTED] -- To unsubscribe, e-mail: mailto:[EMAIL PROTECTED] For additional commands, e-mail: mailto:[EMAIL PROTECTED]
RE: Problem with Logic-iterate and enumeration
This seems like a kludge, but I don't know of another way of doing it with Struts tags. Anybody else? tr logic:iterate * * * length=3 offset=0 tdbean:write * * * //td /logic:iterate /tr tr logic:present logic:iterate * * * length=3 offset=3 tdbean:write * * * //td /logic:iterate /tr tr logic:iterate * * * length=3 offset=6 tdbean:write * * * //td /logic:iterate /tr tr * * * do for how many more groups of 3 numbers you anticipate will only print out if data is present * * * /logic:present /tr Empty tr/tr tags shouldn't bloat table space. Mark -Original Message- From: struts (H2Opilot) [mailto:[EMAIL PROTECTED]] Sent: Thursday, June 06, 2002 10:40 AM hi, I have a List of Numbers and I like to use 3 columns and n rows. Is there a possible way to realise this via Logic-iteration. Normally, it look like that every next step in the iteration there is always another row. Like this: table width=100% border=0 cellspacing=1 cellpadding=1 logic:iterate id=element name=bla_f property=numberss type=app.Data tr bordercolor=#66 td bean:write name=element property=number/ /td td ** this should be the next element of Data, but how increment the element?? * bean:write name=element property=number/ /td /tr /logic:iterate /table any ideas? -- To unsubscribe, e-mail: mailto:[EMAIL PROTECTED] For additional commands, e-mail: mailto:[EMAIL PROTECTED] -- To unsubscribe, e-mail: mailto:[EMAIL PROTECTED] For additional commands, e-mail: mailto:[EMAIL PROTECTED]
RE: Problem with Logic-iterate and enumeration (2)
Or perhaps something like? %! int count = 0 % logic:iterate * * * tr logic:iterate * * * length=3 offset=%= count % tdbean:write * * * //td /logic:iterate /tr % count += 3 % /logic:iterate Mark -Original Message- From: struts (H2Opilot) [mailto:[EMAIL PROTECTED]] Sent: Thursday, June 06, 2002 10:40 AM hi, I have a List of Numbers and I like to use 3 columns and n rows. Is there a possible way to realise this via Logic-iteration. Normally, it look like that every next step in the iteration there is always another row. Like this: table width=100% border=0 cellspacing=1 cellpadding=1 logic:iterate id=element name=bla_f property=numberss type=app.Data tr bordercolor=#66 td bean:write name=element property=number/ /td td ** this should be the next element of Data, but how increment the element?? * bean:write name=element property=number/ /td /tr /logic:iterate /table any ideas? -- To unsubscribe, e-mail: mailto:[EMAIL PROTECTED] For additional commands, e-mail: mailto:[EMAIL PROTECTED] -- To unsubscribe, e-mail: mailto:[EMAIL PROTECTED] For additional commands, e-mail: mailto:[EMAIL PROTECTED] -- To unsubscribe, e-mail: mailto:[EMAIL PROTECTED] For additional commands, e-mail: mailto:[EMAIL PROTECTED]
logic iterate tag
Hi, I'm having some difficulty with the iteration tag in the logic tag lib. It's very straight-forward when you are using your own concrete classes(w/ getters and setters for each property), but I can't seem to figure out a way to get it working with utility classes. What I'm trying to do is iterate over a Vector filled with Hashtable objects. It seem pretty simple, but I can't seem to get the nested iteration working working with the hashtable. bean:define id=foo name=funds type=java.util.Vector scope=request/ logic:iterate id=aFund name=funds // this is where I'm lost. /logic:iterate I'm not sure what's suppose to happen within the parent iteration tag. In the docs, they use the following example to iterate over a hashtable: logic:iterate id=element name=myhashtable Next element is bean:write name=element property=value/ /logic:iterate Do I need to define a new hashtable bean for every iteration of the Vector? If so, how do I set the bean to be the object in the current iteration of the vector? Does anyone have an example? Thanks in advance. Eric. ** This message, including any attachments, contains confidential information intended for a specific individual and purpose, and is protected by law. If you are not the intended recipient, please contact sender immediately by reply e-mail and destroy all copies. You are hereby notified that any disclosure, copying, or distribution of this message, or the taking of any action based on it, is strictly prohibited. TIAA-CREF ** -- To unsubscribe, e-mail: mailto:[EMAIL PROTECTED] For additional commands, e-mail: mailto:[EMAIL PROTECTED]
Re: Logic-Iterate not finding scope of Bean - bean:write error ???
Hi all, I have the same goal of Kat Luna.. and I have the same syntax. But for me, I think that the error come from the bean:write tag. This tag don't find the scope of the bean and then don't find the bean. I really don't know what I have to do.. I don't think so that use the standard jsp method is MVC compliant. Please is there a solution ? Thanks in advance, Geoffrey... - Original Message - From: Charlesworth, Chico [EMAIL PROTECTED] To: [EMAIL PROTECTED] Sent: Friday, June 08, 2001 4:54 PM Subject: RE: Logic-Iterate not finding scope of Bean you can also have two separate action classes that use the same form, where you use the first action class when you first go into that page, then use the second when you are submitting or whatever in the form -Original Message- From: Luna, Kat [mailto:[EMAIL PROTECTED]] Sent: Thursday, June 07, 2001 7:58 PM To: [EMAIL PROTECTED] Subject: Logic-Iterate not finding scope of Bean Hi all, me again with my afternoon question.. I have a UserAction class that extracts a list of Users from the database and stores them in an ArrayList. Success from this Action forwards to user.jsp which I want to display the list in table format. I have: %@ page language=java % %@ taglib uri=/WEB-INF/struts-logic.tld prefix=logic % %@ taglib uri=/WEB-INF/struts-bean.tld prefix=bean % html:html headtitle/title /head body table logic:iterate id=user name=UserAction property=userList type=com.test.User TR TDbean:write name=user property=username//TD TDbean:write name=user property=password//TD /TR /logic:iterate ..etc but this causes the UserAction to run again (essentially calling the database and building the ArrayList again). Is there a way to have this bean init() when the jsp page loads and then iterate through the ArrayList instead of calling the Action first and then displaying the page? And if so, do I need to add anything to struts-config.xml to tell the page where to find/identify the UserAction bean? Thanks, Kat Luna Web Developer, BCE Emergis [EMAIL PROTECTED] -- The content of this e-mail is confidential, may contain privileged material and is intended solely for the recipient(s) named above. If you receive this in error, please notify Software AG immediately and delete this e-mail. Software AG (UK) Limited Registered in England Wales 1310740 Registered Office: Hudson House, Hudson Way, Pride Park, Derby DE24 8HS
Re: Logic-Iterate not finding scope of Bean
Title: Logic-Iterate not finding scope of Bean I would suggest keeping a hidden property on your form that keeps the state that you are in (ie., 1stTimeQuery, or useQueryResults)... - Original Message - From: Luna, Kat To: [EMAIL PROTECTED] Sent: Thursday, June 07, 2001 2:57 PM Subject: Logic-Iterate not finding scope of Bean Hi all, me again with my afternoon question.. I have a UserAction class that extracts a list of Users from the database and stores them in an ArrayList. Success from this Action forwards to user.jsp which I want to display the list in table format. I have: %@ page language="java" % %@ taglib uri="/WEB-INF/struts-logic.tld" prefix="logic" % %@ taglib uri="/WEB-INF/struts-bean.tld" prefix="bean" % html:html headtitle/title /head body table logic:iterate id="user" name="UserAction" property="userList" type="com.test.User" TR TDbean:write name="user" property="username"//TD TDbean:write name="user" property="password"//TD /TR /logic:iterate ..etc but this causes the UserAction to run again (essentially calling the database and building the ArrayList again). Is there a way to have this bean init() when the jsp page loads and then iterate through the ArrayList instead of calling the Action first and then displaying the page? And if so, do I need to add anything to struts-config.xml to tell the page where to find/identify the UserAction bean? Thanks, Kat Luna Web Developer, BCE Emergis [EMAIL PROTECTED]
RE: Logic-Iterate not finding scope of Bean
you can also have two separate action classes that use the same form, where you use the first action class when you first go into that page, then use the second when you are submitting or whatever in the form -Original Message- From: Luna, Kat [mailto:[EMAIL PROTECTED]] Sent: Thursday, June 07, 2001 7:58 PM To: [EMAIL PROTECTED] Subject: Logic-Iterate not finding scope of Bean Hi all, me again with my afternoon question.. I have a UserAction class that extracts a list of Users from the database and stores them in an ArrayList. Success from this Action forwards to user.jsp which I want to display the list in table format. I have: %@ page language=java % %@ taglib uri=/WEB-INF/struts-logic.tld prefix=logic % %@ taglib uri=/WEB-INF/struts-bean.tld prefix=bean % html:html headtitle/title /head body table logic:iterate id=user name=UserAction property=userList type=com.test.User TR TDbean:write name=user property=username//TD TDbean:write name=user property=password//TD /TR /logic:iterate ..etc but this causes the UserAction to run again (essentially calling the database and building the ArrayList again). Is there a way to have this bean init() when the jsp page loads and then iterate through the ArrayList instead of calling the Action first and then displaying the page? And if so, do I need to add anything to struts-config.xml to tell the page where to find/identify the UserAction bean? Thanks, Kat Luna Web Developer, BCE Emergis [EMAIL PROTECTED] -- The content of this e-mail is confidential, may contain privileged material and is intended solely for the recipient(s) named above. If you receive this in error, please notify Software AG immediately and delete this e-mail. Software AG (UK) Limited Registered in England Wales 1310740 Registered Office: Hudson House, Hudson Way, Pride Park, Derby DE24 8HS
Logic-Iterate not finding scope of Bean
Title: Logic-Iterate not finding scope of Bean Hi all, me again with my afternoon question.. I have a UserAction class that extracts a list of Users from the database and stores them in an ArrayList. Success from this Action forwards to user.jsp which I want to display the list in table format. I have: %@ page language=java % %@ taglib uri=/WEB-INF/struts-logic.tld prefix=logic % %@ taglib uri=/WEB-INF/struts-bean.tld prefix=bean % html:html headtitle/title /head body table logic:iterate id=user name=UserAction property=userList type=com.test.User TR TDbean:write name=user property=username//TD TDbean:write name=user property=password//TD /TR /logic:iterate ..etc but this causes the UserAction to run again (essentially calling the database and building the ArrayList again). Is there a way to have this bean init() when the jsp page loads and then iterate through the ArrayList instead of calling the Action first and then displaying the page? And if so, do I need to add anything to struts-config.xml to tell the page where to find/identify the UserAction bean? Thanks, Kat Luna Web Developer, BCE Emergis [EMAIL PROTECTED]
Logic-Iterate
Hi, I was trying to us the logic-iterate tag and i'm stuck at a point. Please go thru the snippet below, logic:iterate id=test name=mybean property=name liembean:write name=test//em/li % String myName = instance.getName(mybean.getName()); System.out.println(myName); % /logic:iterate Now, how do i get one of the properties of a bean when i'm iterating through a collection of a bean objects. Bottom line is i would like to pass the property getName() into a variable. Can anyone help me in sorting this out ?? Thanks, Shane.. = __ Do You Yahoo!? Get personalized email addresses from Yahoo! Mail - only $35 a year! http://personal.mail.yahoo.com/
RE: Logic-Iterate
Shane This is how you do it: logic:iterate id=eachBean name=yourBeanObject property=beanList TR TDbean:write name=eachBean property=name//TD /TR /logic:iterate In the above case in yourBeanObject class you will have the method getBeanList() which will return a list of your beans. And in the bean class eachBean) you will have a method getName() which will return the name variable. Hope this helps. -Nimmi -Original Message- From: Shane Warne [mailto:[EMAIL PROTECTED]] Sent: Monday, June 04, 2001 5:03 PM To: [EMAIL PROTECTED] Subject: Logic-Iterate Hi, I was trying to us the logic-iterate tag and i'm stuck at a point. Please go thru the snippet below, logic:iterate id=test name=mybean property=name liembean:write name=test//em/li % String myName = instance.getName(mybean.getName()); System.out.println(myName); % /logic:iterate Now, how do i get one of the properties of a bean when i'm iterating through a collection of a bean objects. Bottom line is i would like to pass the property getName() into a variable. Can anyone help me in sorting this out ?? Thanks, Shane.. = __ Do You Yahoo!? Get personalized email addresses from Yahoo! Mail - only $35 a year! http://personal.mail.yahoo.com/
Logic iterate problems
Hello, I have a Vector Object stored in my session with the key "tabTest" this Vector contains "Client" Objetcs, Client classe have a "name" property. I use this code in my JSP : logic:iterate id="client" name="tabTest" scope="session" type="Client" bean:write name="client" property="name"//logic:iterate This error is return : ...JSP Exception : Cannot find bean client in scope null any help...Thanks Sylvain
RE: Logic iterate problems
have u put that object into the session, before u get to the form session.setAttribute("tabTest", VectorObject); -Original Message-From: Sylvain FAGNENT [mailto:[EMAIL PROTECTED]]Sent: Thursday, May 10, 2001 2:57 PMTo: [EMAIL PROTECTED]Subject: Logic iterate problems Hello, I have a Vector Object stored in my session with the key "tabTest" this Vector contains "Client" Objetcs, Client classe have a "name" property. I use this code in my JSP : logic:iterate id="client" name="tabTest" scope="session" type="Client" bean:write name="client" property="name"//logic:iterate This error is return : ...JSP Exception : Cannot find bean client in scope null any help...Thanks Sylvain
Re: Logic iterate problems
Yes , we did ! :-( - Original Message - From: Dudley Butt@i-Commerce To: '[EMAIL PROTECTED]' Sent: Thursday, May 10, 2001 3:04 PM Subject: RE: Logic iterate problems have u put that object into the session, before u get to the form session.setAttribute("tabTest", VectorObject); -Original Message-From: Sylvain FAGNENT [mailto:[EMAIL PROTECTED]]Sent: Thursday, May 10, 2001 2:57 PMTo: [EMAIL PROTECTED]Subject: Logic iterate problems Hello, I have a Vector Object stored in my session with the key "tabTest" this Vector contains "Client" Objetcs, Client classe have a "name" property. I use this code in my JSP : logic:iterate id="client" name="tabTest" scope="session" type="Client" bean:write name="client" property="name"//logic:iterate This error is return : ...JSP Exception : Cannot find bean client in scope null any help...Thanks Sylvain
RE: Logic iterate problems
Maybe use need to use the jsp:useBean name="tabTest" class="VectorObject" scope = "session" / in your jsp page. Give it a shot and let me know... cheers, Amar.. -Original Message-From: Sylvain FAGNENT [mailto:[EMAIL PROTECTED]]Sent: Thursday, May 10, 2001 9:13 AMTo: [EMAIL PROTECTED]Subject: Re: Logic iterate problems Yes , we did ! :-( - Original Message - From: Dudley Butt@i-Commerce To: '[EMAIL PROTECTED]' Sent: Thursday, May 10, 2001 3:04 PM Subject: RE: Logic iterate problems have u put that object into the session, before u get to the form session.setAttribute("tabTest", VectorObject); -Original Message-From: Sylvain FAGNENT [mailto:[EMAIL PROTECTED]]Sent: Thursday, May 10, 2001 2:57 PMTo: [EMAIL PROTECTED]Subject: Logic iterate problems Hello, I have a Vector Object stored in my session with the key "tabTest" this Vector contains "Client" Objetcs, Client classe have a "name" property. I use this code in my JSP : logic:iterate id="client" name="tabTest" scope="session" type="Client" bean:write name="client" property="name"//logic:iterate This error is return : ...JSP Exception : Cannot find bean client in scope null any help...Thanks Sylvain
RE: Logic iterate problems
I came across a similar problem not so long ago. What I'd done wrong was try and access properties outside the html:form tags. Moving my tag calls inside the form tags fixed my problem at the time, but I don't know if this applies in your case. It's worth double checking none-the-less. Regards David -Original Message- From: Sylvain FAGNENT [mailto:[EMAIL PROTECTED]] Sent: 10 May 2001 13:57 To: [EMAIL PROTECTED] Subject: Logic iterate problems Hello, I have a Vector Object stored in my session with the key tabTest this Vector contains Client Objetcs, Client classe have a name property. I use this code in my JSP : logic:iterate id=client name=tabTest scope=session type=Client bean:write name=client property=name/ /logic:iterate This error is return : ...JSP Exception : Cannot find bean client in scope null any help...Thanks Sylvain The information in this email is confidential and is intended solely for the addressee(s). Access to this email by anyone else is unauthorised. If you are not an intended recipient, you must not read, use or disseminate the information contained in the email. Any views expressed in this message are those of the individual sender, except where the sender specifically states them to be the views of Capco. http://www.capco.com ***
Re: Logic iterate problems
I tried, here is the code in my action : tabTest= new Vector();test = new Client();test.setName("Tata DUBAR");tabTest.add(test);test = new Client();test.setName("SFA");tabTest.add(test); session.setAttribute("tabTest",tabTest); And the JSP code : jsp:useBean id="tabTest" scope="session" class="java.util.Vector" / logic:iterate id="client" name="tabTest" type="Client" bean:write name="client" property="name"//logic:iterate I still have my "cannnot find client bean " error. Thanks Sylvain ! - Original Message ----- From: Nanduri, Amarnath To: '[EMAIL PROTECTED]' Sent: Thursday, May 10, 2001 3:17 PM Subject: RE: Logic iterate problems Maybe use need to use the jsp:useBean name="tabTest" class="VectorObject" scope = "session" / in your jsp page. Give it a shot and let me know... cheers, Amar.. -Original Message-From: Sylvain FAGNENT [mailto:[EMAIL PROTECTED]]Sent: Thursday, May 10, 2001 9:13 AMTo: [EMAIL PROTECTED]Subject: Re: Logic iterate problems Yes , we did ! :-( - Original Message - From: Dudley Butt@i-Commerce To: '[EMAIL PROTECTED]' Sent: Thursday, May 10, 2001 3:04 PM Subject: RE: Logic iterate problems have u put that object into the session, before u get to the form session.setAttribute("tabTest", VectorObject); -----Original Message-From: Sylvain FAGNENT [mailto:[EMAIL PROTECTED]]Sent: Thursday, May 10, 2001 2:57 PMTo: [EMAIL PROTECTED]Subject: Logic iterate problems Hello, I have a Vector Object stored in my session with the key "tabTest" this Vector contains "Client" Objetcs, Client classe have a "name" property. I use this code in my JSP : logic:iterate id="client" name="tabTest" scope="session" type="Client" bean:write name="client" property="name"//logic:iterate This error is return : ...JSP Exception : Cannot find bean client in scope null any help...Thanks Sylvain
Re: Logic iterate problems
I tried to encapsulate all my tags with html:form action=realAction .. /html:form But it still doesn't work ! - Original Message - From: Firmin David [EMAIL PROTECTED] To: [EMAIL PROTECTED] Sent: Thursday, May 10, 2001 3:22 PM Subject: RE: Logic iterate problems I came across a similar problem not so long ago. What I'd done wrong was try and access properties outside the html:form tags. Moving my tag calls inside the form tags fixed my problem at the time, but I don't know if this applies in your case. It's worth double checking none-the-less. Regards David -Original Message- From: Sylvain FAGNENT [mailto:[EMAIL PROTECTED]] Sent: 10 May 2001 13:57 To: [EMAIL PROTECTED] Subject: Logic iterate problems Hello, I have a Vector Object stored in my session with the key tabTest this Vector contains Client Objetcs, Client classe have a name property. I use this code in my JSP : logic:iterate id=client name=tabTest scope=session type=Client bean:write name=client property=name/ /logic:iterate This error is return : ...JSP Exception : Cannot find bean client in scope null any help...Thanks Sylvain The information in this email is confidential and is intended solely for the addressee(s). Access to this email by anyone else is unauthorised. If you are not an intended recipient, you must not read, use or disseminate the information contained in the email. Any views expressed in this message are those of the individual sender, except where the sender specifically states them to be the views of Capco. http://www.capco.com ***
RE: Logic iterate problems
In your jsp page did you do an import on client ? %@ page import = "beans.Client" % -Original Message-From: Sylvain FAGNENT [mailto:[EMAIL PROTECTED]]Sent: Thursday, May 10, 2001 9:33 AMTo: [EMAIL PROTECTED]Subject: Re: Logic iterate problems I tried, here is the code in my action : tabTest= new Vector();test = new Client();test.setName("Tata DUBAR");tabTest.add(test);test = new Client();test.setName("SFA");tabTest.add(test); session.setAttribute("tabTest",tabTest); And the JSP code : jsp:useBean id="tabTest" scope="session" class="java.util.Vector" / logic:iterate id="client" name="tabTest" type="Client" bean:write name="client" property="name"//logic:iterate I still have my "cannnot find client bean " error. Thanks Sylvain ! - Original Message - From: Nanduri, Amarnath To: '[EMAIL PROTECTED]' Sent: Thursday, May 10, 2001 3:17 PM Subject: RE: Logic iterate problems Maybe use need to use the jsp:useBean name="tabTest" class="VectorObject" scope = "session" / in your jsp page. Give it a shot and let me know... cheers, Amar.. -----Original Message-From: Sylvain FAGNENT [mailto:[EMAIL PROTECTED]]Sent: Thursday, May 10, 2001 9:13 AMTo: [EMAIL PROTECTED]Subject: Re: Logic iterate problems Yes , we did ! :-( - Original Message - From: Dudley Butt@i-Commerce To: '[EMAIL PROTECTED]' Sent: Thursday, May 10, 2001 3:04 PM Subject: RE: Logic iterate problems have u put that object into the session, before u get to the form session.setAttribute("tabTest", VectorObject); -Original Message-From: Sylvain FAGNENT [mailto:[EMAIL PROTECTED]]Sent: Thursday, May 10, 2001 2:57 PMTo: [EMAIL PROTECTED]Subject: Logic iterate problems Hello, I have a Vector Object stored in my session with the key "tabTest" this Vector contains "Client" Objetcs, Client classe have a "name" property. I use this code in my JSP : logic:iterate id="client" name="tabTest" scope="session" type="Client" bean:write name="client" property="name"//logic:iterate This error is return : ...JSP Exception : Cannot find bean client in scope null any help...Thanks Sylvain