Re: converting a struts bean call to EL/JSTL
Thanks for the response but I had tried that and it does not work. ${requestScope[param.formName].uiCtrlLabel[entry.key]} gives and error of unable to find a value for uiCtrlLabel in object of class blank.blank..etc..formname using operator '.' Laurie Harper wrote: Bob wrote: I have a map of ui controls passed to a JSP. Each entry in the map contains a label, name, value. The key used in the map is the name. I iterate through as follows: TABLE c:forEach var=entry items=${requestScope[param.forName].uiControls} TR TD bean:write name='${param.formName}' property=uiCtrlLabel(${entry.key})/ /TD TD html:text property=uiCtrlValue(${entry.key}) size=30 maxlength=2048/ /TD /TR /c:forEach /TABLE This works, however I am trying to figure out how to make it work without using the bean:write tag. Any ideas? I've tried many options all of which fail. How about ${requestScope[param.formName].uiCtrlLabel[entry.key]} ? For safely against cross-site-scripting attacks, of course, that should be wrapped in a c:out/ tag. L. - To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED] -- View this message in context: http://www.nabble.com/converting-a-struts-bean-call-to-EL-JSTL-tf2300239.html#a6412941 Sent from the Struts - User mailing list archive at Nabble.com. - To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED]
Re: converting a struts bean call to EL/JSTL
Well, without knowing what the various beans are or the exact error message, it's hard to guess what the problem may be... Is the bean referenced by requestScope[param.formName] a dyna form by any chance? In that case you would want something like ${requestScope[param.formName].map.uiCtrlLabel[entry.key]} If that doesn't work, try posting some code so we can see how your beans are structured. L. Bob wrote: Thanks for the response but I had tried that and it does not work. ${requestScope[param.formName].uiCtrlLabel[entry.key]} gives and error of unable to find a value for uiCtrlLabel in object of class blank.blank..etc..formname using operator '.' Laurie Harper wrote: Bob wrote: I have a map of ui controls passed to a JSP. Each entry in the map contains a label, name, value. The key used in the map is the name. I iterate through as follows: TABLE c:forEach var=entry items=${requestScope[param.forName].uiControls} TR TD bean:write name='${param.formName}' property=uiCtrlLabel(${entry.key})/ /TD TD html:text property=uiCtrlValue(${entry.key}) size=30 maxlength=2048/ /TD /TR /c:forEach /TABLE This works, however I am trying to figure out how to make it work without using the bean:write tag. Any ideas? I've tried many options all of which fail. How about ${requestScope[param.formName].uiCtrlLabel[entry.key]} ? For safely against cross-site-scripting attacks, of course, that should be wrapped in a c:out/ tag. L. - 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]
converting a struts bean call to EL/JSTL
I have a map of ui controls passed to a JSP. Each entry in the map contains a label, name, value. The key used in the map is the name. I iterate through as follows: TABLE c:forEach var=entry items=${requestScope[param.forName].uiControls} TR TD bean:write name='${param.formName}' property=uiCtrlLabel(${entry.key})/ /TD TD html:text property=uiCtrlValue(${entry.key}) size=30 maxlength=2048/ /TD /TR /c:forEach /TABLE This works, however I am trying to figure out how to make it work without using the bean:write tag. Any ideas? I've tried many options all of which fail. Thanks. -- View this message in context: http://www.nabble.com/converting-a-struts-bean-call-to-EL-JSTL-tf2300239.html#a6392405 Sent from the Struts - User mailing list archive at Nabble.com. - To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED]
Re: converting a struts bean call to EL/JSTL
Bob wrote: I have a map of ui controls passed to a JSP. Each entry in the map contains a label, name, value. The key used in the map is the name. I iterate through as follows: TABLE c:forEach var=entry items=${requestScope[param.forName].uiControls} TR TD bean:write name='${param.formName}' property=uiCtrlLabel(${entry.key})/ /TD TD html:text property=uiCtrlValue(${entry.key}) size=30 maxlength=2048/ /TD /TR /c:forEach /TABLE This works, however I am trying to figure out how to make it work without using the bean:write tag. Any ideas? I've tried many options all of which fail. How about ${requestScope[param.formName].uiCtrlLabel[entry.key]} ? For safely against cross-site-scripting attacks, of course, that should be wrapped in a c:out/ tag. L. - To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED]