Cannot find bean under name org.apache.struts.taglib.html.BEAN
I received the following error when I tried to run one of my JSP pages which follows an Action that completed successfully: Cannot find bean under name org.apache.struts.taglib.html.BEAN Here is the code to the jsp page: tiles:insert definition=mainLayout tiles:put name=title type=stringAttributes/tiles:put tiles:put name=body type=string logic:present name=currentItem logic:iterate indexId=i id=attribute name=currentItem property=attributes type=ItemAttributeBean bean:write name=attribute property=name/: html:select property='%= attribute + i %' html:options name=attribute property=values/ /html:select /logic:iterate /logic:present /tiles:put /tiles:insert Here is the code to the Action that forwards to this page: RequestDispatcher rd; HttpSession session = request.getSession(); int itemID = Integer.parseInt((String)request.getParameter(itemID)); try{ \\ -- SNIP FOR IP PURPOSES -- request.setAttribute(currentItem, cartItem); } catch(Exception ex){ } // Forward the user to the success target return (mapping.findForward(success)); - To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED]
RE: Cannot find bean under name org.apache.struts.taglib.html.BEAN
Found the issue. I was missing my html:form tag. Maybe there should be a better error message for this. -Gp -Original Message- From: Giampiero De Ciantis [mailto:[EMAIL PROTECTED] Sent: August 20, 2003 4:19 PM To: 'Struts User Mailing List' Subject: Cannot find bean under name org.apache.struts.taglib.html.BEAN I received the following error when I tried to run one of my JSP pages which follows an Action that completed successfully: Cannot find bean under name org.apache.struts.taglib.html.BEAN Here is the code to the jsp page: tiles:insert definition=mainLayout tiles:put name=title type=stringAttributes/tiles:put tiles:put name=body type=string logic:present name=currentItem logic:iterate indexId=i id=attribute name=currentItem property=attributes type=ItemAttributeBean bean:write name=attribute property=name/: html:select property='%= attribute + i %' html:options name=attribute property=values/ /html:select /logic:iterate /logic:present /tiles:put /tiles:insert Here is the code to the Action that forwards to this page: RequestDispatcher rd; HttpSession session = request.getSession(); int itemID = Integer.parseInt((String)request.getParameter(itemID)); try{ \\ -- SNIP FOR IP PURPOSES -- request.setAttribute(currentItem, cartItem); } catch(Exception ex){ } // Forward the user to the success target return (mapping.findForward(success)); - 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]
Using the bean:define to store a bean:message value
Hello all, I was looking for a solution to a problem where within a JSP page I need to store a message (that I can obtain from bean:message tag) in a string for later use. I tried the example below with the following values: bean:define id=schemaNamebean:message key=db.schema//bean:define But everytime I load the page I get the following exception: javax.servlet.ServletException: Define tag can contain only one of name attribute, value attribute, or body content Any thoughts? -Gp -Original Message- From: Nagendra Kumar O V S [mailto:[EMAIL PROTECTED] Sent: August 1, 2003 7:47 AM To: [EMAIL PROTECTED] Subject: Re: Using a key as an argument to bean:message hi, u can't send the key as the argument to the bean:message, though u might want to consider this bean:define id=realValue bean:message key=customer.label / /bean:define bean:message key=field.lookupbutton arg0=%=realLabel%/ -- nagi ---Original Message--- From: Struts Users Mailing List mailto:[EMAIL PROTECTED] Date: Friday, August 01, 2003 05:00:41 PM To: Struts Users Mailing List (E-mail) mailto:[EMAIL PROTECTED] Subject: Using a key as an argument to bean:message Hi, Has anyone got any ideas on how to use a message key as an argument in a bean:message call. e.g. bean:message key=field.lookupbutton arg0Key=customer.label/ At the moment I am using a scriptlet to access the message resources and assign the message for the argument to a page variable. e.g. % org.apache.struts.util.MessageResources messages = (org.apache.struts.util.MessageResources)request.getAttribute(org.apache.str uts.Globals.MESSAGES_KEY); String realLabel = messages.getMessage(customer.label); % bean:message key=field.lookupbutton arg0=%=realLabel%/ This works but is a bit messy. Note that both keys are actually dynamic and come from nested beans on the ActionForm - I can't just create a fixed composite message in my application.properties. thanks, Paul ** Axios Email Confidentiality Footer Privileged/Confidential Information may be contained in this message. If you are not the addressee indicated in this message (or responsible for delivery of the message to such person), you may not copy or deliver this message to anyone. In such case, you should destroy this message, and notify us immediately. If you or your employer does not consent to Internet email messages of this kind, please advise us immediately. Opinions, conclusions and other information expressed in this message are not given or endorsed by my Company or employer unless otherwise indicated by an authorised representative independent of this message. WARNING: While Axios Systems Ltd takes steps to prevent computer viruses from being transmitted via electronic mail attachments we cannot guarantee that attachments do not contain computer virus code. You are therefore strongly advised to undertake anti virus checks prior to accessing the attachment to this electronic mail. Axios Systems Ltd grants no warranties regarding performance use or quality of any attachment and undertakes no liability for loss or damage howsoever caused. - To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED] . http://www.incredimail.com/redir.asp?ad_id=309lang=9 IncrediMail - Email has finally evolved - http://www.incredimail.com/redir.asp?ad_id=309lang=9 Click Here
RE: ActionForm as a view bean
George, I am not sure if I understand what you are trying to achieve. If you are attempting to retrieve data from a datasource and display it, the way that I think is most natural in struts is to create an action that does this and then have the Action populate an ActionForm and then forward to a Jsp that will display the data. -Gp -Original Message- From: [EMAIL PROTECTED] [mailto:[EMAIL PROTECTED] Sent: July 25, 2003 11:06 AM To: [EMAIL PROTECTED] Subject: Re: ActionForm as a view bean Hello again, Actually, as it turns out, the ActionForm is NOT a good idea for a view bean. The ActionForm is not created until the html.FormTag.doStartTag() runs, and again, if the initialization from the back end fails, it's too late to do anything about it. What do you all do? The problem is that the preceding Action doesn't REALLY know which jsp is about to be run. It only sends back 'SUCCESS' or something, which is mapped to a jsp... but it doesn't know which one (which is generally a good thing, but in this case...). So the Action can't prepare the view bean for the next view. Where can the view bean be created/prepared? Extension on the RequestProcessor? -g. George Baxter Convergys, Westbrook Centre Block 3, Milton Road Cambridge, CB4 1YG UK Tel +44 (0) 1223 488 019. Fax +44 (0) 1223 302 526. e-mail [EMAIL PROTECTED] www.convergys.com -- NOTICE: The information contained in this electronic mail transmission is intended by Convergys Corporation for the use of the named individual or entity to which it is directed and may contain information that is privileged or otherwise confidential. If you have received this electronic mail transmission in error, please delete it from your system without copying or forwarding it, and notify the sender of the error by reply email or by telephone (collect), so that the sender's address records can be corrected. - 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] Opinion if struts is being used on www.canada411.com
I was at the canada411 site and noticed that the Find a Business feature uses JSP/Servlets instead of ASP (which is what Find a Person uses). I was wondering if anyone could tell me if this is actually struts in the background. I doesn't matter, but it would be interesting to see Struts in such a widely-used application. Look yourself at www.canada411.com -Gp - To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED]
RE: [OT] Opinion if struts is being used on www.canada411.com
Ugh...Not enough coffee today. The reason why I think struts is being used is because the servlet has a .do extension. I wasn't sure if the .do is common in the servlet world. -Original Message- From: Giampiero De Ciantis [mailto:[EMAIL PROTECTED] Sent: July 7, 2003 2:25 PM To: Struts User Mailing List Subject: [OT] Opinion if struts is being used on www.canada411.com I was at the canada411 site and noticed that the Find a Business feature uses JSP/Servlets instead of ASP (which is what Find a Person uses). I was wondering if anyone could tell me if this is actually struts in the background. I doesn't matter, but it would be interesting to see Struts in such a widely-used application. Look yourself at www.canada411.com -Gp - 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: [OT] MVC / Model 2 for Microsoft ???
Just an FYI on this topic. Found this searching MSDN for patterns. http://msdn.microsoft.com/practices/type/Patterns/ImpMVCinASP/default.aspc -Gp -Original Message- From: James Mitchell [mailto:[EMAIL PROTECTED] Sent: June 18, 2003 11:21 AM To: Struts Users Mailing List Subject: Re: [OT] MVC / Model 2 for Microsoft ??? On Wednesday 18 June 2003 09:14, Ted Husted wrote: James Mitchell wrote: I get so tired of hearing of this Struts version of PHP or ASP. Sorry guys, you just can't build a controller with a page by page scripting technology. Have you looked at Maverick, James? As a matter of fact, someone mentioned it last week, so I downloaded the project and briefly skimmed through some of the code. Unfortunately, I have not had time to run the samples or give it a good test-drive, but I hope to soon. I'll post back soon. http://mav.sourceforge.net/ They apparently have .NET and .PHP versions that use controllers, with a request processing pattern that sounds familiar. =:0) http://mavnet.sourceforge.net/ http://amb.sourceforge.net/ I'll be trying these hands-on in July but wondered if you had had a chance to look at these before. -Ted. - To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED] -- James Mitchell Software Developer/Struts Evangelist http://www.struts-atlanta.org 770-822-3359 AIM:jmitchtx - 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: site root going straight to a .do
I had to do the exact same thing for one of my apps. So I just did a logic:forward to my starting action in a file called index.jsp. Then in the welcome-file-list I put the index.jsp file. It's not clean, but it works. -Original Message- From: K.C. Baltz [mailto:[EMAIL PROTECTED] Sent: June 30, 2003 12:14 PM To: Struts Users Mailing List Subject: Re: site root going straight to a .do My understanding is that the webapp spec requires that files in the welcome-file-list be actual files, not servlets, because it has to test for their existence to decide which welcome file to use. So, /index.do won't work. K.C. Affan Qureshi wrote: Have you tried configuring the welcome-file-list in web.xml. I guess you can do all this there. Affan Simon Kelly [EMAIL PROTECTED] wrote in message news:[EMAIL PROTECTED] Hi all, Sorry about the subject line, it's the best I can do in one sentance. What I'm trying to do, is set up the wecome file, so that instead of having to go via a html or jsp page, I can go straight to an action class! Any ideas? If someone types in htt://our.site.com/ourapp then it should go straight to the welcome.do Action and not a html file. I'm using struts1.1 and stxx. Cheers Simon I have often wondered how it is that every man loves himself more than all the rest of men, but yet sets less value on his own opinion of himself than on the opinion of others. -- Georg Christoph Lichtenberg Institut fuer Prozessdatenverarbeitung und Elektronik, Forschungszentrum Karlsruhe GmbH, Postfach 3640, D-76021 Karlsruhe, Germany. Tel: (+49)/7247 82-4042 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]
Anyone getting a file not found error after upgrading to 1.1 final
I was using 1.1 rc2 to develop an application. I switched the jars to the 1.1 final build and now when my web app is initializing in the container I get a fileNotFound error. Here is the trace. All I did was replace the rc2 jars with final release jars, repackage, and redeploy. I am using Jboss 3.2 with Tomcat as the container. java.io.FileNotFoundException: JAR entry org/apache/struts/resources/web-app_2_3 .dtd not found in C:\jboss\server\default\tmp\deploy\server\default\deploy\work\ MainEngine\localhost\smsonline\WEB-INF\lib\struts.jar at sun.net.www.protocol.jar.JarURLConnection.connect(JarURLConnection.ja va:95) at sun.net.www.protocol.jar.JarURLConnection.getInputStream(JarURLConnec tion.java:105) at java.net.URL.openStream(URL.java:960) at org.apache.xerces.impl.XMLEntityManager.startEntity(XMLEntityManager. java:740) at org.apache.xerces.impl.XMLEntityManager.startDTDEntity(XMLEntityManag er.java:700) at org.apache.xerces.impl.XMLDTDScannerImpl.setInputSource(XMLDTDScanner Impl.java:258) at org.apache.xerces.impl.XMLDocumentScannerImpl$DTDDispatcher.dispatch( XMLDocumentScannerImpl.java:811) at org.apache.xerces.impl.XMLDocumentFragmentScannerImpl.scanDocument(XM LDocumentFragmentScannerImpl.java:333) at org.apache.xerces.parsers.StandardParserConfiguration.parse(StandardP arserConfiguration.java:529) at org.apache.xerces.parsers.StandardParserConfiguration.parse(StandardP arserConfiguration.java:585) at org.apache.xerces.parsers.XMLParser.parse(XMLParser.java:147) at org.apache.xerces.parsers.AbstractSAXParser.parse(AbstractSAXParser.j ava:1148) at org.apache.commons.digester.Digester.parse(Digester.java:1562) at org.apache.struts.action.ActionServlet.initServlet(ActionServlet.java :1433) at org.apache.struts.action.ActionServlet.init(ActionServlet.java:466) at javax.servlet.GenericServlet.init(GenericServlet.java:256) at org.apache.catalina.core.StandardWrapper.loadServlet(StandardWrapper. java:935) at org.apache.catalina.core.StandardWrapper.load(StandardWrapper.java:82 3) at org.apache.catalina.core.StandardContext.loadOnStartup(StandardContex t.java:3420) at org.apache.catalina.core.StandardContext.start(StandardContext.java:3 608) at org.apache.catalina.core.ContainerBase.addChildInternal(ContainerBase .java:821) at org.apache.catalina.core.ContainerBase.addChild(ContainerBase.java:80 7) at org.apache.catalina.core.StandardHost.addChild(StandardHost.java:579) at org.jboss.web.catalina.EmbeddedCatalinaService41.createWebContext(Emb eddedCatalinaService41.java:417) at org.jboss.web.catalina.EmbeddedCatalinaService41.performDeploy(Embedd edCatalinaService41.java:266) at org.jboss.web.AbstractWebContainer.start(AbstractWebContainer.java:35 7) at org.jboss.deployment.MainDeployer.start(MainDeployer.java:832) at org.jboss.deployment.MainDeployer.start(MainDeployer.java:824) at org.jboss.deployment.MainDeployer.deploy(MainDeployer.java:640) at org.jboss.deployment.MainDeployer.deploy(MainDeployer.java:613) at sun.reflect.GeneratedMethodAccessor35.invoke(Unknown Source) at sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAcces sorImpl.java:25) at java.lang.reflect.Method.invoke(Method.java:324) at org.jboss.mx.capability.ReflectedMBeanDispatcher.invoke(ReflectedMBea nDispatcher.java:284) at org.jboss.mx.server.MBeanServerImpl.invoke(MBeanServerImpl.java:549) at org.jboss.mx.util.MBeanProxyExt.invoke(MBeanProxyExt.java:177) at $Proxy7.deploy(Unknown Source) at org.jboss.deployment.scanner.URLDeploymentScanner.deploy(URLDeploymen tScanner.java:302) at org.jboss.deployment.scanner.URLDeploymentScanner.scan(URLDeploymentS canner.java:476) at org.jboss.deployment.scanner.AbstractDeploymentScanner$ScannerThread. doScan(AbstractDeploymentScanner.java:200) at org.jboss.deployment.scanner.AbstractDeploymentScanner$ScannerThread. loop(AbstractDeploymentScanner.java:211) at org.jboss.deployment.scanner.AbstractDeploymentScanner$ScannerThread. run(AbstractDeploymentScanner.java:190)
RE: Anyone getting a file not found error after upgrading to 1.1 final
Nevermind, the JBoss VM was pulling tricks on me. -Original Message- From: Giampiero De Ciantis [mailto:[EMAIL PROTECTED] Sent: June 30, 2003 12:50 PM To: Struts User Mailing List ([EMAIL PROTECTED]) Subject: Anyone getting a file not found error after upgrading to 1.1 final I was using 1.1 rc2 to develop an application. I switched the jars to the 1.1 final build and now when my web app is initializing in the container I get a fileNotFound error. Here is the trace. All I did was replace the rc2 jars with final release jars, repackage, and redeploy. I am using Jboss 3.2 with Tomcat as the container. java.io.FileNotFoundException: JAR entry org/apache/struts/resources/web-app_2_3 .dtd not found in C:\jboss\server\default\tmp\deploy\server\default\deploy\work\ MainEngine\localhost\smsonline\WEB-INF\lib\struts.jar at sun.net.www.protocol.jar.JarURLConnection.connect(JarURLConnection.ja va:95) at sun.net.www.protocol.jar.JarURLConnection.getInputStream(JarURLConnec tion.java:105) at java.net.URL.openStream(URL.java:960) at org.apache.xerces.impl.XMLEntityManager.startEntity(XMLEntityManager. java:740) at org.apache.xerces.impl.XMLEntityManager.startDTDEntity(XMLEntityManag er.java:700) at org.apache.xerces.impl.XMLDTDScannerImpl.setInputSource(XMLDTDScanner Impl.java:258) at org.apache.xerces.impl.XMLDocumentScannerImpl$DTDDispatcher.dispatch( XMLDocumentScannerImpl.java:811) at org.apache.xerces.impl.XMLDocumentFragmentScannerImpl.scanDocument(XM LDocumentFragmentScannerImpl.java:333) at org.apache.xerces.parsers.StandardParserConfiguration.parse(StandardP arserConfiguration.java:529) at org.apache.xerces.parsers.StandardParserConfiguration.parse(StandardP arserConfiguration.java:585) at org.apache.xerces.parsers.XMLParser.parse(XMLParser.java:147) at org.apache.xerces.parsers.AbstractSAXParser.parse(AbstractSAXParser.j ava:1148) at org.apache.commons.digester.Digester.parse(Digester.java:1562) at org.apache.struts.action.ActionServlet.initServlet(ActionServlet.java :1433) at org.apache.struts.action.ActionServlet.init(ActionServlet.java:466) at javax.servlet.GenericServlet.init(GenericServlet.java:256) at org.apache.catalina.core.StandardWrapper.loadServlet(StandardWrapper. java:935) at org.apache.catalina.core.StandardWrapper.load(StandardWrapper.java:82 3) at org.apache.catalina.core.StandardContext.loadOnStartup(StandardContex t.java:3420) at org.apache.catalina.core.StandardContext.start(StandardContext.java:3 608) at org.apache.catalina.core.ContainerBase.addChildInternal(ContainerBase .java:821) at org.apache.catalina.core.ContainerBase.addChild(ContainerBase.java:80 7) at org.apache.catalina.core.StandardHost.addChild(StandardHost.java:579) at org.jboss.web.catalina.EmbeddedCatalinaService41.createWebContext(Emb eddedCatalinaService41.java:417) at org.jboss.web.catalina.EmbeddedCatalinaService41.performDeploy(Embedd edCatalinaService41.java:266) at org.jboss.web.AbstractWebContainer.start(AbstractWebContainer.java:35 7) at org.jboss.deployment.MainDeployer.start(MainDeployer.java:832) at org.jboss.deployment.MainDeployer.start(MainDeployer.java:824) at org.jboss.deployment.MainDeployer.deploy(MainDeployer.java:640) at org.jboss.deployment.MainDeployer.deploy(MainDeployer.java:613) at sun.reflect.GeneratedMethodAccessor35.invoke(Unknown Source) at sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAcces sorImpl.java:25) at java.lang.reflect.Method.invoke(Method.java:324) at org.jboss.mx.capability.ReflectedMBeanDispatcher.invoke(ReflectedMBea nDispatcher.java:284) at org.jboss.mx.server.MBeanServerImpl.invoke(MBeanServerImpl.java:549) at org.jboss.mx.util.MBeanProxyExt.invoke(MBeanProxyExt.java:177) at $Proxy7.deploy(Unknown Source) at org.jboss.deployment.scanner.URLDeploymentScanner.deploy(URLDeploymen tScanner.java:302) at org.jboss.deployment.scanner.URLDeploymentScanner.scan(URLDeploymentS canner.java:476) at org.jboss.deployment.scanner.AbstractDeploymentScanner$ScannerThread. doScan(AbstractDeploymentScanner.java:200) at org.jboss.deployment.scanner.AbstractDeploymentScanner$ScannerThread. loop(AbstractDeploymentScanner.java:211) at org.jboss.deployment.scanner.AbstractDeploymentScanner$ScannerThread. run(AbstractDeploymentScanner.java:190)
embedding multiple parameters and associated values in a html:link
I am trying to use an html:link item to submit some data, but I need to send the value of 2 parameters. How do I assign multiple parameters within an html:link tag? Thanks -Gp
Easy way to deal with Dynamic Form elements
I have basically a shopping cart application and I am wondering what is the easiest way of updating the quantity of each item in the shopping cart. Populating the page with the list of cart items is easy. I have no clue how I will process the Dynamic form elements that represent the quantity of each item in the cart. Thanks -Gp
RE: [OT] MVC / Model 2 for Microsoft ???
I don't think that the current ASP .NET model is too far off of the MVC path. Mostly I think that MVC isn't enforced, but the foundation is inherently there. If I had to do a mapping from struts to ASP .NET I would put things like this: .jsp -- .aspx ActionForm -- Code behind page of .aspx Action -- Code behind page of .aspx Model -- any .NET classes or Com objects that your Code behind page calls. Now, I now this isn't nearly as strict a decoupling as Struts makes, but (some of) the principles are still there. What can be seen as both an up-side and down-side about this is that an .aspx page is automatically paired with the code that can do the validation as well as the Actions that will be taken when you submit the form. Basically, everything that is declarative in Struts is programmatic in ASP .NET. I am sure we all have heard the pros/cons of both of those techniques. I like using ASP .NET for my personal stuff because I can roll out my code really quickly. But I think it would be hard to use it in an enterprise environment because it tends to make me write sloppy code. Struts is the opposite. Too much architecture for personal web-site stuff (which is becoming less of an issue as the versions roll on), but great for enterprise apps. -Gp -Original Message- From: David Graham [mailto:[EMAIL PROTECTED] Sent: June 13, 2003 10:58 AM To: [EMAIL PROTECTED] Subject: Re: [OT] MVC / Model 2 for Microsoft ??? But this makes complete sense, in a sick way. In a MS environment, portability probably isn't as big a concern, It's no concern at all because you have nothing to port to. and while there are certainly other reasons to use MVC, it strikes me that the biggest is to maintain abstractions between the various layers. If you're a MS shop, you probably have SQL server, ASP and IIS -- and MS has little interest in making it easy to change this. So why spend time building up a MVC framework if you know that you're pretty much married to certain technologies? I don't see any connection between MVC and vendor lock in. Even if you were an MS shop you still need layers to make the app. maintainable. David No thanks. Erik - To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED] _ Tired of spam? Get advanced junk mail protection with MSN 8. http://join.msn.com/?page=features/junkmail - 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: Easy way to deal with Dynamic Form elements
Sorry, I didn't explain myself. Basically the page that shows the cart contents will have an unknown number (Cardinality 0..*) of items listed. Beside each item there will be a text box where the user can input the quantity of the item that they want to order. When the user hits checkout or updateQuantity I have to be able to figure out what item they are updating. So, How do I know which item they are trying to update once I get to the CartAction that does the processing of the form? Thanks for the reply. -Gp -Original Message- From: Erik Price [mailto:[EMAIL PROTECTED] Sent: June 13, 2003 2:58 PM To: Struts Users Mailing List Subject: Re: Easy way to deal with Dynamic Form elements Giampiero De Ciantis wrote: I have basically a shopping cart application and I am wondering what is the easiest way of updating the quantity of each item in the shopping cart. Populating the page with the list of cart items is easy. I have no clue how I will process the Dynamic form elements that represent the quantity of each item in the cart. Presumably whatever class represents a CartItem has, in addition to a property pointing to an selection from your wares, a property to represent the quantity? Then you simply need to update this quantity in the Action when a user specifies a quantity? Or am I just not understanding you. Erik - 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]
Using ActionForms and Entity CMP EJB
I have an EJB that returns a collection of categories (Strings) that I want to display on my page as links. I can't seem to figure out what the pattern is for bringing a Collection object from the data-tier to the Web-Tier using Struts. Thanks -Gp - To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED]
Re: Using ActionForms and Entity CMP EJB
Once you have populated the form using the Action, how do you send it back to the user? Do you have an example of this method of population (can be really simple, doesn't need to use EJBs or anything)? - Original Message - From: Mike Jasnowski [EMAIL PROTECTED] To: Struts Users Mailing List [EMAIL PROTECTED] Sent: Wednesday, June 11, 2003 1:10 PM Subject: RE: Using ActionForms and Entity CMP EJB You can populate an ActionForm in an Action (Using the EJB data), in the actionform one of the properties can be a collection type such as List. -Original Message- From: Giampiero De Ciantis [mailto:[EMAIL PROTECTED] Sent: Wednesday, June 11, 2003 1:08 PM To: [EMAIL PROTECTED] Subject: Using ActionForms and Entity CMP EJB I have an EJB that returns a collection of categories (Strings) that I want to display on my page as links. I can't seem to figure out what the pattern is for bringing a Collection object from the data-tier to the Web-Tier using Struts. Thanks -Gp - 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]