Re: Database backed forms
I'm not sure if this would work, as dynamic forms have their configurations frozen when the application starts up. You would have to simply write your own version of the dynamic form class, overriding any behavior that you wish to change. I don't think this would be too hard to do. On 2004-Mar-18 10:03, Melonie Brown wrote: I have written a very rough website page content management system using Struts and OJB. (The goal being to allow end users to modify content without having to know anything about Struts or the code behind the pages.) That's working all well and good, but now they want to be able to create forms on the fly. I would like to store all of the form components and validation in the database as well, but I'm not sure how to represent that in Struts (since there's no ValidatorActionDatabaseForm). I would appreciate any advice, tips/techniques, or gotchas that you guys could provide. __ Do you Yahoo!? Yahoo! Mail - More reliable, more storage, less spam http://mail.yahoo.com - To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED] -- Nick Heudecker System Mobile, Inc. Email: [EMAIL PROTECTED] Web: http://www.systemmobile.com - To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED]
Re: Struts cookbook
Wouldn't this be a great use of the (already existing) Struts Wiki? On 2004-Mar-18 13:03, Hubert Rabago wrote: I've had this idea for months now and actually had some entries already written (with full web apps to illustrate) and I've also started collecting cookbook entries from responses to this mailing list. I was in the process of writing the app to hold them late last year but got sidetracked. So yes, I'm interested and would certainly participate. What did you have in mind? Where do you plan to host this? What would the interface be? Would it contain just code samples or would there be some way to also attach actual files/classes? Hubert --- Andy Engle [EMAIL PROTECTED] wrote: Hi all, I am a huge fan of O'Reilly's cookbooks, which seem to contain a good deal of useful material for doing all sorts of different things. Today I thought about the idea of making a Struts cookbook, although two things would be different from how O'Reilly does it: 1. It wouldn't be a published book, but rather a web site, and 2. I'm not going to be writing all of it With that in mind, I would like to ask all of you (who I have received some excellent advice from, by the way) if any of you would be interested in contributing material to such a web site. I simply don't have the time or experience to come up with everything, but I'm sure that collectively we could put something together that could be pretty slick. I could easily host the site, and perhaps simply organize all of the information I receive from you. I appreciate all the information already available with Struts, but I also like it when I can simply look it up and be done with it. I would like to see recipes posted there that cover everything from how to do stuff with tags, iBatis, tiles, and whatever else. Even delving into other stuff like web services and how that ties in with Struts would be good. I don't want to focus so much on concept as I would simply how to get something done quickly and easily. What do you think? Good idea? Dumb idea? I'm interested in your thoughts on such a thing. Looking forward to hearing from you. Regards, Andy __ Do you Yahoo!? Yahoo! Mail - More reliable, more storage, less spam http://mail.yahoo.com - To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED] -- Nick Heudecker System Mobile, Inc. Email: [EMAIL PROTECTED] Phone: 734.604.9192 Web: http://www.systemmobile.com - To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED]
Re: Can a a href be made to function as a 'submit'
Sure, all you need is a bit of JavaScript that submits your form tag. The 'myForm' form is representative: form name=myForm input type=text name=someField1/ input type=text name=someField2/ /form a href=javascript:submitForm();Click/a And finally, the function: script language=JavaScript function submitForm() { document.myForm.submit(); } /script That should do it. On 2004-Feb-25 10:02, Au-Yeung, Stella H wrote: Hi: Can a a href be made to function as a 'submit' and upon submission, all the formBean properties are remembered in the Action class that handles it. When I try to use just the a href I can't get the formBean properties to be remembered. But I can't change my list of a href as submit buttons because I need to pass arguments on each of the a href. Here's an example of what I try to do on my JSP page: When the user clicks a link to see a picture of an item, this JSP will be replaced by another JSP with the picture. So before I leave this page, I must save the Personal information and the item list in a temporary location so when I return to this page, those values will be repopulated. But my problem is, clicking the a href link will not carry over he formBean properties to the Action class for me to save. 'Submit' will but I can't change those a href to 'submit' because I need to pass the item index (0,1,2 etc.) through each a href to the Action class. Personal information: First Name: Last Name: Mailing Address: List of items in your shopping cart: ABC tennis racket 1 a href link to see a picture and pass the index of this item to the Action class Wilson tennis ball5 a href link to see a picture and pass the index of this item to he Action class XYZ tenis shirt 2 a href link to see a picture and pass the index of this item to he Action class I appreciate any suggestion. - To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED] -- Nick Heudecker System Mobile, Inc. Email: [EMAIL PROTECTED] Web: http://www.systemmobile.com - To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED]
Re: Can a a href be made to function as a 'submit'
Assuming I know what you're talking about, this is also pretty easy to address: The form is hidden, with one hidden field. It doesn't have to be hidden, certainly. form name=myForm input type=hidden name=partIdx/ /form The link calls the JavaScript function, passing in the current parameter. a href=javascript:submitForm('%=index%');Click/a The function will set the value of the form field and call submit. script language=JavaScript function submitForm(indexVal) { document.myForm.partIdx.value = indexVal; document.myForm.submit(); } /script On 2004-Feb-25 11:02, Au-Yeung, Stella H wrote: But each of my a href is within a html:iterate indexId=index . tag and it passes the index to the next page base on which item in the list the user clicks. How can I do that with what you suggested? My current a href: a href=app/Order/DisplayPictureRequest.exec?partIdx=%=index% img src=images/icoClick.gif/anbsp; Thanks! -Original Message- From: Nick Heudecker [mailto:[EMAIL PROTECTED] Sent: Wednesday, February 25, 2004 10:45 AM To: Struts Users Mailing List Subject: Re: Can a a href be made to function as a 'submit' Sure, all you need is a bit of JavaScript that submits your form tag. The 'myForm' form is representative: form name=myForm input type=text name=someField1/ input type=text name=someField2/ /form a href=javascript:submitForm();Click/a And finally, the function: script language=JavaScript function submitForm() { document.myForm.submit(); } /script That should do it. On 2004-Feb-25 10:02, Au-Yeung, Stella H wrote: Hi: Can a a href be made to function as a 'submit' and upon submission, all the formBean properties are remembered in the Action class that handles it. When I try to use just the a href I can't get the formBean properties to be remembered. But I can't change my list of a href as submit buttons because I need to pass arguments on each of the a href. Here's an example of what I try to do on my JSP page: When the user clicks a link to see a picture of an item, this JSP will be replaced by another JSP with the picture. So before I leave this page, I must save the Personal information and the item list in a temporary location so when I return to this page, those values will be repopulated. But my problem is, clicking the a href link will not carry over he formBean properties to the Action class for me to save. 'Submit' will but I can't change those a href to 'submit' because I need to pass the item index (0,1,2 etc.) through each a href to the Action class. Personal information: First Name: Last Name: Mailing Address: List of items in your shopping cart: ABC tennis racket 1 a href link to see a picture and pass the index of this item to the Action class Wilson tennis ball 5 a href link to see a picture and pass the index of this item to he Action class XYZ tenis shirt 2 a href link to see a picture and pass the index of this item to he Action class I appreciate any suggestion. - To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED] -- Nick Heudecker System Mobile, Inc. Email: [EMAIL PROTECTED] Web: http://www.systemmobile.com - To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED] - To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED] -- Nick Heudecker System Mobile, Inc. Email: [EMAIL PROTECTED] Web: http://www.systemmobile.com - To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED]
Re: Display TagLib Struts
You need to ensure that you have to correct version of the commons-collections.jar, which is discussed here: http://displaytag.sourceforge.net/install.html On 2004-Feb-17 13:02, Unmesh Nadkarni wrote: I have started working successfully on the Display TagLib in Struts. There are no issues except that the export to .xls, .csv format gives following errors in Tomcat. Exception: javax.servlet.ServletException:org.apache.commons.collections.IteratorUt ils.arrayIterator Root cause: java.lang.NoSuchMethodError:org.apache.commons.collections.IteratorUtils .arrayIterator Any leads to the same would be useful. Thanks and Regards Unmesh N -- Nick Heudecker System Mobile, Inc. Email: [EMAIL PROTECTED] Web: http://www.systemmobile.com - To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED]
Re: [SPAM] - Display TagLib Struts - Found word(s) list error e -mail in the Text body.
http://displaytag.sf.net/ On 2004-Feb-17 14:02, Gagn? Jean-Christian wrote: Sorry to ask this, but where do you get the Display Taglib ? The url mentionned [www.displaytaglib.org] is not found. JC -- Nick Heudecker System Mobile, Inc. Email: [EMAIL PROTECTED] Web: http://www.systemmobile.com - To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED]
Re: html:select
form.xx.options[form.xx.selectedIndex].text; On 2004-Feb-17 17:02, Gonzalez, Sergio Eduardo wrote: Hello . I have to get the description from a html:select example in html select name =xx option value=zz/option /select how can I do to get the z value ??? ( using struts ) -- Nick Heudecker System Mobile, Inc. Email: [EMAIL PROTECTED] Web: http://www.systemmobile.com - To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED]
Re: html:select
Yeah, what I do is just use a LabelValueBean form property to pass the value and txt back to the server. I set the text property using the onBlur javascript event. On 2004-Feb-17 17:02, Gonzalez, Sergio Eduardo wrote: I need to send the value and text dispayed to the server -Mensaje original- De: Wendy Smoak [mailto:[EMAIL PROTECTED] Enviado el: martes, 17 de febrero de 2004 17:39 Para: Struts Users Mailing List Asunto: RE: html:select From: Gonzalez, Sergio Eduardo [mailto:[EMAIL PROTECTED] How can I do to send the value displayed ? Can you post the code from the JSP the way it is now? Someone can probably help you change it so that it does what you want. -- Wendy Smoak Application Systems Analyst, Sr. ASU IA Information Resources Management - To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED] Aquest missatge electronic pot contenir informacio confidencial o privilegiada. Si voste no es el destinatari del missatge, o l'ha rebut per error, si us plau notifiqui-ho al remitent i destrueixi el missatge amb tot el seu contingut. Esta completament prohibida qualsevol copia, us o distribucio no autoritzada del contingut d'aquest missatge electronic. Este mensaje electronico puede contener informacion confidencial o privilegiada. Si usted no es el destinatario de este mensaje o lo ha recibido por error, por favor notifiquelo al remitente y destruya el mensaje con todo su contenido. Queda expresamente prohibida cualquier copia, utilizacion o distribucion no autorizada del contenido de este mensaje electronico. This e-mail may contain confidential and/or privileged information. If you are not the intended recipient (or have received this e-mail in error) please notify the sender immediately and destroy this e-mail. Any unauthorized copying, disclosure or distribution of the material in this e-mail is strictly forbidden. - To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED] -- Nick Heudecker System Mobile, Inc. Email: [EMAIL PROTECTED] Phone: 734.604.9192 Web: http://www.systemmobile.com - To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED]
Re: [OT]CVS client
If you use Emacs/XEmacs, I really like PCL-CVS. On 2004-Feb-03 15:02, Ramadoss Chinnakuzhandai wrote: Hi, can anybody suggest me any better CVS client other than WinCVS and JCVS? Tnx in advance, -Ramadoss - To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED] -- Nick Heudecker System Mobile, Inc. Email: [EMAIL PROTECTED] Web: http://www.systemmobile.com - To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED]
Re: Testing DispatchAction with StrutsTestCase
Al, I just set the appropriate request parameter. If the parameter is 'method' and the method I want to test is 'get', it would look like this: addRequestParameter(method, get); On 2004-Feb-02 10:02, Al Rathon wrote: Hi: I am working working on a Struts based web-app that uses DispatchAction to club the methods belonging to each entity in one Action class. I would like to know how to test such an action class using struts test case. Thanks in advance for the help. __ Do you Yahoo!? Yahoo! SiteBuilder - Free web site building tool. Try it! http://webhosting.yahoo.com/ps/sb/ - To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED] -- Nick Heudecker System Mobile, Inc. Email: [EMAIL PROTECTED] Web: http://www.systemmobile.com - To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED]
Re: xdoclet + Dynaforms
Not at all. Had you googled for 'xdoclet dynaforms', you would've found my patch for XDoclet that allows you to generate the form-bean configuration for DynaForms. You may find it here: http://www.systemmobile.com/code/xdoclet-apache-module-sm-1_2b4.zip On 2004-Jan-28 15:01, Raj Atchutuni wrote: I agree. If i want to use xdoclet i have to generate through form beans. But we are losing the spice of Dynaforms. I implemented Dynaforms on my project with out coding Form beans. Now i want to implement xdoclet on top of it. This is just to try xdoclet to generate my struts-config.xml, if possible tiles-def.xml, ApplicationResources.properties for the all the form properties. Any ideas ? I think xdoclet is limited to EJBs Wendy Smoak [EMAIL PROTECTED] wrote: My question is where do i code web-doclet tags when i am not coding form beans ? and is there any ways to auto generate the attributes in ApplicationResources.properties also ? I don't know, but I thought if you were going to use xdoclet, you would have it generate the form beans. -- Wendy Smoak - To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED] - Do you Yahoo!? Yahoo! SiteBuilder - Free web site building tool. Try it! -- Nick Heudecker System Mobile, Inc. Email: [EMAIL PROTECTED] Phone: 734.604.9192 Web: http://www.systemmobile.com - To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED]
Re: BeanUtils Date Converter
Graham, I believe that you need to specify the null returned value: ConvertUtils.registerConverter(new SqlDateConverter(null), java.sql.Date.class); On 2004-Jan-19 15:01, Graham Lounder wrote: Hey all, I know this question has been addressed numerous times but I can't seem to find the answer. I'm trying to convert strings in my forms to java.sql.Date in my dto. Its throwing a conversion error when my form value is null or blank. Is there a way to get nulls or passed through the BeanUtils.copyProperties function? I read that I may be able to create my own converters too. Is there any documentation on this? Cheers, Graham Graham Lounder - Java Developer Spatial Components Division CARIS www.caris.com Tel: +1-506-458-8533 Fax: +1-506-459-3849 CARIS has expanded to new office facilities. Our new mailing address is: 115 Waggoners Lane, Fredericton, New Brunswick, E3B 2L4, Canada. - To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED] -- Nick Heudecker System Mobile, Inc. Email: [EMAIL PROTECTED] Web: http://www.systemmobile.com - To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED]
Re: .NET: We are just like Struts... only better.
I develop with XEmacs on Linux and Windows. You're not living in the past, you're spreading Light to the Great Unwashed. :) I use JDE, tempo, speedbar, pl-cvs, etc. On 2003-40-28 19:12, Curtis Taylor wrote: This brings up an interesting point (for me, at least): Is anyone on this list developing under Linux w/XEmacs or Emacs? I'm curious as to whether I'm living in the past or not...;-) - Curtis Taylor (no relation to Robert...;-) On Sun, 2003-12-28 at 17:55, Nick Faiz wrote: but still, I'm not dragging and dropping html form controls (or struts-html.tld taglib controls) to a designer screen, linking code and compiling. I believe that various IDEs are beginning to allow this. I saw a demonstration of a Sun's Forte at a Java User Group, a while ago, and they were dropping and dragging JATO taglibs. WebLogic Workshop can apparently allow this using Struts. I don't know if any of this qualifies as decent programming, however. Nick - To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED] -- Nick Heudecker System Mobile, Inc. Email: [EMAIL PROTECTED] Web: http://www.systemmobile.com - To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED]
Re: inputting dates
Oddly enough, I was going to write about how to handle this in my blog today. What I do to manage this is to use an object that wraps a java.util.Date and provides getters and setters for the necessary fields, such as hour, minute, day, month, and year. Such an object might look like: public class DateWrapper { private Date d; public DateWrapper(Date d) { internal = d; } public Date getDate() { // return the updated Date instance. } public int getHour() { // return the hour as an int, either using a Calendar instance or // by parsing it out via SimpleDateFormat. } public void setHour(int hour) { // set the hour in the date using a Calendar instance. } } I'm sure you can figure out the rest of it. The DateWrapper object is then used as a field in your ActionForm or DynaForm. Then, in the JSP, just use the appropriate property names in your html:select lists: html:select property=startDate.hour ... /html:select html:select property=startDate.minute ... /html:select If you just want to present the underlying Date instance, just do something like this: fmt:formatDate value=${myForm.map.startDate.date} pattern=-MM-dd h:m a/ Hope that helps. This is the same mechanism I use and I'm having great results with it. -- Nick Heudecker SystemMobile, Inc. Email: [EMAIL PROTECTED] Web: http://www.systemmobile.com - To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED]
Re: [ANNOUNCE] New Release for XDoclet Support for Struts DynaForms
Due to a mistake on my part the updated bundle may not have been deployed to the webserver. Sorry about that, but that's what I get for trying to get a bundle out the door when I'm dead tired. This has been fixed and the actual release can be found at: http://www.systemmobile.com/code/xdoclet-apache-module-sm-1_2b4.zip On Thu, Nov 20, 2003 at 11:46:53PM -0500, Nick Heudecker wrote: All: I've just finished the second version of the XDoclet extension to support generating Struts DynaForm configs. The content of the README are below. The fully documented bundle can be found at: http://www.systemmobile.com/code/xdoclet-apache-module-sm-1_2b4.zip Changes since last release -- -) The only thing needed to specify a form-property element is @struts.dynaform-field. Everything else can be determined from the getter method. -) Superclasses are now checked for method-level tags. Handy for defining forms throughout an object hierarchy. -) You can now have multiple @struts.dynaform-field tags per method. Useful if you need to have an object property presented as multiple fields in the form. (I use this for dates sometimes.) -) The 'size' attribute for form-property tags is now supported. -) I think I fixed a bug with name collision when generating of forms from an object hierarchy. Installation To install, simply extract the zip and replace your existing xdoclet-apache-module-1.2b4.jar with xdoclet-apache-module-sm-1.2b4.jar. Ant --- Since this feature runs when the strutsconfigxml XDoclet target runs, you just use that Ant task. An example is below: target name=webapp-config taskdef classname=xdoclet.modules.web.WebDocletTask classpathref=project.class.path name=webdoclet/ webdoclet destDir=etc/web excludedTags=@author,@version,@todo mergeDir=etc/merge fileset dir=src include name=**/*.java/ /fileset strutsconfigxml destDir=etc/web mergeDir=etc/merge version=1.1/ /webdoclet /target Usage - This patch to the XDoclet Apache module provides support for Struts DynaForms. The following tags are supported: Class Level Tags: @struts.dynaform Attributes: name - The name of the form bean in the config. [required] type - The type of DynaForm. [required] description - Descriptive string. [optional] className - The config class. [optional] Method Level Tags: @struts.dynaform-field Attributes: name - The name of the form field. If not specified, the property name of the method is used. [optional] type - The type of field. If not specified, the return type of the getter is used. [optional] initial - The initial value of the field. [optional] className - The config class. [optional] There is a simple example in the examples directory. Hacking --- Adding this functionality didn't require any code changes, just a small change to the struts_config.xdt template, and the addition of the struts_dynaform.xdt. If you want to add additional functionality, you'll probably want to start with struts_dynaform.xdt, which can be found in the xdoclet/modules/apache/struts/resources directory once the JAR is extracted. Contact --- I can be reached via email at [EMAIL PROTECTED] -- Nick Heudecker SystemMobile, Inc. Email: [EMAIL PROTECTED] Web: http://www.systemmobile.com - To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED] -- Nick Heudecker SystemMobile, Inc. Email: [EMAIL PROTECTED] Phone: 734.604.9192 Web: http://www.systemmobile.com - To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED]
Re: MessageResources...
I'm not clear on what you want to do. Do you want the name of the resources file? On Thu, Nov 20, 2003 at 02:22:04PM -, Mitesh Patel wrote: Hi, Using Struts 1.1b2 Is it possible to get the message-resource parameter in the struts-config file from a customTag? message-resources parameter=com.misys.sts.ms.customiser.utils.ApplicationResources / (Any examples would be much appreciated) Thanks Mitesh Patel This email message is intended for the named recipient only and may be privileged and/or confidential. If you are not the intended or named recipient or have received this email in error then you should not copy, forward or disclose it to any other person. The views and opinions expressed in this e-mail are those of the sender and may not represent the views and opinions of Misys Securities Trading Systems. If you have received this email in error you should destroy it or contact postmaster [EMAIL PROTECTED] so that we may take appropriate action. - - To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED] -- Nick Heudecker SystemMobile, Inc. Email: [EMAIL PROTECTED] Web: http://www.systemmobile.com - To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED]
Re: forward to new window.
IMO, this isn't trivial, but it's solvable. The problem is that you have to get the client to behave in a certain way based on what's been submitted to the servlet. I think I would try to solve this with a JavaScript RPC call, in which the form was submitted as a background process and the action returned the appropriate JavaScript to either open the new page in this same, or a new browser window. Not easy, but relatively portable if done right. All of the other ways I can thing of to do this have serious problems. I'm interested in hearing what others think. On Fri, Nov 21, 2003 at 09:38:03AM +0530, deepaksawdekar wrote: Hi, I have a requirement, based on certain condition in action class i want the forward to open a page in same window or different page in new window how can i implement this. thanks in advance Deepak. - To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED] -- Nick Heudecker SystemMobile, Inc. Email: [EMAIL PROTECTED] Web: http://www.systemmobile.com - To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED]
Re: forward to new window.
But that won't work because the initial page will be waiting for a page to be returned to it. You could just send them back to the location they came from, but that may not work everytime based on the workflow and how the arrived at the initial location in the first place. On Fri, Nov 21, 2003 at 09:46:57AM +0530, Abhijeet Mahalkar wrote: forward it to some JSP page and in that jsp page say window.open(test.jsp,.);; I don't thing you can forward and open a window through action class.. simple Abhijeet - Original Message - From: deepaksawdekar [EMAIL PROTECTED] To: Struts Users Mailing List [EMAIL PROTECTED] Sent: Friday, November 21, 2003 9:38 AM Subject: forward to new window. Hi, I have a requirement, based on certain condition in action class i want the forward to open a page in same window or different page in new window how can i implement this. thanks in advance Deepak. - To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED] - To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED] -- Nick Heudecker SystemMobile, Inc. Email: [EMAIL PROTECTED] Web: http://www.systemmobile.com - To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED]
[ANNOUNCE] New Release for XDoclet Support for Struts DynaForms
All: I've just finished the second version of the XDoclet extension to support generating Struts DynaForm configs. The content of the README are below. The fully documented bundle can be found at: http://www.systemmobile.com/code/xdoclet-apache-module-sm-1_2b4.zip Changes since last release -- -) The only thing needed to specify a form-property element is @struts.dynaform-field. Everything else can be determined from the getter method. -) Superclasses are now checked for method-level tags. Handy for defining forms throughout an object hierarchy. -) You can now have multiple @struts.dynaform-field tags per method. Useful if you need to have an object property presented as multiple fields in the form. (I use this for dates sometimes.) -) The 'size' attribute for form-property tags is now supported. -) I think I fixed a bug with name collision when generating of forms from an object hierarchy. Installation To install, simply extract the zip and replace your existing xdoclet-apache-module-1.2b4.jar with xdoclet-apache-module-sm-1.2b4.jar. Ant --- Since this feature runs when the strutsconfigxml XDoclet target runs, you just use that Ant task. An example is below: target name=webapp-config taskdef classname=xdoclet.modules.web.WebDocletTask classpathref=project.class.path name=webdoclet/ webdoclet destDir=etc/web excludedTags=@author,@version,@todo mergeDir=etc/merge fileset dir=src include name=**/*.java/ /fileset strutsconfigxml destDir=etc/web mergeDir=etc/merge version=1.1/ /webdoclet /target Usage - This patch to the XDoclet Apache module provides support for Struts DynaForms. The following tags are supported: Class Level Tags: @struts.dynaform Attributes: name - The name of the form bean in the config. [required] type - The type of DynaForm. [required] description - Descriptive string. [optional] className - The config class. [optional] Method Level Tags: @struts.dynaform-field Attributes: name - The name of the form field. If not specified, the property name of the method is used. [optional] type - The type of field. If not specified, the return type of the getter is used. [optional] initial - The initial value of the field. [optional] className - The config class. [optional] There is a simple example in the examples directory. Hacking --- Adding this functionality didn't require any code changes, just a small change to the struts_config.xdt template, and the addition of the struts_dynaform.xdt. If you want to add additional functionality, you'll probably want to start with struts_dynaform.xdt, which can be found in the xdoclet/modules/apache/struts/resources directory once the JAR is extracted. Contact --- I can be reached via email at [EMAIL PROTECTED] -- Nick Heudecker SystemMobile, Inc. Email: [EMAIL PROTECTED] Web: http://www.systemmobile.com - To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED]
Re: IDE
initiate type=flame-war Of course, as everyone knows, *REAL* programmers use vi (which is way better than emacs)... ;- /initiate Sorry, but I had to respond to this. :) Emacs has an excellent Java development environment called JDE: (http://jdee.sunsite.dk). It also has context-sensitive completion, templates, IRC clients, nntp/mail clients, a shell (eshell), excellent integration with CVS, Subversion, ClearCase, Perforce, etc... Oh, I forgot to mention the web browsers, games, calendars, and integrated wiki. This may sound shocking, but it also has a text editor. :) Before you complain about the operating footprint of EMACS, compare it with Eclipse or NetBeans. Certainly, vi has a smaller footprint than EMACS, but how big does a wrapper around cat and ed need to be? :) From EMACS faith.el... __ 24:34 EMACS is the light of the elispland and the editland. Its light may be compared to a niche that enshrines a lamp, the lamp within a crystal of star-like brilliance. It is lit from a blessed olive tree neither eastern nor western. Its very oil would almost shine forth, though no fire touched it. Light upon light; EMACS guides to Its light whom It will. __ 20:114 Do not be quick to recite the Emacs-Manual before its revelation is completed, but rather say: EMACS, increase my knowledge. __ Just trying to bring light to the heathens. I'm done now. :) -- Nick Heudecker SystemMobile, Inc. Email: [EMAIL PROTECTED] Web: http://www.systemmobile.com - To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED]
Re: forwarding with html:rewrite
Try logic:redirect. On Mon, Nov 17, 2003 at 06:20:20PM +0200, Altug B. Altintas wrote: Hi , Is it possible forwarding and html:rewrite can be used together. For example % response.sendRedirect( html:rewrite page='/jsp/login.jsp' / ); // doesn't work % also jsp:forward page=html:rewrite page='/jsp/login.jsp' / doesn't work either any idea ? Regards - To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED] -- Nick Heudecker SystemMobile, Inc. Email: [EMAIL PROTECTED] Web: http://www.systemmobile.com - To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED]
Re: bean:define question
It doesn't work because you must put the variable into the page scope: % List myList = (List) someList; pageContext.setAttribute(myList, myList); % If I have % List myList = (List) someList; % where someList is a list of objects whose name property I want to display in a dropdown, why doesn't the following work? bean:define id=availableNames name=myList type=java.util.List / html:options collection=availableNames property=name/ -- Nick Heudecker SystemMobile, Inc. Email: [EMAIL PROTECTED] Web: http://www.systemmobile.com - To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED]
Re: R: who want to join xmoon project ?
David, There has been discussion on the Hibernate forums and mailing lists that dynabeans will be deprecated in a release after 2.1. I do not believe that a replacement will be made available. If you would like to voice your opinion on this, please visit the Hibernate forums at: http://forum.hibernate.org/ On Thu, Nov 13, 2003 at 10:24:31AM -0500, David Friedman wrote: Mario, Where did you hear that dynabean will not be supported? I'm using the 2.1b6 release and it has components that can be dynabeans. I didn't see any notes about it going away anytime soon. (not that I've used those dynabean components yet). Regards, David -Original Message- From: Mario [mailto:[EMAIL PROTECTED] Sent: Thursday, November 13, 2003 10:02 AM To: 'Struts Users Mailing List' Subject: R: R: who want to join xmoon project ? Yes but i'll remove it because hibernate probably will not support dynabean in the future. i'm using commons sql and i'll publish another demo soon (i hope) -- Nick Heudecker SystemMobile, Inc. Email: [EMAIL PROTECTED] Web: http://www.systemmobile.com - To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED]
Re: Apply an Xslt to the struts-config.xml
Adrien, StrutsDoc, my project, does this. You can check it out at: http://struts.sf.net/strutsdoc Feel free to contact me with questions or comments. On Wed, Nov 12, 2003 at 02:41:22PM +0100, Adrien GEYMOND wrote: Hello all, I am looking for a nice presentation of the struts-config.xml. I want to apply a Xslt file on the struts-config.xml in order to have a well displayed view of my struts-config. the result format should be HTML, SVG or Does somedy have already seen something like that ? Is there a tool, somebody has already developped an Xsl for doing that ? Today, i've found on google a Xslt which examines the struts-config.xml and looks for inconsistencies and reports the errors. http://www.aida2.org/ndpsoftware.com/downloads-xsl-struts.php thanks for advance ... adrien - To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED] -- Nick Heudecker SystemMobile, Inc. Email: [EMAIL PROTECTED] Web: http://www.systemmobile.com - To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED]
Re: What's the best choice for connection pooling with Struts and PostgreSQL
Hi Bruce, I personally prefer C3P0 over DBCP. I've had problems with DBCP in the past, and the support for C3P0 seems to be better. You can find it on Sourceforge. On Sun, Nov 02, 2003 at 08:56:43AM +0800, ZYD wrote: Dear all, I'm writing my Struts application using PostgreSQL as the backend database. Could you give me some advice on choosing the connection pooling framework/methods? I wrote my own connection pooling classes, but if there are some good frameworks from jakarta, it definitely worth a try. Any response is greatly appreciated. bruce -- Nick Heudecker SystemMobile, Inc. Email: [EMAIL PROTECTED] Web: http://www.systemmobile.com - To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED]
Re: [OT - JavaScript] Setting value on a html:select/
The trick I generally use is the onFocus event handler. I think it'll work with select tags: select onFocus=this.blur(); ... /select On Wed, Oct 29, 2003 at 11:11:04AM -0600, Jerry Jalenak wrote: Melissa / James - Thanks for the replies. It does have something to do with setting the 'disabled' attribute to 'true'. Unfortunately, per W3C spec, the select/ tag doesn't support a 'readonly' attribute, only a 'disabled' attribute. Do I need to disable the options? or is there a better way to not allow a user to select a different option? Jerry Jalenak Development Manager, Web Publishing LabOne, Inc. 10101 Renner Blvd. Lenexa, KS 66219 (913) 577-1496 [EMAIL PROTECTED] -Original Message- From: Melissa L Kelley [mailto:[EMAIL PROTECTED] Sent: Wednesday, October 29, 2003 11:08 AM To: Struts Users Mailing List Subject: Re: [OT - JavaScript] Setting value on a html:select/ On Wed, 29 Oct 2003, Jerry Jalenak wrote: I've got two radio buttons on a form. If the user clicks the second radio button, I need to force the value of a following html:select/ to a specific value, and disable the select. So, using JavaScript, on my radio button I fire an onclick event that run a real simple javascript function. In this function I've tried using [...] When you say disable the select, are you using the disabled attribute for the select tag to accomplish this? If so, then the value of that form element will not be sent with the HTTP request. If you want them to not change it, set it to readonly instead of disabled. 'Doh!' moment, but how do I do this? TIA! Jerry Jalenak -- Nick Heudecker SystemMobile, Inc. Email: [EMAIL PROTECTED] Web: http://www.systemmobile.com - To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED]
Re: Struts on WebSphere 3.5
I think the problem I had with this was related to precompiling the JSPs. Maybe try turning off 'precompile jsps' and see what happens. On Wed, Oct 22, 2003 at 04:07:43PM -0500, Ruth, Brice wrote: Does WS 3.5 support the minimum JSP requirements set forth by Struts? Thomas Schneider wrote: Has anyone experiences in getting struts installed on a WebSphere Application Server v3.5? I tried to get the struts-example.war running as desribed at http://jakarta.apache.org/struts/userGuide/installation-was352-x.html but I still get the error Cannot find message resources under key org.apache.struts.action.MESSAGE. What does it mean? The error is mentioned in the article above: then your application is most likely still bombing on the struts-config issue that Richard discovered., but who is Richard? Thanks for help or any informations regarding struts with WAS v3.5 -- Nick Heudecker SystemMobile, Inc. Email: [EMAIL PROTECTED] Web: http://www.systemmobile.com - To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED]
[ANNOUNCE] Struts Message Resource Doc
Afternoon all, I've written a short article detailing usage of the message resources functionality with Struts. It seems like a lot of people are having problems with it, so I'm hoping that this will shed some light on this topic. You can find it at: http://www.systemmobile.com/articles/strutsMessageResources.html Feedback is appreciated. -- Nick Heudecker SystemMobile, Inc. Email: [EMAIL PROTECTED] Web: http://www.systemmobile.com - To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED]
Re: [ANNOUNCE] Struts Message Resource Doc
1. Setting the null attribute to false will display missing resource values as ???key??? instead of displaying null. That's not totally accurate, but it gets the idea across. Perhaps you could mention how the string is actually constructed??? 2. The Internationalization is not correct (unless you meant it in a different context). See o.a.s.u.MessageResources. Good points. I'll make corrections tonight. 3. You didn't mention the Struts-Atlanta Just kidding ;) I wasn't aware that there was anything noteworthy about ATL. :) -- Nick Heudecker SystemMobile, Inc. Email: [EMAIL PROTECTED] Web: http://www.systemmobile.com - To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED]
Re: [ANNOUNCE] Struts Message Resource Doc
You bring up a good point. There are many corner cases with ActionMessages. While I didn't try to cover all possible uses, I did try to cover the use cases that I experience 90% of the time. The specific use case that you point out would be a nice feature enhancement. Essentially, you would have to allow the value of a message resources key to be passed in as an argument. However, isn't this essentially what the Validator does when a field fails validation? I have updated the article WRT James' comments. I think it's more correct than it was, but continued feedback is always appreciated. On Mon, Oct 20, 2003 at 10:49:09AM -0700, atta-ur rehman wrote: Nick, It is a consice article on message resource usage. Thanks. In our scenario, for the sake of maintainablity given the number of entries in the resource files, we have separate resource files for Labels and Messages. Sometimes you have to show a message like: First Name is required. where First Name resides in locale specific resource file while {0} is required. resides in the local specific messages resource file. Now assume that this message would be returned by the validate() method of an ActionForm. How would you suggest to do that? It maybe a nice addition to the article. Regards, ATTA -- Nick Heudecker SystemMobile, Inc. Email: [EMAIL PROTECTED] Web: http://www.systemmobile.com - To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED]
XDoclet Support for Struts DynaForms
Hi, I couldn't find a patch to XDoclet to support generating dynaform configs in the struts-config.xml file, so I rolled my own. The download bundle has an example, a README, and a jar that *should* be a drop-in replacement for the existing 1.2beta4 Apache module. You can find it here: http://www.systemmobile.com/code/xdoclet-apache-module-sm-1_2b4.zip No code changes were made, just changes to the templates. All of the old functionality is preserved. -- Nick Heudecker SystemMobile, Inc. Email: [EMAIL PROTECTED] Phone: 734.604.9192 Web: http://www.systemmobile.com - To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED]
Adding supported types to DynaForms
Hi, I've read in the docs that DynaForms only support the folloing types: # java.lang.BigDecimal # java.lang.BigInteger # boolean and java.lang.Boolean # byte and java.lang.Byte # char and java.lang.Character # java.lang.Class # double and java.lang.Double # float and java.lang.Float # int and java.lang.Integer # long and java.lang.Long # short and java.lang.Short # java.lang.String # java.sql.Date # java.sql.Time # java.sql.Timestamp I would like to add my own type to this, basically a key/value pair object like the LabelValueBean in the Struts source. My question is: What do I need to do to add an additional supported type to DynaForms? -- Nick Heudecker SystemMobile, Inc. Email: [EMAIL PROTECTED] Web: http://www.systemmobile.com - To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED]