Hi Yep, and it works for the <html:...> tags. But when I try to use them with other tags such as <c:if...> it can't find them.
I've used scriptlets for now (urgh) but I may try again some time even though I'm sure I've tried every possible combination. Thanks Richard -----Original Message----- From: news [mailto:[EMAIL PROTECTED] On Behalf Of Laurie Harper Sent: Tuesday, December 05, 2006 11:20 PM To: user@struts.apache.org Subject: Re: Map backed properties Did you try adding a public Map getChecklistItemNoteIds() method to your form bean, and access it with the JSTL syntax Paul provided? L. Gundersen, Richard wrote: > Hi > > Thanks for replying. I have tried that actually and it didn't work. In > fact that particular example wont work for me unfortunately because my > property isn't part of a map inside a DynaActionForm - it's just a > normal member variable of a class that extends ActionForm. > > I don't think the problem is getting hold of the values - they are there > and I can write scriptlets to extract them. I think the problem is that > EL isn't capable of accessing these types of properties. But, I could be > wrong (I hope so because I hate having scriptlets in my JSPs) > > Thanks > > Richard > > -----Original Message----- > From: Strachan, Paul [mailto:[EMAIL PROTECTED] > Sent: Monday, December 04, 2006 11:23 PM > To: Struts Users Mailing List > Subject: RE: Map backed properties > > try something like: > > <c:if test="${formname.map.checklistItemNoteIds[120] == 7}"> > .... > </c:if> > > > -----Original Message----- > From: Gundersen, Richard [mailto:[EMAIL PROTECTED] > Sent: Monday, 4 December 2006 11:00 PM > To: user@struts.apache.org > Subject: Map backed properties > > Hi > > > > I've been happily working with map based properties in my forms for a > while now, but I've come across something that I really can't figure > out. > > > > I started off with a DynaValidatorForm, and in the mapping, I had this: > > > > <form-property name="checklistItemNoteIds" type="java.util.HashMap"/> > > > > I was able to use this nicely, by populating it in the action class, and > storing it as a hidden field in my JSP like so: > > > > <html:hidden property="checklistItemNoteIds(${checklistItem.id})"/> > > > > That results in a nice: <input type="hidden" > name="checklistItemNoteIds(120)" value="7"> > > > > But, I need to access the value of the property now to do some extra > processing, something along the lines of > > > > <c:if test="${checklistItemNoteIds(120) == 7})"> > > // do this > > </c:if> > > > > And it doesn't work. I've even made my own concrete ActionForm class > with these kinds of methods: > > > > public Object getChecklistItemNoteId(String key) { > > return checklistItemNoteIds.get(key); > > } > > > > With no success. Has anyone got this working? > > > > Thanks > > > > Richard > > > *** Disclaimer *** > > This electronic communication is confidential and for the exclusive use > of the addressee. It may contain private and confidential information. > The information, attachments and opinions contained in this E-mail are > those of its author only and do not necessarily represent those of > London Scottish Bank PLC or any other members of the London Scottish > Group. > > If you are not the intended addressee, you are prohibited from any > disclosure, distribution or further copying or use of this communication > or the information in it or taking any action in reliance on it. If you > have received this communication in error please notify the Information > Security Manager at [EMAIL PROTECTED] as soon as possible and > delete the message from all places in your computer where it is stored. > > We utilise virus scanning software but we cannot guarantee the security > of electronic communications and you are advised to check any > attachments for viruses. We do not accept liability for any loss > resulting from any corruption or alteration of data or importation of > any virus as a result of receiving this electronic communication. > > Replies to this E-mail may be monitored for operational or business > reasons. London Scottish Bank PLC is regulated by the Financial Services > Authority. > ______________________________________________________________________ > This email has been scanned by the MessageLabs Email Security System. > ********************************************************************** > This message is intended for the addressee named and may contain > privileged information or confidential information or both. If you > are not the intended recipient please delete it and notify the sender. > ********************************************************************** > > --------------------------------------------------------------------- > To unsubscribe, e-mail: [EMAIL PROTECTED] > For additional commands, e-mail: [EMAIL PROTECTED] > > > ______________________________________________________________________ > This email has been scanned by the MessageLabs Email Security System. > For more information please visit http://www.messagelabs.com/email > ______________________________________________________________________ > > *** Disclaimer *** > > This electronic communication is confidential and for the exclusive use of the addressee. It may contain private and confidential information. The information, attachments and opinions contained in this E-mail are those of its author only and do not necessarily represent those of London Scottish Bank PLC or any other members of the London Scottish Group. > > If you are not the intended addressee, you are prohibited from any disclosure, distribution or further copying or use of this communication or the information in it or taking any action in reliance on it. If you have received this communication in error please notify the Information Security Manager at [EMAIL PROTECTED] as soon as possible and delete the message from all places in your computer where it is stored. > > We utilise virus scanning software but we cannot guarantee the security of electronic communications and you are advised to check any attachments for viruses. We do not accept liability for any loss resulting from any corruption or alteration of data or importation of any virus as a result of receiving this electronic communication. > > Replies to this E-mail may be monitored for operational or business reasons. London Scottish Bank PLC is regulated by the Financial Services Authority. > ______________________________________________________________________ > This email has been scanned by the MessageLabs Email Security System. --------------------------------------------------------------------- To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED] ______________________________________________________________________ This email has been scanned by the MessageLabs Email Security System. For more information please visit http://www.messagelabs.com/email ______________________________________________________________________ *** Disclaimer *** This electronic communication is confidential and for the exclusive use of the addressee. It may contain private and confidential information. The information, attachments and opinions contained in this E-mail are those of its author only and do not necessarily represent those of London Scottish Bank PLC or any other members of the London Scottish Group. If you are not the intended addressee, you are prohibited from any disclosure, distribution or further copying or use of this communication or the information in it or taking any action in reliance on it. If you have received this communication in error please notify the Information Security Manager at [EMAIL PROTECTED] as soon as possible and delete the message from all places in your computer where it is stored. We utilise virus scanning software but we cannot guarantee the security of electronic communications and you are advised to check any attachments for viruses. We do not accept liability for any loss resulting from any corruption or alteration of data or importation of any virus as a result of receiving this electronic communication. Replies to this E-mail may be monitored for operational or business reasons. London Scottish Bank PLC is regulated by the Financial Services Authority. ______________________________________________________________________ This email has been scanned by the MessageLabs Email Security System. --------------------------------------------------------------------- To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED]