Bean:define and nulls
Hi, I want to use a bean:define tag within a logic:iterate tag to set a bean value to null. How can I do this if I can not use the same value for the id attibute. thanks Jordan - To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED]
hashmaps and hash tables in JSPs
HI, I have a hastable or Hashmap of permissions that I want to use in my JSP pages to determine what info is displayed to the user. For instance I want to have the following logic if permissionsHashMap has key Manage Countires then display this if permissionsHashMap has key Manage Logins then display this etc Is there a way to do this with the struts logic tags? thanks Jordan - To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED]
How to handle a multiple select tag
Hi, I have a form that has an html:select tag that looks like this: html:select property=permissions multiple=true size=10 tabindex=5 html:options collection=allPermissions property=permissionId labelProperty=permissionName/ /html:select This renders out as intended but when I submit my form to an ActionForm that has a method that looks like this: public void setPermissions( String[] permissions ) { Integer permissionId = null; for (int i = 0; i permissions.length; i++){ permissionId = new Integer(permissions[i]); this.permissions.add( new PermissionData(permissionId, null) ); } } This essentially takes the permissions and adds them to a Collection. For some reason though, the permissions String[] is null. Why isn't this getting submitted? thanks for your help Jordan -- To unsubscribe, e-mail: mailto:[EMAIL PROTECTED] For additional commands, e-mail: mailto:[EMAIL PROTECTED]
RE: How to handle a multiple select tag
Thanks Sri for the help. I have updated the code to reflect your suggestions. I actually had an ArrayList in there originally and I changed it to an String[] because I was receiving the following error. javax.servlet.ServletExcepion: BeanUtils.populate ... --- Root Cause -- java.lang.IllegalArgumentException: Argument Type Mismatch Obviously I am trying to pass the wrong kind of value into the method but I am not sure how to get around this. Any more suggestions? thanks again for your help Jordan -Original Message- From: Sri Sankaran [mailto:[EMAIL PROTECTED]] Sent: Thursday, 23 January 2003 3:27 PM To: Struts Users Mailing List Subject: RE: How to handle a multiple select tag Is this setter being called at all? If the 'permissions' property of your form-bean is some kind of List (as it seems looking at the setter you have shown) I don't think this setter will be invoked at all. Struts will look for a void setPermissions(List x) method. Likewise when you displayed the page Struts would have obtained the default selection(s) from calling a List getPermissions() method. I haven't given you a definitive answer but hopefully this provided a clue. Sri -Original Message- From: Jordan Thomas [mailto:[EMAIL PROTECTED]] Sent: Thursday, January 23, 2003 6:51 AM To: Struts User List Subject: How to handle a multiple select tag Hi, I have a form that has an html:select tag that looks like this: html:select property=permissions multiple=true size=10 tabindex=5 html:options collection=allPermissions property=permissionId labelProperty=permissionName/ /html:select This renders out as intended but when I submit my form to an ActionForm that has a method that looks like this: public void setPermissions( String[] permissions ) { Integer permissionId = null; for (int i = 0; i permissions.length; i++){ permissionId = new Integer(permissions[i]); this.permissions.add( new PermissionData(permissionId, null) ); } } This essentially takes the permissions and adds them to a Collection. For some reason though, the permissions String[] is null. Why isn't this getting submitted? thanks for your help Jordan -- 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] -- To unsubscribe, e-mail: mailto:[EMAIL PROTECTED] For additional commands, e-mail: mailto:[EMAIL PROTECTED]
Checking boolean values with a logic tag
Hi, How do I check a boolean value of a method/bean using the logic tags. Can Struts-El do this? Essentially I have a method called getXYZ() that returns a boolean value. I can't change the name of the method to isXYZ so I have to leave it as is. thanks Jordan -- To unsubscribe, e-mail: mailto:[EMAIL PROTECTED] For additional commands, e-mail: mailto:[EMAIL PROTECTED]
Dynamically changing the form class in the execute() method
Hi, How can I dynamically change the the form class and name that my action is using? i.e. In the middle of the execute() method. thanks Jordan -- To unsubscribe, e-mail: mailto:[EMAIL PROTECTED] For additional commands, e-mail: mailto:[EMAIL PROTECTED]
RE: Dynamically changing the form class in the execute() method
Sorry, been in a meeting. Actually, I have solved it. All I did was put my new form into a request variable. I have an insert/update form that submits to an action that displays another form that is unrelated. thanks for the interest Jordan -Original Message- From: Durham David Cntr 805CSS/SCBE [mailto:[EMAIL PROTECTED]] Sent: Tuesday, 14 January 2003 8:55 PM To: Struts Users Mailing List Subject: RE: Dynamically changing the form class in the execute() method I guess that was a specific question, how about what are you trying to do, generally? -Original Message- From: Durham David Cntr 805CSS/SCBE Sent: Tuesday, January 14, 2003 12:38 PM To: Struts Users Mailing List Subject: RE: Dynamically changing the form class in the execute() method I don't think that you can. What is it, specifically, that you are trying to do? -Original Message- From: Jordan Thomas [mailto:[EMAIL PROTECTED]] Sent: Tuesday, January 14, 2003 11:51 AM To: Struts-User Subject: Dynamically changing the form class in the execute() method Hi, How can I dynamically change the the form class and name that my action is using? i.e. In the middle of the execute() method. thanks Jordan -- 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]
Help:: Indexed properties and form
Hi, I have successfully created a JSP to output a collection that looks like this: logic:iterate id=permissionLanguage name=permissionForm property=permissionLanguageData tr td bean:write name=permissionLanguage property=languageName/ html:hidden name=permissionLanguage property=languageId indexed=true/ /td td colspan=2 html:hidden name=permissionLanguage property=permissionTranslationId indexed=true/ html:text name=permissionLanguage property=permissionName indexed=true maxlength=200/ /td /tr /logic:iterate %%% Which will in turn generate: tr td Italiano input type=hidden name=permissionLanguage[0].languageId value=it /td td colspan=2 input type=hidden name=permissionLanguage[0].permissionTranslationId value=1 input type=text name=permissionLanguage[0].permissionName value=test /td /tr tr td English input type=hidden name=permissionLanguage[1].languageId value=en /td td colspan=2 input type=hidden name=permissionLanguage[1].permissionTranslationId value=2 input type=text name=permissionLanguage[1].permissionName value=test 2 /td /tr %%% and my form class looks something like: public final class PermissionForm extends ValidatorForm { /** * The Collection to hold all of the PermissionLanguageData objects */ private ArrayList records = null; /** * Standard constructor. */ public PermissionForm() { } /** * Get a specific row from the records ArrayList, based on index * * @param index The index of the row to retrieve */ public PermissionLanguageData getPermissionLanguage(int index) { // a a bit of test code System.out.println(index = + index); System.out.println(records.size() = + records.size()); return (PermissionLanguageData) records.get(index); } /** * Copies the data from the EJB into the form. * * @param value The Collection of PermissionLanguageData */ public void copyFrom( Collection value ) { records = new ArrayList(value); this.permission = ((PermissionLanguageData) records.get(1)).getPermission(); } /** * Returns a Collection of PermissionLanguageData * * @return The Collection of PermissionLanguageData object */ public Collection getPermissionLanguageData() { return this.records; } } %%% This part is just what I wanted as it should allow me to edit my recordHowever, I thought that this would work without a problem but I now have the problem that when I submit my form, the Collection (it's an ArrayList) that I am trying to populate/edit is empty. How do I ensure that the ArrayList in my form class that I am submitting to contains the Collection of objects that I am trying to edit? I am not sure how this would be done because the form class gets called before the action class. All I can think of is to add a couple of lines to add a new row into the ArrayList in the getPermissionLanguage() method. The error that I am getting is caused by a java.lang.IndexOutOfBoundsException Any suggestions that anyone may have would be greatly appreciated as I have been stuffing around with this for some time now. thanks Jordan p.s. here is the whole stack trace % javax.servlet.ServletException: BeanUtils.populate at org.apache.struts.util.RequestUtils.populate(RequestUtils.java:1099) at org.apache.struts.action.RequestProcessor.processPopulate(RequestProcessor.j ava:798) at org.apache.struts.action.RequestProcessor.process(RequestProcessor.java:254) at org.apache.struts.action.ActionServlet.process(ActionServlet.java:1422) at org.apache.struts.action.ActionServlet.doPost(ActionServlet.java:523) at javax.servlet.http.HttpServlet.service(HttpServlet.java:760) at javax.servlet.http.HttpServlet.service(HttpServlet.java:853) at org.apache.catalina.core.ApplicationFilterChain.internalDoFilter(Application FilterChain.java:247) at org.apache.catalina.core.ApplicationFilterChain.doFilter(ApplicationFilterCh ain.java:193) at org.apache.catalina.core.StandardWrapperValve.invoke(StandardWrapperValve.ja va:260) at org.apache.catalina.core.StandardPipeline$StandardPipelineValveContext.invok eNext(StandardPipeline.java:643) at org.apache.catalina.core.StandardPipeline.invoke(StandardPipeline.java:480) at
Problems with nested tags
Hi, I am trying to use the nested tags within an iterate loop and I am getting the following output: input type=hidden name=org.apache.struts.taglib.html.BEAN[1].permissionLanguageData[1].langua geId value=en What I really need is: input type=hidden name=languageId[1] value=en I am not sure what I am doing wrong here. My code looks like: nested:iterate id=permissionteset name=permissionForm property=permissionLanguageData type=scoop.ejb.entity.data.PermissionLanguageData nested:root name=permissionteset/ tr td nested:write property=languageName/ nested:hidden property=languageId indexed=true/ /td /tr /nested:iterate Note that I am not using this inside a nested:form tag hence the use of the nested:root tag. Any pointers for this would be great! thanks Jordan -- To unsubscribe, e-mail: mailto:[EMAIL PROTECTED] For additional commands, e-mail: mailto:[EMAIL PROTECTED]
RE: Problems with nested tags
OK, done. Thanks for that Sri. That seemed easy enough but now I am getting an error that says: javax.servlet.ServletException: No getter method for property languageId of bean org.apache.struts.taglib.html.BEAN Any suggestions? This has really got me stumped. thanks Jordan -Original Message- From: Sri Sankaran [mailto:[EMAIL PROTECTED]] Sent: Thursday, 9 January 2003 5:24 PM To: Struts Users Mailing List Subject: RE: Problems with nested tags Your nested:root isn't what you expect it to since you are closing it immediately. Look closely, you have nested:root name=permissionteset/ ^^ You probably meant nested:root name=permissionteset .. /nested:root Sri -Original Message- From: Jordan Thomas [mailto:[EMAIL PROTECTED]] Sent: Thursday, January 09, 2003 11:06 AM To: Struts-User Subject: Problems with nested tags Hi, I am trying to use the nested tags within an iterate loop and I am getting the following output: input type=hidden name=org.apache.struts.taglib.html.BEAN[1].permissionLanguage Data[1].langua geId value=en What I really need is: input type=hidden name=languageId[1] value=en I am not sure what I am doing wrong here. My code looks like: nested:iterate id=permissionteset name=permissionForm property=permissionLanguageData type=scoop.ejb.entity.data.PermissionLanguageData nested:root name=permissionteset/ tr td nested:write property=languageName/ nested:hidden property=languageId indexed=true/ /td /tr /nested:iterate Note that I am not using this inside a nested:form tag hence the use of the nested:root tag. Any pointers for this would be great! thanks Jordan -- 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] -- To unsubscribe, e-mail: mailto:[EMAIL PROTECTED] For additional commands, e-mail: mailto:[EMAIL PROTECTED]
RE: Problems with nested tags
Thanks David, Looks like that could be the problem but unfortunately your patch hasn't been committed. cheers Jordan -Original Message- From: David Morris [mailto:[EMAIL PROTECTED]] Sent: Thursday, 9 January 2003 5:54 PM To: [EMAIL PROTECTED] Subject: RE: Problems with nested tags Jordan, I had a similar problem with the beta3 version of the nested tags. I posted a bug in bugzilla along with a patch that fixed this issue for me. What I found was that some code in the NestedPropertyHelper was picking up the default nested name value. If you are using Beta 3, you might check http://issues.apache.org/bugzilla/show_bug.cgi?id=15799 to see if this is a related problem. David Morris [EMAIL PROTECTED] 01/09/03 09:45AM OK, done. Thanks for that Sri. That seemed easy enough but now I am getting an error that says: javax.servlet.ServletException: No getter method for property languageId of bean org.apache.struts.taglib.html.BEAN Any suggestions? This has really got me stumped. thanks Jordan -- 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: Re[3]: Need logic:equal tag help
Great, it worked. I actually used the c:if: tag but still, this is all new info. Cool. thanks for your help Jordan :O) -Original Message- From: Rick Reumann [mailto:[EMAIL PROTECTED]] Sent: Monday, 6 January 2003 9:40 PM To: Struts Users Mailing List Subject: Re[3]: Need logic:equal tag help On Monday, January 6, 2003, 3:26:26 PM, Rick wrote: RR To avoid the scriplet though I think you are going to have to use the RR logic-el tag, but possibly someone else has a better solution. Actually logic-el wouldn't be what you want either. I think if you just used the JSTL choose and when tag you'd be fine... logic:iterate id=permission name=permissions indexId=idx c:choose c:when test=${permissionsSize eq idx} bla bla bla /c:when /c:choose /logic:iterate I know the above works, but there might be a better way. -- 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]
Need logic:equal tag help
Hi, I am wanting to use a logic:equal tag inside an interate tag like this logic:iterate id=permission name=permissions indexId=idx logic:equal scope=page name=idx value=request.permissionsSize blah blah... /logic:equal /logic:iterate Essentially the idx value comes from the logic:iterate tag and the permissionsSize comes from a request variable. This doesn't seem to work though. Is there a clean way to get the permissionsSize value out of the request scope into the logic:equal tag without using scriplets? Incedently, my scriptlet code looks like this: %Integer permissionsSize = (Integer) request.getAttribute(permissionsSize);% logic:iterate id=permission name=permissions indexId=idx logic:equal scope=page name=idx value=%=permissionsSize.toString()% blah blah... /logic:equal /logic:iterate Any suggestions would be great. thanks Jordan -- To unsubscribe, e-mail: mailto:[EMAIL PROTECTED] For additional commands, e-mail: mailto:[EMAIL PROTECTED]
Internationalisation and Database/EJB data
Hi, What is the best way to make the data in my Database tables/EJB's internationalised? Is there a standard pattern for having seamlessly internationalised data in a database that I can use with struts? Essentially, based on the user's locale I want different data displayed and unfortunately, resource files won't suffice. thanks Jordan -- To unsubscribe, e-mail: mailto:[EMAIL PROTECTED] For additional commands, e-mail: mailto:[EMAIL PROTECTED]
RE: Internationalisation and Database/EJB data
Thanks for that David. OK, one step further, what about with EJB? The obvious way is to use a compound key but this makes JBoss spew when I try to use it how I need. Any more suggestions? cheers Jordan -Original Message- From: David Graham [mailto:[EMAIL PROTECTED]] Sent: Tuesday, 17 December 2002 9:02 PM To: [EMAIL PROTECTED] Subject: Re: Internationalisation and Database/EJB data You need to design multiple language ability into your database schema. I would create a view to make the queries easier. David From: Jordan Thomas [EMAIL PROTECTED] Reply-To: Struts Users Mailing List [EMAIL PROTECTED] To: Struts-User [EMAIL PROTECTED] Subject: Internationalisation and Database/EJB data Date: Tue, 17 Dec 2002 20:50:18 +0100 Hi, What is the best way to make the data in my Database tables/EJB's internationalised? Is there a standard pattern for having seamlessly internationalised data in a database that I can use with struts? Essentially, based on the user's locale I want different data displayed and unfortunately, resource files won't suffice. thanks Jordan -- To unsubscribe, e-mail: mailto:[EMAIL PROTECTED] For additional commands, e-mail: mailto:[EMAIL PROTECTED] _ Add photos to your e-mail with MSN 8. Get 2 months FREE*. http://join.msn.com/?page=features/featuredemail -- 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]
ActionErrors = Null
Hi, If I call ActionErrors errors = languageForm.validate( mapping, request ); How can be errors null? thanks Jordan -- To unsubscribe, e-mail: mailto:[EMAIL PROTECTED] For additional commands, e-mail: mailto:[EMAIL PROTECTED]
RE: ActionErrors = Null
OK, thanks for that. cheers Jordan -Original Message- From: Gemes Tibor [mailto:[EMAIL PROTECTED]] Sent: Friday, 13 December 2002 11:31 AM To: Struts Users Mailing List Subject: Re: ActionErrors = Null 2002. december 13. 11:12 dátummal Jordan Thomas ezt írtad: Hi, If I call ActionErrors errors = languageForm.validate( mapping, request ); Because if you receive the execute method of your Action, you will be ensured that there was no validating error in the Form. If there were any error, the struts framework would have forwarded back to the input page before even the Action would have been reached. Hth, Tib -- 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]
Precompile my app
Hi All, How can I precompile my Struts app? Is there some kind of utility to do this? thanks Jordan -- To unsubscribe, e-mail: mailto:[EMAIL PROTECTED] For additional commands, e-mail: mailto:[EMAIL PROTECTED]
Struts design: All actions in one ActionClass
Hi, What is the best way to design my application? Is it better to a) Put all my actions for a particluar area (i.e. creating, editing and deleting user accounts) in one Action class or b) Use a seperate action class for every action in my application or c) Put all of the actions for a particular workflow in a single Action class. I am looking to have an application that is easy to maintain and flexible. Suggestions/Advice would be most appreciated. thanks Jordan -- To unsubscribe, e-mail: mailto:[EMAIL PROTECTED] For additional commands, e-mail: mailto:[EMAIL PROTECTED]
RE: Struts design: All actions in one ActionClass
Does this also count for the JSP's? It would seem that it would be better to reuse the JSp's where possible which seems possible. -Original Message- From: David Graham [mailto:[EMAIL PROTECTED]] Sent: Wednesday, 11 December 2002 7:27 PM To: [EMAIL PROTECTED] Subject: Re: Struts design: All actions in one ActionClass Definitely b. It will be far easier to maintain. If you're worried about having a lot of actions you can look at DispatchAction or using DynaBeans. David From: Jordan Thomas [EMAIL PROTECTED] Reply-To: Struts Users Mailing List [EMAIL PROTECTED] To: Struts-User [EMAIL PROTECTED] Subject: Struts design: All actions in one ActionClass Date: Wed, 11 Dec 2002 19:05:36 +0100 Hi, What is the best way to design my application? Is it better to a) Put all my actions for a particluar area (i.e. creating, editing and deleting user accounts) in one Action class or b) Use a seperate action class for every action in my application or c) Put all of the actions for a particular workflow in a single Action class. I am looking to have an application that is easy to maintain and flexible. Suggestions/Advice would be most appreciated. thanks Jordan -- To unsubscribe, e-mail: mailto:[EMAIL PROTECTED] For additional commands, e-mail: mailto:[EMAIL PROTECTED] _ Add photos to your e-mail with MSN 8. Get 2 months FREE*. http://join.msn.com/?page=features/featuredemail -- 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]
Initializing application
Hi, I want to initialize my application with some application variables. What is the best way to do this? My approach so far has been to call the init() method in an unmapped servlet. So everytime the server statrs up they are loaded into memory. The only thing is that I am not sure how to set an application or session variable in the init method of a servlet. How can I do this? Is there a better way to do this? Thanks Jordan -- To unsubscribe, e-mail: mailto:[EMAIL PROTECTED] For additional commands, e-mail: mailto:[EMAIL PROTECTED]
RE: Initializing application
Thanks guys, I've got it all working. cheers Jordan :O) -Original Message- From: Andrew Hill [mailto:[EMAIL PROTECTED]] Sent: Tuesday, 10 December 2002 4:40 PM To: Struts Users Mailing List Subject: RE: Initializing application Oh yeh. Almost forgot. Plugins are called when your webapp is initialised (before anyone can access it) and are executed serially in the order you listed them in your struts-config. -Original Message- From: Andrew Hill [mailto:[EMAIL PROTECTED]] Sent: Tuesday, December 10, 2002 23:36 To: Struts Users Mailing List Subject: RE: Initializing application Another idea would be to make use of a struts plugin. These are actually very simple to write! Just implement PlugIn and its init() method and add to struts-config and bobs yer uncle. btw: the signature of the init method changed between 1.1b1 and 1.1b2. If you do the following trick your Plugin should work in both environments (I havent tested it though!): public void init(ApplicationConfig config) throws ServletException { try { ActionServlet servlet = (ActionServlet)PropertyUtils.getProperty(config,servlet); init(servlet,config); } catch(Throwable t) { throw new ServletException(Error in init(config) method,t); } } public void init(ActionServlet servlet, ApplicationConfig config) throws ServletException { // your code here } (Why I dont just use getServlet() escapes my memory. Maybe the later version doesnt have a getServlet() in the config object?) To add to your struts config (right down near the end of it): plug-in className=com.mypackage.MyPlugIn set-property property=bob value=a job/ /plug-in the set-property tags are optional, but you can use them to pass parameters to your plugin (in which you would define a setBob() method) -Original Message- From: David Graham [mailto:[EMAIL PROTECTED]] Sent: Tuesday, December 10, 2002 23:16 To: [EMAIL PROTECTED] Subject: Re: Initializing application You can define context-params in your web.xml file that will be application init variables. You could also setup a servlet to be loaded when the container starts and put the code in the init() method. See the javadocs on the servlet.init() method it's pretty easy to get ahold of the ServletContext. David From: Jordan Thomas [EMAIL PROTECTED] Reply-To: Struts Users Mailing List [EMAIL PROTECTED] To: Struts-User [EMAIL PROTECTED] Subject: Initializing application Date: Tue, 10 Dec 2002 12:54:27 +0100 Hi, I want to initialize my application with some application variables. What is the best way to do this? My approach so far has been to call the init() method in an unmapped servlet. So everytime the server statrs up they are loaded into memory. The only thing is that I am not sure how to set an application or session variable in the init method of a servlet. How can I do this? Is there a better way to do this? Thanks Jordan -- To unsubscribe, e-mail: mailto:[EMAIL PROTECTED] For additional commands, e-mail: mailto:[EMAIL PROTECTED] _ The new MSN 8: smart spam protection and 2 months FREE* http://join.msn.com/?page=features/junkmail -- 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]
EJB's and Collections of Objects
Hi, I have a finder method associated with an EJB that returns a collection of objects. I don't want to call the get Methods in my struts action class, in my JSP's or in form classes as I would like to keep everything in the same transaction. So what I was going to do was use a session bean which looped around the the collection returned from the finder method, getting the data objects and adding them to a new collection and then return out the collection of data objects. Is there a standard or better way to get my objects out into my struts application? thanks Jordan -- To unsubscribe, e-mail: mailto:[EMAIL PROTECTED] For additional commands, e-mail: mailto:[EMAIL PROTECTED]
Validation Message Order
Hi, When using the validator, how do I change the order of the messages. Currently, the error messages returned are Password Username This doesn't correspond with how the fields are layed out in the form. I would like the JavaScript error to read Username Password Is there any way to do this? I tried setting the fieldOrder attribute in the validation.xml but that didn't work. Any suggestions? thanks Jordan -- To unsubscribe, e-mail: mailto:[EMAIL PROTECTED] For additional commands, e-mail: mailto:[EMAIL PROTECTED]
RE: mapping.getInputForward().getPath() is null
Right you are. Thanks for that Nick. cheers Jordan -Original Message- From: Afshartous, Nick [mailto:[EMAIL PROTECTED]] Sent: Thursday, 5 December 2002 10:44 PM To: 'Struts Users Mailing List' Subject: RE: mapping.getInputForward().getPath() is null Maybe its null because in struts-config.xml the input attribute of the action mapping is not set ? Nick -Original Message- From: Jordan Thomas [mailto:[EMAIL PROTECTED]] Sent: Thursday, December 05, 2002 3:50 PM To: Struts User List Subject: mapping.getInputForward().getPath() is null Hi, I am trying to set a String as mapping.getInputForward().getPath() but this is returning a null. How could this be. I though that this was set on every request through the ActionServlet. If anyone can shed some light on this it would be appreciated. thanks Jordan -- 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]
Validator Javascript missing
Hi All, A few validator problems here. I have set up my validator and it seems to only be half working. My forms are all extening ValidatorForm but I am receiving no specific javascript. I have included my generated HTML page. There is no validation being done on the server side either. When I load up struts the server parses my validation.xml file with no problems. In my action class, when I first enter the page the error.empty() returns true which is correct but then when I submit a form, I receive a 404 error. I've included the action class just in case that helps. I suspect that this is something quite basic but I am having real problems with this. thanks in advance Jordan LoginAction.java Description: Binary data -- To unsubscribe, e-mail: mailto:[EMAIL PROTECTED] For additional commands, e-mail: mailto:[EMAIL PROTECTED]
RE: Validator Javascript missing
Thanks Darren, but validate is already set to true in each action of my struts-config.xml plus I am validating using ActionErrors errors = loginForm.validate( mapping , reguest ); Also, I checked my log file and this is what I found is that it seem to be processing the validation but it doesn't seem to be doing anything. Any other suggestions? thanks for your help Jordan -Original Message- From: Darren Hill [mailto:[EMAIL PROTECTED]] Sent: Friday, 6 December 2002 2:47 PM To: 'Struts Users Mailing List' Subject: RE: Validator Javascript missing The problem may be in your struts-config. If you have validate=false in you action mapping, you have to manually validate via form.validate(); D. -Original Message- From: Jordan Thomas [mailto:[EMAIL PROTECTED]] Sent: December 6, 2002 7:55 AM To: [EMAIL PROTECTED] Subject: Validator Javascript missing Hi All, A few validator problems here. I have set up my validator and it seems to only be half working. My forms are all extening ValidatorForm but I am receiving no specific javascript. I have included my generated HTML page. There is no validation being done on the server side either. When I load up struts the server parses my validation.xml file with no problems. In my action class, when I first enter the page the error.empty() returns true which is correct but then when I submit a form, I receive a 404 error. I've included the action class just in case that helps. I suspect that this is something quite basic but I am having real problems with this. thanks in advance Jordan -- To unsubscribe, e-mail: mailto:[EMAIL PROTECTED] For additional commands, e-mail: mailto:[EMAIL PROTECTED] server.log Description: Binary data -- To unsubscribe, e-mail: mailto:[EMAIL PROTECTED] For additional commands, e-mail: mailto:[EMAIL PROTECTED]
getInputForward() problem
Hi, I am using the getInputForwardMethod() to return a user to the form that has errors on it. OK, that is working except it seems to be leading to the wrong place. I need to go to http://localhost:8080/scoop/login/1.do from http://localhost:8080/scoop/login.do. I think that instead I am been taken to http://localhost:8080/login.do when I am returned to my input form. (My application is called 'scoop') I am receiving a 404 error which says The requested resrouce (/login) is not available. Any suggestions? thanks Jordan -- To unsubscribe, e-mail: mailto:[EMAIL PROTECTED] For additional commands, e-mail: mailto:[EMAIL PROTECTED]
RE: AW: Workflow Extention
Hi Matthias OK, I have modified my workflow as I have seen the obvious errors in what I was trying to do. Now I have the problem that my second action (see code below) does not allow me to enter that step. The message that I am getting is Previous state does not match any allowed previous state!. From what I can see, the previousState of the second step does match the newState of the first step. One thing that I have noticed is that when I enter the first state it says Current State: null. Any ideas? thanks Jordan action path=/registration/1 type=scoop.web.struts.registration.RegistrationAction className=com.livinglogic.struts.workflow.ApplicationMapping name=registrationForm scope=request input=/tiles/registerCompany validate=true set-property property=primaryWorkflow value=registration-workflow/ set-property property=newState value=1/ set-property property=endWorkflow value=false/ forward name=success path=/tiles/registerCompany/ /action action path=/registration/2 type=scoop.web.struts.registration.RegistrationAction className=com.livinglogic.struts.workflow.ApplicationMapping name=registrationForm scope=session input=/tiles/registerCompany_step1 validate=true set-property property=primaryWorkflow value=registration-workflow/ set-property property=newState value=2/ set-property property=prevState value=1/ set-property property=endWorkflow value=false/ forward name=success path=/tiles/registerCompany/ /action -Original Message- From: Matthias Bauer [mailto:[EMAIL PROTECTED]] Sent: Wednesday, 27 November 2002 3:08 PM To: [EMAIL PROTECTED] Cc: 'Struts Users Mailing List' Subject: Re: AW: Workflow Extention Jordan, I think I understand pretty well, what you are trying to do. However according to your configuration you should not be able to execute /registration/2 before having executed /registration/1. Here are some examples: /registration - /registration/1 - /registration/1-/registration/2 - this should work /registration - /registration/1 - /registration/3 - this should fail with the last action /registration - /registration/1 - /registration/2-/registration/1 - this should fail with the last action /registration - /registration/1 - /someAction-/registration/2 - this should work, if /someAction is not part of the workflow Maybe you can try these examples out and see if it works as expected. Remark to the last example: The last example works, if /someAction is not part of the registration-workflow, because it does not change the state of this workflow. --- Matthias Jordan Thomas wrote: Yes, I see what you are saying and if I define the next state, then if I try to jump out of the workflow I get a an exception saying that it is not allowed by the workflow. What makes me think that it is disregarding the wrokflow is that I can enter the workflow at an point (i.e /registration/2) without having executed any of the other steps. Essentially, all I want to do is not control where the user goes but where the user came from. This way, it cascades backwards ensuring that the user enters in all of the data. Is this clearer? Hopefully you have an idea on how to solve this one. Cheers and thanks for the help Jordan -Ursprüngliche Nachricht- Von: Matthias Bauer [mailto:[EMAIL PROTECTED]] Gesendet: Wednesday, 27 November 2002 1:22 PM An: [EMAIL PROTECTED] Cc: 'Struts Users Mailing List' Betreff: Re: Workflow Extention Jordan, according to the configuration the user should not be able to execute /registration/1 before having executed /registration. Also /registration/2 can not be executed before /registration/1, and so on. What the configuration does NOT prohibit, is to execute /registration or any other action after /registration/1 or /registration/2, because you are not defining nextState values. Do you see something else? What lets you think that it seems to be disregarding the workflow? One remark: You can as well leave away the property endWorkflow if you want it to be false, because this is the default. --- Matthias Jordan Thomas wrote: Matthias, Ok, I tried that and it now seems to be disregarding the workflow. Can you seen anything wrong with my struts-config.xml tags? (Sorry for the big code chunk :O) Essentially what (am trying to do is allow a user to go to the next step or stay on the same step. I am using struts 1.1b Thanks Jordan --action class ... public final class NewRegistrationAction extends GenericAction { public ActionForward performAction( ActionMapping mapping, ActionForm form, HttpServletRequest request, HttpServletResponse response ) throws IOException, ServletException { ... --struts-config.xml action path=/registration
RE: java Beautiful
I've been using pretty. It works quite niceley. I like it a bit more than Jalopy. cheers Jordan -Original Message- From: BARADAT Benoit [mailto:[EMAIL PROTECTED]] Sent: Thursday, 5 December 2002 3:34 PM To: Struts Users Mailing List Subject: java Beautiful Hello I'm looking for a tool to have a beautiful java (ident,if,else, case,etc ...) (like cb on Unix Platform) Thank in Advance
RE: AW: Workflow Extention
Matthias, In addition here is the console output. cheers Jordan 16:59:39,370 INFO [RequestProcessor] Processing a 'GET' for path '/login' 16:59:39,410 INFO [Engine] action: Authtype: null 16:59:39,410 INFO [Engine] action: Defined workflow: registration-workflow 16:59:39,420 INFO [Engine] action: Current state: 1 16:59:39,430 INFO [Engine] action: Defined next states: [] 16:59:39,430 INFO [Engine] action: Defined next paths: [] 16:59:39,440 INFO [Engine] action: Previous primary workflow: registration-workflow 16:59:39,470 INFO [Engine] action: Current primary workflow: login-workflow 16:59:39,470 INFO [Engine] action: Forward to: /tiles/login 16:59:44,387 INFO [Engine] jsp: init 16:59:52,870 INFO [Engine] jsp: init 16:59:57,136 INFO [Engine] jsp: init 17:00:03,805 INFO [RequestProcessor] Processing a 'GET' for path '/registration' 17:00:03,815 INFO [Engine] action: Authtype: null 17:00:03,825 INFO [Engine] action: Defined workflow: registration-workflow 17:00:03,825 INFO [Engine] action: Current state: 1 17:00:03,835 INFO [Engine] action: Defined next states: [] 17:00:03,845 INFO [Engine] action: Defined next paths: [] 17:00:03,845 INFO [Engine] action: Defined workflow: login-workflow 17:00:03,855 INFO [Engine] action: Current state: null 17:00:03,865 INFO [Engine] action: Defined next states: null 17:00:03,865 INFO [Engine] action: Defined next paths: null 17:00:03,875 INFO [Engine] action: Previous primary workflow: registration-workflow 17:00:03,885 INFO [Engine] action: Current primary workflow: registration-workflow 17:00:03,906 INFO [Engine] action: Updating workflow: registration-workflow 17:00:03,906 INFO [Engine] action: Setting currentState to 1 17:00:03,916 INFO [Engine] action: Setting definedNextStates to [] 17:00:03,926 INFO [Engine] action: Setting definedNextPaths to [] 17:00:03,936 INFO [Engine] action: Forward to: /tiles/registration 17:00:06,619 INFO [RequestProcessor] Processing a 'GET' for path '/login' 17:00:06,629 INFO [Engine] action: Authtype: null 17:00:06,639 INFO [Engine] action: Defined workflow: registration-workflow 17:00:06,649 INFO [Engine] action: Current state: 1 17:00:06,659 INFO [Engine] action: Defined next states: [] 17:00:06,659 INFO [Engine] action: Defined next paths: [] 17:00:06,669 INFO [Engine] action: Defined workflow: login-workflow 17:00:06,680 INFO [Engine] action: Current state: null 17:00:06,680 INFO [Engine] action: Defined next states: null 17:00:06,690 INFO [Engine] action: Defined next paths: null 17:00:06,700 INFO [Engine] action: Previous primary workflow: registration-workflow 17:00:06,700 INFO [Engine] action: Current primary workflow: login-workflow 17:00:06,710 INFO [Engine] action: Forward to: /tiles/login 17:00:08,212 INFO [RequestProcessor] Processing a 'POST' for path '/login/action' 17:00:08,222 INFO [Engine] action: Authtype: null 17:00:08,232 INFO [Engine] action: Defined workflow: registration-workflow 17:00:08,232 INFO [Engine] action: Current state: 1 17:00:08,242 INFO [Engine] action: Defined next states: [] 17:00:08,242 INFO [Engine] action: Defined next paths: [] 17:00:08,252 INFO [Engine] action: Defined workflow: login-workflow 17:00:08,262 INFO [Engine] action: Current state: null 17:00:08,272 INFO [Engine] action: Defined next states: null 17:00:08,272 INFO [Engine] action: Defined next paths: null 17:00:08,282 INFO [Engine] action: Previous primary workflow: registration-workflow 17:00:08,292 INFO [Engine] action: Current primary workflow: login-workflow 17:00:08,292 INFO [Engine] action: Previous state does not match any allowed previous state! -Original Message- From: Matthias Bauer [mailto:[EMAIL PROTECTED]] Sent: Thursday, 5 December 2002 3:30 PM To: Jordan Thomas Cc: Struts User List Subject: Re: AW: Workflow Extention Jordan, the configuration looks ok to me. Can you please send me the complete log messages. They should look somehow like these (I took them from the example application): 2002-12-05 15:27:52 action: Processing a GET for /beginWf1Transition 2002-12-05 15:27:52 action: Looking for Action instance for class com.livinglogic.struts.workflow.test.Wf1Action 2002-12-05 15:27:52 action: Authtype: com.livinglogic.struts.workflow.test.Authentication 2002-12-05 15:27:52 action: Previous primary workflow: null 2002-12-05 15:27:52 action: Current primary workflow: wf1 2002-12-05 15:27:52 action: Updating workflow: wf1 2002-12-05 15:27:52 action: Setting currentState to 1 2002-12-05 15:27:52 action: Setting definedNextStates to [2] 2002-12-05 15:27:52 action: Setting definedNextPaths to [] 2002-12-05 15:27:52 action: Forward to: /inHome.jspp 2002-12-05 15:28:03 action: Processing a GET for /wf1St2Transition 2002-12-05 15:28:03 action: Looking for Action instance for class com.livinglogic.struts.workflow.test.Wf1Action 2002-12-05 15:28:03 action: Authtype
RE: Tiles Simple Quick Question.
Yes. There is an article on JavaWorld and then there is the Tiles web site where you should be able to download the jar files. Do a search on google for it. cheers Jordan -Original Message- From: Christine McLennan [mailto:[EMAIL PROTECTED]] Sent: Thursday, 5 December 2002 5:01 PM To: 'Struts Users Mailing List' Subject: Tiles Simple Quick Question. Can Tiles be used with Struts 1.0.2? - I know it's already bundled with 1.1 - but I can not use 1.1 until the stable release comes out. (Company policy.) I've been looking but can not find an explicit answer. Thanks for your time. -- 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]
mapping.getInputForward().getPath() is null
Hi, I am trying to set a String as mapping.getInputForward().getPath() but this is returning a null. How could this be. I though that this was set on every request through the ActionServlet. If anyone can shed some light on this it would be appreciated. thanks Jordan -- To unsubscribe, e-mail: mailto:[EMAIL PROTECTED] For additional commands, e-mail: mailto:[EMAIL PROTECTED]
How to get the action mapping
Hi All, A newbie with a basic question (I hope...). How do I get the action mapping from the current request? thanks Jordan -- To unsubscribe, e-mail: mailto:[EMAIL PROTECTED] For additional commands, e-mail: mailto:[EMAIL PROTECTED]
Dynamically generated forms
Hi All, I have a form where I want to generate forms dynamically. For instance, I have a language bean with 3 objects so in my form I have 3 fields i.e. html:text property=cardNumberfield_en/ html:text property=cardNumberfield_de/ html:text property=cardNumberfield_dk/ When I add an object to the language bean I want to have html:text property=field_en/ html:text property=field_de/ html:text property=field_dk/ html:text property=field_se/ Is there a way to do this? That is, dynamically genertate the form fields? All of my data is coming out of a ValidatorForm. thanks Jordan -- To unsubscribe, e-mail: mailto:[EMAIL PROTECTED] For additional commands, e-mail: mailto:[EMAIL PROTECTED]
RE: Workflow Extention
: The action that follows next can be any action. To refer to you concrete problem: Preventing people from entering your workflow in the middle can be achieved by using the prevState parameters: If you have actions A, B, C and you want the user to execute B only if A has been executed before and C only if B has already been executed you can do the following: - equip action A with the state 1, action B with state 2 - set prevState=1 for action B and prevState=2 for action C This way action B can only be executed, if the workflow is in state 1 (i. e. action A has been executed) and action C can only be executed, if the workflow is in state 2 (i. e. action B has been executed). Pls. let me know, if this helps. --- Matthias Jordan Thomas wrote: Hi All, I am using the workflow extention to create my workflows. It seems that when I am in the middle of a workflow, there is no way to allow the user to jump out of the workflow into another area of the application. I have tried specifying a * and a *.do as a nextPath parameter but that doesn't seem to work. Does anyone know how to gain a little more flexibility with this framework? All I want to do is stop people from jumping steps/entering into the middle of a workflow. At the moment, it seems that a user needs to enter a workflow and then complete that workflow before a he/she can leave it. Does anyone have any suggestions how I can work around this? Thanks Jordan -- 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]
AW: Workflow Extention
Yes, I see what you are saying and if I define the next state, then if I try to jump out of the workflow I get a an exception saying that it is not allowed by the workflow. What makes me think that it is disregarding the wrokflow is that I can enter the workflow at an point (i.e /registration/2) without having executed any of the other steps. Essentially, all I want to do is not control where the user goes but where the user came from. This way, it cascades backwards ensuring that the user enters in all of the data. Is this clearer? Hopefully you have an idea on how to solve this one. Cheers and thanks for the help Jordan -Ursprüngliche Nachricht- Von: Matthias Bauer [mailto:[EMAIL PROTECTED]] Gesendet: Wednesday, 27 November 2002 1:22 PM An: [EMAIL PROTECTED] Cc: 'Struts Users Mailing List' Betreff: Re: Workflow Extention Jordan, according to the configuration the user should not be able to execute /registration/1 before having executed /registration. Also /registration/2 can not be executed before /registration/1, and so on. What the configuration does NOT prohibit, is to execute /registration or any other action after /registration/1 or /registration/2, because you are not defining nextState values. Do you see something else? What lets you think that it seems to be disregarding the workflow? One remark: You can as well leave away the property endWorkflow if you want it to be false, because this is the default. --- Matthias Jordan Thomas wrote: Matthias, Ok, I tried that and it now seems to be disregarding the workflow. Can you seen anything wrong with my struts-config.xml tags? (Sorry for the big code chunk :O) Essentially what (am trying to do is allow a user to go to the next step or stay on the same step. I am using struts 1.1b Thanks Jordan --action class ... public final class NewRegistrationAction extends GenericAction { public ActionForward performAction( ActionMapping mapping, ActionForm form, HttpServletRequest request, HttpServletResponse response ) throws IOException, ServletException { ... --struts-config.xml action path=/registration type=scoop.web.struts.registration.NewRegistrationAction className=com.livinglogic.struts.workflow.ApplicationMapping scope=request input=/tiles/registrationDetails validate=true set-property property=primaryWorkflow value=registration-workflow/ set-property property=newState value=0/ set-property property=endWorkflow value=false/ forward name=success path=/tiles/registrationDetails/ /action action path=/registration/1 type=scoop.web.struts.registration.NewRegistrationAction className=com.livinglogic.struts.workflow.ApplicationMapping name=registrationForm scope=session input=/tiles/registerCompany_step1 validate=true set-property property=primaryWorkflow value=registration-workflow/ set-property property=newState value=1/ set-property property=prevState value=0/ set-property property=prevState value=1/ set-property property=endWorkflow value=false/ forward name=success path=/tiles/registerCompany_step1/ /action action path=/registration/2 type=scoop.web.struts.registration.NewRegistrationAction className=com.livinglogic.struts.workflow.ApplicationMapping name=registrationForm scope=session input=/tiles/registerCompany_step2 validate=true set-property property=primaryWorkflow value=registration-workflow/ set-property property=newState value=2/ set-property property=prevState value=1/ set-property property=prevState value=2/ set-property property=endWorkflow value=false/ forward name=success path=/tiles/registerCompany_step2/ /action action path=/registration/3 type=scoop.web.struts.registration.NewRegistrationAction className=com.livinglogic.struts.workflow.ApplicationMapping name=registrationForm scope=session input=/tiles/registerCompany_step3 validate=true set-property property=primaryWorkflow value=registration-workflow/ set-property property=newState value=3/ set-property property=prevState value=2/ set-property property=prevState value=3/ set-property property=endWorkflow value=false/ forward name=success path=/tiles/registerCompany_step3/ /action action path=/registration/4 type=scoop.web.struts.registration.NewRegistrationAction className=com.livinglogic.struts.workflow.ApplicationMapping name=registrationForm scope=session input=/tiles/registerCompany_step4 validate=true set-property property=primaryWorkflow value=registration
RE: Workflow Extention
Thanks Matthias, I'll try it out and let you know how it goes. Regards Jordan -Original Message- From: Matthias Bauer [mailto:[EMAIL PROTECTED]] Sent: Tuesday, 26 November 2002 8:36 AM To: Struts Users Mailing List Subject: Re: Workflow Extention Hi Jordan, sorry for the late response... You can not specify a wildcard like * for nextPath - the framework does not support that up to now. I would be happy to integrate it, if you can explain a valid use case for it. Right now I do not see a necessity for a wildcard, because you can always leave away the nextPath and the nextState parameters, which has basically the same result: The action that follows next can be any action. To refer to you concrete problem: Preventing people from entering your workflow in the middle can be achieved by using the prevState parameters: If you have actions A, B, C and you want the user to execute B only if A has been executed before and C only if B has already been executed you can do the following: - equip action A with the state 1, action B with state 2 - set prevState=1 for action B and prevState=2 for action C This way action B can only be executed, if the workflow is in state 1 (i. e. action A has been executed) and action C can only be executed, if the workflow is in state 2 (i. e. action B has been executed). Pls. let me know, if this helps. --- Matthias Jordan Thomas wrote: Hi All, I am using the workflow extention to create my workflows. It seems that when I am in the middle of a workflow, there is no way to allow the user to jump out of the workflow into another area of the application. I have tried specifying a * and a *.do as a nextPath parameter but that doesn't seem to work. Does anyone know how to gain a little more flexibility with this framework? All I want to do is stop people from jumping steps/entering into the middle of a workflow. At the moment, it seems that a user needs to enter a workflow and then complete that workflow before a he/she can leave it. Does anyone have any suggestions how I can work around this? Thanks Jordan -- 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]
Order of error messages
Hi, How do I change the order of the error and javascript messages that are generated by the validation framework? Thanks Jordan -- To unsubscribe, e-mail: mailto:[EMAIL PROTECTED] For additional commands, e-mail: mailto:[EMAIL PROTECTED]
RE: Help :: Dyna forms and Validation
No, I am actually using the workflow extension which requires one to use the performAction() method. Also, I am using a nightly build of struts from about a week ago. Thanks Jordan -Original Message- From: Billy Bacon [mailto:[EMAIL PROTECTED]] Sent: Friday, 22 November 2002 1:19 PM To: Struts Users Mailing List; [EMAIL PROTECTED] Subject: Re: Help :: Dyna forms and Validation Do you have an execute() method in your Action? What version of Struts are you using? - Original Message - From: Jordan Thomas [EMAIL PROTECTED] To: [EMAIL PROTECTED] Sent: Friday, November 22, 2002 5:10 AM Subject: Help :: Dyna forms and Validation Hi, I have a dynaform that is simply calling inside the action class the following. public ActionForward performAction( ActionMapping mapping, ActionForm form, HttpServletRequest request, HttpServletResponse response ) throws IOException, ServletException { return (mapping.findForward(entry)); } When I enter the form, it is doing the error checking as soon as I enter the page. How can I stop the application from doing this? I tried using form.validate(mapping, request).clear(); in the above method but that didn't work. Is there a way to somehow clear these error values. I am using a dynaform specified as: form name=loginForm field property=username depends=required,minlength,maxlength arg0 key=label.login.username/ arg1 name=minlength key=${var:minlength} resource=false/ arg2 name=maxlength key=${var:maxlength} resource=false/ var var-nameminlength/var-name var-value2/var-value /var var var-namemaxlength/var-name var-value12/var-value /var /field field property=password depends=required,minlength,maxlength arg0 key=label.login.password/ arg1 name=minlength key=${var:minlength} resource=false/ arg2 name=maxlength key=${var:maxlength} resource=false/ var var-nameminlength/var-name var-value6/var-value /var var var-namemaxlength/var-name var-value12/var-value /var /field /form And in my struts-config.xml I have: form-bean name=loginForm dynamic=true type=org.apache.struts.validator.DynaValidatorForm form-property name=username type=java.lang.String / form-property name=password type=java.lang.String / /form-bean action path=/login type=scoop.web.struts.login.LoginEntryAction name=loginForm scope=request input=/tiles/login validate=true forward name=entry path=/tiles/login/ /action Any help would be great. Thanks in advance Jordan -- 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]
Help :: Dyna forms and Validation
Hi, I have a dynaform that is simply calling inside the action class the following. public ActionForward performAction( ActionMapping mapping, ActionForm form, HttpServletRequest request, HttpServletResponse response ) throws IOException, ServletException { return (mapping.findForward(entry)); } When I enter the form, it is doing the error checking as soon as I enter the page. How can I stop the application from doing this? I tried using form.validate(mapping, request).clear(); in the above method but that didn't work. Is there a way to somehow clear these error values. I am using a dynaform specified as: form name=loginForm field property=username depends=required,minlength,maxlength arg0 key=label.login.username/ arg1 name=minlength key=${var:minlength} resource=false/ arg2 name=maxlength key=${var:maxlength} resource=false/ var var-nameminlength/var-name var-value2/var-value /var var var-namemaxlength/var-name var-value12/var-value /var /field field property=password depends=required,minlength,maxlength arg0 key=label.login.password/ arg1 name=minlength key=${var:minlength} resource=false/ arg2 name=maxlength key=${var:maxlength} resource=false/ var var-nameminlength/var-name var-value6/var-value /var var var-namemaxlength/var-name var-value12/var-value /var /field /form And in my struts-config.xml I have: form-bean name=loginForm dynamic=true type=org.apache.struts.validator.DynaValidatorForm form-property name=username type=java.lang.String / form-property name=password type=java.lang.String / /form-bean action path=/login type=scoop.web.struts.login.LoginEntryAction name=loginForm scope=request input=/tiles/login validate=true forward name=entry path=/tiles/login/ /action Any help would be great. Thanks in advance Jordan -- To unsubscribe, e-mail: mailto:[EMAIL PROTECTED] For additional commands, e-mail: mailto:[EMAIL PROTECTED]
Workflow Extention
Hi All, I am using the workflow extention to create my workflows. It seems that when I am in the middle of a workflow, there is no way to allow the user to jump out of the workflow into another area of the application. I have tried specifying a * and a *.do as a nextPath parameter but that doesn't seem to work. Does anyone know how to gain a little more flexibility with this framework? All I want to do is stop people from jumping steps/entering into the middle of a workflow. At the moment, it seems that a user needs to enter a workflow and then complete that workflow before a he/she can leave it. Does anyone have any suggestions how I can work around this? Thanks Jordan Jordan Thomas Fraunhofer-Institut fuer Produktionstechnik und Automatisierung (FhG-IPA) Nobelstrasse 12 D-70569 Stuttgart Tel.: +49 (0) 711-970-1187 Fax: +49 (0) 711-970-97-1187 Handi:+49 (0) 150-554-76776 E-mail: [EMAIL PROTECTED] Web: http://www.ipa.fhg.de -- To unsubscribe, e-mail: mailto:[EMAIL PROTECTED] For additional commands, e-mail: mailto:[EMAIL PROTECTED]
Workflow Extention
Hi All, I am using the workflow extention to create my workflows. It seems that when I am in the middle of a workflow, there is no way to allow the user to jump out of the workflow into another area of the application. I have tried specifying a * and a *.do as a nextPath parameter but that doesn't seem to work. Does anyone know how to gain a little more flexibility with this framework? All I want to do is stop people from jumping steps/entering into the middle of a workflow. At the moment, it seems that a user needs to enter a workflow and then complete that workflow before a he/she can leave it. Does anyone have any suggestions how I can work around this? Thanks Jordan -- To unsubscribe, e-mail: mailto:[EMAIL PROTECTED] For additional commands, e-mail: mailto:[EMAIL PROTECTED]
Dynaform error
Hi, I have set up my form using dynaform functionality. Everything seemed OK, until the point when I started adding my validation functionality. Anyway, it seems to be that when I add my validator:javascript formName=loginForm/ tag to the top of my page I get the following error: 14:36:08,436 ERROR [Engine] ApplicationDispatcher[/scoop] Servlet.service() for servlet jsp threw exception java.lang.NullPointerException at org.apache.struts.validator.taglib.html.JavascriptValidatorTag.doStartTa g(Unknown Source) at org.apache.jsp.formCompanyRegistration$jsp._jspService(formCompanyRegist ration$jsp.java:1720) at org.apache.jasper.runtime.HttpJspBase.service(HttpJspBase.java:107) at javax.servlet.http.HttpServlet.service(HttpServlet.java:853) at org.apache.jasper.servlet.JspServlet$JspServletWrapper.service(JspServle t.java:201) at org.apache.jasper.servlet.JspServlet.serviceJspFile(JspServlet.java:381) at org.apache.jasper.servlet.JspServlet.service(JspServlet.java:473) at javax.servlet.http.HttpServlet.service(HttpServlet.java:853) ..etc...etc... As soon as I take the tag out my form goes back to working again. I am using tiles and the workflow framework within my application so I thought that maybe this is what is causing the error. It also happens in both actions that are declared as session or request scope variables. I am using version 1.1 of struts. As for my config file, it looks like this: form-bean name=loginForm dynamic=true type=org.apache.struts.validator.DynaValidatorForm form-property name=action type=java.lang.String / form-property name=username type=java.lang.String / form-property name=password type=java.lang.String / /form-bean ... action-mappings action path=/login/1 type=scoop.web.struts.login.LoginAction className=com.livinglogic.struts.workflow.ApplicationMapping name=loginForm scope=request validate=true set-property property=authtype value=scoop.web.authentication.Authentication/ set-property property=primaryWorkflow value=login-workflow/ set-property property=newState value=1/ set-property property=nextState value=2/ set-property property=endWorkflow value=false/ forward name=success path=/tiles/login_step1/ /action action path=/login/2 type=scoop.web.struts.login.LoginAction className=com.livinglogic.struts.workflow.ApplicationMapping name=loginForm scope=request validate=true set-property property=authtype value=scoop.web.authentication.Authentication/ set-property property=primaryWorkflow value=login-workflow/ set-property property=newState value=2/ set-property property=prevState value=1/ set-property property=endWorkflow value=true/ forward name=success path=loggedinhome/ /action ... /action-mappings Has anyone seen this before and more importantly does anyone know what could be causing this? I have search through the archives and on the web to no avail. Thanks Jordan -- To unsubscribe, e-mail: mailto:[EMAIL PROTECTED] For additional commands, e-mail: mailto:[EMAIL PROTECTED]
Problem with getter method not being found
Hi, I have a problem where my bean appears to be not finding the firstName field in my JSP. This is seems strange because it the firstName field is declared in my dynaform. I am using tiles and the workflow framework and version 1.1b of struts and I have tried the latest nightly build. ApplicationDispatcher[/scoop] Servlet.service() for servlet jsp threw exception javax.servlet.ServletException: No getter method for property firstName of bean org.apache.struts.taglib.html.BEAN at org.apache.jasper.runtime.PageContextImpl.handlePageException(PageContex tImpl.java:471) Here's my struts-config.xml file form-bean name=contactForm dynamic=true type=org.apache.struts.validator.DynaValidatorForm form-property name=firstName type=java.lang.String / form-property name=lastName type=java.lang.String / form-property name=contactBack type=java.lang.String / form-property name=meage type=java.lang.String / /form-bean . action path=/contact/2 type=scoop.web.struts.contact.ContactAction className=com.livinglogic.struts.workflow.ApplicationMapping name=contactForm scope=request validate=true set-property property=authtype value=scoop.web.authentication.Authentication/ set-property property=primaryWorkflow value=contact-workflow/ set-property property=newState value=2/ set-property property=nextState value=3/ set-property property=prevState value=1/ set-property property=endWorkflow value=false/ forward name=success path=/tiles/contact_step2/ /action . And my JSP %@ taglib uri=/struts-html prefix=html % %@ taglib uri=/struts-logic prefix=logic % %@ taglib uri=/struts-bean prefix=bean % %@ taglib uri=/struts-validator prefix=validator % html:form action=/login/2.do method=POST focus=username onsubmit=return validateRegistrationForm(this); table border=0 tr tdbean:message key=label.contact.firstName//td tdhtml:text property=firstName size=40 maxlength=75 tabindex=1//td /tr tr tdbean:message key=label.contact.lastName//td tdhtml:text property=lastName size=40 maxlength=75 tabindex=2//td /tr tr tdbean:message key=label.contact.contactBack//td td html:radio property=contactBack titleKey=label.yes value=1 tabindex=3/ html:radio property=contactBack titleKey=label.no value=0 tabindex=4/ /td /tr tr tdbean:message key=label.contact.message//td tdhtml:textarea property=message rows=5 cols=50 tabindex=5//td /tr tr td colspan=3 html:submit tabindex=6 bean:message key=button.send/ /html:submit /td /tr /table /html:form validator:javascript formName=contactForm/ Has anyone seen this before and more importantly does anyone know what could be causing this? I have search through the archives and on the web to no avail. Thanks Jordan -- To unsubscribe, e-mail: mailto:[EMAIL PROTECTED] For additional commands, e-mail: mailto:[EMAIL PROTECTED]
FW: Dynaform error
OK, found the problem. I've been looking at this for hours. :O( In my JSP I was using then old struts-validate tld for my validator:javascript formName=loginForm/ tag. It's now part of the struts-html tld. Cheers Jordan -Original Message- From: Jordan Thomas [mailto:[EMAIL PROTECTED]] Sent: Tuesday, 19 November 2002 5:23 PM To: '[EMAIL PROTECTED]' Subject: Dynaform error Hi, I have set up my form using dynaform functionality. Everything seemed OK, until the point when I started adding my validation functionality. Anyway, it seems to be that when I add my validator:javascript formName=loginForm/ tag to the top of my page I get the following error: 14:36:08,436 ERROR [Engine] ApplicationDispatcher[/scoop] Servlet.service() for servlet jsp threw exception java.lang.NullPointerException at org.apache.struts.validator.taglib.html.JavascriptValidatorTag.doStartTa g(Unknown Source) at org.apache.jsp.formCompanyRegistration$jsp._jspService(formCompanyRegist ration$jsp.java:1720) at org.apache.jasper.runtime.HttpJspBase.service(HttpJspBase.java:107) at javax.servlet.http.HttpServlet.service(HttpServlet.java:853) at org.apache.jasper.servlet.JspServlet$JspServletWrapper.service(JspServle t.java:201) at org.apache.jasper.servlet.JspServlet.serviceJspFile(JspServlet.java:381) at org.apache.jasper.servlet.JspServlet.service(JspServlet.java:473) at javax.servlet.http.HttpServlet.service(HttpServlet.java:853) ..etc...etc... As soon as I take the tag out my form goes back to working again. I am using tiles and the workflow framework within my application so I thought that maybe this is what is causing the error. It also happens in both actions that are declared as session or request scope variables. I am using version 1.1 of struts. As for my config file, it looks like this: form-bean name=loginForm dynamic=true type=org.apache.struts.validator.DynaValidatorForm form-property name=action type=java.lang.String / form-property name=username type=java.lang.String / form-property name=password type=java.lang.String / /form-bean ... action-mappings action path=/login/1 type=scoop.web.struts.login.LoginAction className=com.livinglogic.struts.workflow.ApplicationMapping name=loginForm scope=request validate=true set-property property=authtype value=scoop.web.authentication.Authentication/ set-property property=primaryWorkflow value=login-workflow/ set-property property=newState value=1/ set-property property=nextState value=2/ set-property property=endWorkflow value=false/ forward name=success path=/tiles/login_step1/ /action action path=/login/2 type=scoop.web.struts.login.LoginAction className=com.livinglogic.struts.workflow.ApplicationMapping name=loginForm scope=request validate=true set-property property=authtype value=scoop.web.authentication.Authentication/ set-property property=primaryWorkflow value=login-workflow/ set-property property=newState value=2/ set-property property=prevState value=1/ set-property property=endWorkflow value=true/ forward name=success path=loggedinhome/ /action ... /action-mappings Has anyone seen this before and more importantly does anyone know what could be causing this? I have search through the archives and on the web to no avail. Thanks Jordan -- To unsubscribe, e-mail: mailto:[EMAIL PROTECTED] For additional commands, e-mail: mailto:[EMAIL PROTECTED]
Form validation
Hi, I am wanting to do a step by step, wizard style interface. Does anyone know of a good tutorial for this? thanks Jordan Jordan Thomas Fraunhofer-Institut fuer Produktionstechnik und Automatisierung (FhG-IPA) Nobelstrasse 12 D-70569 Stuttgart Tel.: +49 (0) 711-970-1187 Fax: +49 (0) 711-970-97-1187 Handi:+49 (0) 150-554-76776 E-mail: [EMAIL PROTECTED] Web: http://www.ipa.fhg.de/ http://www.ipa.fhg.de