RE: Very simple and URGENT Tag question - Please Help
sorry my previous answer was based on method calling. since this is an index called though it can be done via: http://jakarta.apache.org/struts/faqs/indexedprops.html -Tim -Original Message- From: Chen, Gin [mailto:[EMAIL PROTECTED] Sent: Tuesday, June 03, 2003 11:42 AM To: 'Struts Users Mailing List' Subject: RE: Very simple and URGENT Tag question - Please Help btw this question was answered on the JSTL (Taglibs) list. I just gave a recap of the answer. If you want a more thorough explanation you can find it in the archives. -Tim -Original Message- From: Chen, Gin [mailto:[EMAIL PROTECTED] Sent: Tuesday, June 03, 2003 11:35 AM To: 'Struts Users Mailing List' Subject: RE: Very simple and URGENT Tag question - Please Help since the collection in your case is not accessible except via a method that requires a parameter you can not do this using just jstl or even struts. the best way to do it is to expose your collection with a getXXX method. That way the syntax you used will work. JSP 2.0 *should* solve your problem though. It will allow for you to invoke methods. -Tim -Original Message- From: Renato Romano [mailto:[EMAIL PROTECTED] Sent: Tuesday, June 03, 2003 11:33 AM To: 'Struts Users Mailing List' Subject: Very simple and URGENT Tag question - Please Help I have a bean with an indexed property, that is myBean.getItem(int i). I can't find a way to access that property, using struts, struts-el nor jstl. I tried the following: Where ind is the indexId attribute of an ordinary logic:iterate struts tag. (and c is the prefix for the core jstl tag downloaded from jakarta) Where Am I wrong ? Thanks Renato Renato Romano Sistemi e Telematica S.p.A. Calata Grazie - Vial Al Molo Giano 16127 - GENOVA e-mail: [EMAIL PROTECTED] Tel.: 010 2712603 _ - 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: Very simple and URGENT Tag question - Please Help
If you placed a Map in the context you can reference items in the Map by the key. Example would be to place a Map with a key of "ID" and some value into context. You can reference the value by calling . This is useful when you can't write a bean. On Tue, 2003-06-03 at 09:41, Chen, Gin wrote: > btw this question was answered on the JSTL (Taglibs) list. > I just gave a recap of the answer. If you want a more thorough explanation > you can find it in the archives. > -Tim > > -Original Message- > From: Chen, Gin [mailto:[EMAIL PROTECTED] > Sent: Tuesday, June 03, 2003 11:35 AM > To: 'Struts Users Mailing List' > Subject: RE: Very simple and URGENT Tag question - Please Help > > > since the collection in your case is not accessible except via a method that > requires a parameter you can not do this using just jstl or even struts. > the best way to do it is to expose your collection with a getXXX method. > That way the syntax you used will work. > JSP 2.0 *should* solve your problem though. It will allow for you to invoke > methods. > -Tim > > -Original Message- > From: Renato Romano [mailto:[EMAIL PROTECTED] > Sent: Tuesday, June 03, 2003 11:33 AM > To: 'Struts Users Mailing List' > Subject: Very simple and URGENT Tag question - Please Help > > > I have a bean with an indexed property, that is myBean.getItem(int i). I > can't find a way to access that property, using struts, struts-el nor > jstl. I tried the following: > > > > Where ind is the indexId attribute of an ordinary logic:iterate struts > tag. (and c is the prefix for the core jstl tag downloaded from jakarta) > Where Am I wrong ? > Thanks > > Renato > > > Renato Romano > Sistemi e Telematica S.p.A. > Calata Grazie - Vial Al Molo Giano > 16127 - GENOVA > > e-mail: [EMAIL PROTECTED] > Tel.: 010 2712603 > _ > > > > - > 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: Very simple and URGENT Tag question - Please Help
OK, you're right!! Here are the first lines from stackTrace from tomcat log: javax.servlet.ServletException: An error occurred while evaluating custom action attribute "value" with value "${bd.actionDescription[ind]}": Unable to find a value for "actionDescription" in object of class "BordereauRowWrapper" using operator "." (null) at org.apache.jasper.runtime.PageContextImpl.handlePageException(PageContex tImpl.java:530) at org.apache.jsp.bordereau_jsp._jspService(bordereau_jsp.java:63) at org.apache.jasper.runtime.HttpJspBase.service(HttpJspBase.java:137) at javax.servlet.http.HttpServlet.service(HttpServlet.java:853) at org.apache.jasper.servlet.JspServletWrapper.service(JspServletWrapper.ja va:204) at org.apache.jasper.servlet.JspServlet.serviceJspFile(JspServlet.java:295) at org.apache.jasper.servlet.JspServlet.service(JspServlet.java:241) at javax.servlet.http.HttpServlet.service(HttpServlet.java:853) at org.apache.catalina.core.ApplicationDispatcher.invoke(ApplicationDispatc her.java:684) at org.apache.catalina.core.ApplicationDispatcher.doForward(ApplicationDisp atcher.java:432)at org.apache.catalina.core.ApplicationDispatcher.forward(ApplicationDispat cher.java:356) at org.apache.struts.action.RequestProcessor.doForward(RequestProcessor.jav a:1058) at org.apache.struts.action.RequestProcessor.processForwardConfig(RequestPr ocessor.java:451) at org.apache.struts.action.RequestProcessor.processActionForward(RequestPr ocessor.java:401) at org.apache.struts.action.RequestProcessor.process(RequestProcessor.java: 279)at And here's the method definition: public class BordereauRowWrapper { private B2BAction[] actions; /** * @return java.lang.String */ public String getActionDescription(int i) { return actions[i].getDescription(); } } And the jsp call: It seems there is no property actionDescription in my class, but as you can see it IS there!! Thanks again Renato Renato Romano Sistemi e Telematica S.p.A. Calata Grazie - Vial Al Molo Giano 16127 - GENOVA e-mail: [EMAIL PROTECTED] Tel.: 010 2712603 _ -Original Message- From: Kazda Juraj [mailto:[EMAIL PROTECTED] Sent: martedì 3 giugno 2003 17.38 To: Struts Users Mailing List; [EMAIL PROTECTED] Subject: RE: Very simple and URGENT Tag question - Please Help Hi Renato, hard to say when you don't write what kind of error you got. Exception? Or nothing shown? Dont't you forget to add bean to context (session, request,...)? And, maybe it's typo, but... don't you forget quotes in value attribute? -juraj. -Original Message- From: Renato Romano [mailto:[EMAIL PROTECTED] Sent: Tuesday, June 03, 2003 5:33 PM To: 'Struts Users Mailing List' Subject: Very simple and URGENT Tag question - Please Help I have a bean with an indexed property, that is myBean.getItem(int i). I can't find a way to access that property, using struts, struts-el nor jstl. I tried the following: Where ind is the indexId attribute of an ordinary logic:iterate struts tag. (and c is the prefix for the core jstl tag downloaded from jakarta) Where Am I wrong ? Thanks Renato Renato Romano Sistemi e Telematica S.p.A. Calata Grazie - Vial Al Molo Giano 16127 - GENOVA e-mail: [EMAIL PROTECTED] Tel.: 010 2712603 _ - 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: Very simple and URGENT Tag question - Please Help
If you are using jstl don't use logic-iterate; rather use then you can have or if it is straight string you can have Renato Romano wrote: I have a bean with an indexed property, that is myBean.getItem(int i). I can't find a way to access that property, using struts, struts-el nor jstl. I tried the following: Where ind is the indexId attribute of an ordinary logic:iterate struts tag. (and c is the prefix for the core jstl tag downloaded from jakarta) Where Am I wrong ? Thanks Renato Renato Romano Sistemi e Telematica S.p.A. Calata Grazie - Vial Al Molo Giano 16127 - GENOVA e-mail: [EMAIL PROTECTED] Tel.: 010 2712603 _ - 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: Very simple and URGENT Tag question - Please Help
btw this question was answered on the JSTL (Taglibs) list. I just gave a recap of the answer. If you want a more thorough explanation you can find it in the archives. -Tim -Original Message- From: Chen, Gin [mailto:[EMAIL PROTECTED] Sent: Tuesday, June 03, 2003 11:35 AM To: 'Struts Users Mailing List' Subject: RE: Very simple and URGENT Tag question - Please Help since the collection in your case is not accessible except via a method that requires a parameter you can not do this using just jstl or even struts. the best way to do it is to expose your collection with a getXXX method. That way the syntax you used will work. JSP 2.0 *should* solve your problem though. It will allow for you to invoke methods. -Tim -Original Message- From: Renato Romano [mailto:[EMAIL PROTECTED] Sent: Tuesday, June 03, 2003 11:33 AM To: 'Struts Users Mailing List' Subject: Very simple and URGENT Tag question - Please Help I have a bean with an indexed property, that is myBean.getItem(int i). I can't find a way to access that property, using struts, struts-el nor jstl. I tried the following: Where ind is the indexId attribute of an ordinary logic:iterate struts tag. (and c is the prefix for the core jstl tag downloaded from jakarta) Where Am I wrong ? Thanks Renato Renato Romano Sistemi e Telematica S.p.A. Calata Grazie - Vial Al Molo Giano 16127 - GENOVA e-mail: [EMAIL PROTECTED] Tel.: 010 2712603 _ - 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: Very simple and URGENT Tag question - Please Help
Hi Renato, hard to say when you don't write what kind of error you got. Exception? Or nothing shown? Dont't you forget to add bean to context (session, request,...)? And, maybe it's typo, but... don't you forget quotes in value attribute? -juraj. -Original Message- From: Renato Romano [mailto:[EMAIL PROTECTED] Sent: Tuesday, June 03, 2003 5:33 PM To: 'Struts Users Mailing List' Subject: Very simple and URGENT Tag question - Please Help I have a bean with an indexed property, that is myBean.getItem(int i). I can't find a way to access that property, using struts, struts-el nor jstl. I tried the following: Where ind is the indexId attribute of an ordinary logic:iterate struts tag. (and c is the prefix for the core jstl tag downloaded from jakarta) Where Am I wrong ? Thanks Renato Renato Romano Sistemi e Telematica S.p.A. Calata Grazie - Vial Al Molo Giano 16127 - GENOVA e-mail: [EMAIL PROTECTED] Tel.: 010 2712603 _ - 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: Very simple and URGENT Tag question - Please Help
since the collection in your case is not accessible except via a method that requires a parameter you can not do this using just jstl or even struts. the best way to do it is to expose your collection with a getXXX method. That way the syntax you used will work. JSP 2.0 *should* solve your problem though. It will allow for you to invoke methods. -Tim -Original Message- From: Renato Romano [mailto:[EMAIL PROTECTED] Sent: Tuesday, June 03, 2003 11:33 AM To: 'Struts Users Mailing List' Subject: Very simple and URGENT Tag question - Please Help I have a bean with an indexed property, that is myBean.getItem(int i). I can't find a way to access that property, using struts, struts-el nor jstl. I tried the following: Where ind is the indexId attribute of an ordinary logic:iterate struts tag. (and c is the prefix for the core jstl tag downloaded from jakarta) Where Am I wrong ? Thanks Renato Renato Romano Sistemi e Telematica S.p.A. Calata Grazie - Vial Al Molo Giano 16127 - GENOVA e-mail: [EMAIL PROTECTED] Tel.: 010 2712603 _ - 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]