Set language in JSP
I've encountered a rather annoying issue. To select the language in which our labels should be displayed, we use fmt:setLocale. Everything works fine, everybody's happy. But. To validate our forms, we use DynaValidator. In our webapp, we have 1 form which has only 1 field. When validation fails, the browser redisplays the form, with an appropriate error message. The problem is that we show our error message with html:errors / and since struts doesn't know the locale which was set with fmt:setLocale, this message is retrieved from the resource bundle of the standard browser language. Is there anyone who knows how to set the language in a JSP, for that particular page? It has to be on the page itself, it can't be done in an action or somewhere else. Or maybe another way to show the error message with logic:messagesPresent and retrieval of the error message from a resource bundle. Thanks in advance Kind regards, Bjorn De Bakker This message is for the designated recipient only and may contain privileged, proprietary, or otherwise private information. If you have received it in error, please notify the sender immediately and delete the original. Any other use of the email by you is prohibited.
How to realize ajax in struts2
I want to use ajax within Struts to realize following function,there is a textfield an a submit button which use register a username in a JSP page,then you can put you name into textfield and click register button,then will call ajax to search name is exist,if exist,there will be a message behind textfield,say name is exist,please use another name,like follows: --- Name:| | --- Register button My code is follows,but my code can't reach my goal,I don't know how to realize it? Anybody could tell me how to do it? Thanks! %@ page contentType=text/html;charset=UTF-8 language=java % %@ taglib prefix=s uri=/struts-tags % html head s:head theme=ajax/ /head body Name:s:textfield id=data1 name=data1/div id=t1 style=display:none/div img id=indicator src=${pageContext.request.contextPath}/images/indicator.gif alt=Loading... style=display:none/ s:url id=ajaxTest value=Test1.action / s:submit type=submit theme=ajax value=submit targets=t1 href=%{ajaxTest} align=left indicator=indicator/ /body /html
Re: Tiles 2 Lifecycycle
2007/4/23, [EMAIL PROTECTED] [EMAIL PROTECTED]: Hi Antonio -- I have been teaching for the past couple weeks and now returning to S2/Tiles. I would like to understand how Tiles affects the S2 lifecycle. AFAIK Tiles affects S2 only in rendering the results. What I mean is if you are using a result of tiles type, it will be rendered by rendering its components, that can be JSPs or other view pages. If things have not changes, currently only JSP and FreeMarker are supported. This means that JSP pages (for example) can read all the beans put in all the usual scopes (request, session, etc.) Essentially, using Tiles is not so different to use normal JSP (or FreeMarker) pages: Tiles composes pages and renders them, but how the beans are put in the page is a task of the JSP (or FreeMarker) page. Antonio - To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED]
[s2] Difference between actionMessages and actionErrors
A quick question on what the recommended method for displaying general messages when using struts 2, actionMessages or actionErrors. I had a look at the ValidationAware interface and there appears to be no difference between the two. The only difference I could see what that they are accessed by different tags. Which one is recommended? My main concern is are the non-obvious implications of choosing one over another. Z. - To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED]
RE: Struts Validation Problems
^\w{2}-\w{6}(-\w{2}){0,5}$ | ^[0-9]{4,6}$ ^\\w{2}-\\w{6}(-\\w{2}){0,5}|([0-9]{4,6})$; Are different you are missing the ^ sign after the | operator... Please read the regular expression book properly .. -Original Message- From: Ferruh Zamangör [mailto:[EMAIL PROTECTED] Sent: 23 April 2007 13:17 To: user@struts.apache.org Subject: Struts Validation Problems Hi, I have some problems with using the following regular expression in the validation framework from Struts. field property=projectNumber depends=required,mask msg name=mask key=errors.format/ arg key=projectNumber / arg key=GB-XX-AA-BB-CC-DD-EE resource=false position=1/ var var-namemask/var-name var-value^\w{2}-\w{6}(-\w{2}){0,5}$ | ^[0-9]{4,6}$/var-value /var /field I have tested with the following scenarios: 333 == validation works and a validation message is displayed. == validation OK 1234567 == validation does not work, no validation error is displayed When I use the same pattern in a java class it works fine??? String input = 1234567; String pattern = ^\\w{2}-\\w{6}(-\\w{2}){0,5}|([0-9]{4,6})$; Pattern p = Pattern.compile(pattern); Matcher match = p.matcher(input); boolean result = match.matches(); Can anybody tell me what is wrong in the above definition of the field ?? Regards Ferruh - To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED]
[S2] Newbie. Authentification Interceptors
Hi I notice that there have been a few threads over the last couple of days where people have been talking about implementing login authentication via a Struts2 interceptor. Could someone simply outline the reason why they would want to do it this way rather than using container authentication? Regards Roger - To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED]
Re: Use EL to access to a key from the MessageResources.properties
On 4/23/07, piloupy GOTTAPIL [EMAIL PROTECTED] wrote: Hi, I'd like to do something like this in a JSP file : html-el:link href=${contact.mail}Email Link/html-el:link where contact.mail is a key from my MessageResources.properties. I think the solution is quite simple, but I can't find how to do. How about.. bean:define id=foobean:message key=contact.mail//bean:define html-el:link href=${foo}Email Link/html-el:link Niall Thanks in advance, piloupy - To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED]
Re: Set language in JSP
On 4/24/07, [EMAIL PROTECTED] [EMAIL PROTECTED] wrote: I've encountered a rather annoying issue. To select the language in which our labels should be displayed, we use fmt:setLocale. Everything works fine, everybody's happy. But. To validate our forms, we use DynaValidator. In our webapp, we have 1 form which has only 1 field. When validation fails, the browser redisplays the form, with an appropriate error message. The problem is that we show our error message with html:errors / and since struts doesn't know the locale which was set with fmt:setLocale, this message is retrieved from the resource bundle of the standard browser language. Struts uses either the Locale stored under a key in the Session (default key is Globals.LOCALE_KEY, but you can specify an alternate on tags like html:errors/) or if thats not present the default locale for the request. So I think you have a number of options: 1) Set the locale in the Session 2) Create a custom TagUtils instance overriding the getUserLocale() method (Struts 1.3.5 or later since thats when the static setInstance() method was added to TagUtils). 3) Create your own custom equivalent of the html:errors/ (or html:messages) tag that access the ActionErrors object created by the validation process Niall Is there anyone who knows how to set the language in a JSP, for that particular page? It has to be on the page itself, it can't be done in an action or somewhere else. Or maybe another way to show the error message with logic:messagesPresent and retrieval of the error message from a resource bundle. Thanks in advance Kind regards, Bjorn De Bakker - To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED]
Null date become today in map when use textfield tag
TestDateAction.java public class TestDateAction extends ActionSupport { private Date singleDate; private Map mapDate; private List listDate; @Override public String execute() throws Exception { return super.execute(); } set get methods } index.jsp jsp tag input form action=testDate.action s:textfield name=mapDate['today']/ s:textfield name=singleDate/ s:textfield name=listDate[0]/ input type=submit/ form struts.xml package name=default extends=struts-default action name=testDate class=testDate result name=successindex.jsp/result /action /package I input nothing in all three textfield then submit. In TestDateAction three parameters are all null in valuestack. But after come back to index.jsp, mapDate['today'] 's value become today. so magic. The Null date value become today in Textfield tag. Perhaps this is a bug of ognl when use textfield. - To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED]
Re: Technology choice?
-BEGIN PGP SIGNED MESSAGE- Hash: SHA1 David, Sullivan, David wrote: I am assuming that I wont. However many of the examples I have seen using the interceptor framework use Springs IoC container and I probably wont be using that given the EJB3 specification (Glassfish and Toplink) There's no reason you can't use Spring and EJB together, either. I think the reason that most people on this list don't talk about EJB is because (in my experience) not many people actually use it. They use simpler mechanisms for server cooperation, resource allocation, data persistence and event notification. HTH, - -chris -BEGIN PGP SIGNATURE- Version: GnuPG v1.4.7 (MingW32) Comment: Using GnuPG with Mozilla - http://enigmail.mozdev.org iD8DBQFGLfMg9CaO5/Lv0PARApRGAKC8XmO57K8N8Dn3YZsfaSINq+il7ACgnBGt 5k05aOxtMhlqMF2QzVnnV/s= =oia0 -END PGP SIGNATURE- - To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED]
Re: Could not load 'dojo.widget.html.Tooltip':last tried '__package__.js'
You can just ignore it. musachy On 4/23/07, red phoenix [EMAIL PROTECTED] wrote: I want to use ajax in struts2,but when run my code like http://localhost:8080/test/index.html,it raise following Javascript error: Line:95 Char:1 Error:Could not load 'dojo.widget.html.Tooltip':last tried '__package__.js' Code:0 URL:http://localhost:8080/test/test/Test.action http://localhost:8080/test/test/Test.action My code is follows: /*index.html*/ !DOCTYPE HTML PUBLIC -//W3C//DTD HTML 4.0 Transitional//EN html head META HTTP-EQUIV=Refresh CONTENT=0;URL=test/Test.action /head body pLoading .../p /body /html /*Test.jsp*/ %@ page contentType=text/html;charset=UTF-8 language=java % %@ taglib prefix=s uri=/struts-tags % html head titleAjax Examples/title s:head theme=ajax/ script language=JavaScript type=text/javascript function doSomething() { alert('you can manipulate the form before it gets submitted'); return true; } /script /head body Remote form replacing another div:br/ div id='two' style=border: 1px solid yellow;binitial content/b/div s:form id='theForm2' cssStyle=border: 1px solid green; action='Test' method='post' theme=ajax input type='text' name='data' value='Struts User' s:submit value=GO2 theme=ajax targets=two/ /s:form /body /html /*Test.java*/ package test; import java.io.*; import com.opensymphony.xwork2.*; public class Test extends ActionSupport implements Action, Serializable{ private static int counter = 0; private String data; public long getServerTime() { return System.currentTimeMillis(); } public int getCount() { return ++counter; } public String getData() { return data; } public void setData(String data) { this.data = data; } public String execute() throws Exception { return SUCCESS; } } /*struts.xml*/ ?xml version=1.0 encoding=UTF-8 ? !DOCTYPE struts PUBLIC -//Apache Software Foundation//DTD Struts Configuration 2.0//EN http://struts.apache.org/dtds/struts-2.0.dtd; struts constant name=struts.enable.DynamicMethodInvocation value=false / constant name=struts.devMode value=true / include file=test.xml/ !-- Add packages here -- /struts /*test.xml*/ ?xml version=1.0 encoding=UTF-8 ? !DOCTYPE struts PUBLIC -//Apache Software Foundation//DTD Struts Configuration 2.0//EN http://struts.apache.org/dtds/struts-2.0.dtd; struts package name=test namespace=/test extends=struts-default action name=Test class=test.Test result/test/Test.jsp/result /action !-- Add actions here -- /package /struts I don't know where wrong in my code? I want to know if I lost some js or jar file? How to correct my code? My code structure is follows: D:\tomcat6\webapps\test\index.html D:\tomcat6\webapps\test\test\Test.jsp D:\tomcat6\webapps\test\WEB-INF\web.xml D:\tomcat6\webapps\test\WEB-INF\classes\struts.xml D:\tomcat6\webapps\test\WEB-INF\classes\test.xml D:\tomcat6\webapps\test\WEB-INF\classes\test\Test.class D:\tomcat6\webapps\test\WEB-INF\lib\commons-logging-1.1.jar D:\tomcat6\webapps\test\WEB-INF\lib\freemarker-2.3.8.jar D:\tomcat6\webapps\test\WEB-INF\lib\ognl-2.6.11.jar D:\tomcat6\webapps\test\WEB-INF\lib\struts2-core-2.0.6.jar D:\tomcat6\webapps\test\WEB-INF\lib\xwork-2.0.1.jar Thanks -- Hey you! Would you help me to carry the stone? Pink Floyd
Re: Use EL to access to a key from the MessageResources.properties
Thank you all. The solution of Niall works. I was trying to get the fmt taglib work for nearly 2 days... without success. But I really prefer the solution of Niall, since it doesn't oblige me to declare another taglib. I really thank you guys for your help. piloupy On 4/24/07, Niall Pemberton [EMAIL PROTECTED] wrote: How about.. bean:define id=foobean:message key=contact.mail//bean:define html-el:link href=${foo}Email Link/html-el:link Niall - To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED]
Re: [S2] Newbie. Authentification Interceptors
Others can chime in as well, but from my experience in the past, container-managed authentication is a little too rigid and doesn't offer anywhere near the flexibility of a custom-brewed authentication/authorization scheme. That's not to say a custom scheme need be entirely proprietary; we just implemented a JAAS-backed security framework for authentication and authorization, but which fully exposes in our source code (action classes and authorization interceptor) all steps of the process so we have control over things that container-managed security makes difficult (such as logging, counting of failed logins, integrating authorization rules into struts.xml, and so forth). - Original Message From: Roger Varley [EMAIL PROTECTED] To: user@struts.apache.org Sent: Tuesday, April 24, 2007 5:32:54 AM Subject: [S2] Newbie. Authentification Interceptors Hi I notice that there have been a few threads over the last couple of days where people have been talking about implementing login authentication via a Struts2 interceptor. Could someone simply outline the reason why they would want to do it this way rather than using container authentication? Regards Roger - To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED]
Another file upload question
Hey all I have an action class which handles file uploads via a setter method: private File uploadedMovie = null; public void setUploadedMovie(File uploadedMovie) {this.uploadedMovie = uploadedMovie;} The problem is that I can't set the name of the uploaded file before it is saved to the drive. I can specify the path but the file name is some random generated key by Tomcat. Can I somehow intercept the upload before it has been saved to the drive and change the name? If not, are there other alternatives? Thanks! -- View this message in context: http://www.nabble.com/Another-file-upload-question-tf3638618.html#a10160759 Sent from the Struts - User mailing list archive at Nabble.com. - To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED]
Re: Null date become today in map when use textfield tag
please supply the applicationContext.xml definition for 'testDate' e.g. web..xml action name=springExample class=springAction result name=success /WEB-INF/view/springExample.jsp /result /action beans default-autowire=autodetect bean id=thingManager class=org.apache.struts2.portlet.example.spring.ThingManager /bean bean id=springAction class=org.apache.struts2.portlet.example.spring.SpringAction singleton=false property name=thingManager ref bean=thingManager / /property /bean /beans M- This email message and any files transmitted with it contain confidential information intended only for the person(s) to whom this email message is addressed. If you have received this email message in error, please notify the sender immediately by telephone or email and destroy the original message without making a copy. Thank you. - Original Message - From: longhao [EMAIL PROTECTED] To: Struts Users Mailing List user@struts.apache.org Sent: Tuesday, April 24, 2007 7:19 AM Subject: Null date become today in map when use textfield tag TestDateAction.java public class TestDateAction extends ActionSupport { private Date singleDate; private Map mapDate; private List listDate; @Override public String execute() throws Exception { return super.execute(); } set get methods } index.jsp jsp tag input form action=testDate.action s:textfield name=mapDate['today']/ s:textfield name=singleDate/ s:textfield name=listDate[0]/ input type=submit/ form struts.xml package name=default extends=struts-default action name=testDate class=testDate result name=successindex.jsp/result /action /package I input nothing in all three textfield then submit. In TestDateAction three parameters are all null in valuestack. But after come back to index.jsp, mapDate['today'] 's value become today. so magic. The Null date value become today in Textfield tag. Perhaps this is a bug of ognl when use textfield. - To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED] - To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED]
Re: Another file upload question
--- meeboo [EMAIL PROTECTED] wrote: private File uploadedMovie = null; public void setUploadedMovie(File uploadedMovie) {this.uploadedMovie = uploadedMovie;} The problem is that I can't set the name of the uploaded file before it is saved to the drive. I can specify the path but the file name is some random generated key by Tomcat. Can I somehow intercept the upload before it has been saved to the drive and change the name? If not, are there other alternatives? Yes; use the information in the documentation! :) http://struts.apache.org/2.x/docs/file-upload-interceptor.html There are two additional properties set by the upload interceptor: String fileName; String contentType; To answer your next question, you should copy the uploaded file to its ultimate destination (renaming it to a different place may also work but I haven't tried that) and there may be other ways as well. d. __ Do You Yahoo!? Tired of spam? Yahoo! Mail has the best spam protection around http://mail.yahoo.com - To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED]
Re: Null date become today in map when use textfield tag
--- Martin Gainty [EMAIL PROTECTED] wrote: please supply the applicationContext.xml definition for 'testDate' Huh? I'd be more likely to think it has something to do with not using the s:form.../ tag, but I've never been entirely sure what the relationship between it and the input tags really is. d. e.g. web..xml action name=springExample class=springAction result name=success /WEB-INF/view/springExample.jsp /result /action beans default-autowire=autodetect bean id=thingManager class=org.apache.struts2.portlet.example.spring.ThingManager /bean bean id=springAction class=org.apache.struts2.portlet.example.spring.SpringAction singleton=false property name=thingManager ref bean=thingManager / /property /bean /beans M- This email message and any files transmitted with it contain confidential information intended only for the person(s) to whom this email message is addressed. If you have received this email message in error, please notify the sender immediately by telephone or email and destroy the original message without making a copy. Thank you. - Original Message - From: longhao [EMAIL PROTECTED] To: Struts Users Mailing List user@struts.apache.org Sent: Tuesday, April 24, 2007 7:19 AM Subject: Null date become today in map when use textfield tag TestDateAction.java public class TestDateAction extends ActionSupport { private Date singleDate; private Map mapDate; private List listDate; @Override public String execute() throws Exception { return super.execute(); } set get methods } index.jsp jsp tag input form action=testDate.action s:textfield name=mapDate['today']/ s:textfield name=singleDate/ s:textfield name=listDate[0]/ input type=submit/ form struts.xml package name=default extends=struts-default action name=testDate class=testDate result name=successindex.jsp/result /action /package I input nothing in all three textfield then submit. In TestDateAction three parameters are all null in valuestack. But after come back to index.jsp, mapDate['today'] 's value become today. so magic. The Null date value become today in Textfield tag. Perhaps this is a bug of ognl when use textfield. - 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] __ Do You Yahoo!? Tired of spam? Yahoo! Mail has the best spam protection around http://mail.yahoo.com - To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED]
S2: Disable datetimepicker
I would like to enable/disable the datetimepicker when the user selects certain radio buttons. Here is my tag: s:datetimepicker name=untildate displayWeeks=4 displayFormat= MM-dd-/ I can disable (and clear) the textbox next to the calendar icon like this: var ud = getField('mainForm', 'untildate'); ud.value = ; ud.disabled = true; But this does not disable the calendar icon: ud = getField('mainForm', 'dojo.untildate'); ud.disabled = true; Any ideas on this? I do not see any other applicable elements in my form. Thanks, Scott __ Do You Yahoo!? Tired of spam? Yahoo! Mail has the best spam protection around http://mail.yahoo.com - To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED]
Re: [S2] Formatting inside Iterator tag
Mark Menard wrote: s:text name=format.dates:param name=value value=orderDate //s:text That will do the date, there are some other formats listed on the Wiki I think. *shrug* Mark When I put the exact text you gave me into my .jsp the text format.date is printed out to the page. After a little more research it looks like format.date need to be defined in a properties file somewhere. Can this be any properties file or are you referring to struts.properties? Can I put it in struts.xml? What do I set format.date equal to, is there anything I need to do to make sure it is picked up by Struts, etc.? If there are detailed instructions somewhere I'm not opposed to reading a little documentation. I just haven't been able to find any with enough detail to help me out. Is there any way in which I can do this without messing with a properties file? -- View this message in context: http://www.nabble.com/-S2--Formatting-inside-Iterator-tag-tf3635036.html#a10162415 Sent from the Struts - User mailing list archive at Nabble.com. - To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED]
Can I load filter-class from custom jar file in WEB-INF/lib dir
What I need to do to load the filter-class from custon jar or war file ? I am getting this exception : Apr 24, 2007 10:16:09 AM EDT Error HTTP BEA-101165 Could not load user defined filter in web.xml: ServletContext(id=31649343,name=dlymags,context-path=/dlymags) org.sae.commons.filter.LogParamFilter. java.lang.ClassNotFoundException: org.sae.commons.filter.LogParamFilter at weblogic.utils.classloaders.GenericClassLoader.findClass(GenericClassLoader.java:199) at weblogic.utils.classloaders.ChangeAwareClassLoader.findClass(ChangeAwareClassLoader.java:61) at java.lang.ClassLoader.loadClass(ClassLoader.java:289) at java.lang.ClassLoader.loadClass(ClassLoader.java:235) at weblogic.utils.classloaders.GenericClassLoader.loadClass(GenericClassLoader.java:224) at weblogic.utils.classloaders.ChangeAwareClassLoader.loadClass(ChangeAwareClassLoader.java:41) at weblogic.servlet.internal.WebAppServletContext.loadClass(WebAppServletContext.java:6127) at weblogic.servlet.internal.WebAppServletContext.registerFilter(WebAppServletContext.java:3076) at weblogic.servlet.internal.WebAppServletContext.initFilters(WebAppServletContext.java:3053) at weblogic.servlet.internal.WebAppServletContext.preloadResources(WebAppServletContext.java:3354) at weblogic.servlet.internal.WebAppServletContext.setStarted(WebAppServletContext.java:6208) at weblogic.servlet.internal.WebAppModule.start(WebAppModule.java:864) at weblogic.j2ee.J2EEApplicationContainer.start(J2EEApplicationContainer.java:2134) at weblogic.j2ee.J2EEApplicationContainer.activate(J2EEApplicationContainer.java:2175) at weblogic.j2ee.J2EEApplicationContainer.activate(J2EEApplicationContainer.java:2122) at weblogic.management.deploy.slave.SlaveDeployer$Application.setActivation(SlaveDeployer.java:3099) at weblogic.management.deploy.slave.SlaveDeployer.setActivationStateForAllApplications(SlaveDeployer.java:1768) at weblogic.management.deploy.slave.SlaveDeployer.resume(SlaveDeployer.java:351) at weblogic.management.deploy.DeploymentManagerServerLifeCycleImpl.resume(DeploymentManagerServerLifeCycleImpl.java:229) at weblogic.t3.srvr.SubsystemManager.resume(SubsystemManager.java:136) at weblogic.t3.srvr.T3Srvr.resume(T3Srvr.java:965) at weblogic.t3.srvr.T3Srvr.run(T3Srvr.java:360) at weblogic.Server.main(Server.java:32) -- View this message in context: http://www.nabble.com/Can-I-load-filter-class-from-custom-jar-file-in-WEB-INF-lib-dir-tf3639142.html#a10162570 Sent from the Struts - User mailing list archive at Nabble.com. - To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED]
Re: S2: Disable datetimepicker
Assign an id to your datepicker, lets say dp1 and do this: dojo.widget.byId(dp1).disable(); to enable it: dojo.widget.byId(dp1).enable(); musachy On 4/24/07, Scott Nesbitt [EMAIL PROTECTED] wrote: I would like to enable/disable the datetimepicker when the user selects certain radio buttons. Here is my tag: s:datetimepicker name=untildate displayWeeks=4 displayFormat= MM-dd-/ I can disable (and clear) the textbox next to the calendar icon like this: var ud = getField('mainForm', 'untildate'); ud.value = ; ud.disabled = true; But this does not disable the calendar icon: ud = getField('mainForm', 'dojo.untildate'); ud.disabled = true; Any ideas on this? I do not see any other applicable elements in my form. Thanks, Scott __ Do You Yahoo!? Tired of spam? Yahoo! Mail has the best spam protection around http://mail.yahoo.com - To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED] -- Hey you! Would you help me to carry the stone? Pink Floyd
Re: [S2] Formatting inside Iterator tag
--- chengas123 [EMAIL PROTECTED] wrote: Can this be any properties file or are you referring to struts.properties? It needs to be one of the normal properties files used for messages etc. that S2 searches for, where you keep the rest of your messages/properties. (So no, I don't think struts.properties would work.) Is there any way in which I can do this without messing with a properties file? I don't know, but that would kind of defeat the purpose of having I18N property files; AFAIK the S2 tags are more or less wrappers around standard Java I18N localization functionality. The link: http://java.sun.com/j2se/1.4.2/docs/api/java/text/MessageFormat.html provided on the s:text.../ reference page goes in to a fair amount of detail about the values contained in the properties file. d. __ Do You Yahoo!? Tired of spam? Yahoo! Mail has the best spam protection around http://mail.yahoo.com - To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED]
Re: S2: Disable datetimepicker
Works great! Thanks, Musachy. Scott --- Musachy Barroso [EMAIL PROTECTED] wrote: Assign an id to your datepicker, lets say dp1 and do this: dojo.widget.byId(dp1).disable(); to enable it: dojo.widget.byId(dp1).enable(); musachy On 4/24/07, Scott Nesbitt [EMAIL PROTECTED] wrote: I would like to enable/disable the datetimepicker when the user selects certain radio buttons. Here is my tag: s:datetimepicker name=untildate displayWeeks=4 displayFormat= MM-dd-/ I can disable (and clear) the textbox next to the calendar icon like this: var ud = getField('mainForm', 'untildate'); ud.value = ; ud.disabled = true; But this does not disable the calendar icon: ud = getField('mainForm', 'dojo.untildate'); ud.disabled = true; Any ideas on this? I do not see any other applicable elements in my form. Thanks, Scott __ Do You Yahoo!? Tired of spam? Yahoo! Mail has the best spam protection around http://mail.yahoo.com - To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED] -- Hey you! Would you help me to carry the stone? Pink Floyd __ Do You Yahoo!? Tired of spam? Yahoo! Mail has the best spam protection around http://mail.yahoo.com - To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED]
Re: S2: Disable datetimepicker
I'm not a struts2 user (unfortunately) but this seems bad to me. From what I see of the s2 tags, they abstract you from the fact that dojo is being used under the hood. Should struts2 have it's own core js that proxies through to the dojo implementation? Scott Nesbitt wrote: Works great! Thanks, Musachy. Scott --- Musachy Barroso [EMAIL PROTECTED] wrote: Assign an id to your datepicker, lets say dp1 and do this: dojo.widget.byId(dp1).disable(); to enable it: dojo.widget.byId(dp1).enable(); musachy On 4/24/07, Scott Nesbitt [EMAIL PROTECTED] wrote: I would like to enable/disable the datetimepicker when the user selects certain radio buttons. Here is my tag: s:datetimepicker name=untildate displayWeeks=4 displayFormat= MM-dd-/ I can disable (and clear) the textbox next to the calendar icon like this: var ud = getField('mainForm', 'untildate'); ud.value = ; ud.disabled = true; But this does not disable the calendar icon: ud = getField('mainForm', 'dojo.untildate'); ud.disabled = true; Any ideas on this? I do not see any other applicable elements in my form. Thanks, Scott __ Do You Yahoo!? Tired of spam? Yahoo! Mail has the best spam protection around http://mail.yahoo.com - To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED] -- Hey you! Would you help me to carry the stone? Pink Floyd __ Do You Yahoo!? Tired of spam? Yahoo! Mail has the best spam protection around http://mail.yahoo.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]
Re: [S2] Newbie. Authentification Interceptors
On 4/24/07 8:49 AM, Shahak Nagiel [EMAIL PROTECTED] wrote: Others can chime in as well, but from my experience in the past, container-managed authentication is a little too rigid and doesn't offer anywhere near the flexibility of a custom-brewed authentication/authorization scheme. That's not to say a custom scheme need be entirely proprietary; we just implemented a JAAS-backed security framework for authentication and authorization, but which fully exposes in our source code (action classes and authorization interceptor) all steps of the process so we have control over things that container-managed security makes difficult (such as logging, counting of failed logins, integrating authorization rules into struts.xml, and so forth). I'd echo a lot of this sentiment. Using the interceptor gives me control over the process. Also, personally I don't use JAAS. Maybe I will someday, but right now I don't. Mark - To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED]
Re: [s2] Difference between actionMessages and actionErrors
redundantactionMessages is for general messages, and actionErrors for errors./redundant . I don't think there are any implications. regards musachy On 4/24/07, Zoran Avtarovski [EMAIL PROTECTED] wrote: A quick question on what the recommended method for displaying general messages when using struts 2, actionMessages or actionErrors. I had a look at the ValidationAware interface and there appears to be no difference between the two. The only difference I could see what that they are accessed by different tags. Which one is recommended? My main concern is are the non-obvious implications of choosing one over another. Z. - To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED] -- Hey you! Would you help me to carry the stone? Pink Floyd
Re: [S2] Formatting inside Iterator tag
Dave Newton-4 wrote: --- chengas123 [EMAIL PROTECTED] wrote: Can this be any properties file or are you referring to struts.properties? It needs to be one of the normal properties files used for messages etc. that S2 searches for, where you keep the rest of your messages/properties. (So no, I don't think struts.properties would work.) Is there any way in which I can do this without messing with a properties file? I don't know, but that would kind of defeat the purpose of having I18N property files; AFAIK the S2 tags are more or less wrappers around standard Java I18N localization functionality. The link: http://java.sun.com/j2se/1.4.2/docs/api/java/text/MessageFormat.html provided on the s:text.../ reference page goes in to a fair amount of detail about the values contained in the properties file. d. Awesome. Got it working by adding that to a package.properties file. I have no plans to internationalize this site and it wasn't immediately obvious to me that formatting would fall under the category of localization (although I understand why it does), so I'm afraid this was an area I hadn't made any efforts to learn. Thanks again for the help. -- View this message in context: http://www.nabble.com/-S2--Formatting-inside-Iterator-tag-tf3635036.html#a10164155 Sent from the Struts - User mailing list archive at Nabble.com. - To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED]
Re: S2: Disable datetimepicker
http://www.koders.com/javascript/fidFF0542A22748F79D50156F4B75564D76676002D4.aspx I would suggest using struts.widgets.HTMLDynArchCalendar whcih inherits from dojo.widget.DomWidget which has the enable() and disable() methods M-- This email message and any files transmitted with it contain confidential information intended only for the person(s) to whom this email message is addressed. If you have received this email message in error, please notify the sender immediately by telephone or email and destroy the original message without making a copy. Thank you. - Original Message - From: Musachy Barroso [EMAIL PROTECTED] To: Struts Users Mailing List user@struts.apache.org Sent: Tuesday, April 24, 2007 11:01 AM Subject: Re: S2: Disable datetimepicker Assign an id to your datepicker, lets say dp1 and do this: dojo.widget.byId(dp1).disable(); to enable it: dojo.widget.byId(dp1).enable(); musachy On 4/24/07, Scott Nesbitt [EMAIL PROTECTED] wrote: I would like to enable/disable the datetimepicker when the user selects certain radio buttons. Here is my tag: s:datetimepicker name=untildate displayWeeks=4 displayFormat= MM-dd-/ I can disable (and clear) the textbox next to the calendar icon like this: var ud = getField('mainForm', 'untildate'); ud.value = ; ud.disabled = true; But this does not disable the calendar icon: ud = getField('mainForm', 'dojo.untildate'); ud.disabled = true; Any ideas on this? I do not see any other applicable elements in my form. Thanks, Scott __ Do You Yahoo!? Tired of spam? Yahoo! Mail has the best spam protection around http://mail.yahoo.com - To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED] -- Hey you! Would you help me to carry the stone? Pink Floyd - To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED]
Re: S2: Disable datetimepicker
In the beginning I think that was the idea(I wasn't around at that time so don't take my word for it :) ), as of 2.1 we are moving all these ajax tags to a dojo plugin, so they are dojo specific. If there was another implementation, it would be better to have a common interface, but just working with dojo is difficult enough already, so I don't think we will supporting anything else in the near (or distant AFAIK) future. musachy On 4/24/07, Lance [EMAIL PROTECTED] wrote: I'm not a struts2 user (unfortunately) but this seems bad to me. From what I see of the s2 tags, they abstract you from the fact that dojo is being used under the hood. Should struts2 have it's own core js that proxies through to the dojo implementation? Scott Nesbitt wrote: Works great! Thanks, Musachy. Scott --- Musachy Barroso [EMAIL PROTECTED] wrote: Assign an id to your datepicker, lets say dp1 and do this: dojo.widget.byId(dp1).disable(); to enable it: dojo.widget.byId(dp1).enable(); musachy On 4/24/07, Scott Nesbitt [EMAIL PROTECTED] wrote: I would like to enable/disable the datetimepicker when the user selects certain radio buttons. Here is my tag: s:datetimepicker name=untildate displayWeeks=4 displayFormat= MM-dd-/ I can disable (and clear) the textbox next to the calendar icon like this: var ud = getField('mainForm', 'untildate'); ud.value = ; ud.disabled = true; But this does not disable the calendar icon: ud = getField('mainForm', 'dojo.untildate'); ud.disabled = true; Any ideas on this? I do not see any other applicable elements in my form. Thanks, Scott __ Do You Yahoo!? Tired of spam? Yahoo! Mail has the best spam protection around http://mail.yahoo.com - To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED] -- Hey you! Would you help me to carry the stone? Pink Floyd __ Do You Yahoo!? Tired of spam? Yahoo! Mail has the best spam protection around http://mail.yahoo.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] -- Hey you! Would you help me to carry the stone? Pink Floyd
Re: S2: Disable datetimepicker
That widget is long gone :) (since 2.0.3 I think) musachy On 4/24/07, Martin Gainty [EMAIL PROTECTED] wrote: http://www.koders.com/javascript/fidFF0542A22748F79D50156F4B75564D76676002D4.aspx I would suggest using struts.widgets.HTMLDynArchCalendar whcih inherits from dojo.widget.DomWidget which has the enable() and disable() methods M-- This email message and any files transmitted with it contain confidential information intended only for the person(s) to whom this email message is addressed. If you have received this email message in error, please notify the sender immediately by telephone or email and destroy the original message without making a copy. Thank you. - Original Message - From: Musachy Barroso [EMAIL PROTECTED] To: Struts Users Mailing List user@struts.apache.org Sent: Tuesday, April 24, 2007 11:01 AM Subject: Re: S2: Disable datetimepicker Assign an id to your datepicker, lets say dp1 and do this: dojo.widget.byId(dp1).disable(); to enable it: dojo.widget.byId(dp1).enable(); musachy On 4/24/07, Scott Nesbitt [EMAIL PROTECTED] wrote: I would like to enable/disable the datetimepicker when the user selects certain radio buttons. Here is my tag: s:datetimepicker name=untildate displayWeeks=4 displayFormat= MM-dd-/ I can disable (and clear) the textbox next to the calendar icon like this: var ud = getField('mainForm', 'untildate'); ud.value = ; ud.disabled = true; But this does not disable the calendar icon: ud = getField('mainForm', 'dojo.untildate'); ud.disabled = true; Any ideas on this? I do not see any other applicable elements in my form. Thanks, Scott __ Do You Yahoo!? Tired of spam? Yahoo! Mail has the best spam protection around http://mail.yahoo.com - To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED] -- Hey you! Would you help me to carry the stone? Pink Floyd - To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED] -- Hey you! Would you help me to carry the stone? Pink Floyd
Re: [S2] Formatting inside Iterator tag
--- chengas123 [EMAIL PROTECTED] wrote: Awesome. Got it working by adding that to a package.properties file. I have no plans to internationalize this site and it wasn't immediately obvious to me that formatting would fall under the category of localization (although I understand why it does), so I'm afraid this was an area I hadn't made any efforts to learn. Thanks again for the help. No problem. I didn't know much about it until a couple of weeks ago myself until I flailed trying to convert a couple screens into Chinese and all heck broke loose. Learned a bit more than I wanted to ;) d. __ Do You Yahoo!? Tired of spam? Yahoo! Mail has the best spam protection around http://mail.yahoo.com - To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED]
Re: How to realize ajax in struts2
I guess you're looking for custom validation. You can find it surfing at http://struts.apache.org/2.x/docs/home.html By the way, in your code, aren't you missing the s:form tag? Struts forms are similar to HTML forms. You must wrap the ui components in a s:form, except in special cases. Regards, Felipe red phoenix-2 wrote: I want to use ajax within Struts to realize following function,there is a textfield an a submit button which use register a username in a JSP page,then you can put you name into textfield and click register button,then will call ajax to search name is exist,if exist,there will be a message behind textfield,say name is exist,please use another name,like follows: --- Name:| | --- Register button My code is follows,but my code can't reach my goal,I don't know how to realize it? Anybody could tell me how to do it? Thanks! %@ page contentType=text/html;charset=UTF-8 language=java % %@ taglib prefix=s uri=/struts-tags % html head s:head theme=ajax/ /head body Name:s:textfield id=data1 name=data1/div id=t1 style=display:none/div ${pageContext.request.contextPath}/images/indicator.gif s:url id=ajaxTest value=Test1.action / s:submit type=submit theme=ajax value=submit targets=t1 href=%{ajaxTest} align=left indicator=indicator/ /body /html -- View this message in context: http://www.nabble.com/How-to-realize-ajax-in-struts2-tf3636780.html#a10164514 Sent from the Struts - User mailing list archive at Nabble.com. - To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED]
Optiontransferselect button customization.
Hi guys, Can I somehow change the button (e.g. addAllToLeft) of a Optiontransferselect to some image? I imagine it can be done by changing the ftl, but I'd like some clues to do that. Would be great to define some id for these buttons, then we could change it by css. How about that? Thanks, Felipe -- View this message in context: http://www.nabble.com/Optiontransferselect-button-customization.-tf3639737.html#a10164516 Sent from the Struts - User mailing list archive at Nabble.com. - To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED]
ForwardAction question/issue
Hi- So we're using ForwardAction for URIs that can just link to a JSP page and don't need a customized Struts Action to perform tasks ahead of time. When a user connects to our website, we essentially direct the user to the default main page, which is protected, so they have to log in first before accessing it. If the user tries to link directly to another URL (something.do) on our website that is protected, likewise, they are first directed to the login page, and then the request is redirected to the page they originally wanted. The behavior I'm seeing is that when the user links directly to a protected page (again, something.do) on our website the following occurs: If the .do is linked to a custom struts action OR if the ForwardAction is used AND the JSP has a scriptlet tag (along w/ HTML) % ... % the above described redirect occurs. However, if I remove the scriptlet tags and no Java code is present in the JSP (but the HTML still is), then the JSP is displayed for a split second (one can see it) and then the user is directed to the main page. I tried a very, very simple scriptlet with 'String foo = foo;' and the correct behavior occurs - i.e., the redirect to the main page does not occur. Anyone have any ideas? Thanks. --adam - To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED]
Re: [s2] Difference between actionMessages and actionErrors
I was supposed to test the genereated HTML from both. (Laziness got the best of me). guess Here it goes, without testing. I think that the HTML generated is slightly different so that you may apply different CSS style sheets to it. /guess harringf On 4/24/07, Musachy Barroso [EMAIL PROTECTED] wrote: redundantactionMessages is for general messages, and actionErrors for errors./redundant . I don't think there are any implications. regards musachy On 4/24/07, Zoran Avtarovski [EMAIL PROTECTED] wrote: A quick question on what the recommended method for displaying general messages when using struts 2, actionMessages or actionErrors. I had a look at the ValidationAware interface and there appears to be no difference between the two. The only difference I could see what that they are accessed by different tags. Which one is recommended? My main concern is are the non-obvious implications of choosing one over another. Z. - To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED] -- Hey you! Would you help me to carry the stone? Pink Floyd
S2 Tag Properties
I notice key is now preferred over getText() and am now curious about something else. Is the name attribute necessary when using key? I would rather not duplicate myself unless S2 requires it. s:textfield name=user.zip.city key=user.zip.city size=40 readonly=true / -- Scott [EMAIL PROTECTED]
Re: [s2] Difference between actionMessages and actionErrors
Harring Figueiredo wrote: guess Here it goes, without testing. I think that the HTML generated is slightly different so that you may apply different CSS style sheets to it. /guess Bingo. That is exactly the reason for the two. Direct from my style sheet: span.actionMessage { background-color: LightGreen; border: 1px; width: 100%; font-family: sans-serif; padding-left: 10px; padding-right: 10px; padding-top: 1px; padding-bottom: 1px; border-color: #000; border-width: 1px; border-style: solid; } span.errorMessage { color: Black; background-color: Pink; border: 1px; width: 100%; font-weight: normal; text-align: left; padding-left: 10px; padding-right: 10px; padding-top: 1px; padding-bottom: 1px; border-color: #000; border-width: 1px; border-style: solid; } - To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED]
Re: [S2] Formatting inside Iterator tag
Oh Boy, I am glad to see that I was not the only one to have this problem :-) Dave, Here is how I got it to work: Edit the struts.properties with the following entry struts.custom.i18n.resources=translations Edit the properties file translations.properties with the entry format.money={0,number,currency} Make sure that translations.properties is in you classpath. Note: The filename translations.properties can be any name you choose. I use that name because that is the place where I place my translated strings. If you have translated Strings, make sure you place the entry on other files as well. Cheers, Harring. On 4/24/07, Dave Newton [EMAIL PROTECTED] wrote: --- chengas123 [EMAIL PROTECTED] wrote: Awesome. Got it working by adding that to a package.properties file. I have no plans to internationalize this site and it wasn't immediately obvious to me that formatting would fall under the category of localization (although I understand why it does), so I'm afraid this was an area I hadn't made any efforts to learn. Thanks again for the help. No problem. I didn't know much about it until a couple of weeks ago myself until I flailed trying to convert a couple screens into Chinese and all heck broke loose. Learned a bit more than I wanted to ;) d. __ Do You Yahoo!? Tired of spam? Yahoo! Mail has the best spam protection around http://mail.yahoo.com - To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED]
Re: S2 Tag Properties
They can the different and serve different purposes. The name attribute that you have there means that the value will be picked from yourAction.getUser().getZip().getCity(); The key will be used to lookup the resources files using the literal string 'user.zip.city', of course. Hope this helps. Harring. On 4/24/07, [EMAIL PROTECTED] [EMAIL PROTECTED] wrote: I notice key is now preferred over getText() and am now curious about something else. Is the name attribute necessary when using key? I would rather not duplicate myself unless S2 requires it. s:textfield name=user.zip.city key=user.zip.city size=40 readonly=true / -- Scott [EMAIL PROTECTED]
Re: S2 Tag Properties
If the name is null, and there is a key, it will be used as the name. So, no, you don't need to duplicate it. musachy On 4/24/07, Harring Figueiredo [EMAIL PROTECTED] wrote: They can the different and serve different purposes. The name attribute that you have there means that the value will be picked from yourAction.getUser().getZip().getCity(); The key will be used to lookup the resources files using the literal string 'user.zip.city', of course. Hope this helps. Harring. On 4/24/07, [EMAIL PROTECTED] [EMAIL PROTECTED] wrote: I notice key is now preferred over getText() and am now curious about something else. Is the name attribute necessary when using key? I would rather not duplicate myself unless S2 requires it. s:textfield name=user.zip.city key=user.zip.city size=40 readonly=true / -- Scott [EMAIL PROTECTED] -- Hey you! Would you help me to carry the stone? Pink Floyd
Reset struts form values: Struts 1.3
Hi, I am using Struts 1.3. We have several struts forms which are pre-populated from a database. My questions is, if I want to provide the user with a way to reset the form to the initial values which were populated from the database. Is there any API or method calls for that. Or maybe some kind of caching mechanism or using Apache's beanutils. Harsh. - To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED]
Re: [s2] Difference between actionMessages and actionErrors
Another important difference between ActionMessages and ActionErrors has to do with how the Validation interceptor works. If you add an ActionError in the 'validate' method (or before the ValidationInterceptor get ahold of the request) of a ValidationAware action, the interceptor will see that there is some kind of error, and consequently, not fire the intended action method (execute by default). ActionMessages do not act that way. You can add ActionMessages without having an affect on the workflow of the action. Eric Rank On Apr 24, 2007, at 12:49 PM, Harring Figueiredo wrote: I was supposed to test the genereated HTML from both. (Laziness got the best of me). guess Here it goes, without testing. I think that the HTML generated is slightly different so that you may apply different CSS style sheets to it. /guess harringf On 4/24/07, Musachy Barroso [EMAIL PROTECTED] wrote: redundantactionMessages is for general messages, and actionErrors for errors./redundant . I don't think there are any implications. regards musachy On 4/24/07, Zoran Avtarovski [EMAIL PROTECTED] wrote: A quick question on what the recommended method for displaying general messages when using struts 2, actionMessages or actionErrors. I had a look at the ValidationAware interface and there appears to be no difference between the two. The only difference I could see what that they are accessed by different tags. Which one is recommended? My main concern is are the non-obvious implications of choosing one over another. Z. - To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED] -- Hey you! Would you help me to carry the stone? Pink Floyd - To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED]
Re: Reset struts form values: Struts 1.3
Chaudhary, Harsh [EMAIL PROTECTED] wrote: Hi, I am using Struts 1.3. We have several struts forms which are pre-populated from a database. My questions is, if I want to provide the user with a way to reset the form to the initial values which were populated from the database. It sounds like you will be providing a button for this choice. If so, then wire it up to a Struts action which will get the values from the database. Or if those values are cached in application scope, just retrieve those again. Paul
Re: ForwardAction question/issue
Adam, It sounds like you have your protected logic in the JSP. If so, then the JSP will always be rendered. You should instead put such security logic in the application, such as in the Struts Controller. It's no good putting it on the JSP. Paul On 4/24/07, Adam Gordon [EMAIL PROTECTED] wrote: Hi- So we're using ForwardAction for URIs that can just link to a JSP page and don't need a customized Struts Action to perform tasks ahead of time. When a user connects to our website, we essentially direct the user to the default main page, which is protected, so they have to log in first before accessing it. If the user tries to link directly to another URL (something.do) on our website that is protected, likewise, they are first directed to the login page, and then the request is redirected to the page they originally wanted. The behavior I'm seeing is that when the user links directly to a protected page (again, something.do) on our website the following occurs: If the .do is linked to a custom struts action OR if the ForwardAction is used AND the JSP has a scriptlet tag (along w/ HTML) % ... % the above described redirect occurs. However, if I remove the scriptlet tags and no Java code is present in the JSP (but the HTML still is), then the JSP is displayed for a split second (one can see it) and then the user is directed to the main page. I tried a very, very simple scriptlet with 'String foo = foo;' and the correct behavior occurs - i.e., the redirect to the main page does not occur. Anyone have any ideas? Thanks. --adam - To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED]
RE: Reset struts form values: Struts 1.3
Yea, that's what I was thinking too. I was just wondering if Struts (or some other API) has a built-in caching mechanism. Thanks though, Harsh. -Original Message- From: [EMAIL PROTECTED] [mailto:[EMAIL PROTECTED] On Behalf Of Paul Benedict Sent: Tuesday, April 24, 2007 4:55 PM To: Struts Users Mailing List Subject: Re: Reset struts form values: Struts 1.3 Chaudhary, Harsh [EMAIL PROTECTED] wrote: Hi, I am using Struts 1.3. We have several struts forms which are pre-populated from a database. My questions is, if I want to provide the user with a way to reset the form to the initial values which were populated from the database. It sounds like you will be providing a button for this choice. If so, then wire it up to a Struts action which will get the values from the database. Or if those values are cached in application scope, just retrieve those again. Paul - To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED]
ear problem
I have 3 struts applications (.war ) inside one .ear. One of these application's classes extend a base class that is defined in an external .jar. Somehow if I deploy the three applications separately everything works fine, But once I deploy only the .ear, it fails when creating the extended class. Both classes are public and everything. It seems like It just don't allows to extend classes from other .jars but that is impossible, as im executing This action, which is extending Action from struts.jat?? so I don't understand why that happens?? Can somebody help me? Im using Jboss, and the external .jar is included in the lib folder inside the server instance. This is the error im getting. 16:21:38,803 ERROR [[action]] Servlet.service() for servlet action threw exception java.lang.NoClassDefFoundError: org/apache/struts/action/ActionMessages at com.dsi.evaccine.common.manager.BasicManager.init(BasicManager.java:22 ) at com.dsi.evaccine.web.enrollment.queue.business.AccountManager.init(Acc ountManager.java:30) at com.dsi.evaccine.web.enrollment.queue.struts.GetAccountsAction.execute(G etAccountsAction.java:33) at org.apache.struts.action.RequestProcessor.processActionPerform(RequestPr ocessor.java:431) at org.apache.struts.action.RequestProcessor.process(RequestProcessor.java: 236) at org.apache.struts.action.ActionServlet.process(ActionServlet.java:1196) at org.apache.struts.action.ActionServlet.doGet(ActionServlet.java:414) at javax.servlet.http.HttpServlet.service(HttpServlet.java:697) at javax.servlet.http.HttpServlet.service(HttpServlet.java:810) at org.apache.catalina.core.ApplicationFilterChain.internalDoFilter(Applica tionFilterChain.java:252) at org.apache.catalina.core.ApplicationFilterChain.doFilter(ApplicationFilt erChain.java:173) at org.jboss.web.tomcat.filters.ReplyHeaderFilter.doFilter(ReplyHeaderFilte r.java:96) at org.apache.catalina.core.ApplicationFilterChain.internalDoFilter(Applica tionFilterChain.java:202) at org.apache.catalina.core.ApplicationFilterChain.doFilter(ApplicationFilt erChain.java:173) at org.apache.catalina.core.StandardWrapperValve.invoke(StandardWrapperValv e.java:213) at org.apache.catalina.core.StandardContextValve.invoke(StandardContextValv e.java:178) at org.jboss.web.tomcat.security.SecurityAssociationValve.invoke(SecurityAs sociationValve.java:175) at org.jboss.web.tomcat.security.JaccContextValve.invoke(JaccContextValve.j ava:74) at org.apache.catalina.core.StandardHostValve.invoke(StandardHostValve.java :126) at org.apache.catalina.valves.ErrorReportValve.invoke(ErrorReportValve.java :105) at org.jboss.web.tomcat.tc5.jca.CachedConnectionValve.invoke(CachedConnecti onValve.java:156) at org.apache.catalina.core.StandardEngineValve.invoke(StandardEngineValve. java:107) at org.apache.catalina.connector.CoyoteAdapter.service(CoyoteAdapter.java:1 48) at org.apache.coyote.http11.Http11Processor.process(Http11Processor.java:86 9) at org.apache.coyote.http11.Http11BaseProtocol$Http11ConnectionHandler.proc essConnection(Http11BaseProtocol.java:664) at org.apache.tomcat.util.net.PoolTcpEndpoint.processSocket(PoolTcpEndpoint .java:527) at org.apache.tomcat.util.net.MasterSlaveWorkerThread.run(MasterSlaveWorker Thread.java:112) at java.lang.Thread.run(Thread.java:595) Ashuin Sharma Software Developer Isthmus Inc. The Costa Rica IT Outsourcing Company www.isthmusit.com blocked::http://www.isthmusit.com/ [EMAIL PROTECTED] Office +1 (506) 560-1600 Mobile +1 (506) 817-4059 Fax +1 (506) 560-1610 San Jose, Costa Rica The information contained in this e-mail is privileged and confidential, this information is intended only for the use of the individual or entity to which it is addressed. If you are not the intended recipient, you are hereby notified that any use, dissemination, distribution, copy or taking action in reliance upon this email is strictly prohibited. If you have received this e-mail in error, please immediately notify the sender and then delete this e-mail in its entirety.
[s2]theme=ajax for form/submit button
Folks, I have a form with a submit button as follows s:form action=member_login.action theme=ajax validate=true s:textfield key=username / s:password key=password showPassword=false/ s:submit key=button.save theme=ajax targets=RightPaneWindow / s:reset key=button.reset/ /s:form On the page itself, I have an IFrame with the div=RightPaneWindow; however, the updated div is the div in which the form is in. Any idea? Thank you in advance, Harring Figueiredo
Re: [s2]theme=ajax for form/submit button
After the ajax request completes, for each target in the target list this will run: dojo.byId(id).innerHTML = text; try updating the div content like that, and see what happens. This is a dumb question, but are you using the same id for more than one div? musachy On 4/24/07, Harring Figueiredo [EMAIL PROTECTED] wrote: Folks, I have a form with a submit button as follows s:form action=member_login.action theme=ajax validate=true s:textfield key=username / s:password key=password showPassword=false/ s:submit key=button.save theme=ajax targets=RightPaneWindow / s:reset key=button.reset/ /s:form On the page itself, I have an IFrame with the div=RightPaneWindow; however, the updated div is the div in which the form is in. Any idea? Thank you in advance, Harring Figueiredo -- Hey you! Would you help me to carry the stone? Pink Floyd
Re: [S2] Newbie. Authentification Interceptors
For what it's worth we use a combination of both JAAS and a custom AuthInterceptor. JAAS handles authentication and the AuthInterceptor manages authorisation. This leverages off the strength of JAAS and has the flexibility required for our needs. A couple of sources of useful information are: 1. the JAAS in Action book (free) 2. WebWork in Action 3. Mark Mernards Blog has good example of implementing an interceptor. Z. Hi I notice that there have been a few threads over the last couple of days where people have been talking about implementing login authentication via a Struts2 interceptor. Could someone simply outline the reason why they would want to do it this way rather than using container authentication? Regards Roger - To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED] - To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED]
Re: [s2]theme=ajax for form/submit button
Musachy, Thanks for the reply. I am using only one div with the id. I now tried something else while waiting for the reply: s:set nameframe value=LoginWindow/ s:if test=hasActionErrors s:set nameframe value=RightPaneWindow/ /s:if I then tried to replace the traget on the form itself (since it works on the form) with: s:form action=member_login.action theme=ajax target=#frame validate=true and also tried with s:form action=member_login.action theme=ajax target=s:param name='value' value='#frame' validate=true Howver I cannot get the rigyht syntax to substitue the correct string. I think that it would work both ways.. But I would prefer to get the ajax/targets working. Harring On 4/24/07, Musachy Barroso [EMAIL PROTECTED] wrote: After the ajax request completes, for each target in the target list this will run: dojo.byId(id).innerHTML = text; try updating the div content like that, and see what happens. This is a dumb question, but are you using the same id for more than one div? musachy On 4/24/07, Harring Figueiredo [EMAIL PROTECTED] wrote: Folks, I have a form with a submit button as follows s:form action=member_login.action theme=ajax validate=true s:textfield key=username / s:password key=password showPassword=false/ s:submit key=button.save theme=ajax targets=RightPaneWindow / s:reset key=button.reset/ /s:form On the page itself, I have an IFrame with the div=RightPaneWindow; however, the updated div is the div in which the form is in. Any idea? Thank you in advance, Harring Figueiredo -- Hey you! Would you help me to carry the stone? Pink Floyd -- Sincerely, Harring Figueiredo Sr. Software Engineer Email: [EMAIL PROTECTED] Telephone: 941-256-0600 We never become truly spiritual by sitting down and wishing to become so. You must undertake something so great that you cannot accomplish it unaided.
Response already committed
Hi, I've following global result to handle authentication. global-results result name=login type=chain param name=actionNamelogin/param param name=namespace/home/param param name=methodinput/param /result ... /global-results For most part this works fine. The only problem with this is that on session timeout, it opens up the login page nested inside the page being requested. For example if there are tabs on the page and if the user clicks on one of the tab when the session is timed out, it opens the login page as a content of the current tab. So, I figured changing result type to 'redirect-action' should fix it. Now it started complaing about response already commited when I am logging in first time itself. Here is the snippets of my interceptor code: public String intercept(final ActionInvocation invocation) throws Exception { final SessionMap session = (SessionMap) ActionContext.getContext().get(ActionContext.SESSION); final SessionSecureUser user = (SessionSecureUser) session.get(Constants.AUTHORIZED_KEY); if (user == null) { return Action.LOGIN; } Could you please suggest where I could be going wrong with this? thanks for your help! Laxman This e-mail and its attachments are confidential and solely for the intended addressee(s). Do not share or use them without Fannie Mae's approval. If received in error, contact the sender and delete them.
[s2] Extending struts.xml
I'm trying to extend the standard struts.xml by using includes but tomcat is throwing errors. I found some info on the mail lists pointing to an error in xwork and that it was fixed in 2.08. When I went looking to download a nightly build there were only 2.10 builds. My question is what's the easiest way to fix the problem. I've put all my config info into struts.xml but it's already becoming unwieldy and is growing rapidly. Z. - To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED]
Re: [s2]theme=ajax for form/submit button
Is the target div on a different frame? musachy On 4/24/07, Harring Figueiredo [EMAIL PROTECTED] wrote: Musachy, Thanks for the reply. I am using only one div with the id. I now tried something else while waiting for the reply: s:set nameframe value=LoginWindow/ s:if test=hasActionErrors s:set nameframe value=RightPaneWindow/ /s:if I then tried to replace the traget on the form itself (since it works on the form) with: s:form action=member_login.action theme=ajax target=#frame validate=true and also tried with s:form action=member_login.action theme=ajax target=s:param name='value' value='#frame' validate=true Howver I cannot get the rigyht syntax to substitue the correct string. I think that it would work both ways.. But I would prefer to get the ajax/targets working. Harring On 4/24/07, Musachy Barroso [EMAIL PROTECTED] wrote: After the ajax request completes, for each target in the target list this will run: dojo.byId(id).innerHTML = text; try updating the div content like that, and see what happens. This is a dumb question, but are you using the same id for more than one div? musachy On 4/24/07, Harring Figueiredo [EMAIL PROTECTED] wrote: Folks, I have a form with a submit button as follows s:form action=member_login.action theme=ajax validate=true s:textfield key=username / s:password key=password showPassword=false/ s:submit key=button.save theme=ajax targets=RightPaneWindow / s:reset key=button.reset/ /s:form On the page itself, I have an IFrame with the div=RightPaneWindow; however, the updated div is the div in which the form is in. Any idea? Thank you in advance, Harring Figueiredo -- Hey you! Would you help me to carry the stone? Pink Floyd -- Sincerely, Harring Figueiredo Sr. Software Engineer Email: [EMAIL PROTECTED] Telephone: 941-256-0600 We never become truly spiritual by sitting down and wishing to become so. You must undertake something so great that you cannot accomplish it unaided. -- Hey you! Would you help me to carry the stone? Pink Floyd
Re: [s2]theme=ajax for form/submit button
This is the generated code: td colspan=2div align=rightinput type=submit dojoType=struts:Bind event=onclick value=Save id=member_login_button_savelabel=Save name=button.save targets=RightPaneWindow / /div The div is on a different IFrame. Harring On 4/24/07, Harring Figueiredo [EMAIL PROTECTED] wrote: Musachy, Thanks for the reply. I am using only one div with the id. I now tried something else while waiting for the reply: s:set nameframe value=LoginWindow/ s:if test=hasActionErrors s:set nameframe value=RightPaneWindow/ /s:if I then tried to replace the traget on the form itself (since it works on the form) with: s:form action=member_login.action theme=ajax target=#frame validate=true and also tried with s:form action=member_login.action theme=ajax target=s:param name='value' value='#frame' validate=true Howver I cannot get the rigyht syntax to substitue the correct string. I think that it would work both ways.. But I would prefer to get the ajax/targets working. Harring On 4/24/07, Musachy Barroso [EMAIL PROTECTED] wrote: After the ajax request completes, for each target in the target list this will run: dojo.byId(id).innerHTML = text; try updating the div content like that, and see what happens. This is a dumb question, but are you using the same id for more than one div? musachy On 4/24/07, Harring Figueiredo [EMAIL PROTECTED] wrote: Folks, I have a form with a submit button as follows s:form action=member_login.action theme=ajax validate=true s:textfield key=username / s:password key=password showPassword=false/ s:submit key=button.save theme=ajax targets=RightPaneWindow / s:reset key= button.reset/ /s:form On the page itself, I have an IFrame with the div=RightPaneWindow; however, the updated div is the div in which the form is in. Any idea? Thank you in advance, Harring Figueiredo -- Hey you! Would you help me to carry the stone? Pink Floyd
Re: [s2]theme=ajax for form/submit button
I think that's why it doesn't work, the ajax theme uses getElementBydId(id) (actually dojo.byId(), anyway) which returns the element in the current document, for an iframe it should be window.frames[0].document.getElementById(...). You can use the notifyTopics attribute and do it yourself inside the topic. regards musachy On 4/24/07, Harring Figueiredo [EMAIL PROTECTED] wrote: This is the generated code: td colspan=2div align=rightinput type=submit dojoType=struts:Bind event=onclick value=Save id=member_login_button_savelabel=Save name=button.save targets=RightPaneWindow / /div The div is on a different IFrame. Harring On 4/24/07, Harring Figueiredo [EMAIL PROTECTED] wrote: Musachy, Thanks for the reply. I am using only one div with the id. I now tried something else while waiting for the reply: s:set nameframe value=LoginWindow/ s:if test=hasActionErrors s:set nameframe value=RightPaneWindow/ /s:if I then tried to replace the traget on the form itself (since it works on the form) with: s:form action=member_login.action theme=ajax target=#frame validate=true and also tried with s:form action=member_login.action theme=ajax target=s:param name='value' value='#frame' validate=true Howver I cannot get the rigyht syntax to substitue the correct string. I think that it would work both ways.. But I would prefer to get the ajax/targets working. Harring On 4/24/07, Musachy Barroso [EMAIL PROTECTED] wrote: After the ajax request completes, for each target in the target list this will run: dojo.byId(id).innerHTML = text; try updating the div content like that, and see what happens. This is a dumb question, but are you using the same id for more than one div? musachy On 4/24/07, Harring Figueiredo [EMAIL PROTECTED] wrote: Folks, I have a form with a submit button as follows s:form action=member_login.action theme=ajax validate=true s:textfield key=username / s:password key=password showPassword=false/ s:submit key=button.save theme=ajax targets=RightPaneWindow / s:reset key= button.reset/ /s:form On the page itself, I have an IFrame with the div=RightPaneWindow; however, the updated div is the div in which the form is in. Any idea? Thank you in advance, Harring Figueiredo -- Hey you! Would you help me to carry the stone? Pink Floyd -- Hey you! Would you help me to carry the stone? Pink Floyd
Re: [s2] Extending struts.xml
--- Zoran Avtarovski [EMAIL PROTECTED] wrote: I found some info on the mail lists pointing to an error in xwork and that it was fixed in 2.08. When I went looking to download a nightly build there were only 2.10 builds. .10 is bigger than .08. The fix is probably still in it. d. __ Do You Yahoo!? Tired of spam? Yahoo! Mail has the best spam protection around http://mail.yahoo.com - To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED]
Re: [s2]theme=ajax for form/submit button
H... I sm not sure I understood. Maybe the generated code is different for: form target=someT ..? then for : s:submit targets=someT / ??? If the target is used on the form, it does reference and update the right form (But I have to IFrames that I need to update and that is the reason I am using the s:submit :-. Harring. On 4/24/07, Musachy Barroso [EMAIL PROTECTED] wrote: I think that's why it doesn't work, the ajax theme uses getElementBydId(id) (actually dojo.byId(), anyway) which returns the element in the current document, for an iframe it should be window.frames[0].document.getElementById(...). You can use the notifyTopics attribute and do it yourself inside the topic. regards musachy On 4/24/07, Harring Figueiredo [EMAIL PROTECTED] wrote: This is the generated code: td colspan=2div align=rightinput type=submit dojoType=struts:Bind event=onclick value=Save id=member_login_button_savelabel=Save name= button.save targets=RightPaneWindow / /div The div is on a different IFrame. Harring On 4/24/07, Harring Figueiredo [EMAIL PROTECTED] wrote: Musachy, Thanks for the reply. I am using only one div with the id. I now tried something else while waiting for the reply: s:set nameframe value=LoginWindow/ s:if test=hasActionErrors s:set nameframe value=RightPaneWindow/ /s:if I then tried to replace the traget on the form itself (since it works on the form) with: s:form action=member_login.action theme=ajax target=#frame validate=true and also tried with s:form action=member_login.action theme=ajax target=s:param name='value' value='#frame' validate=true Howver I cannot get the rigyht syntax to substitue the correct string. I think that it would work both ways.. But I would prefer to get the ajax/targets working. Harring On 4/24/07, Musachy Barroso [EMAIL PROTECTED] wrote: After the ajax request completes, for each target in the target list this will run: dojo.byId(id).innerHTML = text; try updating the div content like that, and see what happens. This is a dumb question, but are you using the same id for more than one div? musachy On 4/24/07, Harring Figueiredo [EMAIL PROTECTED] wrote: Folks, I have a form with a submit button as follows s:form action=member_login.action theme=ajax validate=true s:textfield key=username / s:password key=password showPassword=false/ s:submit key=button.save theme=ajax targets=RightPaneWindow / s:reset key= button.reset/ /s:form On the page itself, I have an IFrame with the div=RightPaneWindow; however, the updated div is the div in which the form is in. Any idea? Thank you in advance, Harring Figueiredo -- Hey you! Would you help me to carry the stone? Pink Floyd -- Hey you! Would you help me to carry the stone? Pink Floyd -- Sincerely, Harring Figueiredo Sr. Software Engineer Email: [EMAIL PROTECTED] Telephone: 941-256-0600 We never become truly spiritual by sitting down and wishing to become so. You must undertake something so great that you cannot accomplish it unaided.
Re: [s2]theme=ajax for form/submit button
The targets won't be updated if they are in another frame, you can do something like this: s:submit theme=ajax notifyTopics=/updateIframe / script dojo.event.topics.subscribe(/updateIframe, function(data, type, e) { if(type == load) { //use iframe index or name here window.iframe[0].document.getElementById(divId).innerHTML = data; } }); /script musachy On 4/24/07, Harring Figueiredo [EMAIL PROTECTED] wrote: H... I sm not sure I understood. Maybe the generated code is different for: form target=someT ..? then for : s:submit targets=someT / ??? If the target is used on the form, it does reference and update the right form (But I have to IFrames that I need to update and that is the reason I am using the s:submit :-. Harring. On 4/24/07, Musachy Barroso [EMAIL PROTECTED] wrote: I think that's why it doesn't work, the ajax theme uses getElementBydId(id) (actually dojo.byId(), anyway) which returns the element in the current document, for an iframe it should be window.frames[0].document.getElementById(...). You can use the notifyTopics attribute and do it yourself inside the topic. regards musachy On 4/24/07, Harring Figueiredo [EMAIL PROTECTED] wrote: This is the generated code: td colspan=2div align=rightinput type=submit dojoType=struts:Bind event=onclick value=Save id=member_login_button_savelabel=Save name= button.save targets=RightPaneWindow / /div The div is on a different IFrame. Harring On 4/24/07, Harring Figueiredo [EMAIL PROTECTED] wrote: Musachy, Thanks for the reply. I am using only one div with the id. I now tried something else while waiting for the reply: s:set nameframe value=LoginWindow/ s:if test=hasActionErrors s:set nameframe value=RightPaneWindow/ /s:if I then tried to replace the traget on the form itself (since it works on the form) with: s:form action=member_login.action theme=ajax target=#frame validate=true and also tried with s:form action=member_login.action theme=ajax target=s:param name='value' value='#frame' validate=true Howver I cannot get the rigyht syntax to substitue the correct string. I think that it would work both ways.. But I would prefer to get the ajax/targets working. Harring On 4/24/07, Musachy Barroso [EMAIL PROTECTED] wrote: After the ajax request completes, for each target in the target list this will run: dojo.byId(id).innerHTML = text; try updating the div content like that, and see what happens. This is a dumb question, but are you using the same id for more than one div? musachy On 4/24/07, Harring Figueiredo [EMAIL PROTECTED] wrote: Folks, I have a form with a submit button as follows s:form action=member_login.action theme=ajax validate=true s:textfield key=username / s:password key=password showPassword=false/ s:submit key=button.save theme=ajax targets=RightPaneWindow / s:reset key= button.reset/ /s:form On the page itself, I have an IFrame with the div=RightPaneWindow; however, the updated div is the div in which the form is in. Any idea? Thank you in advance, Harring Figueiredo -- Hey you! Would you help me to carry the stone? Pink Floyd -- Hey you! Would you help me to carry the stone? Pink Floyd -- Sincerely, Harring Figueiredo Sr. Software Engineer Email: [EMAIL PROTECTED] Telephone: 941-256-0600 We never become truly spiritual by sitting down and wishing to become so. You must undertake something so great that you cannot accomplish it unaided. -- Hey you! Would you help me to carry the stone? Pink Floyd
Re: [s2] Extending struts.xml
Thanks for the big call Dave. My concern was that 10 may introduce more issues than it solved. So I should've said What's the easiest and least disruptive way to fix the problem? Z. --- Zoran Avtarovski [EMAIL PROTECTED] wrote: I found some info on the mail lists pointing to an error in xwork and that it was fixed in 2.08. When I went looking to download a nightly build there were only 2.10 builds. .10 is bigger than .08. The fix is probably still in it. d. __ Do You Yahoo!? Tired of spam? Yahoo! Mail has the best spam protection around http://mail.yahoo.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]
Re: [s2] Extending struts.xml
--- Zoran Avtarovski [EMAIL PROTECTED] wrote: Thanks for the big call Dave. ;) My concern was that 10 may introduce more issues than it solved. So I should've said What's the easiest and least disruptive way to fix the problem? I haven't updated that far either... An XWork person will chime in, I'm sure... d. __ Do You Yahoo!? Tired of spam? Yahoo! Mail has the best spam protection around http://mail.yahoo.com - To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED]
Re: Re: Null date become today in map when use textfield tag
Hello Dave Newton, I confirm that i define the testDate in my applicationContext.xml file. And if you use s:form/ tag. the magic thing is still happen . Null date become today in map. Best regards, === At 2007-04-24, 21:27:41 you wrote: === --- Martin Gainty [EMAIL PROTECTED] wrote: please supply the applicationContext.xml definition for 'testDate' Huh? I'd be more likely to think it has something to do with not using the s:form.../ tag, but I've never been entirely sure what the relationship between it and the input tags really is. d. e.g. web..xml action name=springExample class=springAction result name=success /WEB-INF/view/springExample.jsp /result /action beans default-autowire=autodetect bean id=thingManager class=org.apache.struts2.portlet.example.spring.ThingManager /bean bean id=springAction class=org.apache.struts2.portlet.example.spring.SpringAction singleton=false property name=thingManager ref bean=thingManager / /property /bean /beans M- This email message and any files transmitted with it contain confidential information intended only for the person(s) to whom this email message is addressed. If you have received this email message in error, please notify the sender immediately by telephone or email and destroy the original message without making a copy. Thank you. - Original Message - From: longhao [EMAIL PROTECTED] To: Struts Users Mailing List user@struts.apache.org Sent: Tuesday, April 24, 2007 7:19 AM Subject: Null date become today in map when use textfield tag TestDateAction.java public class TestDateAction extends ActionSupport { private Date singleDate; private Map mapDate; private List listDate; @Override public String execute() throws Exception { return super.execute(); } set get methods } index.jsp jsp tag input form action=testDate.action s:textfield name=mapDate['today']/ s:textfield name=singleDate/ s:textfield name=listDate[0]/ input type=submit/ form struts.xml package name=default extends=struts-default action name=testDate class=testDate result name=successindex.jsp/result /action /package I input nothing in all three textfield then submit. In TestDateAction three parameters are all null in valuestack. But after come back to index.jsp, mapDate['today'] 's value become today. so magic. The Null date value become today in Textfield tag. Perhaps this is a bug of ognl when use textfield. - 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] __ Do You Yahoo!? Tired of spam? Yahoo! Mail has the best spam protection around http://mail.yahoo.com - To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED] = = = = = = = = = = = = = = = = = = = = longhao [EMAIL PROTECTED] 2007-04-25 - To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED]
How do I access Struts 2 action errors in request from Freemarker view.
I'm trying to figure out a way to access the Struts 2 action messages in a Freemarker template. I copied the following code from the Struts template directory, into my Freemarker view, but the action errors do not show up, which tells me I must not be using the correct variable. [#if (actionErrors?exists actionErrors?size 0)] ul [#list actionErrors as error] lispan class=errorMessage${error}/span/li [/#list] /ul [/#if] I've also tried Request.actionErrors, but this doesn't work either. Does anyone have an idea how I can get access to these? I need to be able to customize the output of these messages. I know there is a way to override the Struts 2 default template, but I need to combine actionErrors and actionMessages in a single template. Thanks for any help.
[S2] Initializing Actions from Spring page not found
Hi! The page is not found when we clicked on Initializing Actions from Spring from http://struts.apache.org/2.x/docs/why-would-we-want-to-create-action-objects-from-the-spring-configuration.html Do you have any idea of what could be the problem? - To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED]
[S2] Access DAOs in Spring actions
Hi! I have action classes configured in struts.xml and the DataSource, SessionFactory, DAO objects configured in Spring's applicationContext.xml. How can I reference the DAO objects in my action class? Please advise, thank you! - To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED]