Re: Tiles
Le mar 23/07/2002 à 08:32, Adarsh a écrit : Hi all, Can any body guide me on what tiles is all about...where can it be used?and how can it be used with struts Adarsh Gupta Software Engineer Patni Computer Systems Limited SDF-7, 4th Floor, Unit 17, SEEPZ Tel : (022)-8290479/8291454 Extn : 5741 Mobile : 9820224341 www.patni.com World-Wide Partnerships.World-Class Solutions. Sorry I am not responding to your question but I just use your thread to ask an another question that could help you too: What is the difference between struts-template and tiles ? -- To unsubscribe, e-mail: mailto:[EMAIL PROTECTED] For additional commands, e-mail: mailto:[EMAIL PROTECTED]
Stylesheets
Hi all, How to apply external css file to a form elements???In html like we do class=txtfield what is the corresponding thing in struts?? Adarsh Gupta Software Engineer Patni Computer Systems Limited SDF-7, 4th Floor, Unit 17, SEEPZ Tel : (022)-8290479/8291454 Extn : 5741 Mobile : 9820224341 www.patni.com World-Wide Partnerships.World-Class Solutions.
RE: Stylesheets
did you read the fine manual ;- try it with: styleClass=txtfield -Original Message- From: Adarsh [mailto:[EMAIL PROTECTED]] Sent: Dienstag, 23. Juli 2002 10:06 To: Struts Users Mailing List Subject: Stylesheets Hi all, How to apply external css file to a form elements???In html like we do class=txtfield what is the corresponding thing in struts?? Adarsh Gupta Software Engineer Patni Computer Systems Limited SDF-7, 4th Floor, Unit 17, SEEPZ Tel : (022)-8290479/8291454 Extn : 5741 Mobile : 9820224341 www.patni.com World-Wide Partnerships.World-Class Solutions. -- To unsubscribe, e-mail: mailto:[EMAIL PROTECTED] For additional commands, e-mail: mailto:[EMAIL PROTECTED]
RE: Tiles
I hava an application that requires a master/detail type maintenance form. e.g. order/order items. Does anyone have any experience of modelling this in struts. Ideally i will have the form contain a collection of order items (either directly or inside a 'value object' nested bean) Is it possible to display the collection as a grid for editing. I don't see how to resolve what field belongs to which item in JSP/Struts. My feeling is that I should create a specific edit action to edit a selected line, then post that line data. This is not what the user would ideally :-) Tom Lister * 020 7612 3030 * [EMAIL PROTECTED] *** This communication (including any attachments) contains confidential information. If you are not the intended recipient and you have received this communication in error, you should destroy it without copying, disclosing or otherwise using its contents. Please notify the sender immediately of the error. Internet communications are not necessarily secure and may be intercepted or changed after they are sent. Abbey National Treasury Services plc does not accept liability for any loss you may suffer as a result of interception or any liability for such changes. If you wish to confirm the origin or content of this communication, please contact the sender by using an alternative means of communication. This communication does not create or modify any contract and, unless otherwise stated, is not intended to be contractually binding. Abbey National Treasury Services plc. Registered Office: Abbey National House, 2 Triton Square, Regents Place, London NW1 3AN. Registered in England under Company Registration Number: 2338548. Regulated by the Financial Services Authority (FSA). *** -- To unsubscribe, e-mail: mailto:[EMAIL PROTECTED] For additional commands, e-mail: mailto:[EMAIL PROTECTED]
Master/Detail data - editing multiple entities in a grid
I hava an application that requires a master/detail type maintenance form. e.g. order/order items. Does anyone have any experience of modelling this in struts. Ideally i will have the form contain a collection of order items (either directly or inside a 'value object' nested bean) Is it possible to display the collection as a grid for editing. I don't see how to resolve what field belongs to which item in JSP/Struts. My feeling is that I should create a specific edit action to edit a selected line, then post that line data. This is not what the user would ideally :-) Tom Lister * 020 7612 3030 * [EMAIL PROTECTED] *** This communication (including any attachments) contains confidential information. If you are not the intended recipient and you have received this communication in error, you should destroy it without copying, disclosing or otherwise using its contents. Please notify the sender immediately of the error. Internet communications are not necessarily secure and may be intercepted or changed after they are sent. Abbey National Treasury Services plc does not accept liability for any loss you may suffer as a result of interception or any liability for such changes. If you wish to confirm the origin or content of this communication, please contact the sender by using an alternative means of communication. This communication does not create or modify any contract and, unless otherwise stated, is not intended to be contractually binding. Abbey National Treasury Services plc. Registered Office: Abbey National House, 2 Triton Square, Regents Place, London NW1 3AN. Registered in England under Company Registration Number: 2338548. Regulated by the Financial Services Authority (FSA). *** -- To unsubscribe, e-mail: mailto:[EMAIL PROTECTED] For additional commands, e-mail: mailto:[EMAIL PROTECTED] *** This communication (including any attachments) contains confidential information. If you are not the intended recipient and you have received this communication in error, you should destroy it without copying, disclosing or otherwise using its contents. Please notify the sender immediately of the error. Internet communications are not necessarily secure and may be intercepted or changed after they are sent. Abbey National Treasury Services plc does not accept liability for any loss you may suffer as a result of interception or any liability for such changes. If you wish to confirm the origin or content of this communication, please contact the sender by using an alternative means of communication. This communication does not create or modify any contract and, unless otherwise stated, is not intended to be contractually binding. Abbey National Treasury Services plc. Registered Office: Abbey National House, 2 Triton Square, Regents Place, London NW1 3AN. Registered in England under Company Registration Number: 2338548. Regulated by the Financial Services Authority (FSA). *** -- To unsubscribe, e-mail: mailto:[EMAIL PROTECTED] For additional commands, e-mail: mailto:[EMAIL PROTECTED]
RE: Tiles
http://www.lifl.fr/~dumoulin/tiles/ -Original Message- From: Adarsh [mailto:[EMAIL PROTECTED]] Sent: Tuesday, 23 July 2002 4:33 PM To: Struts Users Mailing List Subject: Tiles Hi all, Can any body guide me on what tiles is all about...where can it be used?and how can it be used with struts Adarsh Gupta Software Engineer Patni Computer Systems Limited SDF-7, 4th Floor, Unit 17, SEEPZ Tel : (022)-8290479/8291454 Extn : 5741 Mobile : 9820224341 www.patni.com World-Wide Partnerships.World-Class Solutions. -- To unsubscribe, e-mail: mailto:[EMAIL PROTECTED] For additional commands, e-mail: mailto:[EMAIL PROTECTED]
org.apache.struts.taglib.html.FormTag.lookup Exception
Hello ! I am getting this exception when I type in my brower /start.do. Might you help me ? Here my code: struts_config.xml: ?xml version=1.0 encoding=ISO-8859-1 ? !DOCTYPE struts-config PUBLIC -//Apache Software Foundation//DTD Struts Configuration 1.0//EN http://jakarta.apache.org/struts/dtds/struts-config_1_0.dtd; struts-config !-- Action Form Beans -- form-beans form-bean name=startForm type=com.ihg.mitop.gui.StartForm/ /form-beans !-- Global Forward Definitions -- global-forwards forward name=proteinList path=/pages/proteinList.jsp/ /global-forwards !-- action mappings -- action-mappings action path=/start forward=/index.jsp /action /action-mappings /struts-config and then my jsp file: %@ page language=java % %@ taglib uri=/tags/struts-html prefix=html % html:html head meta http-equiv=Content-Type content=text/html; charset=iso-8859-1 titlemitop project/title /head body blockquote h2 font face=ArialWelcome to Mitop database !/font/h2 /body /html:html br and my web.xml: ?xml version=1.0 encoding=ISO-8859-1? !DOCTYPE web-app PUBLIC -//Sun Microsystems, Inc.//DTD Web Application 2.3//EN http://java.sun.com/dtd/web-app_2_3.dtd; web-app !-- General description of your web application -- display-nameMitop/display-name !-- Standard Action Servlet Configuration (with debugging) -- servlet servlet-nameaction/servlet-name servlet-classorg.apache.struts.action.ActionServlet/servlet-class init-param param-nameapplication/param-name param-valueApplicationResources/param-value /init-param init-param param-nameconfig/param-name param-value/WEB-INF/struts-config.xml/param-value /init-param init-param param-namedebug/param-name param-value2/param-value /init-param init-param param-namedetail/param-name param-value2/param-value /init-param init-param param-namevalidate/param-name param-valuetrue/param-value /init-param load-on-startup2/load-on-startup /servlet !-- Standard Action Servlet Mapping -- servlet-mapping servlet-nameaction/servlet-name url-pattern*.do/url-pattern /servlet-mapping !-- Struts Tag Library Descriptors -- taglib taglib-uri/tags/struts-bean/taglib-uri taglib-location/WEB-INF/lib/struts-bean.tld/taglib-location /taglib taglib taglib-uri/tags/struts-html/taglib-uri taglib-location/WEB-INF/lib/struts-html.tld/taglib-location /taglib taglib taglib-uri/tags/struts-logic/taglib-uri taglib-location/WEB-INF/lib/struts-logic.tld/taglib-location /taglib /web-app thanks !! -- To unsubscribe, e-mail: mailto:[EMAIL PROTECTED] For additional commands, e-mail: mailto:[EMAIL PROTECTED]
Latency Problem
Hi, I feel Struts has got latency problem. Recently i have started using struts. Before that the system is very fast. But now the system became very slow for the first time. Later it is ok. Can anybody tell me how can I fix this latency. Thanks and Best Regards, -- To unsubscribe, e-mail: mailto:[EMAIL PROTECTED] For additional commands, e-mail: mailto:[EMAIL PROTECTED]
Setting indexed properties - ArrayIndexOutOfBounds
Hi everyone. I've looked through the archives for this and the commons list, without finding an answer to my problems with receiving indexed properties from a form. I've tried with both 1.1 beta and a nightly build from a couple of nights ago. I'm not sure if my problem is with Struts, Commons / BeanUtils, or my understanding of how indexed properties on a bean work. I have a form which, amongst other things, has a tabular set of data: ... input type=hidden name=rows[0].id value=ROW1-PAINT input type=hidden name=rows[0].name value=Paint colour td/td tdPaint colour/td tdinput type=text name=rows[0].value value=Blue/td td/td /tr ... In my form bean I have represented this with an indexed property. ... public Row [] getRows() { if (rows == null) setRows(new Row [0]); return rows; } public void setRows(Row [] rows) { this.rows = rows; } ... Where Row is an inner (nested? never sure of the terminology - defined as public static inside the form bean, anyway). My problem is when Struts comes to populate my form bean with values from the form. Instead of creating a new Row [] and calling setRows, it calls getRows and then attempts to set values within the array. Trouble is, the array isn't big enough, leading to an ArrayIndexOutOfBoundsException. And there's no way I can tell how big to make the array, as the size of the form varies. So, I tried using a List instead of an array. But with the same result - Struts would grab the list from public List getRows(), and then attempt to set values at indexes within the list. So, in desperation, I went back to my array version and added a getter and setter that would take an index, but would 'resize' the array when the index would be out of bounds: ... public Row getRows(int i) { if (i = getRows().length) increaseRows(i + 1); return getRows()[i]; } public void setRows(int i, Row row) { if (i = getRows().length) increaseRows(i + 1); getRows()[i] = row; } ... Now, that works. But I'm not very satisfied. I would have thought that, in my original code, the only proper way to change values of the property would be to create a new array and pass it to public void setRows(Row [] rows). One argument for this is (thinking only of JavaBeans, not Struts) if the property was bound, and the array was changed behind the objects back, it wouldn't know to fire a PropertyChangeEvent. So, is this a bug in Struts / Commons-BeanUtils? Or a flaw in my understanding of JavaBeans? Or just a limitation I have to live with? Is the workaround above 'legal' in terms of the JavaBeans spec? Is there a nicer way to achieve what I'm trying to do? Thanks in advance... -- To unsubscribe, e-mail: mailto:[EMAIL PROTECTED] For additional commands, e-mail: mailto:[EMAIL PROTECTED]
Re: Strutsproblem: Sending files from Server to client!
I am not clear about your problem but the following code sample works fine. Maybe the only important difference is that the perform method returns null ? public ActionForward perform(ActionMapping mapping, ActionForm form, HttpServletRequest request, HttpServletResponse response) throws IOException, ServletException { HttpSession session = request.getSession(); (...) // a temporary output stream ByteArrayOutputStream bout = new ByteArrayOutputStream(); // a writer to write String to output Stream. Writer writer = new BufferedWriter(new OutputStreamWriter(bout)); writer.write(xmldoc); // xmldoc could be your csv.dat as String writer.close(); byte[] content = bout.toByteArray(); // set the exact content length from our temp output stream response.setContentLength(content.length); // write the bytes content response.getOutputStream().write(content); // flush the stream response.getOutputStream().flush(); return null; } Mrazovic, Maik wrote: Server generates a textfile. After generating server read the file and sends it to the client. Well, thats noe problem I thought, but a problem within Struts! While server wants to make this above within an Action there come en error: 2002-07-22 12:46:44 - Ctx( /impact ): IllegalStateException in: R( /impact + /createCSV2.do + null) Cannot forward as OutputStream or Writer has already been obtained But if server makes this by a servlet it works! Isn´t that strange? The code: //userObject from session HttpSession session = request.getSession(true); de.tsystems.impact.model.User user = ( de.tsystems.impact.model.User ) session.getAttribute(de.tsystems.impact.constants.Constants.USER_KEY); //debug-Info de.tsystems.impact.util.ParameterTest.printParameters(request); //App.Key: sql.csv.generate String stmt = something...'; DBConnector con = DBConnector.getInstance(); java.util.List listResult = con.executeDBStatement(stmt); java.util.Iterator iter = listResult.iterator(); //Vector we fill with ImpactCSV-Objects java.util.Vector vectorWithCSVData = new java.util.Vector(); while (iter.hasNext()) { java.util.List vec = (java.util.List) iter.next(); vectorWithCSVData.add(new de.tsystems.impact.model.ImpactCSV( ((String) vec.get(2)), //land ((String) vec.get(0)), //bm ((String) vec.get(1)), //Version ((String) vec.get(4)), //Monat ((String) vec.get(3)), //Jahr ((String) vec.get(5)) //MengeLPP )); } //create empty CSV-File on server String file = getServletContext().getRealPath() + java.io.File.separator + web-inf + java.io.File.separator + csv.dat; //Buffersize for reading and sending data int buffer = 10 * 1024; //10 kb, increase if necessary //fill the csv.dat at ..\WEB-INF\csv.dat. FileOutputStream fos = new FileOutputStream(new File(file)); PrintWriter pw = new PrintWriter(fos); for (int i = 0; i vectorWithCSVData.size(); i++) { de.tsystems.impact.model.ImpactCSV impactSCV = ( de.tsystems.impact.model.ImpactCSV ) vectorWithCSVData.get(i); pw.write(impactSCV.getLandnummer() + ; + impactSCV.getBaumuster() + ; + impactSCV.getVersion() + ; + impactSCV.getMonat() + ; + impactSCV.getJahr() + ; + impactSCV.getWert() + \n); } //clean up all ressources pw.flush(); pw.close(); fos.close(); //Now sending this file to client try { //BufferedOutputStream out = new BufferedOutputStream(response.getOutputStream(), buffer); javax.servlet.ServletOutputStream out = response.getOutputStream(); String contentType = getServletContext().getMimeType(file); response.setContentType(contentType); FileInputStream fis = new FileInputStream(file); byte[] buf = new byte [buffer]; int bytesRead; while ((bytesRead = fis.read(buf)) != -1) { out.write(buf, 0, bytesRead); } out.flush(); fis.close(); } catch (Exception e) { e.printStackTrace(); response.sendError(response.SC_NOT_FOUND, e.toString()); } -- 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:
Re: Not necessary to specify Tiles plugin in struts-config.xml?
Hi, The prefer way to enable Tiles in Struts1.1 is now to specify the Tiles plugin in each struts-config. If you do that, you don't need to specify the TilesRequestProcessor and the ActionComponentServlet. For backward compatibility, the old methods to initialize Tiles still working (i.e: ActionComponentServlet + TilesRequestProcessor). Using such methods will generate some warning messages incitating you to use the new methods. Cedric David M. Karr wrote: Isn't it the case that as of the latest Struts distribution, you do NOT have to add the Tiles plugin specification to the struts-config.xml file? I never did this, and my rather simple application using Tiles works with no problem. -- To unsubscribe, e-mail: mailto:[EMAIL PROTECTED] For additional commands, e-mail: mailto:[EMAIL PROTECTED]
Re: Including parameters in Forward
Try something like this: forward name=success path=/Admin/main.jsp?param1=aValueparam2=aValue/ Cedric Christian Pich wrote: How do specify additional parameters in the forwarding, e.g. for one of my actions I have forward name=success path=/Admin/main.jsp/ but I would like to add parameters. I can add them in the Action Servlet manually by retrieving the path of the mapping (mapping.findForward(success).getPath()) and then add my parameters and create a new ActionForward. Is there a better way to do this? How does Struts envison this? -- 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: How to bind a request parameter to a tile definition ?
You can't do it directly. The preferred way to pass parameters to a Tiles is to pass it some attributes. You can specify attributes values in the Tiles definition. Cedric Slava_L wrote: I often use tile's definition name as a forward in my action mappings. Since this is not an url to direct jsp file how am i suppose to pass any request parametrs i.e forward name=someforward path=someTileDefName?param1param2/ -- To unsubscribe, e-mail: mailto:[EMAIL PROTECTED] For additional commands, e-mail: mailto:[EMAIL PROTECTED]
Struts doesn' t find my class ?
Hi ! When I am going to /start, struts according to he log file below can not find my class GetProteinsAction ALTHOUGH the class file is present under WEB_INF/classes/com/ihg/mitop/gui . Do you have an idea why ? thank you Log file: processing a GET for /start 2002-07-23 10:53:41 action: Looking for Action instance for class com.ihg.mitop.gui.GetProteinsAction 2002-07-23 10:53:41 action: Double checking for Action instance already there 2002-07-23 10:53:41 action: Creating new Action instance : Error creating Action instance for path '/start', class name 'com.ihg.mitop.gui.GetProteinsAction' java.lang.ClassNotFoundException: com/ihg/mitop/gui/GetProteinsAction -- To unsubscribe, e-mail: mailto:[EMAIL PROTECTED] For additional commands, e-mail: mailto:[EMAIL PROTECTED]
html:error iterator
Is there a possibility to iterate over an array of errormessages in struts1.0? I've an errorpage which displays all errors in an table. How can I write each error in a cell without having the TD and TR elements in my resources? Thanks Matthias Hanel Matthias Fachinformatiker (Anwendungsentwicklung) in Ausbildung Logistik World GmbH Fon:+49-841-9014-300 Marie-Curie-Strasse 6 Fax:+49-841-9014-302 D- 85055 Ingolstadt mailto:[EMAIL PROTECTED] -- To unsubscribe, e-mail: mailto:[EMAIL PROTECTED] For additional commands, e-mail: mailto:[EMAIL PROTECTED]
Re: Form bean properties data types and conversions
So the answer is, that without changing struts there is no way to achieve this in automatic, i assume. Maybe could be an interesting enhancement for future releases? Otherwise the automatism on type conversions is really useless outside U.S. Regards, Jens Stutte Craig R. McClanahan To: Struts Users Mailing List [EMAIL PROTECTED] craigmcc@apacc: che.org Subject: Re: Form bean properties data types and conversions 18/07/2002 18.45 Please respond to Struts Users Mailing List On Thu, 18 Jul 2002 [EMAIL PROTECTED] wrote: Date: Thu, 18 Jul 2002 16:52:28 +0200 From: [EMAIL PROTECTED] Reply-To: Struts Users Mailing List [EMAIL PROTECTED] To: Struts Users Mailing List [EMAIL PROTECTED] Subject: Form bean properties data types and conversions I have seen, that in Struts 1.0 there is some support for automatic conversion of request parameters to form bean properties, which seems to be extending in the 1.1beta (i did not use it, but i navigated through the sources). There seem to be converters for date and time data types in the beta. So far, so fine. But i could not get any hint on the localisation. As Struts knows in his request the locale of the user and offers it to the Action programmer, will this locale be used to make any automatic conversions, too? For Struts 1.0 this seems not to be the case, as far as i could see in the sources in half an hour. And the calls to the new DynaBean classes from the jakarta.commons project seem to lack any locale support, too. I can not see much use in an automatic conversion function of Dates (but also numbers), whithout any respect to the users locale, so i wondered if i am missing something. The APIs for Converters is not currently Locale-sensitive, although it could probably be made possible through an extended interface (LocaleConverter or something) that passed an extra Locale argument along. Could someone shed som light on this? Regards, Jens Stutte Craig -- 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: Tiles + ActionForm.validation - problem !
Checking the code, it appears that the error comes from a Struts code part (copied as is to ComponentActionServlet). The exact same code exist at the same place in the Struts servlet. You can encountered such kind of java.lang.IllegalAccessError when you try to run some classes against a different version of jar files than the ones used to compile classes. TilesForStruts1.0.jar is compiled with struts 1.0.2 jar files. But maybe you have another version of Struts available in your classpath ? Also, can you check if your action run correctly without Tiles ? Try replacing somePage by a valid jsp page to test. Cedric Slava_L wrote: the date of my tilesForStruts1.0.jar is 20 june 2002 which one should i use therefor if that one duz not preffered for struts1.0.x? - Original Message - From: Cedric Dumoulin [EMAIL PROTECTED] To: Struts Users Mailing List [EMAIL PROTECTED] Sent: Monday, July 22, 2002 5:58 PM Subject: Re: Tiles + ActionForm.validation - problem ! What is the date of your tilesForStruts1.0.jar ? It looks like the ActionComponentServlet chocks on a new call to getMultipartRequestHandler(...), which has been added in Struts1.1 Slava_L wrote: Nobody meets this problem ? - Original Message - From: Slava_L [EMAIL PROTECTED] To: Struts Users Mailing List [EMAIL PROTECTED] Sent: Friday, July 19, 2002 7:08 PM Subject: Tiles + ActionForm.validation - problem ! Hi, list I'm very new to Tiles and when i tried to bind this cool stuff to my previously designed app, i met a problem with validation. I'm usin' Struts 1.0.2 stable ver. + tilesForStruts1.0.jar (external tiles lib). I need my action to forward back to the same page, when any errors appeared in struts-config.xml i have an action: action path=/loadSomething type=mypackage.LoadSomethingAction name=someForm forward name=success path=somePage/forward /action to load source page and another action mapping action path=/saveSomething type=mypackage.SaveSomethingAction name=someForm scope=request validate=true input=somePage forward name=success path=index.jsp/forward /action for savin entered data in tiles-def.xml i have definition: definition name=somePage path=/template.jsp put name=content value=some_page.jsp / /definition where some_page.jsp contains an input form. When validation method returns not empty ActionErrors i recieve internal server error message like this one: java.lang.IllegalAccessError: try to access method org.apache.struts.action.ActionForm.getMultipartRequestHandler()Lorg/apache / struts/upload/MultipartRequestHandler; from class org.apache.struts.tiles.ActionComponentServlet at org.apache.struts.tiles.ActionComponentServlet.processValidate(ActionCompon e ntServlet.java:167) at org.apache.struts.action.ActionServlet.process(ActionServlet.java:1565) at org.apache.struts.action.ActionServlet.doPost(ActionServlet.java:510) at javax.servlet.http.HttpServlet.service(HttpServlet.java:211) at javax.servlet.http.HttpServlet.service(HttpServlet.java:309) at javax.servlet.http.HttpServlet.service(HttpServlet.java:336) the question is How am i suppose to describe error page in action mapping ? input ? or somehow else . Help needed! (thanx a lot) -- 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]
Custom tag for If condition
Hi , Do we have any equivalent custom tag for IF.statement -Hari -- To unsubscribe, e-mail: mailto:[EMAIL PROTECTED] For additional commands, e-mail: mailto:[EMAIL PROTECTED]
examples
are there any good examples for forms with tabular data, sort of like an invoice containing a list of items...how do you do this using struts? -- To unsubscribe, e-mail: mailto:[EMAIL PROTECTED] For additional commands, e-mail: mailto:[EMAIL PROTECTED]
problem with ActionForm object
Hi, I have a simple form on my jsp page. In my ActionForm class I validate whether a checkbox was clicked or not. If the checkbox was not clicked an error is returned and displayed on the same jsp-page. This works fine but: Some (not all!) of the properties which were given by the user are not available on the error page. Furthermore, before I first show the jsp-form I get some information from a database which is then stored in the ActionForm bean and therefore displayed in a selectbox. After submitting the form and after validation this information is not available on the error jsp-page. It seems that the ActionForm object was destroyed too early. Does anyone have any ideas about this problem? Thanks - Thomas [EMAIL PROTECTED]
Re: problem with ActionForm object
Your ActionForm contains all accessors to the fields of html form ? For exemple, if you have a text field name things, you must have a attributes String things in your ActionForm. Do you use the tag html:form or directly the html form tag ? -- Jean-Baptiste Onofré (Nanthrax) Membre fondateur de phpFR.org http://www.phpfr.org [EMAIL PROTECTED] Membre fondateur du LUG Béziers http://lug-beziers.org [EMAIL PROTECTED] -- To unsubscribe, e-mail: mailto:[EMAIL PROTECTED] For additional commands, e-mail: mailto:[EMAIL PROTECTED]
Re: problem with ActionForm object
This is the select box tag on the jsp page: html:select property=ewrStaaten html:options property=ewrStaatenValue labelProperty=ewrStaatenLabel/ /html:select These are the getter and setter methods in the ActionForm class: public String getEwrStaaten() { return (ewrStaaten); } public void setEwrStaaten(String ewrStaaten) { this.ewrStaaten = ewrStaaten; } public Vector getEwrStaatenLabel() { return (ewrStaatenLabel); } public void setEwrStaatenLabel(Vector ewrStaatenLabel) { this.ewrStaatenLabel = ewrStaatenLabel; } public Vector getEwrStaatenValue() { return (ewrStaatenValue); } public void setEwrStaatenValue(Vector ewrStaatenValue) { this.ewrStaatenValue = ewrStaatenValue; } These things work fine because on when the jsp page is first requested the select box properties are displayed. But the second time this page is displayed (after validate() - when the error occurs!) the property Vector ewrStaatenLabel is not displayed and obviously not available in the ActionForm object. -Thomas [EMAIL PROTECTED] - Original Message - From: Jean-Baptiste Onofré [EMAIL PROTECTED] To: Struts Users Mailing List [EMAIL PROTECTED] Sent: Tuesday, July 23, 2002 2:15 PM Subject: Re: problem with ActionForm object Your ActionForm contains all accessors to the fields of html form ? For exemple, if you have a text field name things, you must have a attributes String things in your ActionForm. Do you use the tag html:form or directly the html form tag ? -- Jean-Baptiste Onofré (Nanthrax) Membre fondateur de phpFR.org http://www.phpfr.org [EMAIL PROTECTED] Membre fondateur du LUG Béziers http://lug-beziers.org [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: Code generation
I have been thinking about building such a tool. Based on the schema the tool would start out by creating all the beans (ActionForms), actions, and basic views such as view all objects and add/edit forms. Once this is done, then customization based on the generated actions and views. I have looked at some of the code generators available on the resources page on the apache struts site and some people tend to be going in the direction of XSLT. This seems like a good approach because you can easily update the XSL stylesheet to reflect build releases, etc. Are there other projects that are not listed on the struts resource page that generate code? Im also interested in the communities thoughts on such a tool and solutions other than XSLT for code generation. Shane Elderclei R Reami [EMAIL PROTECTED] Mon, 22 Jul 2002 16:50:36 I'd like to know if there's any tool out there to generate a Struts application, including view and model, based on database schema. Just wondering: I can see how tooling might generate a model (one or more Beans) from your schema. But how would tooling be able to know what view you want to provide, just from your schema? -- 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: Out of Office Response: RE: Can I read internationalized messages in Action classes ?
Actually, Jesus said much stronger words than that when addressing the Pharasees, so Would someone mind removing this idiot? doesn't shatter my fragile sensibilities. (In my spare time I'm the reserve Preacher at the church I attend. :-) Simon - Simon P. Chappell [EMAIL PROTECTED] Java Programming Specialist www.landsend.com Lands' End, Inc. (608) 935-4526 -Original Message- From: Barry Glasco [mailto:[EMAIL PROTECTED]] Sent: Monday, July 22, 2002 7:36 PM To: [EMAIL PROTECTED]; [EMAIL PROTECTED] Cc: Struts Users Mailing List Subject: RE: Out of Office Response: RE: Can I read internationalized messages in Action classes ? Kind of strong language for a self proclaimed evangelist... what would jesus Say? -- Original Message -- From: James Mitchell [EMAIL PROTECTED] Reply-To: [EMAIL PROTECTED] Date: Mon, 22 Jul 2002 11:57:35 -0400 Would someone mind removing this idiot? James Mitchell Software Engineer\Struts Evangelist Struts-Atlanta, the Open Minded Developer Network http://www.open-tools.org/struts-atlanta -Original Message- From: [EMAIL PROTECTED] [mailto:[EMAIL PROTECTED]] Sent: Monday, July 22, 2002 10:59 AM To: [EMAIL PROTECTED] Subject: Out of Office Response: RE: Can I read internationalized messages in Action classes ? Giles Hinchliff will be away on Monday July 22, 2002 -- To unsubscribe, e-mail: mailto:struts-user-[EMAIL PROTECTED] For additional commands, e-mail: mailto:[EMAIL PROTECTED] -- To unsubscribe, e-mail: mailto:struts-user-[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: Code generation
Adalon from Synthis is an excellent tool for generating code from a business requirements perspective. http://www.synthis.com/ Not exactly what you're looking for, but thought I'd throw it out there. -james [EMAIL PROTECTED] http://www.jamesholmes.com/struts/ --- Shane Witbeck [EMAIL PROTECTED] wrote: I have been thinking about building such a tool. Based on the schema the tool would start out by creating all the beans (ActionForms), actions, and basic views such as view all objects and add/edit forms. Once this is done, then customization based on the generated actions and views. I have looked at some of the code generators available on the resources page on the apache struts site and some people tend to be going in the direction of XSLT. This seems like a good approach because you can easily update the XSL stylesheet to reflect build releases, etc. Are there other projects that are not listed on the struts resource page that generate code? Im also interested in the communities thoughts on such a tool and solutions other than XSLT for code generation. Shane Elderclei R Reami [EMAIL PROTECTED] Mon, 22 Jul 2002 16:50:36 I'd like to know if there's any tool out there to generate a Struts application, including view and model, based on database schema. Just wondering: I can see how tooling might generate a model (one or more Beans) from your schema. But how would tooling be able to know what view you want to provide, just from your schema? -- 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] __ Do You Yahoo!? Yahoo! Health - Feel better, live better http://health.yahoo.com -- To unsubscribe, e-mail: mailto:[EMAIL PROTECTED] For additional commands, e-mail: mailto:[EMAIL PROTECTED]
RE: Out of Office Response: RE: Can I read internationalized messages in Action classes ?
I made him say it. -Original Message- From: Barry Glasco [mailto:[EMAIL PROTECTED]] Sent: Monday, July 22, 2002 8:36 PM Kind of strong language for a self proclaimed evangelist... what would jesus Say? -- Original Message -- From: James Mitchell [EMAIL PROTECTED] Date: Mon, 22 Jul 2002 11:57:35 -0400 Would someone mind removing this idiot? James Mitchell -Original Message- From: [EMAIL PROTECTED] [mailto:[EMAIL PROTECTED]] Sent: Monday, July 22, 2002 10:59 AM Giles Hinchliff will be away on Monday July 22, 2002 -- To unsubscribe, e-mail: mailto:[EMAIL PROTECTED] For additional commands, e-mail: mailto:[EMAIL PROTECTED]
Re: Custom tag for If condition
It is the Struts taglib logic Later... Harinath wrote: Hi , Do we have any equivalent custom tag for IF.statement -Hari -- 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]
Design Advice: Using DispatchAction
I'll try to keep this as short as possible. Background: I have various groupings of common events in my web app where I would like each grouping of common events handled by a single Action class. The DispatchAction class allows me to do this. I want to do this because in my scenario, the Action classes are simple proxies to my business tier and are not reusable and I would like to keep the number of Action classes I have to create to a minimum. Problem: The problem I am running into is that pre-processing requirements vary within the common event groupings. For example, let's say eventGroupA handles events 1, 2, 3, and 4. Events 3 and 4 require that the user be logged in before any processing occurs, but events 1 and 2 don't. An idea: Assertions What if there was a way to declaratively define an ordered list of assertions that must be true before any processing occurs for an action mapping. Assertions would be processed in the order in which they appear in the action mapping and would return an ActionForward only if it failed else it would return null indicating that the assertion passed and to continue processing. Any errors or messages would be revealed to the user via ActionErrors or ActionMessages stored in the appropriate scope. An Assertion would have access to the action mapping so it could leverage lookups for locally or globally defined forwards. An Assertion would implement a Command pattern and have a single method assert() into which the RequestProcessor would be passed the ActionForm, ActionMapping, HttpServletRequest, and HttpServletResponse. Basically the same arguments as Action.execute(). Example struts-config with assertions: assertions assertion name=authenticated type=com.company.web.assertion.SomeAssertion/ assertion name=isAdministrator type=com.company.web.assertion.AnotherAssertion/ /assertions action path=/user/account/create type=com.company.web.account.UserAccountController name=userAccountForm scope=request validate=true input=/WEB-INF/user/account/create.jsp parameter=create assert name=authenticated/ assert name=isAdministrator/ forward name=success path=/WEB-INF/user/account/detail.jsp/ forward name=failure path=/WEB-INF/user/account/error.jsp/ /action Example of Assertion.assert(): public ActionForward assert(ActionMapping mapping, ActionForm form, HttpServletRequest request, HttpServletResponse response) throws Exception; This solution seems to fit my needs, but I'm interested in any feed back on it. Good or bad. Does it suck? Is there a better way to accomplish my goal? Am I way off track? Am I close? Am I making things too complex? Is this idea kludgy? robert -- To unsubscribe, e-mail: mailto:[EMAIL PROTECTED] For additional commands, e-mail: mailto:[EMAIL PROTECTED]
RE: Custom tag for If condition
Take a look at most of the logic tags: http://jakarta.apache.org/struts/struts-logic.html Mark -Original Message- From: Harinath [mailto:[EMAIL PROTECTED]] Sent: Tuesday, July 23, 2002 6:13 AM To: struts Subject: Custom tag for If condition Hi , Do we have any equivalent custom tag for IF.statement -Hari -- 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: examples
Check out the logic:iterate tag: http://jakarta.apache.org/struts/struts-logic.html Mark -Original Message- From: Michael Luy [mailto:[EMAIL PROTECTED]] Sent: Tuesday, July 23, 2002 6:37 AM are there any good examples for forms with tabular data, sort of like an invoice containing a list of items...how do you do this using struts? -- To unsubscribe, e-mail: mailto:[EMAIL PROTECTED] For additional commands, e-mail: mailto:[EMAIL PROTECTED]
Re: Code generation
I have done some code generation to support the work I am doing. I have found that using XSLT and XML files is a good way to go. It is very flexible and easily expandable. Also, I plan to eventually map the XML structure to/from Java objects (which is easily done using Digester or Castor or JAXB) and generate an application that allows the user to define the XML files. Ultimately, you end up with an application that builds itself. bob - Original Message - From: Shane Witbeck [EMAIL PROTECTED] To: [EMAIL PROTECTED] Sent: Tuesday, July 23, 2002 8:11 AM Subject: Re: Code generation I have been thinking about building such a tool. Based on the schema the tool would start out by creating all the beans (ActionForms), actions, and basic views such as view all objects and add/edit forms. Once this is done, then customization based on the generated actions and views. I have looked at some of the code generators available on the resources page on the apache struts site and some people tend to be going in the direction of XSLT. This seems like a good approach because you can easily update the XSL stylesheet to reflect build releases, etc. Are there other projects that are not listed on the struts resource page that generate code? Im also interested in the communities thoughts on such a tool and solutions other than XSLT for code generation. Shane Elderclei R Reami [EMAIL PROTECTED] Mon, 22 Jul 2002 16:50:36 I'd like to know if there's any tool out there to generate a Struts application, including view and model, based on database schema. Just wondering: I can see how tooling might generate a model (one or more Beans) from your schema. But how would tooling be able to know what view you want to provide, just from your schema? -- 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: Code generation
Wow. Now if we could only do that with beer! -Original Message- From: Robert Williams [mailto:[EMAIL PROTECTED]] Sent: Tuesday, July 23, 2002 9:59 AM Ultimately, you end up with an application that builds itself. bob -- To unsubscribe, e-mail: mailto:[EMAIL PROTECTED] For additional commands, e-mail: mailto:[EMAIL PROTECTED]
RE: Code generation
I feel I rebuild myself every time I really drink beer or I drink real beer. Belgian one, of course (that's joke). -Original Message- From: Galbreath, Mark [mailto:[EMAIL PROTECTED]] Sent: 23 July 2002 16:00 To: 'Struts Users Mailing List' Subject: RE: Code generation Wow. Now if we could only do that with beer! -Original Message- From: Robert Williams [mailto:[EMAIL PROTECTED]] Sent: Tuesday, July 23, 2002 9:59 AM Ultimately, you end up with an application that builds itself. bob -- To unsubscribe, e-mail: mailto:[EMAIL PROTECTED] For additional commands, e-mail: mailto:[EMAIL PROTECTED] DISCLAIMER This e-mail and any attachments thereto may contain information which is confidential and/or protected by intellectual property rights and are intended for the sole use of the recipient(s) named above. Any use of the information contained herein (including, but not limited to, total or partial reproduction, communication or distribution in any form) by persons other than the designated recipient(s) is prohibited. If you have received this e-mail in error, please notify the sender either by telephone or by e-mail and delete the material from any computer. Thank you for your cooperation. -- To unsubscribe, e-mail: mailto:[EMAIL PROTECTED] For additional commands, e-mail: mailto:[EMAIL PROTECTED]
RE: Design Advice: Using DispatchAction
You don't need to use the DispatchAction for this. Call the isLoggedIn method whenever you need it. And make sure to have the actionName property on your form. if (!isLoggedIn(request)) { return new ActionForward(Constants.GLOBAL_FORWARD_LOGON, true); } ApplicationForm applicationForm = (ApplicationForm) form; String action = applicationForm.getActionName(); if (action.equals(userContainer.getMessage(Constants.BUTTON_CANCEL))) { doAdd(mapping, applicationForm, request, response, userContainer); } else if (action.equals(userContainer.getMessage(Constants.BUTTON_ADD))) { doAdd(mapping, applicationForm, request, response, userContainer); } else if (action.equals(userContainer.getMessage(Constants.BUTTON_SAVE))) { doSave(mapping, applicationForm, request, response, userContainer); } else if (action.equals(userContainer.getMessage(Constants.BUTTON_EDIT)) || action.equals(userContainer.getMessage(Constants.BUTTON_REMOVE))) { doEdit(mapping, applicationForm, request, response, userContainer); } else if (action.equals(userContainer.getMessage(Constants.BUTTON_UPDATE))) { doUpdate(mapping, applicationForm, request, response, userContainer); } else if (action.equals(userContainer.getMessage(Constants.BUTTON_DELETE))) { doDelete(mapping, applicationForm, request, response, userContainer); } return (new ActionForward(mapping.getInput())); } -Original Message- From: Robert Taylor [mailto:[EMAIL PROTECTED]] Sent: Tuesday, July 23, 2002 8:46 AM To: [EMAIL PROTECTED] Subject: Design Advice: Using DispatchAction I'll try to keep this as short as possible. Background: I have various groupings of common events in my web app where I would like each grouping of common events handled by a single Action class. The DispatchAction class allows me to do this. I want to do this because in my scenario, the Action classes are simple proxies to my business tier and are not reusable and I would like to keep the number of Action classes I have to create to a minimum. Problem: The problem I am running into is that pre-processing requirements vary within the common event groupings. For example, let's say eventGroupA handles events 1, 2, 3, and 4. Events 3 and 4 require that the user be logged in before any processing occurs, but events 1 and 2 don't. An idea: Assertions What if there was a way to declaratively define an ordered list of assertions that must be true before any processing occurs for an action mapping. Assertions would be processed in the order in which they appear in the action mapping and would return an ActionForward only if it failed else it would return null indicating that the assertion passed and to continue processing. Any errors or messages would be revealed to the user via ActionErrors or ActionMessages stored in the appropriate scope. An Assertion would have access to the action mapping so it could leverage lookups for locally or globally defined forwards. An Assertion would implement a Command pattern and have a single method assert() into which the RequestProcessor would be passed the ActionForm, ActionMapping, HttpServletRequest, and HttpServletResponse. Basically the same arguments as Action.execute(). Example struts-config with assertions: assertions assertion name=authenticated type=com.company.web.assertion.SomeAssertion/ assertion name=isAdministrator type=com.company.web.assertion.AnotherAssertion/ /assertions action path=/user/account/create type=com.company.web.account.UserAccountController name=userAccountForm scope=request validate=true input=/WEB-INF/user/account/create.jsp parameter=create assert name=authenticated/ assert name=isAdministrator/ forward name=success path=/WEB-INF/user/account/detail.jsp/ forward name=failure path=/WEB-INF/user/account/error.jsp/ /action Example of Assertion.assert(): public ActionForward assert(ActionMapping mapping, ActionForm form, HttpServletRequest request, HttpServletResponse response) throws Exception; This solution seems to fit my needs, but I'm interested in any feed back on it. Good or bad. Does it suck? Is there a better way to accomplish my goal? Am I way off track? Am I close? Am I making things too complex? Is this idea kludgy? robert -- 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: Custom tag for If condition
Title: RE: Custom tag for If condition I have some code that I haven't tried, you can use it. -Original Message- From: Galbreath, Mark [mailto:[EMAIL PROTECTED]] Sent: Tuesday, July 23, 2002 4:50 PM To: 'Struts Users Mailing List' Subject: RE: Custom tag for If condition Take a look at most of the logic tags: http://jakarta.apache.org/struts/struts-logic.html Mark -Original Message- From: Harinath [mailto:[EMAIL PROTECTED]] Sent: Tuesday, July 23, 2002 6:13 AM To: struts Subject: Custom tag for If condition Hi , Do we have any equivalent custom tag for IF.statement -Hari -- 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-niallp.zip Description: Binary data -- To unsubscribe, e-mail: mailto:[EMAIL PROTECTED] For additional commands, e-mail: mailto:[EMAIL PROTECTED]
Re: Code generation
I think that have tried that and they ended up with Red Stripe! I hope my venture is successful. :-) bob - Original Message - From: Galbreath, Mark [EMAIL PROTECTED] To: 'Struts Users Mailing List' [EMAIL PROTECTED] Sent: Tuesday, July 23, 2002 8:59 AM Subject: RE: Code generation Wow. Now if we could only do that with beer! -Original Message- From: Robert Williams [mailto:[EMAIL PROTECTED]] Sent: Tuesday, July 23, 2002 9:59 AM Ultimately, you end up with an application that builds itself. bob -- 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]
struts book
Is chapter 8 of the O'Reilly struts book not going to be up for review? Jose Casas E-Commerce Applications (501) 277-3112 [EMAIL PROTECTED] ** Notice: The area code for the Wal-Mart Bentonville General Office in the US has changed from 501 to 479. Please make sure that you are dialing 479 when making calls to any General Office location. ** This email and any files transmitted with it are confidential and intended solely for the individual or entity to whom they are addressed. If you have received this email in error destroy it immediately. ** Wal-Mart Stores, Inc. Confidential ** -- To unsubscribe, e-mail: mailto:[EMAIL PROTECTED] For additional commands, e-mail: mailto:[EMAIL PROTECTED]
RE: Design Advice: Using DispatchAction
Hai, thanks for your response. 1. The login example was just that, an example. My problem extends beyond the simple example. 2. DispatchAction is used to solve the spagetti type logic exemplified by your example below. 3. This does not solve my problem of needing to apply certain constraints to certain events handled by a single DispatchAction. robert -Original Message- From: Hoang, Hai [mailto:[EMAIL PROTECTED]] Sent: Tuesday, July 23, 2002 10:07 AM To: 'Struts Users Mailing List' Subject: RE: Design Advice: Using DispatchAction You don't need to use the DispatchAction for this. Call the isLoggedIn method whenever you need it. And make sure to have the actionName property on your form. if (!isLoggedIn(request)) { return new ActionForward(Constants.GLOBAL_FORWARD_LOGON, true); } ApplicationForm applicationForm = (ApplicationForm) form; String action = applicationForm.getActionName(); if (action.equals(userContainer.getMessage(Constants.BUTTON_CANCEL))) { doAdd(mapping, applicationForm, request, response, userContainer); } else if (action.equals(userContainer.getMessage(Constants.BUTTON_ADD))) { doAdd(mapping, applicationForm, request, response, userContainer); } else if (action.equals(userContainer.getMessage(Constants.BUTTON_SAVE))) { doSave(mapping, applicationForm, request, response, userContainer); } else if (action.equals(userContainer.getMessage(Constants.BUTTON_EDIT)) || action.equals(userContainer.getMessage(Constants.BUTTON_REMOVE))) { doEdit(mapping, applicationForm, request, response, userContainer); } else if (action.equals(userContainer.getMessage(Constants.BUTTON_UPDATE))) { doUpdate(mapping, applicationForm, request, response, userContainer); } else if (action.equals(userContainer.getMessage(Constants.BUTTON_DELETE))) { doDelete(mapping, applicationForm, request, response, userContainer); } return (new ActionForward(mapping.getInput())); } -Original Message- From: Robert Taylor [mailto:[EMAIL PROTECTED]] Sent: Tuesday, July 23, 2002 8:46 AM To: [EMAIL PROTECTED] Subject: Design Advice: Using DispatchAction I'll try to keep this as short as possible. Background: I have various groupings of common events in my web app where I would like each grouping of common events handled by a single Action class. The DispatchAction class allows me to do this. I want to do this because in my scenario, the Action classes are simple proxies to my business tier and are not reusable and I would like to keep the number of Action classes I have to create to a minimum. Problem: The problem I am running into is that pre-processing requirements vary within the common event groupings. For example, let's say eventGroupA handles events 1, 2, 3, and 4. Events 3 and 4 require that the user be logged in before any processing occurs, but events 1 and 2 don't. An idea: Assertions What if there was a way to declaratively define an ordered list of assertions that must be true before any processing occurs for an action mapping. Assertions would be processed in the order in which they appear in the action mapping and would return an ActionForward only if it failed else it would return null indicating that the assertion passed and to continue processing. Any errors or messages would be revealed to the user via ActionErrors or ActionMessages stored in the appropriate scope. An Assertion would have access to the action mapping so it could leverage lookups for locally or globally defined forwards. An Assertion would implement a Command pattern and have a single method assert() into which the RequestProcessor would be passed the ActionForm, ActionMapping, HttpServletRequest, and HttpServletResponse. Basically the same arguments as Action.execute(). Example struts-config with assertions: assertions assertion name=authenticated type=com.company.web.assertion.SomeAssertion/ assertion name=isAdministrator type=com.company.web.assertion.AnotherAssertion/ /assertions action path=/user/account/create type=com.company.web.account.UserAccountController name=userAccountForm scope=request validate=true input=/WEB-INF/user/account/create.jsp parameter=create assert name=authenticated/ assert name=isAdministrator/ forward name=success path=/WEB-INF/user/account/detail.jsp/ forward name=failure path=/WEB-INF/user/account/error.jsp/ /action Example of Assertion.assert(): public ActionForward assert(ActionMapping mapping, ActionForm form, HttpServletRequest request, HttpServletResponse response) throws Exception; This solution seems to fit my needs, but I'm interested in any feed back on it. Good or bad. Does it suck? Is there a better way to accomplish my goal? Am I way off track? Am I close? Am I making things too complex? Is this idea kludgy? robert -- To unsubscribe,
question about lists...
I'd like to know if having a bean (that holds a collection to populate a options list), I can hold this collection in form bean and still using options struts tag. -- Emerson Cargnin - MSA SICREDI - Tel : 3358-4860 -- To unsubscribe, e-mail: mailto:[EMAIL PROTECTED] For additional commands, e-mail: mailto:[EMAIL PROTECTED]
sort of off topic validation in console window
What do I need to configure, add or whatever to keep Tomcat from displaying all my validation rules information in the console window when it loads up? It really slows things down. Thanks so much -- Rick mailto:[EMAIL PROTECTED] -- To unsubscribe, e-mail: mailto:[EMAIL PROTECTED] For additional commands, e-mail: mailto:[EMAIL PROTECTED]
Re: Wrapping Collections in LazyList to auto-populate form on Submit
Hemant, Sorry about the issues you're having, but at face value it seems that you're almost trying too hard. Without seeing the rest of your code, it's hard to see what your generateWrappedCollection() method is trying to acheive, so I'll try to answer with code... With the collection wrapping, it's a simple one liner in the bean. For example, in all my monkey examples, they all return the collection as the indexed property type (because it's a valid indexed getter and the iterate tags can use the collection to get their thing going). All you need to do is wrap that collection directly. For example, two complete beans... public class MonkeyBean { public List getBananas() { return bananas; } private List bananas = LazyCollections.lazyList(new ArrayList(), BananaBean.class); } public class BananaBean { public String getFlavour() { return flav; } public void setFlavour(String str) { flav = str; } private String flav; } The MonkeyBean is the parent class that hold the collection. It has immediately wrapped the ArrayList in the LazyCollection, and passed it the class of the BananaBean object. You may want to keep a reference to the wrapped ArrayList, generally I don't have the need to. These classes are all but ready to rock. In the action class, query the database or whatever and populate the MonkeyBean with the BananaBean data. Serve the result to the JSP. JSP write out a list of text boxes using iterate tags. Submit this, and after the monkeybean is built, the lazy collection will grow the banana list with banana beans as the indexed requests come in. When it gets back to your action class, you'll have your collection of banana beans. Hope this helps, you know where we are if it doesn't. Arron. On Mon, 2002-07-22 at 22:59, hemant wrote: Comrades, Objective: To autopopulate forms on submit. The formbean has a collection of collections of ValueObjects. Each valueObject contains a pair of other Value Objects. Before people beat me up, The following possibilities have been dealt with: 1 No, this is not a case of reset() I have the collections initialized and things are fine. 2 It is not a case of bean being in request scope. By default the bean is in session scope (Unless we explicitly mention the action attribute that it is request scope.) [ ...cut...] I am about to give up on form auto populate as I am out of time. I will be populating them by hand but anyway... one last attempt. We dont like to lose... do we? Thanks In Advance hemant -- To unsubscribe, e-mail: mailto:[EMAIL PROTECTED] For additional commands, e-mail: mailto:[EMAIL PROTECTED]
RE: question about lists...
Yes. Try it. Mark -Original Message- From: Emerson Cargnin - SICREDI Serviços [mailto:[EMAIL PROTECTED]] Sent: Tuesday, July 23, 2002 10:23 AM I'd like to know if having a bean (that holds a collection to populate a options list), I can hold this collection in form bean and still using options struts tag. -- Emerson Cargnin - MSA -- To unsubscribe, e-mail: mailto:[EMAIL PROTECTED] For additional commands, e-mail: mailto:[EMAIL PROTECTED]
RE: sort of off topic validation in console window
Just a guess Rick, but I would imagine that Struts Validator uses Digester to read the rules from the appropriate xml file and convert them into in-memory objects. Have you set Digester logging to -1. I could be way off base though. robert -Original Message- From: Rick Reumann [mailto:[EMAIL PROTECTED]] Sent: Tuesday, July 23, 2002 10:21 AM To: Struts List Subject: sort of off topic validation in console window What do I need to configure, add or whatever to keep Tomcat from displaying all my validation rules information in the console window when it loads up? It really slows things down. Thanks so much -- Rick 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[2]: sort of off topic validation in console window
On Tuesday, July 23, 2002, 10:36:14 AM, Robert wrote: RT Just a guess Rick, but I would imagine that Struts Validator uses RT Digester to read the rules from the appropriate xml file and RT convert them into in-memory objects. Have you set Digester logging RT to -1. I could be way off base though. Sorry for my ignorance here, but where is that donesetting the Digester logging to -1 ? Thanks again Robert. -- Rick mailto:[EMAIL PROTECTED] -- To unsubscribe, e-mail: mailto:[EMAIL PROTECTED] For additional commands, e-mail: mailto:[EMAIL PROTECTED]
Re: question about lists...
ok, but in the struts doc, it says : * The collection attribute is interpreted as the name of a JSP bean, in some scope, that itself represents a collection of individual beans, one per option value to be rendered. how do I do to reference the collection inside the formBean from inside options tag (or do I have to use iterate)?? Galbreath, Mark wrote: Yes. Try it. Mark -Original Message- From: Emerson Cargnin - SICREDI Serviços [mailto:[EMAIL PROTECTED]] Sent: Tuesday, July 23, 2002 10:23 AM I'd like to know if having a bean (that holds a collection to populate a options list), I can hold this collection in form bean and still using options struts tag. -- Emerson Cargnin - MSA SICREDI - Tel : 3358-4860 -- To unsubscribe, e-mail: mailto:[EMAIL PROTECTED] For additional commands, e-mail: mailto:[EMAIL PROTECTED]
Re: struts book
It's not going to be available for review, but it will be in the book. I'm still rewriting this very moment :) chuck At 09:14 AM 7/23/2002 -0500, you wrote: Is chapter 8 of the O'Reilly struts book not going to be up for review? Jose Casas E-Commerce Applications (501) 277-3112 [EMAIL PROTECTED] ** Notice: The area code for the Wal-Mart Bentonville General Office in the US has changed from 501 to 479. Please make sure that you are dialing 479 when making calls to any General Office location. ** This email and any files transmitted with it are confidential and intended solely for the individual or entity to whom they are addressed. If you have received this email in error destroy it immediately. ** Wal-Mart Stores, Inc. Confidential ** -- 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: Latency Problem
If you aren't accustomed to using JSP in your application, the initial latency (that you say occurs the first time then is OK) would occur as the web container compiles the JSP into a servlet. If you were using JSP's in your application even prior to Struts, then it may just be a need to set the page to pre-compile in the new project. -Arian -Original Message- From: Galbreath, Mark [SMTP:[EMAIL PROTECTED]] Sent: Tuesday, July 23, 2002 8:46 AM To: 'Struts Users Mailing List' Subject: RE: Latency Problem Write better code and use caches. It's not Struts that's causing the problem - it's just a framework. The problem lies in your code and/or your application server. Mark -Original Message- From: Sudhir [mailto:[EMAIL PROTECTED]] Sent: Tuesday, July 23, 2002 4:16 AM I feel Struts has got latency problem. Recently i have started using struts. Before that the system is very fast. But now the system became very slow for the first time. Later it is ok. Can anybody tell me how can I fix this latency. -- 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]
Web Browsers and Browser Indepedent HTML
I am considering using Struts for a project and I need to know what browsers will Struts work on (for example, IE version 5, Netscape version 6, etc) and if the HTML tags used in the JSP pages are browser-independent? _ Chat with friends online, try MSN Messenger: http://messenger.msn.com -- To unsubscribe, e-mail: mailto:[EMAIL PROTECTED] For additional commands, e-mail: mailto:[EMAIL PROTECTED]
Re: struts console bug?
I just wanted to say that this bug went away after I installed struts console 2.0. Which works great so far. Thanks. James Holmes wrote: Vincent, We can take this offline and I'll help you debug what's going on and see if there's a bug in Struts Console. What version of Struts Console are you using? Can you send me the config file and the steps to recreate the problem? Please email me back directly and not the list. Thanks, -james [EMAIL PROTECTED] http://www.jamesholmes.com/struts/ --- Vincent Stoessel [EMAIL PROTECTED] wrote: I am using struts console in forte 4 java 4 CE and whenever I try to close the struts console window. sine I can't kill the window, struts-console begins with forte at startup. Throwing same error on the opening and closing of forte. the exception: *** Exception occurred Tue Jun 25 16:26:53 EDT 2002: java.lang.NullPointerException: no message java.lang.NullPointerException at org.apache.struts.console.adapters.netbeans.StrutsConsolePanel.closeLast(StrutsConsolePanel.java:136) at org.openide.windows.CloneableTopComponent$Ref.unregister(CloneableTopComponent.java:286) at org.openide.windows.CloneableTopComponent.canClose(CloneableTopComponent.java:143) at org.openide.windows.TopComponent.close(TopComponent.java:263) at org.openide.windows.TopComponent.close(TopComponent.java:243) at org.netbeans.core.windows.frames.DefaultContainerImpl.doPerformAction(DefaultContainerImpl.java:445) at org.netbeans.core.windows.frames.DefaultContainerImpl.access$000(DefaultContainerImpl.java:76) at org.netbeans.core.windows.frames.DefaultContainerImpl$1.run(DefaultContainerImpl.java:431) at java.awt.event.InvocationEvent.dispatch(InvocationEvent.java:178) at java.awt.EventQueue.dispatchEvent(EventQueue.java:443) [catch] at java.awt.EventDispatchThread.pumpOneEventForHierarchy(EventDispatchThread.java:190) at java.awt.EventDispatchThread.pumpEventsForHierarchy(EventDispatchThread.java:144) at java.awt.EventDispatchThread.pumpEvents(EventDispatchThread.java:138) at java.awt.EventDispatchThread.pumpEvents(EventDispatchThread.java:130) at java.awt.EventDispatchThread.run(EventDispatchThread.java:98) any clue as to what is going on? My strings: Product Version = Forte for Java 4, Community Edition (Build 020521) IDE Versioning= IDE/1 spec=1.43.3 impl=020521 Operating System = Linux version 2.4.7-10 running on i386 Java; VM; Vendor = 1.4.0; Java HotSpot(TM) Client VM 1.4.0-b92; Sun Microsystems Inc. Java Home = /usr/j2sdk1.4.0/jre System Locale; Encod. = en_US; ISO-8859-1 (f4j_ce) -- Vincent Stoessel Linux Systems Developer vincent xaymaca.com -- To unsubscribe, e-mail: mailto:[EMAIL PROTECTED] For additional commands, e-mail: mailto:[EMAIL PROTECTED] __ Do You Yahoo!? Yahoo! - Official partner of 2002 FIFA World Cup http://fifaworldcup.yahoo.com -- To unsubscribe, e-mail: mailto:[EMAIL PROTECTED] For additional commands, e-mail: mailto:[EMAIL PROTECTED] -- Vincent Stoessel Linux Systems Developer vincent xaymaca.com smime.p7s Description: S/MIME Cryptographic Signature
Re: Web Browsers and Browser Indepedent HTML
Any browser should be fine. Struts is just the framework that is used to while building your servlets, JSP's, etc. The app I'm developing runs equally as well on either Internet Exploder, Netscape v6 and v4.x. Later... CB Thomas wrote: I am considering using Struts for a project and I need to know what browsers will Struts work on (for example, IE version 5, Netscape version 6, etc) and if the HTML tags used in the JSP pages are browser-independent? _ Chat with friends online, try MSN Messenger: http://messenger.msn.com -- 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: JSP Completion for Struts tags using NetBeans?
WebSphere Studio Application Developer 4.x does this very nicely. /mark -Original Message- From: Scott Linford [mailto:[EMAIL PROTECTED]] Sent: Monday, July 22, 2002 5:09 PM To: Struts Users Mailing List Subject: RE: JSP Completion for Struts tags using NetBeans? That works for .java coding but not for JSPs. I want to be able to type: bean:parameter and press Ctrl+Space and get a list of valid attributes. - Scott -Original Message- From: [EMAIL PROTECTED] [mailto:[EMAIL PROTECTED]] Sent: Monday, July 22, 2002 3:53 PM To: Struts Users Mailing List Subject: Re: JSP Completion for Struts tags using NetBeans? I have found that it works well. If you right click on the struts.jar and update the parser database it should do what you need. -- 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: question about lists...
use bean:define tag to place the collection in page scope. -Original Message- From: Emerson Cargnin - SICREDI Serviços [mailto:[EMAIL PROTECTED]] Sent: Tuesday, July 23, 2002 10:51 AM To: Struts Users Mailing List Subject: Re: question about lists... ok, but in the struts doc, it says : * The collection attribute is interpreted as the name of a JSP bean, in some scope, that itself represents a collection of individual beans, one per option value to be rendered. how do I do to reference the collection inside the formBean from inside options tag (or do I have to use iterate)?? Galbreath, Mark wrote: Yes. Try it. Mark -Original Message- From: Emerson Cargnin - SICREDI Serviços [mailto:[EMAIL PROTECTED]] Sent: Tuesday, July 23, 2002 10:23 AM I'd like to know if having a bean (that holds a collection to populate a options list), I can hold this collection in form bean and still using options struts tag. -- Emerson Cargnin - MSA SICREDI - Tel : 3358-4860 -- 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: Web Browsers and Browser Indepedent HTML
Struts is a server side framework so it will work with any browser. The Struts html: .../ tags generate standard HTML code. I'm not sure if it is 3.2 or 4.0. robert -Original Message- From: CB Thomas [mailto:[EMAIL PROTECTED]] Sent: Tuesday, July 23, 2002 11:10 AM To: [EMAIL PROTECTED] Subject: Web Browsers and Browser Indepedent HTML I am considering using Struts for a project and I need to know what browsers will Struts work on (for example, IE version 5, Netscape version 6, etc) and if the HTML tags used in the JSP pages are browser-independent? _ Chat with friends online, try MSN Messenger: http://messenger.msn.com -- 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: Web Browsers and Browser Indepedent HTML
On Tue, 23 Jul 2002, CB Thomas wrote: Date: Tue, 23 Jul 2002 10:10:20 -0500 From: CB Thomas [EMAIL PROTECTED] Reply-To: Struts Users Mailing List [EMAIL PROTECTED] To: [EMAIL PROTECTED] Subject: Web Browsers and Browser Indepedent HTML I am considering using Struts for a project and I need to know what browsers will Struts work on (for example, IE version 5, Netscape version 6, etc) and if the HTML tags used in the JSP pages are browser-independent? All of the HTML that is generated by standard Struts tags conforms to HTML/4.01. Whether any given browser supports HTML/4.01 correctly, fo course, is outside of Struts's control :-). Craig -- To unsubscribe, e-mail: mailto:[EMAIL PROTECTED] For additional commands, e-mail: mailto:[EMAIL PROTECTED]
Re: Design Advice: Using DispatchAction
Subject: Re: Design Advice: Using DispatchAction From: Vic C. [EMAIL PROTECTED] === Robert Taylor wrote: The problem I am running into is that pre-processing requirements vary within the common event groupings. For example, let's say eventGroupA handles events 1, 2, 3, and 4. Events 3 and 4 require that the user be logged in before any processing occurs, but events 1 and 2 don't. Hate to be a broken record http://jakarta.apache.org/tomcat/tomcat-4.1-doc/realm-howto.html#JDBCRealm Any container does it The web container does that for you already! Some should go to /do/* Some should go to /do/portected/* and then set up you web-xml *not struts* : security-constraint web-resource-collection web-resource-nameSecure/web-resource-name url-pattern/do/port/*/url-pattern /web-resource-collection auth-constraint role-nameguest/role-name role-nameenhanced/role-name role-namemanager/role-name /auth-constraint user-data-constraint descriptionSSL not required/description transport-guaranteeNONE/transport-guarantee /user-data-constraint /security-constraint login-config auth-methodBASIC/auth-method realm-namedefault/realm-name /login-config See some are portected. Here is a link on web.xml: http://edocs.bea.com/wls/docs61/webapp/web_xml.html Full working example (and a live online struts webex tutorial in a few days at you guessed it http://basicportal.sourceforge.net ). The example sometimes authoticates and sometimes it does not, and it passes the rediriect and parametars for you. See, already done in web.xml, and 0 code no matter how complex. Then if you want more you do servlet api, getuserpricipal, snipet: String authenUser = ae.getReq().getUserPrincipal().getName(); //security UserBean userBn = new UserBean(); userBn.find(authenUser); String userid = userBn.getId(); frm.setUserid(userid); Here is a link on servlet api http://java.sun.com/webservices/docs/ea2/api/ Some of these topics are a bit of a pre req for Struts, and one is JAAS: http://suned.sun.com/US/certification/java/exam_objectives.html#web hth, Vic ps: The struts example should not be login, one day... I'll try to keep this as short as possible. Background: I have various groupings of common events in my web app where I would like each grouping of common events handled by a single Action class. The DispatchAction class allows me to do this. I want to do this because in my scenario, the Action classes are simple proxies to my business tier and are not reusable and I would like to keep the number of Action classes I have to create to a minimum. Problem: The problem I am running into is that pre-processing requirements vary within the common event groupings. For example, let's say eventGroupA handles events 1, 2, 3, and 4. Events 3 and 4 require that the user be logged in before any processing occurs, but events 1 and 2 don't. An idea: Assertions What if there was a way to declaratively define an ordered list of assertions that must be true before any processing occurs for an action mapping. Assertions would be processed in the order in which they appear in the action mapping and would return an ActionForward only if it failed else it would return null indicating that the assertion passed and to continue processing. Any errors or messages would be revealed to the user via ActionErrors or ActionMessages stored in the appropriate scope. An Assertion would have access to the action mapping so it could leverage lookups for locally or globally defined forwards. An Assertion would implement a Command pattern and have a single method assert() into which the RequestProcessor would be passed the ActionForm, ActionMapping, HttpServletRequest, and HttpServletResponse. Basically the same arguments as Action.execute(). Example struts-config with assertions: assertions assertion name=authenticated type=com.company.web.assertion.SomeAssertion/ assertion name=isAdministrator type=com.company.web.assertion.AnotherAssertion/ /assertions action path=/user/account/create type=com.company.web.account.UserAccountController name=userAccountForm scope=request validate=true input=/WEB-INF/user/account/create.jsp parameter=create assert name=authenticated/ assert name=isAdministrator/ forward name=success path=/WEB-INF/user/account/detail.jsp/ forward name=failure path=/WEB-INF/user/account/error.jsp/ /action Example of Assertion.assert(): public ActionForward assert(ActionMapping mapping, ActionForm form, HttpServletRequest request, HttpServletResponse response) throws Exception; This solution seems to fit my needs, but I'm interested in any feed back on it. Good or bad. Does it suck? Is there a better
Re: how can I invoke a Tile Definition directly from the browser
There was a bug preventing the 'DefinitionDispatcherAction' to work in 1.1b1. It will be in 1.1b2. If you want to use it in 1.1b1, get 1.1b1 sources, replace class 'DefinitionDispatcherAction' with the latest version and recompile. The simplest solution is to use a nightly build ;-) Cedric [EMAIL PROTECTED] wrote: Just an extra question: I've tested the 'DefinitionDispatcherAction' using a nightly build, and it worked great. However I didn't manage to get it working in our project, which is using Struts 1.1b1 ... it just displays an empty page in the browser (if I provide no parameter, I get the message Definition dispatcher action: can't get parameter 'def'. Can't this feature be used in 1.1b1 ??? Will it be in the 1.1b2 release ? Thanks, Esther P.S. copying the jar files from the nightly build to our project, fixes it, but I'd feel more comfortable to be working from a beta than from a nightly build ;-) -Original Message- From: Esther Miranda Iglesias Sent: vrijdag 19 juli 2002 16:21 To: [EMAIL PROTECTED] Subject: RE: how can I invoke a Tile Definition directly from the browser I've tried the DefinitionDispatcherAction and it works beautifully ;-) Thanks, Esther -Original Message- From: Cedric Dumoulin [mailto:[EMAIL PROTECTED]] Sent: vrijdag 19 juli 2002 11:30 To: Struts Users Mailing List Subject: Re: how can I invoke a Tile Definition directly from the browser Hello, This is the way to go. Remember that Tiles definition's names are logical names. They can't be used directly as URL. You can also use a struts action taking the definition's name as request parameter. The action then insert the requested tiles. Such action already exist in Tiles sources (org.apache.struts.tiles.actions.DefinitionDispatcherAction.java) Cedric [EMAIL PROTECTED] wrote: Hi, How can I invoke a Tile Definition directly from the browser? This to minimize the number of JSP pages, and have them all defined in the xml config file. In Prakash Malani's article 'UI Design with Tiles and Struts' (http://www.javaworld.com/javaworld/jw-01-2002/jw-0104-tilest rut.html), based on Struts 1.0, is shown that you need to write a non operational Action Class, that does nothing but direct you to a mapping containing the Tile Definition. Is this still the way to go with Struts 1.1b1 ? Or are there better ways of doing this ? Where could I find more info on this ? Thanks in advance, Esther -- 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: Code generation
It might be rather difficult to post a beer on the mailing list. I suppose they could send screen-shots though :-P (Is it Friday already?!? LOL) Jano Fetyko wrote: Will you post to this list when you have some version ready to look at ? Or do you have it on the web somewhere ? J -Original Message- From: Robert Williams [mailto:[EMAIL PROTECTED]] Sent: Tue 23-Jul-02 9:11 AM To: Struts Users Mailing List Cc: Subject: Re: Code generation I think that have tried that and they ended up with Red Stripe! I hope my venture is successful. :-) bob - Original Message - From: Galbreath, Mark [EMAIL PROTECTED] To: 'Struts Users Mailing List' [EMAIL PROTECTED] Sent: Tuesday, July 23, 2002 8:59 AM Subject: RE: Code generation Wow. Now if we could only do that with beer! -- To unsubscribe, e-mail: mailto:[EMAIL PROTECTED] For additional commands, e-mail: mailto:[EMAIL PROTECTED]
XHTML compliant tags
Is there a way to get Struts to produce XHTML compliant tags? _ Join the worlds largest e-mail service with MSN Hotmail. http://www.hotmail.com -- To unsubscribe, e-mail: mailto:[EMAIL PROTECTED] For additional commands, e-mail: mailto:[EMAIL PROTECTED]
RE: Design Advice: Using DispatchAction
Vic, thanks for the response. I hate to be a broken record as well, but my problem does not just deal with authentication. It is more general than that. I used the authentication example because it is simple and common. Maybe I should have used another example because you are the second responder to assume that my problem only deals with authentication. It is more general than that. It deals with things that must be true, assertions, before any event processing occurs. The premise is that I am using DispatchAction as a central controller to process common HTTP events. Some events have different constraints than others but they still fall under the same event category. Because my DispatchAction processes all events in an event grouping or category, I need a way to plug-in logic modules to ensure all is well before processing of the event can occur. These pluggable modules are what I am referring to as Assertions. As for authentication, I will investigate more closely how to leverage JAAS in web containers. Thanks for examples and reference links. robert -Original Message- From: Struts Newsgroup [mailto:@[EMAIL PROTECTED]] Sent: Tuesday, July 23, 2002 11:40 AM To: [EMAIL PROTECTED] Subject: Re: Design Advice: Using DispatchAction Subject: Re: Design Advice: Using DispatchAction From: Vic C. [EMAIL PROTECTED] === Robert Taylor wrote: The problem I am running into is that pre-processing requirements vary within the common event groupings. For example, let's say eventGroupA handles events 1, 2, 3, and 4. Events 3 and 4 require that the user be logged in before any processing occurs, but events 1 and 2 don't. Hate to be a broken record http://jakarta.apache.org/tomcat/tomcat-4.1-doc/realm-howto.html#JDBCRealm Any container does it The web container does that for you already! Some should go to /do/* Some should go to /do/portected/* and then set up you web-xml *not struts* : security-constraint web-resource-collection web-resource-nameSecure/web-resource-name url-pattern/do/port/*/url-pattern /web-resource-collection auth-constraint role-nameguest/role-name role-nameenhanced/role-name role-namemanager/role-name /auth-constraint user-data-constraint descriptionSSL not required/description transport-guaranteeNONE/transport-guarantee /user-data-constraint /security-constraint login-config auth-methodBASIC/auth-method realm-namedefault/realm-name /login-config See some are portected. Here is a link on web.xml: http://edocs.bea.com/wls/docs61/webapp/web_xml.html Full working example (and a live online struts webex tutorial in a few days at you guessed it http://basicportal.sourceforge.net ). The example sometimes authoticates and sometimes it does not, and it passes the rediriect and parametars for you. See, already done in web.xml, and 0 code no matter how complex. Then if you want more you do servlet api, getuserpricipal, snipet: String authenUser = ae.getReq().getUserPrincipal().getName(); //security UserBean userBn = new UserBean(); userBn.find(authenUser); String userid = userBn.getId(); frm.setUserid(userid); Here is a link on servlet api http://java.sun.com/webservices/docs/ea2/api/ Some of these topics are a bit of a pre req for Struts, and one is JAAS: http://suned.sun.com/US/certification/java/exam_objectives.html#web hth, Vic ps: The struts example should not be login, one day... I'll try to keep this as short as possible. Background: I have various groupings of common events in my web app where I would like each grouping of common events handled by a single Action class. The DispatchAction class allows me to do this. I want to do this because in my scenario, the Action classes are simple proxies to my business tier and are not reusable and I would like to keep the number of Action classes I have to create to a minimum. Problem: The problem I am running into is that pre-processing requirements vary within the common event groupings. For example, let's say eventGroupA handles events 1, 2, 3, and 4. Events 3 and 4 require that the user be logged in before any processing occurs, but events 1 and 2 don't. An idea: Assertions What if there was a way to declaratively define an ordered list of assertions that must be true before any processing occurs for an action mapping. Assertions would be processed in the order in which they appear in the action mapping and would return an ActionForward only if it failed else it would return null indicating that the assertion passed and to continue processing. Any errors or messages would be revealed to the user via ActionErrors or ActionMessages stored in the appropriate scope. An Assertion would have
RE: Beer generation
I'd like to see self-generating beer. I wonder if being refrigerated would slow the processh. James Mitchell Software Engineer\Struts Evangelist Struts-Atlanta, the Open Minded Developer Network http://www.open-tools.org/struts-atlanta -Original Message- From: Eddie Bush [mailto:[EMAIL PROTECTED]] Sent: Tuesday, July 23, 2002 12:08 PM To: Struts Users Mailing List Subject: Re: Code generation It might be rather difficult to post a beer on the mailing list. I suppose they could send screen-shots though :-P (Is it Friday already?!? LOL) Jano Fetyko wrote: Will you post to this list when you have some version ready to look at ? Or do you have it on the web somewhere ? J -Original Message- From: Robert Williams [mailto:[EMAIL PROTECTED]] Sent: Tue 23-Jul-02 9:11 AM To: Struts Users Mailing List Cc: Subject: Re: Code generation I think that have tried that and they ended up with Red Stripe! I hope my venture is successful. :-) bob - Original Message - From: Galbreath, Mark [EMAIL PROTECTED] To: 'Struts Users Mailing List' [EMAIL PROTECTED] Sent: Tuesday, July 23, 2002 8:59 AM Subject: RE: Code generation Wow. Now if we could only do that with beer! -- 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: XHTML compliant tags
Yes. There were a few posts on this last week. Try to search the mail-archive for XHTML. James Mitchell Software Engineer\Struts Evangelist Struts-Atlanta, the Open Minded Developer Network http://www.open-tools.org/struts-atlanta -Original Message- From: CB Thomas [mailto:[EMAIL PROTECTED]] Sent: Tuesday, July 23, 2002 12:07 PM To: [EMAIL PROTECTED] Subject: XHTML compliant tags Is there a way to get Struts to produce XHTML compliant tags? _ Join the worlds largest e-mail service with MSN Hotmail. http://www.hotmail.com -- 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]
html:link and new window properties
Subject: html:link and new window properties From: deco [mail][EMAIL PROTECTED] === Hi... Here's my problem. I'm opening a link in a new window, passing a parameter like this: html:link paramId=missionCode paramName=mission paramProperty=missionCode page=/do/admin/viewMissionArchive styleClass=tablelink target=_blank The thing is: what if i want to define the new window size and properties?? I would do this using javascript easily, but here if i call some javascript on the onclick event for example, i would loose the normal behaviour of this tag (session id in the url, for example) I don't even think i can resize the window afterwards, as i would have to have opened it with resizable=yes or something like this, again using javascript!! Any help?? Thanks in advance Ricardo Rocha -- To unsubscribe, e-mail: mailto:[EMAIL PROTECTED] For additional commands, e-mail: mailto:[EMAIL PROTECTED]
problem with HttpSession in Resin-2.1.2
Hey All, Sorry, this isn't really a struts problem (but I'm using struts in my application :-) The problem is with HttpSession and resin-2.1.2 Everthing works just fine on Tomcat 4.0.3 and Websphere. But for some strange reason the HttpSession I create in my LogonAction loses an attribute (The UserBean) in the next request (only with Resin)! In the LogonAction is got something like this HttpSession session = request.getSession(true); session.setAttribute(theCurrentUser, user); Enumeration enum = session.getAttributeNames(); while(enum.hasMoreElements() ) { String key = enum.nextElement().toString(); System.out.println(key:+key+, +session.getAttribute(key).toString()); } and in the Action I forward to I got HttpSession session = request.getSession(false); if(session != null) { Enumeration enum = session.getAttributeNames(); while(enum.hasMoreElements() ) { String key = enum.nextElement().toString(); System.out.println(key:+key+, +session.getAttribute(key).toString()); } this.user = (UserBean)session.getAttribute(Constants.USER_KEY); } if(this.user == null) System.out.println(User is not logged in); As expected, I get the below in the output after loging on. key:org.apache.struts.action.LOCALE, en_US key:theCurrentUser, mainsite.authentication.beans.UserBean@6df389 key:org.apache.struts.action.LOCALE, en_US key:theCurrentUser, mainsite.authentication.beans.UserBean@6df389 As you can see the information gets printed out twice. Once for the LogonAction and once for the Action I forward to upon successfull logins. However if I now call the second Action directly I get key:org.apache.struts.action.LOCALE, en_US User is not logged in The UserBean has disappered!!! Anyone got any ideas? Do I need to put something into the web.xml about session timeout for Resin? Thanks in advance dave -- To unsubscribe, e-mail: mailto:[EMAIL PROTECTED] For additional commands, e-mail: mailto:[EMAIL PROTECTED]
How to write an ActionForm property as just plain text
Suppose you wanted to have an entry screen, then a confirmation screen. The entry screen could have one field (email address) for example. In my jsp, I'll use html:text property=email to accomplish this. The user enters an email address and submits the form. I want the Action to then forward the request to a confirmation page. On that page, I want to just write out the email address they entered. I could use html:text property=email disabled=true to put a disabled text box, and struts would fill in the value of the email address. But, what if you want to just put out the email address in plain text? Is there an easy way to do this? I managed to accomplish this by creating my own tag custom:text property=email. I created a custom TextTag class that extends BaseInputTag, looks up the property and writes it out. This works, but it seems like there should be a better way of doing this. Is there a better way? How have others approached this problem? TIA -- Dave -- To unsubscribe, e-mail: mailto:[EMAIL PROTECTED] For additional commands, e-mail: mailto:[EMAIL PROTECTED]
Re: How to write an ActionForm property as just plain text
Try using bean:write name={your form name} property=email/ Later, ajTreece David Wood wrote: Suppose you wanted to have an entry screen, then a confirmation screen. The entry screen could have one field (email address) for example. In my jsp, I'll use html:text property=email to accomplish this. The user enters an email address and submits the form. I want the Action to then forward the request to a confirmation page. On that page, I want to just write out the email address they entered. I could use html:text property=email disabled=true to put a disabled text box, and struts would fill in the value of the email address. But, what if you want to just put out the email address in plain text? Is there an easy way to do this? I managed to accomplish this by creating my own tag custom:text property=email. I created a custom TextTag class that extends BaseInputTag, looks up the property and writes it out. This works, but it seems like there should be a better way of doing this. Is there a better way? How have others approached this problem? TIA -- Dave -- 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: How to write an ActionForm property as just plain text
Take a look at the html:hidden tag, there's an attribute to specify having the text written. Example: html:hidden property=someField write=true/ James Mitchell Software Engineer\Struts Evangelist Struts-Atlanta, the Open Minded Developer Network http://www.open-tools.org/struts-atlanta -Original Message- From: David Wood [mailto:[EMAIL PROTECTED]] Sent: Wednesday, July 24, 2002 1:00 AM To: [EMAIL PROTECTED] Subject: How to write an ActionForm property as just plain text Suppose you wanted to have an entry screen, then a confirmation screen. The entry screen could have one field (email address) for example. In my jsp, I'll use html:text property=email to accomplish this. The user enters an email address and submits the form. I want the Action to then forward the request to a confirmation page. On that page, I want to just write out the email address they entered. I could use html:text property=email disabled=true to put a disabled text box, and struts would fill in the value of the email address. But, what if you want to just put out the email address in plain text? Is there an easy way to do this? I managed to accomplish this by creating my own tag custom:text property=email. I created a custom TextTag class that extends BaseInputTag, looks up the property and writes it out. This works, but it seems like there should be a better way of doing this. Is there a better way? How have others approached this problem? TIA -- Dave -- 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: How to write an ActionForm property as just plain text
If you need to retain the value(e.g. have struts put it back into your formbean), use hidden. Otherwise, use the below example. James Mitchell Software Engineer\Struts Evangelist Struts-Atlanta, the Open Minded Developer Network http://www.open-tools.org/struts-atlanta -Original Message- From: ajTreece [mailto:[EMAIL PROTECTED]] Sent: Tuesday, July 23, 2002 1:05 PM To: Struts Users Mailing List Subject: Re: How to write an ActionForm property as just plain text Try using bean:write name={your form name} property=email/ Later, ajTreece David Wood wrote: Suppose you wanted to have an entry screen, then a confirmation screen. The entry screen could have one field (email address) for example. In my jsp, I'll use html:text property=email to accomplish this. The user enters an email address and submits the form. I want the Action to then forward the request to a confirmation page. On that page, I want to just write out the email address they entered. I could use html:text property=email disabled=true to put a disabled text box, and struts would fill in the value of the email address. But, what if you want to just put out the email address in plain text? Is there an easy way to do this? I managed to accomplish this by creating my own tag custom:text property=email. I created a custom TextTag class that extends BaseInputTag, looks up the property and writes it out. This works, but it seems like there should be a better way of doing this. Is there a better way? How have others approached this problem? TIA -- Dave -- 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]
Is it possible to get message as a String from ActionMessage?
Subject: Is it possible to get message as a String from ActionMessage? From: Matt Raible [EMAIL PROTECTED] === I want to do something like the following: // construct the subject of the e-mail String subject = new ActionMessage(courseCatalog.email.subject).toString(); requestForm.setSubject(subject); But I get a subject of: org.apache.struts.action.ActionMessage@b95f2 Any ideas? Matt -- To unsubscribe, e-mail: mailto:[EMAIL PROTECTED] For additional commands, e-mail: mailto:[EMAIL PROTECTED]
nested:iterate nested colletions
Hi - I'm trying to work out the usage of the nested:iterate tag. I have three beans, one called report which contains an array list of years. The year bean contains an array list of weeks. each bean has a get method that returns an object array. This is my markup: nested:nest property=reportForm/ Report Name: nested:write property=reportName/ nested:iterate property=year nested:write property=yearname/ nested:iterate property=week nested:write property=weekname/ /nested:iterate !-- week -- /nested:iterate !-- year -- /nested:nest when i run this code, i get the following error: javax.servlet.ServletException: No getter method for property year[0].week of bean reportForm why am i getting this error? thanks, jim -- To unsubscribe, e-mail: mailto:[EMAIL PROTECTED] For additional commands, e-mail: mailto:[EMAIL PROTECTED]
RE: How to write an ActionForm property as just plain text
Why not just use bean:write? If you're just writing it out, that's all you need. http://jakarta.apache.org/struts/userGuide/struts-bean.html ~ Keith http://www.buffalo.edu/~kkamholz -Original Message- From: James Mitchell [mailto:[EMAIL PROTECTED]] Sent: Tuesday, July 23, 2002 1:12 PM To: Struts Users Mailing List; [EMAIL PROTECTED] Subject: RE: How to write an ActionForm property as just plain text If you need to retain the value(e.g. have struts put it back into your formbean), use hidden. Otherwise, use the below example. James Mitchell Software Engineer\Struts Evangelist Struts-Atlanta, the Open Minded Developer Network http://www.open-tools.org/struts-atlanta -Original Message- From: ajTreece [mailto:[EMAIL PROTECTED]] Sent: Tuesday, July 23, 2002 1:05 PM To: Struts Users Mailing List Subject: Re: How to write an ActionForm property as just plain text Try using bean:write name={your form name} property=email/ Later, ajTreece David Wood wrote: Suppose you wanted to have an entry screen, then a confirmation screen. The entry screen could have one field (email address) for example. In my jsp, I'll use html:text property=email to accomplish this. The user enters an email address and submits the form. I want the Action to then forward the request to a confirmation page. On that page, I want to just write out the email address they entered. I could use html:text property=email disabled=true to put a disabled text box, and struts would fill in the value of the email address. But, what if you want to just put out the email address in plain text? Is there an easy way to do this? I managed to accomplish this by creating my own tag custom:text property=email. I created a custom TextTag class that extends BaseInputTag, looks up the property and writes it out. This works, but it seems like there should be a better way of doing this. Is there a better way? How have others approached this problem? TIA -- Dave -- 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: How to write an ActionForm property as just plain text
I get: Cannot find bean XX in scope null I know I'm missing something early on to use this correctly. Any idea what? -- dave ajTreece wrote: Try using bean:write name={your form name} property=email/ Later, ajTreece David Wood wrote: Suppose you wanted to have an entry screen, then a confirmation screen. The entry screen could have one field (email address) for example. In my jsp, I'll use html:text property=email to accomplish this. The user enters an email address and submits the form. I want the Action to then forward the request to a confirmation page. On that page, I want to just write out the email address they entered. I could use html:text property=email disabled=true to put a disabled text box, and struts would fill in the value of the email address. But, what if you want to just put out the email address in plain text? Is there an easy way to do this? I managed to accomplish this by creating my own tag custom:text property=email. I created a custom TextTag class that extends BaseInputTag, looks up the property and writes it out. This works, but it seems like there should be a better way of doing this. Is there a better way? How have others approached this problem? TIA -- Dave -- 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: How to write an ActionForm property as just plain text
html:hidden seems to only support name, property, and value attributes Are you sure that hidden has a setting to write out as text? -- dave James Mitchell wrote: Take a look at the html:hidden tag, there's an attribute to specify having the text written. Example: html:hidden property=someField write=true/ James Mitchell Software Engineer\Struts Evangelist Struts-Atlanta, the Open Minded Developer Network http://www.open-tools.org/struts-atlanta -Original Message- From: David Wood [mailto:[EMAIL PROTECTED]] Sent: Wednesday, July 24, 2002 1:00 AM To: [EMAIL PROTECTED] Subject: How to write an ActionForm property as just plain text Suppose you wanted to have an entry screen, then a confirmation screen. The entry screen could have one field (email address) for example. In my jsp, I'll use html:text property=email to accomplish this. The user enters an email address and submits the form. I want the Action to then forward the request to a confirmation page. On that page, I want to just write out the email address they entered. I could use html:text property=email disabled=true to put a disabled text box, and struts would fill in the value of the email address. But, what if you want to just put out the email address in plain text? Is there an easy way to do this? I managed to accomplish this by creating my own tag custom:text property=email. I created a custom TextTag class that extends BaseInputTag, looks up the property and writes it out. This works, but it seems like there should be a better way of doing this. Is there a better way? How have others approached this problem? TIA -- Dave -- 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: Is it possible to get message as a String from ActionMessage?
Have you looked at the struts-example.war? James Mitchell Software Engineer\Struts Evangelist Struts-Atlanta, the Open Minded Developer Network http://www.open-tools.org/struts-atlanta -Original Message- From: Struts Newsgroup [mailto:@[EMAIL PROTECTED]] Sent: Tuesday, July 23, 2002 1:10 PM To: [EMAIL PROTECTED] Subject: Is it possible to get message as a String from ActionMessage? Subject: Is it possible to get message as a String from ActionMessage? From: Matt Raible [EMAIL PROTECTED] === I want to do something like the following: // construct the subject of the e-mail String subject = new ActionMessage(courseCatalog.email.subject).toString(); requestForm.setSubject(subject); But I get a subject of: org.apache.struts.action.ActionMessage@b95f2 Any ideas? Matt -- 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]
DynaValidatorActionForm validation order of operations?
I've got validation working for several forms. I have noticed, however, that there is a definite order to things regarding validation. And, it seems somewhat cumbersome from a user perspective (IMHO). I'm looking for input on how to improve the situation either by using a different configuration or defining my own validation class(es) or something. I've got a form with two fields. Both fields (field1 and field2) are required, but field2 also needs to be an integer within a certain range. If I (the user) enter an invalid value for field2 while leaving field1 empty, I am returned to the form and notified that field1 is required. I am NOT also told that field2 was invalid. So, I (the user) fill in field1 and resubmit the form ... only to be returned AGAIN to the form and told that field2 is invalid (having not changed the existing field2 value from my first submit). Is this by design? It would be useful in my application to be able to tell the user in one round-trip that one required field is missing, PLUS the data provided in another field is invalid (out-of-range ... not a number, etc.). Thoughts? Does that make any sense? I can provide applicable struts-config.xml and validator.xml excerpts, but I didn't think it was really necessary (unless this really is just a configuration problem). Thanks in advance. -Bob Hodgeman -- To unsubscribe, e-mail: mailto:[EMAIL PROTECTED] For additional commands, e-mail: mailto:[EMAIL PROTECTED]
RE: How to write an ActionForm property as just plain text
You're just trying to write out the property as text? Why mess around with html:hidden? Like I said, bean:write works perfectly fine. http://jakarta.apache.org/struts/userGuide/struts-bean.html ~ Keith http://www.buffalo.edu/~kkamholz -Original Message- From: David Wood [mailto:[EMAIL PROTECTED]] Sent: Wednesday, July 24, 2002 1:24 AM To: Struts Users Mailing List Subject: Re: How to write an ActionForm property as just plain text html:hidden seems to only support name, property, and value attributes Are you sure that hidden has a setting to write out as text? -- dave James Mitchell wrote: Take a look at the html:hidden tag, there's an attribute to specify having the text written. Example: html:hidden property=someField write=true/ James Mitchell Software Engineer\Struts Evangelist Struts-Atlanta, the Open Minded Developer Network http://www.open-tools.org/struts-atlanta -Original Message- From: David Wood [mailto:[EMAIL PROTECTED]] Sent: Wednesday, July 24, 2002 1:00 AM To: [EMAIL PROTECTED] Subject: How to write an ActionForm property as just plain text Suppose you wanted to have an entry screen, then a confirmation screen. The entry screen could have one field (email address) for example. In my jsp, I'll use html:text property=email to accomplish this. The user enters an email address and submits the form. I want the Action to then forward the request to a confirmation page. On that page, I want to just write out the email address they entered. I could use html:text property=email disabled=true to put a disabled text box, and struts would fill in the value of the email address. But, what if you want to just put out the email address in plain text? Is there an easy way to do this? I managed to accomplish this by creating my own tag custom:text property=email. I created a custom TextTag class that extends BaseInputTag, looks up the property and writes it out. This works, but it seems like there should be a better way of doing this. Is there a better way? How have others approached this problem? TIA -- Dave -- 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: How to write an ActionForm property as just plain text
Oh, forgot to mention. I think that's a post-1.1b1 thing. Try using a nightly snapshot. I can't graph cvs from here or I would let know exactly when it was added. Sorry. James Mitchell Software Engineer\Struts Evangelist Struts-Atlanta, the Open Minded Developer Network http://www.open-tools.org/struts-atlanta -Original Message- From: David Wood [mailto:[EMAIL PROTECTED]] Sent: Wednesday, July 24, 2002 1:24 AM To: Struts Users Mailing List Subject: Re: How to write an ActionForm property as just plain text html:hidden seems to only support name, property, and value attributes Are you sure that hidden has a setting to write out as text? -- dave James Mitchell wrote: Take a look at the html:hidden tag, there's an attribute to specify having the text written. Example: html:hidden property=someField write=true/ James Mitchell Software Engineer\Struts Evangelist Struts-Atlanta, the Open Minded Developer Network http://www.open-tools.org/struts-atlanta -Original Message- From: David Wood [mailto:[EMAIL PROTECTED]] Sent: Wednesday, July 24, 2002 1:00 AM To: [EMAIL PROTECTED] Subject: How to write an ActionForm property as just plain text Suppose you wanted to have an entry screen, then a confirmation screen. The entry screen could have one field (email address) for example. In my jsp, I'll use html:text property=email to accomplish this. The user enters an email address and submits the form. I want the Action to then forward the request to a confirmation page. On that page, I want to just write out the email address they entered. I could use html:text property=email disabled=true to put a disabled text box, and struts would fill in the value of the email address. But, what if you want to just put out the email address in plain text? Is there an easy way to do this? I managed to accomplish this by creating my own tag custom:text property=email. I created a custom TextTag class that extends BaseInputTag, looks up the property and writes it out. This works, but it seems like there should be a better way of doing this. Is there a better way? How have others approached this problem? TIA -- Dave -- 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: Not necessary to specify Tiles plugin in struts-config.xml?
Cedric == Cedric Dumoulin [EMAIL PROTECTED] writes: Cedric Hi, Cedric The prefer way to enable Tiles in Struts1.1 is now to specify the Tiles Cedric plugin in each struts-config. If you do that, you don't need to specify the Cedric TilesRequestProcessor and the ActionComponentServlet. Cedric For backward compatibility, the old methods to initialize Tiles still working Cedric (i.e: ActionComponentServlet + TilesRequestProcessor). Using such methods will Cedric generate some warning messages incitating you to use the new methods. Curious. I'm not initializing Tiles in any way. My JSP page uses a tiles:insert wrapping some puts with specified content, and my layout page uses tiles:insert and tiles:getAsString elements. All of this works fine. I don't see any warnings. Perhaps the initialization strategies are only necessary if you use definitions and definition references? -- === David M. Karr ; Java/J2EE/XML/Unix/C++ [EMAIL PROTECTED] -- To unsubscribe, e-mail: mailto:[EMAIL PROTECTED] For additional commands, e-mail: mailto:[EMAIL PROTECTED]
RE: How to write an ActionForm property as just plain text
To each his own I guess. If you want to retain a value, such as an id for a row, but only allow read-only access to it. Don't use html:text with disabled, it doesn't work in NS 4.7 and a few others. You can use html:hidden and it will: a) create a hidden name=blah blah b) write out the value in plain text (you just can't get more 'read-only' than that) c) when the form is submitted, because you had a hidden form field, struts will re-populate that field correctly for you. Like I said before, if you don't care to retain the value.use bean:write James Mitchell Software Engineer\Struts Evangelist Struts-Atlanta, the Open Minded Developer Network http://www.open-tools.org/struts-atlanta -Original Message- From: Kamholz, Keith (corp-staff) USX [mailto:[EMAIL PROTECTED]] Sent: Tuesday, July 23, 2002 1:27 PM To: 'Struts Users Mailing List' Subject: RE: How to write an ActionForm property as just plain text You're just trying to write out the property as text? Why mess around with html:hidden? Like I said, bean:write works perfectly fine. http://jakarta.apache.org/struts/userGuide/struts-bean.html ~ Keith http://www.buffalo.edu/~kkamholz -Original Message- From: David Wood [mailto:[EMAIL PROTECTED]] Sent: Wednesday, July 24, 2002 1:24 AM To: Struts Users Mailing List Subject: Re: How to write an ActionForm property as just plain text html:hidden seems to only support name, property, and value attributes Are you sure that hidden has a setting to write out as text? -- dave James Mitchell wrote: Take a look at the html:hidden tag, there's an attribute to specify having the text written. Example: html:hidden property=someField write=true/ James Mitchell Software Engineer\Struts Evangelist Struts-Atlanta, the Open Minded Developer Network http://www.open-tools.org/struts-atlanta -Original Message- From: David Wood [mailto:[EMAIL PROTECTED]] Sent: Wednesday, July 24, 2002 1:00 AM To: [EMAIL PROTECTED] Subject: How to write an ActionForm property as just plain text Suppose you wanted to have an entry screen, then a confirmation screen. The entry screen could have one field (email address) for example. In my jsp, I'll use html:text property=email to accomplish this. The user enters an email address and submits the form. I want the Action to then forward the request to a confirmation page. On that page, I want to just write out the email address they entered. I could use html:text property=email disabled=true to put a disabled text box, and struts would fill in the value of the email address. But, what if you want to just put out the email address in plain text? Is there an easy way to do this? I managed to accomplish this by creating my own tag custom:text property=email. I created a custom TextTag class that extends BaseInputTag, looks up the property and writes it out. This works, but it seems like there should be a better way of doing this. Is there a better way? How have others approached this problem? TIA -- Dave -- 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: How to write an ActionForm property as just plain text
Sorry, I still need help on this part. What do I need to use to get the bean:write to work? I get an error saying: Cannot find bean XX in scope null I assume I'm missing some statement earlier that I need. I actually like the hidden approach (since you can see the value and it will get carried over on form submit), but I don't want to move to the 1.1 stuff. -- dave Kamholz, Keith (corp-staff) USX wrote: You're just trying to write out the property as text? Why mess around with html:hidden? Like I said, bean:write works perfectly fine. http://jakarta.apache.org/struts/userGuide/struts-bean.html ~ Keith http://www.buffalo.edu/~kkamholz -Original Message- From: David Wood [mailto:[EMAIL PROTECTED]] Sent: Wednesday, July 24, 2002 1:24 AM To: Struts Users Mailing List Subject: Re: How to write an ActionForm property as just plain text html:hidden seems to only support name, property, and value attributes Are you sure that hidden has a setting to write out as text? -- dave James Mitchell wrote: Take a look at the html:hidden tag, there's an attribute to specify having the text written. Example: html:hidden property=someField write=true/ James Mitchell Software Engineer\Struts Evangelist Struts-Atlanta, the Open Minded Developer Network http://www.open-tools.org/struts-atlanta -Original Message- From: David Wood [mailto:[EMAIL PROTECTED]] Sent: Wednesday, July 24, 2002 1:00 AM To: [EMAIL PROTECTED] Subject: How to write an ActionForm property as just plain text Suppose you wanted to have an entry screen, then a confirmation screen. The entry screen could have one field (email address) for example. In my jsp, I'll use html:text property=email to accomplish this. The user enters an email address and submits the form. I want the Action to then forward the request to a confirmation page. On that page, I want to just write out the email address they entered. I could use html:text property=email disabled=true to put a disabled text box, and struts would fill in the value of the email address. But, what if you want to just put out the email address in plain text? Is there an easy way to do this? I managed to accomplish this by creating my own tag custom:text property=email. I created a custom TextTag class that extends BaseInputTag, looks up the property and writes it out. This works, but it seems like there should be a better way of doing this. Is there a better way? How have others approached this problem? TIA -- Dave -- 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: How to write an ActionForm property as just plain text
Never mind. I was using the class name (MyActionForm) instead of the logical name in the struts-config.xml file (myActionForm). Thanks everybody for all the help. -- dave David Wood wrote: Sorry, I still need help on this part. What do I need to use to get the bean:write to work? I get an error saying: Cannot find bean XX in scope null I assume I'm missing some statement earlier that I need. I actually like the hidden approach (since you can see the value and it will get carried over on form submit), but I don't want to move to the 1.1 stuff. -- dave Kamholz, Keith (corp-staff) USX wrote: You're just trying to write out the property as text? Why mess around with html:hidden? Like I said, bean:write works perfectly fine. http://jakarta.apache.org/struts/userGuide/struts-bean.html ~ Keith http://www.buffalo.edu/~kkamholz -Original Message- From: David Wood [mailto:[EMAIL PROTECTED]] Sent: Wednesday, July 24, 2002 1:24 AM To: Struts Users Mailing List Subject: Re: How to write an ActionForm property as just plain text html:hidden seems to only support name, property, and value attributes Are you sure that hidden has a setting to write out as text? -- dave James Mitchell wrote: Take a look at the html:hidden tag, there's an attribute to specify having the text written. Example: html:hidden property=someField write=true/ James Mitchell Software Engineer\Struts Evangelist Struts-Atlanta, the Open Minded Developer Network http://www.open-tools.org/struts-atlanta -Original Message- From: David Wood [mailto:[EMAIL PROTECTED]] Sent: Wednesday, July 24, 2002 1:00 AM To: [EMAIL PROTECTED] Subject: How to write an ActionForm property as just plain text Suppose you wanted to have an entry screen, then a confirmation screen. The entry screen could have one field (email address) for example. In my jsp, I'll use html:text property=email to accomplish this. The user enters an email address and submits the form. I want the Action to then forward the request to a confirmation page. On that page, I want to just write out the email address they entered. I could use html:text property=email disabled=true to put a disabled text box, and struts would fill in the value of the email address. But, what if you want to just put out the email address in plain text? Is there an easy way to do this? I managed to accomplish this by creating my own tag custom:text property=email. I created a custom TextTag class that extends BaseInputTag, looks up the property and writes it out. This works, but it seems like there should be a better way of doing this. Is there a better way? How have others approached this problem? TIA -- Dave -- 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]
Struts Persistence
Hi again, Does anyone know about usage of persistence frameworks, like Torque OJB from Apache Group, with Struts? Thanks for all the help with code generation. I downloaded StrutsBuilder and Eclipse+EasyStruts to evaluate and they are great tools. About self- generated apps from database schema and beer... Huhr! Sounds nice and we can start a new project from the idea :) Best Regards, Elder -- To unsubscribe, e-mail: mailto:[EMAIL PROTECTED] For additional commands, e-mail: mailto:[EMAIL PROTECTED]
RE: How to write an ActionForm property as just plain text
Ok, I see what you're saying. I'm actually working on my first web app, and the my main objects are stored in the session so I don't have to worry about retaining the value. I can definitely see how you would need the html:hidden tag for some scenarios though. ~ Keith http://www.buffalo.edu/~kkamholz -Original Message- From: James Mitchell [mailto:[EMAIL PROTECTED]] Sent: Tuesday, July 23, 2002 1:37 PM To: Struts Users Mailing List Subject: RE: How to write an ActionForm property as just plain text To each his own I guess. If you want to retain a value, such as an id for a row, but only allow read-only access to it. Don't use html:text with disabled, it doesn't work in NS 4.7 and a few others. You can use html:hidden and it will: a) create a hidden name=blah blah b) write out the value in plain text (you just can't get more 'read-only' than that) c) when the form is submitted, because you had a hidden form field, struts will re-populate that field correctly for you. Like I said before, if you don't care to retain the value.use bean:write James Mitchell Software Engineer\Struts Evangelist Struts-Atlanta, the Open Minded Developer Network http://www.open-tools.org/struts-atlanta -Original Message- From: Kamholz, Keith (corp-staff) USX [mailto:[EMAIL PROTECTED]] Sent: Tuesday, July 23, 2002 1:27 PM To: 'Struts Users Mailing List' Subject: RE: How to write an ActionForm property as just plain text You're just trying to write out the property as text? Why mess around with html:hidden? Like I said, bean:write works perfectly fine. http://jakarta.apache.org/struts/userGuide/struts-bean.html ~ Keith http://www.buffalo.edu/~kkamholz -Original Message- From: David Wood [mailto:[EMAIL PROTECTED]] Sent: Wednesday, July 24, 2002 1:24 AM To: Struts Users Mailing List Subject: Re: How to write an ActionForm property as just plain text html:hidden seems to only support name, property, and value attributes Are you sure that hidden has a setting to write out as text? -- dave James Mitchell wrote: Take a look at the html:hidden tag, there's an attribute to specify having the text written. Example: html:hidden property=someField write=true/ James Mitchell Software Engineer\Struts Evangelist Struts-Atlanta, the Open Minded Developer Network http://www.open-tools.org/struts-atlanta -Original Message- From: David Wood [mailto:[EMAIL PROTECTED]] Sent: Wednesday, July 24, 2002 1:00 AM To: [EMAIL PROTECTED] Subject: How to write an ActionForm property as just plain text Suppose you wanted to have an entry screen, then a confirmation screen. The entry screen could have one field (email address) for example. In my jsp, I'll use html:text property=email to accomplish this. The user enters an email address and submits the form. I want the Action to then forward the request to a confirmation page. On that page, I want to just write out the email address they entered. I could use html:text property=email disabled=true to put a disabled text box, and struts would fill in the value of the email address. But, what if you want to just put out the email address in plain text? Is there an easy way to do this? I managed to accomplish this by creating my own tag custom:text property=email. I created a custom TextTag class that extends BaseInputTag, looks up the property and writes it out. This works, but it seems like there should be a better way of doing this. Is there a better way? How have others approached this problem? TIA -- Dave -- 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]
Tiles: if useAttribute ignore is true, what about script var?
In Tiles, the useAttribute tag declares a scripting variable. It also has an ignore attribute. If the ignore attribute is true, it's supposed to do nothing. Is it possible to do nothing in a tag that declares a scripting variable? Wouldn't it declare the variable, even if ignore was true? -- === David M. Karr ; Java/J2EE/XML/Unix/C++ [EMAIL PROTECTED] -- To unsubscribe, e-mail: mailto:[EMAIL PROTECTED] For additional commands, e-mail: mailto:[EMAIL PROTECTED]
Re: XHTML compliant tags
Subject: Re: XHTML compliant tags From: Matt Raible [EMAIL PROTECTED] === Soon (hopefully). Watch this bug to find out: http://issues.apache.org/bugzilla/show_bug.cgi?id=5518 CB Thomas [EMAIL PROTECTED] wrote in message news:[EMAIL PROTECTED]... Is there a way to get Struts to produce XHTML compliant tags? _ Join the world's largest e-mail service with MSN Hotmail. http://www.hotmail.com -- 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: Struts Persistence
I'll be uploading a modified version of the example app (struts-example.war) which uses OJB as soon as I can finish it. Basic O/R mapping using JDO API w/MySql on the backend. It's not there yet, but here's the url: http://sourceforge.net/projects/struts/ James Mitchell Software Engineer\Struts Evangelist Struts-Atlanta, the Open Minded Developer Network http://www.open-tools.org/struts-atlanta -Original Message- From: Elderclei R Reami [mailto:[EMAIL PROTECTED]] Sent: Tuesday, July 23, 2002 2:54 PM To: [EMAIL PROTECTED] Subject: Struts Persistence Hi again, Does anyone know about usage of persistence frameworks, like Torque OJB from Apache Group, with Struts? Thanks for all the help with code generation. I downloaded StrutsBuilder and Eclipse+EasyStruts to evaluate and they are great tools. About self- generated apps from database schema and beer... Huhr! Sounds nice and we can start a new project from the idea :) Best Regards, Elder -- 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: Struts Persistence
OJB is great. (jakarta.apache.org/ojb) You can easily map your tables to objects. It works with MySQL. I recommend that you implement DAO objects that call OJB's APIs and keep all the persistence operations there. Good luck, Mete --- James Mitchell [EMAIL PROTECTED] wrote: I'll be uploading a modified version of the example app (struts-example.war) which uses OJB as soon as I can finish it. Basic O/R mapping using JDO API w/MySql on the backend. It's not there yet, but here's the url: http://sourceforge.net/projects/struts/ James Mitchell Software Engineer\Struts Evangelist Struts-Atlanta, the Open Minded Developer Network http://www.open-tools.org/struts-atlanta -Original Message- From: Elderclei R Reami [mailto:[EMAIL PROTECTED]] Sent: Tuesday, July 23, 2002 2:54 PM To: [EMAIL PROTECTED] Subject: Struts Persistence Hi again, Does anyone know about usage of persistence frameworks, like Torque OJB from Apache Group, with Struts? Thanks for all the help with code generation. I downloaded StrutsBuilder and Eclipse+EasyStruts to evaluate and they are great tools. About self- generated apps from database schema and beer... Huhr! Sounds nice and we can start a new project from the idea :) Best Regards, Elder -- 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] __ Do You Yahoo!? Yahoo! Health - Feel better, live better http://health.yahoo.com -- To unsubscribe, e-mail: mailto:[EMAIL PROTECTED] For additional commands, e-mail: mailto:[EMAIL PROTECTED]
RE: Struts Persistence
I haven't had time to play with OJB yet, but does anyone know if it works properly with Oracle? I mean, I know it should work fine with any DB for generating select and update statements, but what about inserts when you are using sequence numbers? The increments are handled differently in different databases, so I'm curious how OJB addresses this (if at all). thanks, Joe -Original Message- From: Mete Kural [mailto:[EMAIL PROTECTED]] Sent: Tuesday, July 23, 2002 11:42 AM To: Struts Users Mailing List; [EMAIL PROTECTED] Subject: RE: Struts Persistence OJB is great. (jakarta.apache.org/ojb) You can easily map your tables to objects. It works with MySQL. I recommend that you implement DAO objects that call OJB's APIs and keep all the persistence operations there. Good luck, Mete --- James Mitchell [EMAIL PROTECTED] wrote: I'll be uploading a modified version of the example app (struts-example.war) which uses OJB as soon as I can finish it. Basic O/R mapping using JDO API w/MySql on the backend. It's not there yet, but here's the url: http://sourceforge.net/projects/struts/ James Mitchell Software Engineer\Struts Evangelist Struts-Atlanta, the Open Minded Developer Network http://www.open-tools.org/struts-atlanta -Original Message- From: Elderclei R Reami [mailto:[EMAIL PROTECTED]] Sent: Tuesday, July 23, 2002 2:54 PM To: [EMAIL PROTECTED] Subject: Struts Persistence Hi again, Does anyone know about usage of persistence frameworks, like Torque OJB from Apache Group, with Struts? Thanks for all the help with code generation. I downloaded StrutsBuilder and Eclipse+EasyStruts to evaluate and they are great tools. About self- generated apps from database schema and beer... Huhr! Sounds nice and we can start a new project from the idea :) Best Regards, Elder -- 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] __ Do You Yahoo!? Yahoo! Health - Feel better, live better http://health.yahoo.com -- 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]
populating JSP from
Does anybody know if it is possible to populate a form in a JSP with data from a formbean ?(reverse to what happens when the form gets submitted to an action). What I am trying to do is,... when user enters some data data on a screen(JSP) and submits to an action if there is an error in the action(something like record not found in database) then I want to show the same screen(JSP) to the user with along with the data he originally he keyed in. I can do this with scriplet code in the JSP but I want to use a cleaner way because we are following a consistent approach of not puttinng java code in our JSPs in our project. thanks in advance Srinivas -- To unsubscribe, e-mail: mailto:[EMAIL PROTECTED] For additional commands, e-mail: mailto:[EMAIL PROTECTED]
RE: Struts Persistence
I've been using OJB for the past couple of weeks so I'm by no means an expert. What I can tell you is that OJB requires an OJB_SEQ table in the database. This allows OJB to hanlde autoincrementing fields on its own, and not on any one specific implementation. I have been using OJB with MsAccess and haven't had a problem yet (crossing my fingers) :-) Graham -Original Message- From: Joe Barefoot [mailto:[EMAIL PROTECTED]] Sent: Tuesday, July 23, 2002 4:04 PM To: Struts Users Mailing List Subject: RE: Struts Persistence I haven't had time to play with OJB yet, but does anyone know if it works properly with Oracle? I mean, I know it should work fine with any DB for generating select and update statements, but what about inserts when you are using sequence numbers? The increments are handled differently in different databases, so I'm curious how OJB addresses this (if at all). thanks, Joe -Original Message- From: Mete Kural [mailto:[EMAIL PROTECTED]] Sent: Tuesday, July 23, 2002 11:42 AM To: Struts Users Mailing List; [EMAIL PROTECTED] Subject: RE: Struts Persistence OJB is great. (jakarta.apache.org/ojb) You can easily map your tables to objects. It works with MySQL. I recommend that you implement DAO objects that call OJB's APIs and keep all the persistence operations there. Good luck, Mete --- James Mitchell [EMAIL PROTECTED] wrote: I'll be uploading a modified version of the example app (struts-example.war) which uses OJB as soon as I can finish it. Basic O/R mapping using JDO API w/MySql on the backend. It's not there yet, but here's the url: http://sourceforge.net/projects/struts/ James Mitchell Software Engineer\Struts Evangelist Struts-Atlanta, the Open Minded Developer Network http://www.open-tools.org/struts-atlanta -Original Message- From: Elderclei R Reami [mailto:[EMAIL PROTECTED]] Sent: Tuesday, July 23, 2002 2:54 PM To: [EMAIL PROTECTED] Subject: Struts Persistence Hi again, Does anyone know about usage of persistence frameworks, like Torque OJB from Apache Group, with Struts? Thanks for all the help with code generation. I downloaded StrutsBuilder and Eclipse+EasyStruts to evaluate and they are great tools. About self- generated apps from database schema and beer... Huhr! Sounds nice and we can start a new project from the idea :) Best Regards, Elder -- 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] __ Do You Yahoo!? Yahoo! Health - Feel better, live better http://health.yahoo.com -- 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: populating JSP from
I think the easiest way to explain it would be to take a look at the struts example that comes with the binary. They have a simple application where the first screen is a login. If the user enters a login name, but not a password, the same screen is returned with an error message and with the entered login name already populated. Basically, I think if you send the response back to the same page, and you use the html:input tags and the like, then it will populate them automatically. -- dave I-Sampige, Srinivas wrote: Does anybody know if it is possible to populate a form in a JSP with data from a formbean ?(reverse to what happens when the form gets submitted to an action). What I am trying to do is,... when user enters some data data on a screen(JSP) and submits to an action if there is an error in the action(something like record not found in database) then I want to show the same screen(JSP) to the user with along with the data he originally he keyed in. I can do this with scriplet code in the JSP but I want to use a cleaner way because we are following a consistent approach of not puttinng java code in our JSPs in our project. thanks in advance Srinivas -- 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: populating JSP from
Yes, this actually happens by default if the form bean associated with a JSP already has data. So, if you have an ActionForm named myActionForm with a field userName, and userName has a value, then the Struts tag below will render the text input with that value already in it. html:text name=myActionForm property=userName / Similarly, whatever value is specified for the property in an html:select tag will determine what value is pre-selected in the drop-down when the page is rendered. Actually, if you forward right back to the page the submit occurred from, the form bean should still be in the request and this should happen 'automatically'. If you have an intermediate page, or a redirect Action, or anything that causes the request to be terminated, you'll have to either stuff the form bean into the (new) request or the session before forwarding back to the page. -Original Message- From: I-Sampige, Srinivas [mailto:[EMAIL PROTECTED]] Sent: Tuesday, July 23, 2002 12:01 PM To: Strutsuser (E-mail) Subject: populating JSP from Does anybody know if it is possible to populate a form in a JSP with data from a formbean ?(reverse to what happens when the form gets submitted to an action). What I am trying to do is,... when user enters some data data on a screen(JSP) and submits to an action if there is an error in the action(something like record not found in database) then I want to show the same screen(JSP) to the user with along with the data he originally he keyed in. I can do this with scriplet code in the JSP but I want to use a cleaner way because we are following a consistent approach of not puttinng java code in our JSPs in our project. thanks in advance Srinivas -- 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: Struts Persistence
The OJB site contains a useful looking page that lists the RDBMS that it supports: http://jakarta.apache.org/ojb/platforms.html The list is near the bottom of the page, but Oracle and DB2 are both supported out of the box, as is my favourite ... HSQLDB. Simon - Simon P. Chappell [EMAIL PROTECTED] Java Programming Specialist www.landsend.com Lands' End, Inc. (608) 935-4526 -Original Message- From: Joe Barefoot [mailto:[EMAIL PROTECTED]] Sent: Tuesday, July 23, 2002 2:04 PM To: Struts Users Mailing List Subject: RE: Struts Persistence I haven't had time to play with OJB yet, but does anyone know if it works properly with Oracle? I mean, I know it should work fine with any DB for generating select and update statements, but what about inserts when you are using sequence numbers? The increments are handled differently in different databases, so I'm curious how OJB addresses this (if at all). thanks, Joe -Original Message- From: Mete Kural [mailto:[EMAIL PROTECTED]] Sent: Tuesday, July 23, 2002 11:42 AM To: Struts Users Mailing List; [EMAIL PROTECTED] Subject: RE: Struts Persistence OJB is great. (jakarta.apache.org/ojb) You can easily map your tables to objects. It works with MySQL. I recommend that you implement DAO objects that call OJB's APIs and keep all the persistence operations there. Good luck, Mete --- James Mitchell [EMAIL PROTECTED] wrote: I'll be uploading a modified version of the example app (struts-example.war) which uses OJB as soon as I can finish it. Basic O/R mapping using JDO API w/MySql on the backend. It's not there yet, but here's the url: http://sourceforge.net/projects/struts/ James Mitchell Software Engineer\Struts Evangelist Struts-Atlanta, the Open Minded Developer Network http://www.open-tools.org/struts-atlanta -Original Message- From: Elderclei R Reami [mailto:[EMAIL PROTECTED]] Sent: Tuesday, July 23, 2002 2:54 PM To: [EMAIL PROTECTED] Subject: Struts Persistence Hi again, Does anyone know about usage of persistence frameworks, like Torque OJB from Apache Group, with Struts? Thanks for all the help with code generation. I downloaded StrutsBuilder and Eclipse+EasyStruts to evaluate and they are great tools. About self- generated apps from database schema and beer... Huhr! Sounds nice and we can start a new project from the idea :) Best Regards, Elder -- 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] __ Do You Yahoo!? Yahoo! Health - Feel better, live better http://health.yahoo.com -- 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: Struts Persistence
I used this on the Storefront application including in several chapters as if my memory serves me correctly, you can plugin different sequence manager implementations in the ojb.properties class. Something like this I think: SequenceManagerClass=ojb.broker.util.sequence.SequenceManagerHighLowImpl There are several other properties that you can control as well, like are the ids global to all enties or does each entity have its own set. Very nice. chuck At 12:24 PM 7/23/2002 -0700, you wrote: That makes sense, I was wondering how it could handle it in a generic fashion. I suppose it adds a row to the OJB_SEQ table for every table column that it has to autoincrement. I further suppose it could accomplish an auto-increment insert with a single DB call if they use a nested select from the OJB_SEQ table for the auto-increment column, followed by an update to the OJB_SEQ table to actually increment that column value, both statements executed as a single batch call. I'll have to check it outthanks! peace, Joe -Original Message- From: Graham Lounder [mailto:[EMAIL PROTECTED]] Sent: Tuesday, July 23, 2002 12:08 PM To: Struts Users Mailing List Subject: RE: Struts Persistence I've been using OJB for the past couple of weeks so I'm by no means an expert. What I can tell you is that OJB requires an OJB_SEQ table in the database. This allows OJB to hanlde autoincrementing fields on its own, and not on any one specific implementation. I have been using OJB with MsAccess and haven't had a problem yet (crossing my fingers) :-) Graham -Original Message- From: Joe Barefoot [mailto:[EMAIL PROTECTED]] Sent: Tuesday, July 23, 2002 4:04 PM To: Struts Users Mailing List Subject: RE: Struts Persistence I haven't had time to play with OJB yet, but does anyone know if it works properly with Oracle? I mean, I know it should work fine with any DB for generating select and update statements, but what about inserts when you are using sequence numbers? The increments are handled differently in different databases, so I'm curious how OJB addresses this (if at all). thanks, Joe -Original Message- From: Mete Kural [mailto:[EMAIL PROTECTED]] Sent: Tuesday, July 23, 2002 11:42 AM To: Struts Users Mailing List; [EMAIL PROTECTED] Subject: RE: Struts Persistence OJB is great. (jakarta.apache.org/ojb) You can easily map your tables to objects. It works with MySQL. I recommend that you implement DAO objects that call OJB's APIs and keep all the persistence operations there. Good luck, Mete --- James Mitchell [EMAIL PROTECTED] wrote: I'll be uploading a modified version of the example app (struts-example.war) which uses OJB as soon as I can finish it. Basic O/R mapping using JDO API w/MySql on the backend. It's not there yet, but here's the url: http://sourceforge.net/projects/struts/ James Mitchell Software Engineer\Struts Evangelist Struts-Atlanta, the Open Minded Developer Network http://www.open-tools.org/struts-atlanta -Original Message- From: Elderclei R Reami [mailto:[EMAIL PROTECTED]] Sent: Tuesday, July 23, 2002 2:54 PM To: [EMAIL PROTECTED] Subject: Struts Persistence Hi again, Does anyone know about usage of persistence frameworks, like Torque OJB from Apache Group, with Struts? Thanks for all the help with code generation. I downloaded StrutsBuilder and Eclipse+EasyStruts to evaluate and they are great tools. About self- generated apps from database schema and beer... Huhr! Sounds nice and we can start a new project from the idea :) Best Regards, Elder -- 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] __ Do You Yahoo!? Yahoo! Health - Feel better, live better http://health.yahoo.com -- 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: Struts Persistence
At 12:24 PM -0700 2002/07/23, Joe Barefoot wrote: That makes sense, I was wondering how it could handle it in a generic fashion. I suppose it adds a row to the OJB_SEQ table for every table column that it has to autoincrement. I further suppose it could accomplish an auto-increment insert with a single DB call if they use a nested select from the OJB_SEQ table for the auto-increment column, followed by an update to the OJB_SEQ table to actually increment that column value, both statements executed as a single batch call. OJB is pretty pluggable; you can specify an implementation class of a SequenceManager interface which can take responsibility for assigning primary keys. You could make one that knows about your existing sequences. http://jakarta.apache.org/ojb/sequencemanager.html Joe -- -- * Joe Germuska{ [EMAIL PROTECTED] } It's pitiful, sometimes, if they've got it bad. Their eyes get glazed, they go white, their hands tremble As I watch them I often feel that a dope peddler is a gentleman compared with the man who sells records. --Sam Goody, 1956 tune in posse radio: http://www.live365.com/stations/289268 -- To unsubscribe, e-mail: mailto:[EMAIL PROTECTED] For additional commands, e-mail: mailto:[EMAIL PROTECTED]
ActionError messages
Is it possible to set an ActionError similar to the following? errors.add(ActionErrors.GLOBAL_ERROR, new ActionError(myMessage)); where myMessage is a variable? Jerry Jalenak Web Publishing LabOne, Inc. 10101 Renner Blvd. Lenexa, KS 66219 (913) 577-1496 [EMAIL PROTECTED] This transmission (and any information attached to it) may be confidential and is intended solely for the use of the individual or entity to which it is addressed. If you are not the intended recipient or the person responsible for delivering the transmission to the intended recipient, be advised that you have received this transmission in error and that any use, dissemination, forwarding, printing, or copying of this information is strictly prohibited. If you have received this transmission in error, please immediately notify LabOne at (800)388-4675. -- To unsubscribe, e-mail: mailto:[EMAIL PROTECTED] For additional commands, e-mail: mailto:[EMAIL PROTECTED]
RE: Struts Persistence
Very cool. And if you already have populated tables, I assume you can specify what number to start at, etc. I'd really like to test out OJB with an EJB session layer, and compare it with an EJB session + entity CMP implementation, just to see what the performance metrics look like when you hit each with a load test. I wonder if anyone working on OJB has done this already peace, Joe -Original Message- From: Chuck Cavaness [mailto:[EMAIL PROTECTED]] Sent: Tuesday, July 23, 2002 12:33 PM To: Struts Users Mailing List Subject: RE: Struts Persistence I used this on the Storefront application including in several chapters as if my memory serves me correctly, you can plugin different sequence manager implementations in the ojb.properties class. Something like this I think: SequenceManagerClass=ojb.broker.util.sequence.SequenceManagerHighLowImpl There are several other properties that you can control as well, like are the ids global to all enties or does each entity have its own set. Very nice. chuck At 12:24 PM 7/23/2002 -0700, you wrote: That makes sense, I was wondering how it could handle it in a generic fashion. I suppose it adds a row to the OJB_SEQ table for every table column that it has to autoincrement. I further suppose it could accomplish an auto-increment insert with a single DB call if they use a nested select from the OJB_SEQ table for the auto-increment column, followed by an update to the OJB_SEQ table to actually increment that column value, both statements executed as a single batch call. I'll have to check it outthanks! peace, Joe -Original Message- From: Graham Lounder [mailto:[EMAIL PROTECTED]] Sent: Tuesday, July 23, 2002 12:08 PM To: Struts Users Mailing List Subject: RE: Struts Persistence I've been using OJB for the past couple of weeks so I'm by no means an expert. What I can tell you is that OJB requires an OJB_SEQ table in the database. This allows OJB to hanlde autoincrementing fields on its own, and not on any one specific implementation. I have been using OJB with MsAccess and haven't had a problem yet (crossing my fingers) :-) Graham -Original Message- From: Joe Barefoot [mailto:[EMAIL PROTECTED]] Sent: Tuesday, July 23, 2002 4:04 PM To: Struts Users Mailing List Subject: RE: Struts Persistence I haven't had time to play with OJB yet, but does anyone know if it works properly with Oracle? I mean, I know it should work fine with any DB for generating select and update statements, but what about inserts when you are using sequence numbers? The increments are handled differently in different databases, so I'm curious how OJB addresses this (if at all). thanks, Joe -Original Message- From: Mete Kural [mailto:[EMAIL PROTECTED]] Sent: Tuesday, July 23, 2002 11:42 AM To: Struts Users Mailing List; [EMAIL PROTECTED] Subject: RE: Struts Persistence OJB is great. (jakarta.apache.org/ojb) You can easily map your tables to objects. It works with MySQL. I recommend that you implement DAO objects that call OJB's APIs and keep all the persistence operations there. Good luck, Mete --- James Mitchell [EMAIL PROTECTED] wrote: I'll be uploading a modified version of the example app (struts-example.war) which uses OJB as soon as I can finish it. Basic O/R mapping using JDO API w/MySql on the backend. It's not there yet, but here's the url: http://sourceforge.net/projects/struts/ James Mitchell Software Engineer\Struts Evangelist Struts-Atlanta, the Open Minded Developer Network http://www.open-tools.org/struts-atlanta -Original Message- From: Elderclei R Reami [mailto:[EMAIL PROTECTED]] Sent: Tuesday, July 23, 2002 2:54 PM To: [EMAIL PROTECTED] Subject: Struts Persistence Hi again, Does anyone know about usage of persistence frameworks, like Torque OJB from Apache Group, with Struts? Thanks for all the help with code generation. I downloaded StrutsBuilder and Eclipse+EasyStruts to evaluate and they are great tools. About self- generated apps from database schema and beer... Huhr! Sounds nice and we can start a new project from the idea :) Best Regards, Elder -- 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] __ Do You Yahoo!? Yahoo! Health - Feel better, live better http://health.yahoo.com -- 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:
RE: Struts Persistence
I was hoping that someone was going to say. Yes, I'm building an add-on component that allows you to use your existing form-bean declarations to map your tables right in the struts-config.xml and you can even use DynaActionForms! Any takers? (Tumble weeds blow by as the wind howls) James Mitchell Software Engineer\Struts Evangelist Struts-Atlanta, the Open Minded Developer Network http://www.open-tools.org/struts-atlanta -Original Message- From: Joe Barefoot [mailto:[EMAIL PROTECTED]] Sent: Tuesday, July 23, 2002 3:54 PM To: Struts Users Mailing List Subject: RE: Struts Persistence Very cool. And if you already have populated tables, I assume you can specify what number to start at, etc. I'd really like to test out OJB with an EJB session layer, and compare it with an EJB session + entity CMP implementation, just to see what the performance metrics look like when you hit each with a load test. I wonder if anyone working on OJB has done this already peace, Joe -Original Message- From: Chuck Cavaness [mailto:[EMAIL PROTECTED]] Sent: Tuesday, July 23, 2002 12:33 PM To: Struts Users Mailing List Subject: RE: Struts Persistence I used this on the Storefront application including in several chapters as if my memory serves me correctly, you can plugin different sequence manager implementations in the ojb.properties class. Something like this I think: SequenceManagerClass=ojb.broker.util.sequence.SequenceManagerHighLowImpl There are several other properties that you can control as well, like are the ids global to all enties or does each entity have its own set. Very nice. chuck At 12:24 PM 7/23/2002 -0700, you wrote: That makes sense, I was wondering how it could handle it in a generic fashion. I suppose it adds a row to the OJB_SEQ table for every table column that it has to autoincrement. I further suppose it could accomplish an auto-increment insert with a single DB call if they use a nested select from the OJB_SEQ table for the auto-increment column, followed by an update to the OJB_SEQ table to actually increment that column value, both statements executed as a single batch call. I'll have to check it outthanks! peace, Joe -Original Message- From: Graham Lounder [mailto:[EMAIL PROTECTED]] Sent: Tuesday, July 23, 2002 12:08 PM To: Struts Users Mailing List Subject: RE: Struts Persistence I've been using OJB for the past couple of weeks so I'm by no means an expert. What I can tell you is that OJB requires an OJB_SEQ table in the database. This allows OJB to hanlde autoincrementing fields on its own, and not on any one specific implementation. I have been using OJB with MsAccess and haven't had a problem yet (crossing my fingers) :-) Graham -Original Message- From: Joe Barefoot [mailto:[EMAIL PROTECTED]] Sent: Tuesday, July 23, 2002 4:04 PM To: Struts Users Mailing List Subject: RE: Struts Persistence I haven't had time to play with OJB yet, but does anyone know if it works properly with Oracle? I mean, I know it should work fine with any DB for generating select and update statements, but what about inserts when you are using sequence numbers? The increments are handled differently in different databases, so I'm curious how OJB addresses this (if at all). thanks, Joe -Original Message- From: Mete Kural [mailto:[EMAIL PROTECTED]] Sent: Tuesday, July 23, 2002 11:42 AM To: Struts Users Mailing List; [EMAIL PROTECTED] Subject: RE: Struts Persistence OJB is great. (jakarta.apache.org/ojb) You can easily map your tables to objects. It works with MySQL. I recommend that you implement DAO objects that call OJB's APIs and keep all the persistence operations there. Good luck, Mete --- James Mitchell [EMAIL PROTECTED] wrote: I'll be uploading a modified version of the example app (struts-example.war) which uses OJB as soon as I can finish it. Basic O/R mapping using JDO API w/MySql on the backend. It's not there yet, but here's the url: http://sourceforge.net/projects/struts/ James Mitchell Software Engineer\Struts Evangelist Struts-Atlanta, the Open Minded Developer Network http://www.open-tools.org/struts-atlanta -Original Message- From: Elderclei R Reami [mailto:[EMAIL PROTECTED]] Sent: Tuesday, July 23, 2002 2:54 PM To: [EMAIL PROTECTED] Subject: Struts Persistence Hi again, Does anyone know about usage of persistence frameworks, like Torque OJB from Apache Group, with Struts? Thanks for all the help with code generation. I downloaded StrutsBuilder and Eclipse+EasyStruts to evaluate and they are great tools. About self- generated apps from database schema and beer... Huhr! Sounds nice and we can start a new project from the idea :) Best Regards, Elder
RE: html:radio, needing to pre-check a button with DynaActionForm
Well, the radio button will be automatically selected based on the value attribute of the html:radio. If the corresponding property is equal to the value specified, it will be selected automatically. Just make sure that the property is set to whatever it needs to be before it hits the JSP with the radio buttons. ~ Keith http://www.buffalo.edu/~kkamholz -Original Message- From: Glen Mazza [mailto:[EMAIL PROTECTED]] Sent: Tuesday, July 23, 2002 3:47 PM To: [EMAIL PROTECTED] Subject: html:radio, needing to pre-check a button with DynaActionForm Hello, I'm using html:radio tags and I would like one of the radio buttons to be preselected when the JSP screen appears. (My action form is a DynaActionForm which I'm not subclassing.) For example, I'd like to convert this: INPUT type=radio name=searchType value=SSN checked=CHECKED % to this: html:radio property=searchType value=SSN checked=CHECKED % but there is no checked attribute. I've searched for this on the ML Archive, some said for ActionForms to just initialize the property to the value in the AF constructor. However, I'm using a DynaActionForm--how do I set the CHECKED property here? Thanks, Glen _ Do You Yahoo!? Información de Estados Unidos y América Latina, en Yahoo! Noticias. Visítanos en http://noticias.espanol.yahoo.com -- 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: html:radio, needing to pre-check a button with DynaActionForm
Keith == Keith Kamholz Kamholz writes: Keith Well, the radio button will be automatically selected based on the value Keith attribute of the html:radio. If the corresponding property is equal to Keith the value specified, it will be selected automatically. Just make sure that Keith the property is set to whatever it needs to be before it hits the JSP with Keith the radio buttons. This is correct, but I believe before yesterday, it was difficult or impossible to manually set a DynaActionForm property from your Action code. Craig just submitted a change for this yesterday. Read struts-dev over the last few days to read about this change. -- === David M. Karr ; Java/J2EE/XML/Unix/C++ [EMAIL PROTECTED] -- To unsubscribe, e-mail: mailto:[EMAIL PROTECTED] For additional commands, e-mail: mailto:[EMAIL PROTECTED]
RE: Refering form variables from the JavaScript function
Have you seen the way its done in the struts-example.war? James Mitchell Software Engineer\Struts Evangelist Struts-Atlanta, the Open Minded Developer Network http://www.open-tools.org/struts-atlanta -Original Message- From: Ramu, Manjukumar [PRDUS] [mailto:[EMAIL PROTECTED]] Sent: Tuesday, July 23, 2002 3:35 PM To: Struts Users Mailing List Subject: Refering form variables from the JavaScript function Hello, I have a form html:form action=/nominationAction in a JSP, I am calling Javascript function for an event. I want to set some values of the parameters within the form in using Javascript. For Ex : function f1 (value) { form.name = value } Can any body tell me how to refer form variables from the JavaScript function in Struts based JSP? I appreciate your help! Thanks, Manju -- To unsubscribe, e-mail: mailto:[EMAIL PROTECTED] For additional commands, e-mail: mailto:[EMAIL PROTECTED]