Re: [S2] How to keep a reference to a bean without using a session scope?
Hi Mark, On 10/04/07, Mark Menard [EMAIL PROTECTED] wrote: There's a cleaner Struts 2 way of doing this. Take a look at the org.apache.struts2.interceptor.SessionAware interface. This will make your action independent of the servlet spec and more easily testable. Thanks for the tip! This works perfectly as expected, as long as there is only one instance of the application launched at a time in the same browser (using Firefox or IE7 tabs for example). In that case, the bean is shared between the different instances, which is problematic since its content depends on previous data input. You need a conversation scope. There is no direct support for this in the Servlet spec, nor in Struts 2 directly. You could take a look at using the Spring Webflow integration (I don't know the link). You could also take a look at a simple interceptor I created for this purpose. (http://www.vitarara.org/cms/node/84) I have since updated that method to simply be an extension of ModelDriven, if you're interested in the most recent version let me know. The concept of conversation scope is exactly what I was looking for. The most common situation where I would need it is when having a select input which content depends on the item chosen from another one (for example, a set of two selects representing countries and cities, the content of the latter representing the cities of the chosen country only). In my case, the generation of the subselect can be quite time-consuming, thus the need to keep it in some higher scope than the request. As for the Interceptor you wrote, I would be most interested in the most recent version. Thanks for the help, alexis - To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED]
Re: S2 life cycle
Works but the values get reset all the time, doesnt stay in the session scope, if I update form in the one action class and if I try to retrieve from the other action class the values has been lost. Should I have to do any extra things --- Dave Newton [EMAIL PROTECTED] wrote: --- tom tom [EMAIL PROTECTED] wrote: How can I have a reference to the form class inside the action class. I did the following 1) Wrote a action class which implements ScopedModelDriven interface, the argo is not null inside setModel(Object arg0)method in the action class but I cant cast into test.TestForm (pojo) At the very least I believe you should implement ScopedModelDrivenT, not just ScopedModelDriven, and provide typed accessors: http://struts.apache.org/2.x/struts2-core/apidocs/com/opensymphony/xwork2/ModelDriven.html http://struts.apache.org/2.x/struts2-core/apidocs/com/opensymphony/xwork2/interceptor/ScopedModelDriven.html d. Don't get soaked. Take a quick peek at the forecast with the Yahoo! Search weather shortcut. http://tools.search.yahoo.com/shortcuts/#loc_weather - To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED] Don't be flakey. Get Yahoo! Mail for Mobile and always stay connected to friends.http://mobile.yahoo.com/mail - To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED]
Array of Bean and optionsCollection (up)
Please excuse me but i try again ... (hope will never die) Hi all, i've the following problem using the tag html:optionsCollection, the jsp give the following error: org.apache.jasper.JasperException: No bean specified Let's say this is my code (actionForm, jsp, bean class) public class MyForm extends ActionForm { private myBean[] arrayOfMyBean; public void reset(ActionMapping mapping, HttpServletRequest request){ arrayOfMyBean=someClass.getMyBeanArray(); request.setAttribute(aBean, arrayOfMyBean); super.reset( mapping, request); } public myBean[] getABean(return arrayOfMyBean); // i forgot this on my previous post, not on my code! } __ The jsp: %@ taglib uri=/WEB-INF/struts-html.tld prefix=html % html:xhtml / html:html locale=true body html:form action=/MyAction html:select property=myBeanCode html:optionsCollection property=aBean value=code label=descr/ /html:select /html:form /body /html:html myBean Class: public class myBean implements java.io.Serializable{ private Integer code; private String descr; public Integer getCode(){return code;} public String getDescr(){return descr;} public void setCode(Integer val){ code=val;} public void setDescr(String val){ descr=val;} } _ Could anyone help me? Any help will be greatly appreciated. Thanks in advance Marcello - To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED] - To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED] - To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED]
Re: Array of Bean and optionsCollection (up)
At first sight, u miss the name of the collection in html:optionsCollection property=aBean value=code label=descr/ second u forgot the dot in myBeanCode , it's myBean.code , Struts will do myBean.getCode(). third : your form property aBean is an array u use a select ( which a single property) not clear but i could have understood wrong . Good luck 2007/4/11, Marcello Savino [EMAIL PROTECTED]: Please excuse me but i try again ... (hope will never die) Hi all, i've the following problem using the tag html:optionsCollection, the jsp give the following error: org.apache.jasper.JasperException: No bean specified Let's say this is my code (actionForm, jsp, bean class) public class MyForm extends ActionForm { private myBean[] arrayOfMyBean; public void reset(ActionMapping mapping, HttpServletRequest request){ arrayOfMyBean=someClass.getMyBeanArray(); request.setAttribute(aBean, arrayOfMyBean); super.reset( mapping, request); } public myBean[] getABean(return arrayOfMyBean); // i forgot this on my previous post, not on my code! } __ The jsp: %@ taglib uri=/WEB-INF/struts-html.tld prefix=html % html:xhtml / html:html locale=true body html:form action=/MyAction html:select property=myBeanCode html:optionsCollection property=aBean value=code label=descr/ /html:select /html:form /body /html:html myBean Class: public class myBean implements java.io.Serializable{ private Integer code; private String descr; public Integer getCode(){return code;} public String getDescr(){return descr;} public void setCode(Integer val){ code=val;} public void setDescr(String val){ descr=val;} } _ Could anyone help me? Any help will be greatly appreciated. Thanks in advance Marcello - To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED] - To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED] - To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED]
Re: Struts module switch
Well, could u then let me know how to modularize my struts config in case it grows large. How do I modularize my struts web app without having separate struts modules. I am working on a web project where there are three types of users:Admin, Web User and Call Center User. Under each of these there are several screens/modules. Currently we are maintaining only one struts config and tiles def file and their sizes are becoming a issue. Also I would like to use separate application resources properties files for different user types. Could u give me suggestions on how to overcome these issues? Still I would like to have an answer to my original question, if possible. As I have already told that I have been able to do module switching, but still I haven't been able to use a separate tiles definition file for the second module. If u could help me out at this, I will be thankful to you. Being able to use a separate tiles def file for the second module (having a struts config file of its own) will do for me. pbenedict wrote: Have you considered removing the use of modules? Modules are really a nuisance, and were originally developed to allow multiple Struts apps running under one context. There's a hard barrier between modules and almost all developers I know no longer use them. You can split up your struts config without using modules. I know this advice doesn't answer your question, but think about it, because it will save you time. Paul Suman Maity wrote: Hi, I was trying struts module switching and was successful doing it using SwitchAction. I am also using tiles. The problem is I am not able to use a separate tiles definition file for the other module (i have two modules). I have two struts config files. struts-config.xml for the default module and struts-anotherModule-config.xml for the other module. I have written the following in the default struts config file (struts-config.xml): plug-in className=org.apache.struts.tiles.TilesPlugin set-property property=definitions-config value=/WEB-INF/conf/tiles-defs.xml/ set-property property=definitions-debug value=1/ set-property property=definitions-parser-details value=0/ set-property property=definitions-parser-validate value=true/ /plug-in I had created another tiles definition file for the other module with a name tiles-anotherModule-defs.xml and created some definitions in that. I mentioned this file in struts-anotherModule-config.xml file in the same way as above. In this struts config i wrote a action mapiping which has forward tag like this: forward name=switchModule path=actionExamples The definition of actionExamples is there in the second tiles definition file that is the tiles-anotherModule-defs.xml file. When I run the app, the module switch occurs with the help of SwitchAction but finally it fails to load the definition actionExamples saying Can not get request dispatcher for path actionExamples. Now, the irony is that instead of specifying a seperate tiles definition file, I write the following line in struts-anotherModule-config.xml file: plug-in className=org.apache.struts.tiles.TilesPlugin/ Put the definition actionExamples in the default tiles def file and it works. I even don't need to mention the tiles def file's name here although it simply works. But if i comment the above line, it does not work. I am confused. Can not I use separate tiles definition files for separate modules each having its own struts config file? Please provide example if possible. Thanking in advance. - To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED] -- View this message in context: http://www.nabble.com/Struts-module-switch-tf3552250.html#a9934530 Sent from the Struts - User mailing list archive at Nabble.com. - To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED]
R: Array of Bean and optionsCollection (up)
At first sight, u miss the name of the collection in html:optionsCollection property=aBean value=code label=descr/ Do you mean i have to specify the attribute name=aBeaninstead of property=aBean ? second u forgot the dot in myBeanCode , it's myBean.code , Struts will do myBean.getCode(). myBeanCode is only a name for the current bean in the select tag third : your form property aBean is an array u use a select ( which a single property) Do you mean i have to specify the attribute name=aBeaninstead of property=aBean ? Thanks for your attention 2007/4/11, Marcello Savino [EMAIL PROTECTED]: Please excuse me but i try again ... (hope will never die) Hi all, i've the following problem using the tag html:optionsCollection, the jsp give the following error: org.apache.jasper.JasperException: No bean specified Let's say this is my code (actionForm, jsp, bean class) public class MyForm extends ActionForm { private myBean[] arrayOfMyBean; public void reset(ActionMapping mapping, HttpServletRequest request){ arrayOfMyBean=someClass.getMyBeanArray(); request.setAttribute(aBean, arrayOfMyBean); super.reset( mapping, request); } public myBean[] getABean(return arrayOfMyBean); // i forgot this on my previous post, not on my code! } __ The jsp: %@ taglib uri=/WEB-INF/struts-html.tld prefix=html % html:xhtml / html:html locale=true body html:form action=/MyAction html:select property=myBeanCode html:optionsCollection property=aBean value=code label=descr/ /html:select /html:form /body /html:html myBean Class: public class myBean implements java.io.Serializable{ private Integer code; private String descr; public Integer getCode(){return code;} public String getDescr(){return descr;} public void setCode(Integer val){ code=val;} public void setDescr(String val){ descr=val;} } _ Could anyone help me? Any help will be greatly appreciated. Thanks in advance Marcello - To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED] - To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED] - To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED] - To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED]
[S2] Dispaly data in FreeMarker
I'm using Struts 2 and FreeMarker and I'm ready to move on from the HelloWorld example... I would like to create a page to display a list of accounts. Hence, the following is the action class, public class Search extends ActionSupport implements SessionAware { private Map session; public String execute() throws Exception { ListAccount accounts = new ArrayListAccount(); for (int i = 0; i 5; i++) { Account account = new Account(); account.setUserName(name + i); accounts.add(account); } session.put(accounts, accounts); return SUCCESS; } public void setSession(Map session) { this.session = session; } } Subsequently the FreeMarker template can display the accounts, #list accounts as account ${account.getUserName()} /#list Is this the only way we push the data to FreeMarker template? Do we need to remove the data from the session? Can the FreeMarker template access the request parameters directly without us adding the parameters into the session? /Struts newbie - To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED]
Re: struts.action.extension question
No takers on this? meeboo wrote: Hey all I have a mapping pattern which looks like this action name=movie/* class=com.bubbleclip.web.struts.action.PlayMovie param name=movieTitle{1}/param result/movie.jsp/result /action The wildcard is for backwards compability since our original JSP/Servlet web-layer mapped movie titles like http:localhost:8080/movie/movieTitle This works fine if I set struts.action.extension to , this way I preserve compatibility since the movie title is the actual action name. The problem is that S2 will also interpret everything else as being actions - even CSS names making the pages not render correctly. Is there a way around this? -- View this message in context: http://www.nabble.com/struts.action.extension-question-tf3548145.html#a9934814 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: struts.action.extension question
keep struts.action.extension default.and create a filter to make sure it's before the struts filter.like this: filter-mapping filter-nameyourfilter/filter-name url-patternmovie/*/url-pattern /filter-mapping filter-mapping filter-namestruts2/filter-name url-pattern/*/url-pattern /filter-mapping u can foward or redirect to the url movie.action?movieTitle=* or something else in your filter. regards joey On 4/11/07, meeboo [EMAIL PROTECTED] wrote: No takers on this? meeboo wrote: Hey all I have a mapping pattern which looks like this action name=movie/* class=com.bubbleclip.web.struts.action.PlayMovie param name=movieTitle{1}/param result/movie.jsp/result /action The wildcard is for backwards compability since our original JSP/Servlet web-layer mapped movie titles like http:localhost:8080/movie/movieTitle This works fine if I set struts.action.extension to , this way I preserve compatibility since the movie title is the actual action name. The problem is that S2 will also interpret everything else as being actions - even CSS names making the pages not render correctly. Is there a way around this? -- View this message in context: http://www.nabble.com/struts.action.extension-question-tf3548145.html#a9934814 Sent from the Struts - User mailing list archive at Nabble.com. - To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED]
[OT] how to change the look and feel of checkbox
Hi, I am using html:checkbox option to display a check box in disabled mode. This causes the checkbox to be greyed out. Can somebody please tell me how can I show it in bold font and disabled at the same time. regards, Pankaj
Re: [S2] Dispaly data in FreeMarker
Answer to one of the questions: Can the FreeMarker template access the request parameters directly without us adding the parameters into the session? It is described in http://struts.apache.org/2.0.6/docs/freemarker.html, ${Parameters.myParameter} /Struts newbie - To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED]
tags within tags in struts..
hi i want to make the value of my url tag to come from the value of my property tag.. like this.. s:url id=module value=s:property value=ModuleAction/ but i am getting an error,. what is the correct way to do it? thanks in advance. - Don't get soaked. Take a quick peak at the forecast with theYahoo! Search weather shortcut.
Re: struts.action.extension question
The problem is that I have a lot of URL:s which look like /user/username, movie/movieTitle or account/create - and I don't want to forward or redirect for each URL since this will slow down my application. Is there a way to exclude .css extensions maybe? joey-30 wrote: keep struts.action.extension default.and create a filter to make sure it's before the struts filter.like this: filter-mapping filter-nameyourfilter/filter-name url-patternmovie/*/url-pattern /filter-mapping filter-mapping filter-namestruts2/filter-name url-pattern/*/url-pattern /filter-mapping u can foward or redirect to the url movie.action?movieTitle=* or something else in your filter. regards joey On 4/11/07, meeboo [EMAIL PROTECTED] wrote: No takers on this? meeboo wrote: Hey all I have a mapping pattern which looks like this action name=movie/* class=com.bubbleclip.web.struts.action.PlayMovie param name=movieTitle{1}/param result/movie.jsp/result /action The wildcard is for backwards compability since our original JSP/Servlet web-layer mapped movie titles like http:localhost:8080/movie/movieTitle This works fine if I set struts.action.extension to , this way I preserve compatibility since the movie title is the actual action name. The problem is that S2 will also interpret everything else as being actions - even CSS names making the pages not render correctly. Is there a way around this? -- View this message in context: http://www.nabble.com/struts.action.extension-question-tf3548145.html#a9934814 Sent from the Struts - User mailing list archive at Nabble.com. - To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED] -- View this message in context: http://www.nabble.com/struts.action.extension-question-tf3548145.html#a9936131 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: tags within tags in struts..
try this s:set name=moduleAction value=ModuleAction/ s:url id=module value=%{moduleAction}/ On 4/11/07, mi [EMAIL PROTECTED] wrote: hi i want to make the value of my url tag to come from the value of my property tag.. like this.. s:url id=module value=s:property value=ModuleAction/ but i am getting an error,. what is the correct way to do it? thanks in advance. - Don't get soaked. Take a quick peak at the forecast with theYahoo! Search weather shortcut.
Re: [OT] how to change the look and feel of checkbox
html:checkbox disabled=disabled ...bBolded text/b Or, did you mean to style the actual checkbox? -- James Mitchell On Apr 11, 2007, at 4:37 AM, Pankaj Gupta wrote: Hi, I am using html:checkbox option to display a check box in disabled mode. This causes the checkbox to be greyed out. Can somebody please tell me how can I show it in bold font and disabled at the same time. regards, Pankaj - To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED]
unsubsribe
unsubsribe Send a FREE SMS to your friend's mobile from Yahoo! Messenger. Get it now at http://in.messenger.yahoo.com/
Re: Struts module switch
On 4/11/07, Suman Maity [EMAIL PROTECTED] wrote: Well, could u then let me know how to modularize my struts config in case it grows large. How do I modularize my struts web app without having separate struts modules. I am working on a web project where there are three types of users:Admin, Web User and Call Center User. Under each of these there are several screens/modules. Currently we are maintaining only one struts config and tiles def file and their sizes are becoming a issue. Also I would like to use separate application resources properties files for different user types. Could u give me suggestions on how to overcome these issues? You can have multiple struts-config.xml files in one module - you just specify a comm separated list of the file names in the web.xml - take a look at the struts-examples webapp shipped with the latest version of struts - the validation module is broken up in suahc a way. Niall Still I would like to have an answer to my original question, if possible. As I have already told that I have been able to do module switching, but still I haven't been able to use a separate tiles definition file for the second module. If u could help me out at this, I will be thankful to you. Being able to use a separate tiles def file for the second module (having a struts config file of its own) will do for me. pbenedict wrote: Have you considered removing the use of modules? Modules are really a nuisance, and were originally developed to allow multiple Struts apps running under one context. There's a hard barrier between modules and almost all developers I know no longer use them. You can split up your struts config without using modules. I know this advice doesn't answer your question, but think about it, because it will save you time. Paul Suman Maity wrote: Hi, I was trying struts module switching and was successful doing it using SwitchAction. I am also using tiles. The problem is I am not able to use a separate tiles definition file for the other module (i have two modules). I have two struts config files. struts-config.xml for the default module and struts-anotherModule-config.xml for the other module. I have written the following in the default struts config file (struts-config.xml): plug-in className=org.apache.struts.tiles.TilesPlugin set-property property=definitions-config value=/WEB-INF/conf/tiles-defs.xml/ set-property property=definitions-debug value=1/ set-property property=definitions-parser-details value=0/ set-property property=definitions-parser-validate value=true/ /plug-in I had created another tiles definition file for the other module with a name tiles-anotherModule-defs.xml and created some definitions in that. I mentioned this file in struts-anotherModule-config.xml file in the same way as above. In this struts config i wrote a action mapiping which has forward tag like this: forward name=switchModule path=actionExamples The definition of actionExamples is there in the second tiles definition file that is the tiles-anotherModule-defs.xml file. When I run the app, the module switch occurs with the help of SwitchAction but finally it fails to load the definition actionExamples saying Can not get request dispatcher for path actionExamples. Now, the irony is that instead of specifying a seperate tiles definition file, I write the following line in struts-anotherModule-config.xml file: plug-in className=org.apache.struts.tiles.TilesPlugin/ Put the definition actionExamples in the default tiles def file and it works. I even don't need to mention the tiles def file's name here although it simply works. But if i comment the above line, it does not work. I am confused. Can not I use separate tiles definition files for separate modules each having its own struts config file? Please provide example if possible. Thanking in advance. - To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED] -- View this message in context: http://www.nabble.com/Struts-module-switch-tf3552250.html#a9934530 Sent from the Struts - User mailing list archive at Nabble.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]
unsubsribe
unsubsribe Whilst this email has been checked for all known viruses, recipients should undertake their own virus checking as Xansa will not accept any liability whatsoever. This email and any files transmitted with it are confidential and protected by client privilege. It is solely for the use of the intended recipient. Please delete it and notify the sender if you have received it in error. Unauthorised use is prohibited. Any opinions expressed in this email are those of the individual and not necessarily the organisation. Xansa, Registered Office: 420 Thames Valley Park Drive, Thames Valley Park, Reading, RG6 1PU, UK. Registered in England No.1000954. t +44 (0)8702 416181 w www.xansa.com - To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED]
Re: [S2] Adding Calendar function to a form.
Trying again, due to bad formatting on Nabble... I saw cilquirms reply, but I don't think I phrased my problems correctly. I understand that the tag libraries are very accomodating, but I am at a loss as to how to insert this code. This little calendar image and the associated href for clickability would need to go somewhere inside the generated code that the tag outputs. Is that even possible? I want to have the little calendar icon be next to the field input, so user's can use it instead of typing in a date by hand. Hopefully that is a bit more clear on my issues. Any ideas? --- I tried the s:datetimepicker to work on things, but since I am not using AJAX, I believe that is a dead end, no? There'd be no point in bringing in the ajax theme if I wasn't using AJAX. So how do I incorporate a standard js calendar routine into a field on my form? What I want to add is this calendar clickable icon that brings up a date picker: pre a href=javascript:NewCal('demo1','ddmmm',true,24)img src=images/cal.gif width=16 height=16 border=0 alt=Pick a date/a /pre Where I want to add it is next to my input box on my form for the datePaid field: s:textfield key=p.datePaid / I am just missing the concept here on how to plug custom code into the s: tags. I am trying very hard not to hack this thing to bits with tricks and cheats. Skip Hollowell - To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED]
How to use datetimepicker localization
Hi, I use struts 2 blank war to use the struts tags tag library , and I use it but the calendar of datetimepicker shown in English language , I want to use another local ar , I try to extract the struts2-core-2.0.6.jar file and see the dojo files org\apache\struts2\static\dojo\src\i18n\calendar\nls\en\gregorian.js and change the values of the months and days even for the en and repackage it as a jar and check , no changes I found , Thanks to help me in add my local, Regards, __^__ __^__ ( ___ )---( ___ ) | / |IBRAHIM SAYED IBRAHIM| \ | |___| |___| (_)---(_) - To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED]
Wrong Content Type text/plain
I added Tiles to the struts2-blank-2.0.6 example webapp and started to work on my application. All works just fine on my Linux/Tomcat 5.5 development box but when I deploy the app to the provider's Linux/Tomcat 5.5 webspace the content type is suddenly text/plain instead of text/html and all I see is the HTML source. The funny thing is, that when an action is executed through s:action namespace=/test name=home executeResult=true/s:action the content type is text/html and the page displays correctly, but when the same action is executed through a href=s:url action=home/Home/a the above described problem occurs. Setting something like %@ page language=java contentType=text/html; charset=ISO-8859-1 % in the Tiles template and even the subpages seems to be ignored. Calling a JSP directly works fine. There is a Struts1 + Tiles webapp running just fine on the same webspace. I spent some hours googling but I could not find any solution. Does anyone have an idea what is going on and what might be the difference between my development machine and the provider's server could cause this problem? Torsten - To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED]
s:checkbox returns an String[] when is checked!
Hi guys, I'm using ActionContext.getContext().getParameters().get(checkboxName); to get a value from a checkbox in my jsp. The problem here is, when its value is false, works fine, I got an String. But when my checkbox is checked and I call this same method, I got a String[] and as you know, if I cast from String[] to String I got an cast exception. Does somebody knows why I got this behavior? Thanks, Felipe -- View this message in context: http://www.nabble.com/%3Cs%3Acheckbox%3E-returns-an-String---when-is-checked%21-tf3559152.html#a9938814 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: Type-Conversion error - NPE
Did you really think I made it because I want to? Tim Williams wrote: On 4/9/07, Felipe Rodrigues [EMAIL PROTECTED] wrote: Hi Guys, I'm trying to use the Type Conversion at Struts2, but I'm getting a NPE. Here is my MyAction-conversion.properties file: KeyProperty_insertList=id Element_insertList=my.package.MyBean CreateIfNull_insertList=true MyAction has the attribute ListMyBean insertList as well as its setters and getters. Does somebody knows if it is required to override toString in MyBean? I'm also trying to set a value of a Bean inside a Map under my Bean. Something like this: insertList('%{id}').movMap['5'].value Would it work? Thanks in Advance, Felipe Felipe, Can you please stop this spam. Be nice/patient and ask your question once vs. 6 duplicate emails in less than an hour. Give it some time. Thanks, --tim - To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED] -- View this message in context: http://www.nabble.com/Type-Conversion-error---NPE-tf3549251.html#a9938849 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] Adding Calendar function to a form.
The more I look at and play with this scenario, the more I am starting to thing that using the default XHTML theme is not the way to go. I would be much better served, I think to use the simple theme, giving me much more control over layout and additional tags around my form fields. Is that a proper assumption, and a more 'struts2-ish' way of approaching things? Thanks, Skip Skip Hollowell wrote: Trying again, due to bad formatting on Nabble... I saw cilquirms reply, but I don't think I phrased my problems correctly. I understand that the tag libraries are very accomodating, but I am at a loss as to how to insert this code. This little calendar image and the associated href for clickability would need to go somewhere inside the generated code that the tag outputs. Is that even possible? I want to have the little calendar icon be next to the field input, so user's can use it instead of typing in a date by hand. Hopefully that is a bit more clear on my issues. Any ideas? --- I tried the s:datetimepicker to work on things, but since I am not using AJAX, I believe that is a dead end, no? There'd be no point in bringing in the ajax theme if I wasn't using AJAX. So how do I incorporate a standard js calendar routine into a field on my form? What I want to add is this calendar clickable icon that brings up a date picker: pre a href=javascript:NewCal('demo1','ddmmm',true,24)img src=images/cal.gif width=16 height=16 border=0 alt=Pick a date/a /pre Where I want to add it is next to my input box on my form for the datePaid field: s:textfield key=p.datePaid / I am just missing the concept here on how to plug custom code into the s: tags. I am trying very hard not to hack this thing to bits with tricks and cheats. Skip Hollowell - To unsubscribe, e-mail: [EMAIL PROTECTED] http://www.nabble.com/user/SendEmail.jtp?type=postpost=9938513i=0 For additional commands, e-mail: [EMAIL PROTECTED] http://www.nabble.com/user/SendEmail.jtp?type=postpost=9938513i=1 - To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED]
RE: what version of struts is better?
I can't speak to Struts2, as I haven't worked with it. I was just suggesting that you should look at JSF as well. I've worked with Struts 1 for about 5 years. My last project, I got to work with JSF and Facelets and was very impressed. The main reason I liked it was that it was component based. As a UI Framework, that seemed more intuitive than using an Action based framework, and I felt it lends itself to more code reuse. Being able to do Event Driven coding was a big plus as well. You can simulate that with an action framework, but it's a bit easier in JSF. Using Facelets was a major step up on JSPs and Tiles. Facelets templating is a bit more advanced than tiles, and it also allows you to create compound components and use them as custom tags, and you don't need to write any Java code. The cons of Facelets is that there are some issues parsing some typical html. For example, you can't use nbsp;. You have to use #160;. Not a major issue, but those lend to the learning curve. Again, I have not worked with Struts2, so I can't speak to a direct comparison. I was merely suggesting you take a look at JSF and decide for yourself. One other thing to keep in mind is that if you have developers who only have experience with Action based frameworks, there will be a fairly high learning curve. If deadlines are tight, there will be some added pressure... -Original Message- From: Chris Pratt [mailto:[EMAIL PROTECTED] Sent: Tuesday, April 10, 2007 4:56 PM To: Struts Users Mailing List Subject: Re: what version of struts is better? Frank, what is it about JSF that you find superior to Struts 2? We are internally in a debate on which way to go (JSF v Struts 2) and I'd like to hear your opinion. (*Chris*) On 4/10/07, Frank Russo [EMAIL PROTECTED] wrote: Not to show any disrespect, but if you are starting a new project with a clean slate, I'd seriously look at JSF/Facelets if I were you. Both frameworks have their pros/cons, but I think JSF's pros well outweigh the cons. Plus, if you are going to take the time and learn a new framework, which if you haven't worked with Struts2 or WebWorks that is what you are doing, then you may want to weigh your options with JSF. I would highly recommend, though, that if you do consider it, Facelets, and not JSP's are the way to go. Just my 2 cents... -Original Message- From: Love, Andrew [mailto:[EMAIL PROTECTED] Sent: Tuesday, April 10, 2007 4:43 PM To: Struts Users Mailing List Subject: RE: what version of struts is better? Hello, I have a great deal of experience developing web based applications. I have used home-grown frameworks and several commercial frameworks. I am new to STRUTS2, but my initial impression is that STRUTS2 kicks-butt. Form validation and action/navigation management is extremely intuitive. The original version of STRUTS has a great deal of books and documentation available. STRUTS2 does not have much in the market yet. However, STRUTS2 is based on WEBWORK so you should be able to find enough information for your term paper. Best Regards, Andrew Love Chief Software Architect, Strategic Initiatives McKesson Corporation McKesson Pharmacy Systems mailto:[EMAIL PROTECTED] -Original Message- From: dire [mailto:[EMAIL PROTECTED] Sent: Tuesday, April 10, 2007 2:30 PM To: user@struts.apache.org Subject: what version of struts is better? sorry for my English! in my term paper i want to use Struts. Before this time i don`t have a deal with it. in http://struts.apache.org/ i saw that struts had two versions. i try to found what version is preferable, but can`t... Can anybody says how many differencies bitween them? Or, at least, tell me, please, where i can found answer for my question. thanx for your attention! -- View this message in context: http://www.nabble.com/what-version-of-struts-is-better--tf3554740.html #a9925 553 Sent from the Struts - User mailing list archive at Nabble.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] - 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: what version of struts is better?
Actually, I disagree. JSF is a framework. I used MyFaces and their component library exclusively, without using Shale, Seam or anything else... -Original Message- From: Piero Sartini [mailto:[EMAIL PROTECTED] Sent: Tuesday, April 10, 2007 5:21 PM To: Struts Users Mailing List Subject: Re: what version of struts is better? I did look at JSF/Seam/Shale and other web frameworks before I decided to use Struts2. There were several reasons for my decision and I have not regret it since now. After many years of web development an action based framework like s2 for me is much more natural than a component based approach. I think I am much more productive with s2. If someone wants tooling support and a visual designer, maybe it would be better to look at JSF. But in my oppinion there is missing a good framework for JSF. (No, I do not think that JSF is a framework - it is a technology). Shale is a good start, but has a long way to go. Seam is too much coupled with JBoss/Hibernate for my feeling. Visual Web Editor and from the netbeans project is nice - but IMHO not suited for bigger projects. I really came to the conclusion that JSF is nice for small projects with a few pages and if you really want a desktop-like development approach. I am sure there are many other opinions out there, but more cents are always good ;-) Piero On Tuesday 10 April 2007 22:50:12 Frank Russo wrote: Not to show any disrespect, but if you are starting a new project with a clean slate, I'd seriously look at JSF/Facelets if I were you. Both frameworks have their pros/cons, but I think JSF's pros well outweigh the cons. Plus, if you are going to take the time and learn a new framework, which if you haven't worked with Struts2 or WebWorks that is what you are doing, then you may want to weigh your options with JSF. I would highly recommend, though, that if you do consider it, Facelets, and not JSP's are the way to go. Just my 2 cents... - 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]
Struts Submission
Hi All: I have a list of Checkboxes with UserIDs. User checks a few number of Check-boxes and then clicks 'SUBMIT'. All Checked Items received are then added to a DB - which happens in a fraction of a Second. However, all of the UserIds are also sent an Email which takes a very long Time. Therefore, the User is forced to wait. Is their a WAY I can only do the DBInsertion on click of Submit Button and do email Sending in the back-ground whilst the User stares at a JSP saying: All Users selected have been registered. Currently Email Transmission is being processed. Pls WAIT and donot click the BACK BUTTON. I don't see how using regular Struts 1.2 I can fwd to a page but do work in the Background. Any Ideas or Improvements to this Idea. Thanks. Chetan _ CHETAN PANDEY Executive - Technology Services BLUE, 1 Maritime Square, #13-02 Harbourfront Centre, Singapore 099253 DID +65-6212-0863 main line +65-6333-3336 fax +65 6336-6334 email mailto:[EMAIL PROTECTED] [EMAIL PROTECTED] website http://www.bluesingapore.com/ www.BLUEsingapore.com _ BEIJING SHANGHAI LONDON TOKYO PALO ALTO SINGAPORE CONFIDENTIALITY STATEMENT: This email and its attachment(s) contain Privileged/Confidential information. If you are not the intended recipient, the distribution, use or replication of the information in this email is strictly prohibited. If you have received this email in error, please notify the sender immediately by return email, then delete this email and any attached documents. Any opinions, conclusions or views expressed in this email are those of the individual sender, except where he/she -- expressly and with authority -- states them to be the views of BLUE.
Re: [S2] Adding Calendar function to a form.
--- Skip Hollowell [EMAIL PROTECTED] wrote: The more I look at and play with this scenario, the more I am starting to thing that using the default XHTML theme is not the way to go. I would be much better served, I think to use the simple theme, giving me much more control over layout and additional tags around my form fields. Is that a proper assumption, and a more 'struts2-ish' way of approaching things? I feel the supplied themes are starting points--they may work great for many cases, but as soon as you need something different, I think you're better off either extending an existing theme or creating your own. If you're doing enough different things on all your pages then using the simple theme might be a good idea, but as soon as you find yourself inserting the same chunks of markup over and over then I think you'd be creating more work in the long run than extending or creating. So far I've found the xhtml theme to work for me almost everything with the occasional dip in to simple land, but my projects have fairly basic input needs (except for one horribly difficult page :/ d. Be a PS3 game guru. Get your game face on with the latest PS3 news and previews at Yahoo! Games. http://videogames.yahoo.com/platform?platform=120121 - To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED]
RE: [S2] Adding Calendar function to a form.
Skip, There is a pretty good tutorial out there to create a component using the struts tags - this is what I did for exactly what you are doing. Granted it is not as pretty as s:text ...stuff here/s:text but it does the job and now that I have it written I can use it in all the places I need to. Check out http://www.vitarara.org/cms/node/86 for the example. Al From: Skip Hollowell [mailto:[EMAIL PROTECTED] Sent: Wed 4/11/2007 9:10 AM To: user@struts.apache.org Subject: Re: [S2] Adding Calendar function to a form. The more I look at and play with this scenario, the more I am starting to thing that using the default XHTML theme is not the way to go. I would be much better served, I think to use the simple theme, giving me much more control over layout and additional tags around my form fields. Is that a proper assumption, and a more 'struts2-ish' way of approaching things? Thanks, Skip Skip Hollowell wrote: Trying again, due to bad formatting on Nabble... I saw cilquirms reply, but I don't think I phrased my problems correctly. I understand that the tag libraries are very accomodating, but I am at a loss as to how to insert this code. This little calendar image and the associated href for clickability would need to go somewhere inside the generated code that the tag outputs. Is that even possible? I want to have the little calendar icon be next to the field input, so user's can use it instead of typing in a date by hand. Hopefully that is a bit more clear on my issues. Any ideas? --- I tried the s:datetimepicker to work on things, but since I am not using AJAX, I believe that is a dead end, no? There'd be no point in bringing in the ajax theme if I wasn't using AJAX. So how do I incorporate a standard js calendar routine into a field on my form? What I want to add is this calendar clickable icon that brings up a date picker: pre a href=javascript:NewCal('demo1','ddmmm',true,24)img src=images/cal.gif width=16 height=16 border=0 alt=Pick a date/a /pre Where I want to add it is next to my input box on my form for the datePaid field: s:textfield key=p.datePaid / I am just missing the concept here on how to plug custom code into the s: tags. I am trying very hard not to hack this thing to bits with tricks and cheats. Skip Hollowell - To unsubscribe, e-mail: [EMAIL PROTECTED] http://www.nabble.com/user/SendEmail.jtp?type=postpost=9938513i=0 For additional commands, e-mail: [EMAIL PROTECTED] http://www.nabble.com/user/SendEmail.jtp?type=postpost=9938513i=1 - 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]
How to use datetimepicker localization
Hi, I use struts 2 blank war to use the struts tags tag library , and I use it but the calendar of datetimepicker shown in English language , I want to use another local ar , I try to extract the struts2-core-2.0.6.jar file and see the dojo files org\apache\struts2\static\dojo\src\i18n\calendar\nls\en\gregorian.js and change the values of the months and days even for the en and repackage it as a jar and check , no changes I found , Thanks to help me in add my local, Regards, IBRAHIM SAYED IBRAHIM
Re: [S2] Adding Calendar function to a form.
Dave Newton-4 wrote: So far I've found the xhtml theme to work for me almost everything with the occasional dip in to simple land, but my projects have fairly basic input needs (except for one horribly difficult page :/ d. I too am starting to see this. Yes, simple will be the way to go when I need to get out of the realm of columnar Label/Data presentations. We actually have the 'luxury' of a presentation team here, so they will design the look and feel, and I will get to plug things in so as to fit into their vision. Not too shabby a way to work, sometimes. - To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED]
Re: [S2] Adding Calendar function to a form.
Fogleson, Allen wrote: Skip, There is a pretty good tutorial out there to create a component using the struts tags - this is what I did for exactly what you are doing. Granted it is not as pretty as s:text ...stuff here/s:text but it does the job and now that I have it written I can use it in all the places I need to. Check out http://www.vitarara.org/cms/node/86 for the example. Al Al, I am surprised I didn't remember seeing this on your site, as it is one of only a handful of Struts 2 sites I have bookmarked. Thanks for the indepth explanations along with the solid examples. Skip. - To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED]
s:action S2 Tiles
Does anyone know of any existing issues with result type of stream using s:action within tiles? I'm getting an illegal state exception when using s:action executeresult = true The struts.xml result type = stream and the stream is actually html to render on the client/browser. If I skip the s:action tag and hit the action directly it works fine. I'm using S2.0.5 and a tiles-plugin2.0.5. Thanks, James - To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED]
RE: [S2] Adding Calendar function to a form.
Not my site, but I had the exact same problem as you and that's where I went. It does have pretty solid, and concise examples. Al From: Skip Hollowell [mailto:[EMAIL PROTECTED] Sent: Wed 4/11/2007 10:05 AM To: user@struts.apache.org Subject: Re: [S2] Adding Calendar function to a form. Fogleson, Allen wrote: Skip, There is a pretty good tutorial out there to create a component using the struts tags - this is what I did for exactly what you are doing. Granted it is not as pretty as s:text ...stuff here/s:text but it does the job and now that I have it written I can use it in all the places I need to. Check out http://www.vitarara.org/cms/node/86 for the example. Al Al, I am surprised I didn't remember seeing this on your site, as it is one of only a handful of Struts 2 sites I have bookmarked. Thanks for the indepth explanations along with the solid examples. Skip. - 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]
S2: Simple way to pass data
In my app I have need menu items at the top of every page that are links do other pages. I also need a common date and dropdown selection on most pages. My challenge is how to componentize the date/dropdown selection so it can be re-used on each page, and then get the data passed to the action class. I would prefer not to have two ways to get data from the screen to my action class: 1) pass parameters from rewriting the href link 2) auto-populating the variables when a button in the form is clicked I do not know how to have a common way to do this, but hopefully I have overlooked something simple. Does anybody have suggestions or pointers? Thank you, Scott Need Mail bonding? Go to the Yahoo! Mail QA for great tips from Yahoo! Answers users. http://answers.yahoo.com/dir/?link=listsid=396546091 - To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED]
[S2] s:text help on formatting output
Folks: It is clear that I MUST be doing something wrong, but I have tried all the options with the s:text to format a number. Here is what I have tried: lis:text name=currencys:param name=money value=%{#session.Account.balance}//s:text/li lis:text name=format.moneys:param name=money value=%{#session.Account.balance}//s:text/li lis:text name=currencys:param name=money value=122. //s:text/li lis:text name=format.moneys:param name=money value=122. //s:text/li lis:text name=currencys:param value=122.//s:text/li lis:text name=currencys:param value='122.'//s:text/li lis:text name=currencys:param name=money .1 /s:param /s:text/li lis:text name=currencys:param .1 /s:param /s:text/li lis:property value=%{#session.Account.balance}//li And Here is the Corresponding output on the page: currency format.money currency format.money currency currency currency currency 1003.9 What in the world ami I missing? ( I am wither misreading the example, or it is clearly not correct. I hope it is the former) I followed the example on this page: http://struts.apache.org/2.x/docs/text.html Other example s:text name=format.moneys:param name=value value=myMoneyValue//s:text where format.money={0,number,currency} Thank you in advance for any input. hf
Re: S2 life cycle
tom: I have not experience with the ModelDrivenInterface. What is that you are trying to do? (It it is to keep a bean around to share between action invocations, have you tried this? class FirstAction extends ActionSupport{ public String execute(){ Bean bean = new Bean(); bean.setWhaterver(...); session.setAttribute(MY_BEAN, bean); } } class SecondAction extends ActionSupport{ public String execute(){ Bean bean = (Bean)= session.getAttribute(MY_BEAN); bean.getWahtever(); } } Is that what you want to do? Thanks, Hf On 4/11/07, tom tom [EMAIL PROTECTED] wrote: Works but the values get reset all the time, doesnt stay in the session scope, if I update form in the one action class and if I try to retrieve from the other action class the values has been lost. Should I have to do any extra things --- Dave Newton [EMAIL PROTECTED] wrote: --- tom tom [EMAIL PROTECTED] wrote: How can I have a reference to the form class inside the action class. I did the following 1) Wrote a action class which implements ScopedModelDriven interface, the argo is not null inside setModel(Object arg0)method in the action class but I cant cast into test.TestForm (pojo) At the very least I believe you should implement ScopedModelDrivenT, not just ScopedModelDriven, and provide typed accessors: http://struts.apache.org/2.x/struts2-core/apidocs/com/opensymphony/xwork2/ModelDriven.html http://struts.apache.org/2.x/struts2-core/apidocs/com/opensymphony/xwork2/interceptor/ScopedModelDriven.html d. Don't get soaked. Take a quick peek at the forecast with the Yahoo! Search weather shortcut. http://tools.search.yahoo.com/shortcuts/#loc_weather - To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED] Don't be flakey. Get Yahoo! Mail for Mobile and always stay connected to friends.http://mobile.yahoo.com/mail - To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED] -- 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: Can we *please* havea seperate Struts *2* - User list?
I have to agree. Having a separate Struts 2 list would be nice, but let's face it... - Struts 1 owned the web presentation space, making the move from 1.x to 1.y brainless. - But since Struts 2 is a complete rewrite and JSF is competing strongly for the same space (with much help from the tool vendors), the choice to go to from Struts 1 to 2 is not easy for today's developers. Struts 2 - regardless of how much better it is - needs all the help it can get to establish itself in the minds of developers. The price we pay by slogging through 100 emails per day in a single list is small if it helps Struts 2 win the battle. Bruno -Original Message- From: Frank W. Zammetti [mailto:[EMAIL PROTECTED] Sent: Tuesday, April 10, 2007 7:59 PM To: Struts Users Mailing List Subject: Re: Can we *please* havea seperate Struts *2* - User list? I think the thought behind not splitting the lists to this point is that Apache experience has been that it tends to divide a community rather than direct traffic in a more granular way. The idea is that a Struts user is a Struts user regardless of version, and those that may not be using S2 today (yours truly included for the most part) may well be using it tomorrow... a person can get a leg-up just by keeping an eye on the S2 posts (I know that's true for me). One could always subscribe to multiple lists of course, but in terms of community, a single united list theoretically at least yields more synergy. This is my interpretation of things I've seen stated in the past (I happen to agree with it too :) ). Maybe the thinking is different now by those who are in a position to change things, I don't know. As for a forum, I seem to remember Apache infrastructure not supporting it, and I also seem to remember something about Apache projects not (directly at least) using outside resources... others more knowledgeable than I would have to answer this though... I can't off the top of my head think of any other Apache project that has a forum that is officially linked to the project. As a personal opinion, I'm not sure I see the benefit of a forum vs. a mailing list, they seem pretty well even to me, maybe a slight edge to the mailing list since it goes to my mail client... I could see a good argument though for a forum that supplies an RSS feed too. Frank Antony Stubbs wrote: Well it might have made sense if struts 2 issues were somehow applicable to struts 1, but they're mostly not. For Struts 2 to be adopted, it needs to be clearly separated from struts 1, as is the code base. This includes having clearly separate support to make it as easy as possible to find help. It's not like it's we want a struts 1.5 list. 2 is very different from 1. What's the mentality for keeping them jumbled together? I suppose you don't see a separate mailing list for every major tapestry release, but this is a case of adopting the best process that fit's the situation, and in this situation the lists should be seperate IMO. Dave Newton-4 wrote: --- Antony Stubbs [EMAIL PROTECTED] wrote: This list seems to be quite busy, and I think everyone would benefit hugely from separating out the two frameworks for obvious reasons. Actually I'm surprised this hasn't been done already. It's been brought up (even by me) in the past; I still agree and would vote for separation if it was votable. d. _ ___ Finding fabulous fares is fun. Let Yahoo! FareChase search your favorite travel sites to find flight and hotel bargains. http://farechase.yahoo.com/promo-generic-14795097 - To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED] -- Frank W. Zammetti Founder and Chief Software Architect Omnytex Technologies http://www.omnytex.com AIM/Yahoo: fzammetti MSN: [EMAIL PROTECTED] Author of Practical Ajax Projects With Java Technology (2006, Apress, ISBN 1-59059-695-1) Java Web Parts - http://javawebparts.sourceforge.net Supplying the wheel, so you don't have to reinvent it! - 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: what version of struts is better?
On Wednesday 11 April 2007 15:19:27 Frank Russo wrote: Actually, I disagree. JSF is a framework. I used MyFaces and their component library exclusively, without using Shale, Seam or anything else... I used JSP and Servlets exclusively to build web apps years ago. JSP is no framework for most people. But I do agree that JSF has some functionalities where a webframework was needed before. Maybe its just a question of what we call a web framework. For me, it is something like struts. There is no need to build another framework on top of it. With JSF, things are different. There IS a need to build a web framework on top of it (Seam, Shale, etc). At least for me it does not feel complete enough to build my applications with it. Craig said in another thread [1] at this list that JSF focuses on the component APIs and the foundations for application needs and that a framework on top of JSF is a reasonable thing for an application developer to want. Piero [1] http://www.mail-archive.com/user%40struts.apache.org/msg53891.html - To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED]
Re: Can we *please* havea seperate Struts *2* - User list?
Just FYI, Nabble does provide RSS feeds on a per-list/forum level. I Live-bookmark http://www.nabble.com/Struts---User-f206.html Frank W. Zammetti wrote: I think the thought behind not splitting the lists to this point is that Apache experience has been that it tends to divide a community rather than direct traffic in a more granular way. The idea is that a Struts user is a Struts user regardless of version, and those that may not be using S2 today (yours truly included for the most part) may well be using it tomorrow... a person can get a leg-up just by keeping an eye on the S2 posts (I know that's true for me). One could always subscribe to multiple lists of course, but in terms of community, a single united list theoretically at least yields more synergy. This is my interpretation of things I've seen stated in the past (I happen to agree with it too :) ). Maybe the thinking is different now by those who are in a position to change things, I don't know. As for a forum, I seem to remember Apache infrastructure not supporting it, and I also seem to remember something about Apache projects not (directly at least) using outside resources... others more knowledgeable than I would have to answer this though... I can't off the top of my head think of any other Apache project that has a forum that is officially linked to the project. As a personal opinion, I'm not sure I see the benefit of a forum vs. a mailing list, they seem pretty well even to me, maybe a slight edge to the mailing list since it goes to my mail client... I could see a good argument though for a forum that supplies an RSS feed too. Frank Antony Stubbs wrote: Well it might have made sense if struts 2 issues were somehow applicable to struts 1, but they're mostly not. For Struts 2 to be adopted, it needs to be clearly separated from struts 1, as is the code base. This includes having clearly separate support to make it as easy as possible to find help. It's not like it's we want a struts 1.5 list. 2 is very different from 1. What's the mentality for keeping them jumbled together? I suppose you don't see a separate mailing list for every major tapestry release, but this is a case of adopting the best process that fit's the situation, and in this situation the lists should be seperate IMO. Dave Newton-4 wrote: --- Antony Stubbs [EMAIL PROTECTED] wrote: This list seems to be quite busy, and I think everyone would benefit hugely from separating out the two frameworks for obvious reasons. Actually I'm surprised this hasn't been done already. It's been brought up (even by me) in the past; I still agree and would vote for separation if it was votable. d. Finding fabulous fares is fun. Let Yahoo! FareChase search your favorite travel sites to find flight and hotel bargains. http://farechase.yahoo.com/promo-generic-14795097 - To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED] -- Frank W. Zammetti Founder and Chief Software Architect Omnytex Technologies http://www.omnytex.com AIM/Yahoo: fzammetti MSN: [EMAIL PROTECTED] Author of Practical Ajax Projects With Java Technology (2006, Apress, ISBN 1-59059-695-1) Java Web Parts - http://javawebparts.sourceforge.net Supplying the wheel, so you don't have to reinvent it! - To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED] -- View this message in context: http://www.nabble.com/Can-we-*please*-havea-seperate-Struts-*2*---User-list--tf3556523.html#a9941601 Sent from the Struts - User mailing list archive at Nabble.com. - To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED]
Tiles 2 woes
I'm trying to migrate a S1 web app to S2. Most things are working with the exception of Tiles. Here is the list of things I did in case someone might detect a glitch; 1. Had to download commons-digester-1.8.jar because it was not included in \struts-2.0.6\lib 2. Added the three struts tiles jars to my project (plugin, core, api) 3. Added org.apache.struts2.tiles.StrutsTilesListener to web.xml 4. Modified struts package to extend tiles-default 5. Copied my tiles.xml 6. Copied my jsp files When I make an HTTPRequest to my struts action it correctly makes the request of the result type tiles but I receive the following error: 08:58:33,459 ERROR BasicTilesContainer:401 - Error rendering tile I have double checked all the names and file locations and this message doesn't give me much to go by! After reviewing http://struts.apache.org/2.x/docs/tiles-plugin.html it appears the tiles tag names have been changed so I updated them accordingly. Any clues before I jump? -- Scott [EMAIL PROTECTED]
Re: [s2] Can we *please* havea seperate Struts *2* - User list?
If you are really interested in bringing clarity to the discussions, the people who are interested in having separate lists should be prefixing your questions and answers with [s1] or [s2] instead of trying to force people to have to subscribe to separate lists. If someone posts a new question without a prefix, you can always send a gentle reminder that such prefixes are preferred, but we should never try to enforce it as a rule. Even if *your* reply uses [s2] and it is the only one in a long thread, at least the entire thread gets labelled (sort of) so that future searches can use [s2] as a filter to narrow the results. For example, if you search the googler for struts action site:nabble.com, you get 9,360 results. However, if you search for s2 action site:nabble.com, you get 244. -- James Mitchell On Apr 11, 2007, at 10:55 AM, Bruno Melloni wrote: I have to agree. Having a separate Struts 2 list would be nice, but let's face it... - Struts 1 owned the web presentation space, making the move from 1.x to 1.y brainless. - But since Struts 2 is a complete rewrite and JSF is competing strongly for the same space (with much help from the tool vendors), the choice to go to from Struts 1 to 2 is not easy for today's developers. Struts 2 - regardless of how much better it is - needs all the help it can get to establish itself in the minds of developers. The price we pay by slogging through 100 emails per day in a single list is small if it helps Struts 2 win the battle. Bruno -Original Message- From: Frank W. Zammetti [mailto:[EMAIL PROTECTED] Sent: Tuesday, April 10, 2007 7:59 PM To: Struts Users Mailing List Subject: Re: Can we *please* havea seperate Struts *2* - User list? I think the thought behind not splitting the lists to this point is that Apache experience has been that it tends to divide a community rather than direct traffic in a more granular way. The idea is that a Struts user is a Struts user regardless of version, and those that may not be using S2 today (yours truly included for the most part) may well be using it tomorrow... a person can get a leg-up just by keeping an eye on the S2 posts (I know that's true for me). One could always subscribe to multiple lists of course, but in terms of community, a single united list theoretically at least yields more synergy. This is my interpretation of things I've seen stated in the past (I happen to agree with it too :) ). Maybe the thinking is different now by those who are in a position to change things, I don't know. As for a forum, I seem to remember Apache infrastructure not supporting it, and I also seem to remember something about Apache projects not (directly at least) using outside resources... others more knowledgeable than I would have to answer this though... I can't off the top of my head think of any other Apache project that has a forum that is officially linked to the project. As a personal opinion, I'm not sure I see the benefit of a forum vs. a mailing list, they seem pretty well even to me, maybe a slight edge to the mailing list since it goes to my mail client... I could see a good argument though for a forum that supplies an RSS feed too. Frank Antony Stubbs wrote: Well it might have made sense if struts 2 issues were somehow applicable to struts 1, but they're mostly not. For Struts 2 to be adopted, it needs to be clearly separated from struts 1, as is the code base. This includes having clearly separate support to make it as easy as possible to find help. It's not like it's we want a struts 1.5 list. 2 is very different from 1. What's the mentality for keeping them jumbled together? I suppose you don't see a separate mailing list for every major tapestry release, but this is a case of adopting the best process that fit's the situation, and in this situation the lists should be seperate IMO. Dave Newton-4 wrote: --- Antony Stubbs [EMAIL PROTECTED] wrote: This list seems to be quite busy, and I think everyone would benefit hugely from separating out the two frameworks for obvious reasons. Actually I'm surprised this hasn't been done already. It's been brought up (even by me) in the past; I still agree and would vote for separation if it was votable. d. _ ___ Finding fabulous fares is fun. Let Yahoo! FareChase search your favorite travel sites to find flight and hotel bargains. http://farechase.yahoo.com/promo-generic-14795097 - To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED] -- Frank W. Zammetti Founder and Chief Software Architect Omnytex Technologies http://www.omnytex.com AIM/Yahoo: fzammetti MSN: [EMAIL PROTECTED] Author of Practical Ajax Projects With Java Technology (2006, Apress, ISBN 1-59059-695-1)
Re: struts.action.extension question
I don't believe this can be cleanly handled with just the web 2.4 spec and struts2. Some container, like Resin, allow for url-patterns to be regexes, which would help in this scenario. meeboo wrote: The problem is that I have a lot of URL:s which look like /user/username, movie/movieTitle or account/create - and I don't want to forward or redirect for each URL since this will slow down my application. Is there a way to exclude .css extensions maybe? joey-30 wrote: keep struts.action.extension default.and create a filter to make sure it's before the struts filter.like this: filter-mapping filter-nameyourfilter/filter-name url-patternmovie/*/url-pattern /filter-mapping filter-mapping filter-namestruts2/filter-name url-pattern/*/url-pattern /filter-mapping u can foward or redirect to the url movie.action?movieTitle=* or something else in your filter. regards joey On 4/11/07, meeboo [EMAIL PROTECTED] wrote: No takers on this? meeboo wrote: Hey all I have a mapping pattern which looks like this action name=movie/* class=com.bubbleclip.web.struts.action.PlayMovie param name=movieTitle{1}/param result/movie.jsp/result /action The wildcard is for backwards compability since our original JSP/Servlet web-layer mapped movie titles like http:localhost:8080/movie/movieTitle This works fine if I set struts.action.extension to , this way I preserve compatibility since the movie title is the actual action name. The problem is that S2 will also interpret everything else as being actions - even CSS names making the pages not render correctly. Is there a way around this? -- View this message in context: http://www.nabble.com/struts.action.extension-question-tf3548145.html#a9934814 Sent from the Struts - User mailing list archive at Nabble.com. - To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED] -- View this message in context: http://www.nabble.com/struts.action.extension-question-tf3548145.html#a9941787 Sent from the Struts - User mailing list archive at Nabble.com. - To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED]
Show error in parent page
Hi all, I have a jsp with a download button. When I click on that button, a new web page using javascript is opened: html:submit property=accion styleClass=boton onclick=window.open('http://server:8080/FileServer/Menus/Search/selectDownloadType.jsp','blank','width=400,height=300,scrollbars=no')fmt:message key=button.download//html:submit html:messages id=msg message=true bean:write name=msg/br /html:messages In the new web page I only have this code: html:form action=modificarAsociacion.do input type=hidden name=rPropietario value=bean:write name=propietarioAsociacion property=dni// input type=hidden name=idAsociacion value=bean:write name=asociacionActiva property=idAsociacion// input type=radio name=tipoDescarga value=porVersionVersión más alta input type=radio name=tipoDescarga value=porEstadoEstado más alto/td html:submit property=accion styleClass=botonfmt:message key=boton.downloadFile//html:submit /html:form If the logged user has permission to download the file, it works properly, but if he doesn't have permissions, the error is not shown in the parent web page; the parent page is opened inside the child page showing the error. Is there any way to show the error in the parent page? Thanks a lot. Best regards, Paco _ Descarga gratis la Barra de Herramientas de MSN http://www.msn.es/usuario/busqueda/barra?XAPID=2031DI=1055SU=http%3A//www.hotmail.comHL=LINKTAG1OPENINGTEXT_MSNBH - To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED]
Re: Tiles 2 woes
I was recently doing the same and what gave me a headache was that even though my IDE complains about it, it has to be definition name=errorTiles extends=homeTiles put name=body value=/test/error.jsp/ /definition rather than definition name=errorTiles extends=homeTiles put-attribute name=body value=/test/error.jsp/ /definition which gave me a 11-Apr-2007 17:42:15 org.apache.tiles.impl.BasicTilesContainer render SEVERE: Error rendering tile So maybe it's that or something similar? Torsten [EMAIL PROTECTED] wrote: I'm trying to migrate a S1 web app to S2. Most things are working with the exception of Tiles. Here is the list of things I did in case someone might detect a glitch; 1. Had to download commons-digester-1.8.jar because it was not included in \struts-2.0.6\lib 2. Added the three struts tiles jars to my project (plugin, core, api) 3. Added org.apache.struts2.tiles.StrutsTilesListener to web.xml 4. Modified struts package to extend tiles-default 5. Copied my tiles.xml 6. Copied my jsp files When I make an HTTPRequest to my struts action it correctly makes the request of the result type tiles but I receive the following error: 08:58:33,459 ERROR BasicTilesContainer:401 - Error rendering tile I have double checked all the names and file locations and this message doesn't give me much to go by! After reviewing http://struts.apache.org/2.x/docs/tiles-plugin.html it appears the tiles tag names have been changed so I updated them accordingly. Any clues before I jump? - To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED]
Re: Tiles 2 woes
2007/4/11, [EMAIL PROTECTED] [EMAIL PROTECTED]: After reviewing http://struts.apache.org/2.x/docs/tiles-plugin.html it appears the tiles tag names have been changed so I updated them accordingly. Any clues before I jump? Tiles 2 is a complete rewrite of Struts-Tiles, we tried to clean up API, taglibs and DTD for Tiles definitions files. So... on what floor is your cubicle? :-) Antonio - To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED]
RE: Tiles 2 woes
Layout.jsp %@ taglib prefix=tiles uri=http://struts.apache.org/tags-tiles; % tiles:insertAttribute name=bar/ Tiles.xml definition name=foo template=/Layout.jsp put name=bar value=/bar.jsp/ /definition Hope this helps. -Original Message- From: [EMAIL PROTECTED] [mailto:[EMAIL PROTECTED] Sent: Wednesday, April 11, 2007 10:12 AM To: Struts Users Mailing List Subject: Tiles 2 woes I'm trying to migrate a S1 web app to S2. Most things are working with the exception of Tiles. Here is the list of things I did in case someone might detect a glitch; 1. Had to download commons-digester-1.8.jar because it was not included in \struts-2.0.6\lib 2. Added the three struts tiles jars to my project (plugin, core, api) 3. Added org.apache.struts2.tiles.StrutsTilesListener to web.xml 4. Modified struts package to extend tiles-default 5. Copied my tiles.xml 6. Copied my jsp files When I make an HTTPRequest to my struts action it correctly makes the request of the result type tiles but I receive the following error: 08:58:33,459 ERROR BasicTilesContainer:401 - Error rendering tile I have double checked all the names and file locations and this message doesn't give me much to go by! After reviewing http://struts.apache.org/2.x/docs/tiles-plugin.html it appears the tiles tag names have been changed so I updated them accordingly. Any clues before I jump? -- Scott [EMAIL PROTECTED] - To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED]
Re: s:checkbox returns an String[] when is checked!
Try declaring a boolean setter in your Action with the checkbox name. i.e. setCheckboxName( boolean val ) { this.checkboxName = val ; } and using that instead. I'm not sure why you're trying to get the value from the ActionContext.getParameters(). That will return the raw, globbed values of the parameters, and they by nature are multi-valued, so a String[] is expected. ( it's possible for a query string to be someParam=asomeParam=b ). Felipe Rodrigues wrote: Hi guys, I'm using ActionContext.getContext().getParameters().get(checkboxName); to get a value from a checkbox in my jsp. The problem here is, when its value is false, works fine, I got an String. But when my checkbox is checked and I call this same method, I got a String[] and as you know, if I cast from String[] to String I got an cast exception. Does somebody knows why I got this behavior? Thanks, Felipe -- View this message in context: http://www.nabble.com/%3Cs%3Acheckbox%3E-returns-an-String---when-is-checked%21-tf3559152.html#a9943331 Sent from the Struts - User mailing list archive at Nabble.com. - To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED]
autocompleter not working on Firefox 1.5 on Linux
I have a working autocompleter on Firefox 2.0 on MacOS. The same code does not work on Firefox 1.5 on Linux. Any suggestions? Thanks, Rohit
Re: autocompleter not working on Firefox 1.5 on Linux
Can you give more details on the problem? Any Javascript error? If you set debug=true on the head tag, does Dojo report any error? I use FF 2 on Linux and the showcase examples work for me. regards musachy On 4/11/07, Rohit Dewan [EMAIL PROTECTED] wrote: I have a working autocompleter on Firefox 2.0 on MacOS. The same code does not work on Firefox 1.5 on Linux. Any suggestions? Thanks, Rohit -- Hey you! Would you help me to carry the stone? Pink Floyd
Issue in compiling application in websphere
Hi I am getting the following jsp compilation error in websphere 5.1 org.apache.jasper.compiler.ParseException: /pages/purchasing/contract.jsp(128,61) Attribute system has no value at org.apache.jasper.compiler.JspReader.parseAttributeValue( JspReader.java:599) This jsp compiles fine in tomcat This is what i have in my jsp html:form action=pages/purchase/ContractApprovalAction focus=comment html:hidden value=%= sppu0016.getSTEREGFLG() % property=siteregflg / (This is line 128) html:hidden value=%=(String)request.getAttribute(system)% property=system / /html:form This is how i have defined in struts-config.xml file form-bean name=ContractApprovalForm type=org.apache.struts.validator.DynaValidatorForm dynamic=true form-property name=data type=com.pfizer.maps.file.purchase.SPPU0016 / form-property name=prcvar type=java.util.List / form-property name=comment type=java.lang.String / form-property name=comment1 type=java.lang.String / form-property name=system type=java.lang.String / form-property name=envName type=java.lang.String / form-property name=ttype type=java.lang.String / form-property name=reasoncode type=java.lang.String / form-property name=reasondesc type=java.lang.String / form-property name=reasonCodeValues type=java.util.List / form-property name=contractNotes type=java.util.List / form-property name=contractLineNotes type=java.util.List / form-property name=priceBreaks type=java.util.List / /form-bean Any idea what it might be Ashish
Re: Tiles 2 woes
I'm starting to realize this! I had a nice S1 Tiles application just die under S2 tiles. Should the taglib be: http://struts.apache.org/tags-tiles or http://tiles.apache.org/tags-tiles Also what supersedes the controllerClass tag? Scott
Tiles 2 Lifecycycle
I am discovering slightly different behavior between my application with Tiles and without. Consider the following snippet of configuration: action name=course_* method={1} class=course result name=input type=tilescourse.page/result result type=tilescourse.page/result /action Shouldn't returning SUCCESS from my action result in a new Action class instance and it's dependencies being injected? My web page is retaining the values as if the bean in the action class was not renewed. I don't recall seeing this behavior before adding struts. What steps are happening as the request is passed to the tiles definition? tiles-definitions definition name=standard template=/pages/base.jsp put name=title value=Standard Title for base.jsp / put name=header value=/pages/header.jsp / put name=navigation value=/pages/navigation.jsp / put name=body value=/pages/body.jsp / put name=footer value=/pages/footer.jsp / /definition definition name=course.page extends=standard put name=title value=Course / put name=body value=/pages/course.jsp / /definition /tiles-definitions -- Scott [EMAIL PROTECTED]
[S2] datetimepicker fields can't be referenced/updated by ID?
I'm using Struts 2.0.7 AjaxTags 1.2-beta3 and I've come to the painful realization that AjaxTags no longer is able to update Struts2 datetimepicker fields. The new S2 date fields use a div (example html below) instead of an html form input tag. The issue is that the handler: function(request, options) part of AjaxJspTag.UpdateField in ajaxtags.js (also below) can't change the value of the div object. I'm posting this to the AjaxTags forum, but thought I'd post here to see if struts 2.0.7 users had experience this issue (appears not to be specific to the AjaxTags javascript) and had a workaround. div dojoType=dropdowndatepicker id=selectedRangeEnd value=2007-03-31T23:59:59 name=dojo.selectedRangeEnd inputName=selectedRangeEnd displayFormat=MM/dd/ saveFormat=rfc/div AjaxTags expects form field not a div tag... handler: function(request, options) { for (var i=0; ioptions.targets.length ioptions.items.length; i++) { $(options.targets[i]).value = options.items[i][1]; } } Thanks, Jon - To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED]
Re: Tiles 2 Lifecycycle
--- [EMAIL PROTECTED] wrote: result type=tilescourse.page/result Shouldn't returning SUCCESS from my action result in a new Action class instance and it's dependencies being injected? No; it's not a redirect. It's just like you put a JSP value in for the result. d. 8:00? 8:25? 8:40? Find a flick in no time with the Yahoo! Search movie showtime shortcut. http://tools.search.yahoo.com/shortcuts/#news - To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED]
Re: Tiles 2 woes
This one works for me: http://tiles.apache.org/tags-tiles Torsten [EMAIL PROTECTED] schrieb: I'm starting to realize this! I had a nice S1 Tiles application just die under S2 tiles. Should the taglib be: http://struts.apache.org/tags-tiles or http://tiles.apache.org/tags-tiles Also what supersedes the controllerClass tag? Scott - To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED]
Re: S2: Simple way to pass data
Scott -- The most elegant solution would be to incorporate Tiles and use a controller (preparer) for this region of the web page. Tiles allows you to build comprehensive web pages from reusable parts. Scott On 4/11/07, Scott Nesbitt [EMAIL PROTECTED] wrote: In my app I have need menu items at the top of every page that are links do other pages. I also need a common date and dropdown selection on most pages. My challenge is how to componentize the date/dropdown selection so it can be re-used on each page, and then get the data passed to the action class. I would prefer not to have two ways to get data from the screen to my action class: 1) pass parameters from rewriting the href link 2) auto-populating the variables when a button in the form is clicked I do not know how to have a common way to do this, but hopefully I have overlooked something simple. Does anybody have suggestions or pointers? Thank you, Scott Need Mail bonding? Go to the Yahoo! Mail QA for great tips from Yahoo! Answers users. http://answers.yahoo.com/dir/?link=listsid=396546091 - To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED] -- Scott [EMAIL PROTECTED]
[S2] Iterator and Index
Hi, I want to generate indexed html elements via iterator. In Struts 1, I would do it as follows: logic:iterate name=namesForm property=names id=name html:text name=name property=firstname indexed=true size=30/ html:text name=name property=lastname indexed=true size=30/ /logic:iterate Then Struts 1 will generate the output like this: input type=text name=name[0].firstname size=30 value= input type=text name=name[0].lastname size=30 value= input type=text name=name[1].firstname size=30 value= input type=text name=name[1].lastname size=30 value= ... Now, how can I do the same with Struts 2? I tried s:iterator and s:textfield. But, they don't have have equivalent attributes. Is there anyone who has an idea how to do it? Thanks, Willa We won't tell. Get more on shows you hate to love (and love to hate): Yahoo! TV's Guilty Pleasures list. http://tv.yahoo.com/collections/265
Re: struts.action.extension question
Unfortunately I'm running Tomcat. I did come up with a pretty clean solution though, what I do is that I link to the CSS /JS/Image files via an absolute URL, so instead of public/css/design.css I use http://mydomain.com/public/css/design.css; - good enough for me at the moment. cilquirm wrote: I don't believe this can be cleanly handled with just the web 2.4 spec and struts2. Some container, like Resin, allow for url-patterns to be regexes, which would help in this scenario. meeboo wrote: The problem is that I have a lot of URL:s which look like /user/username, movie/movieTitle or account/create - and I don't want to forward or redirect for each URL since this will slow down my application. Is there a way to exclude .css extensions maybe? joey-30 wrote: keep struts.action.extension default.and create a filter to make sure it's before the struts filter.like this: filter-mapping filter-nameyourfilter/filter-name url-patternmovie/*/url-pattern /filter-mapping filter-mapping filter-namestruts2/filter-name url-pattern/*/url-pattern /filter-mapping u can foward or redirect to the url movie.action?movieTitle=* or something else in your filter. regards joey On 4/11/07, meeboo [EMAIL PROTECTED] wrote: No takers on this? meeboo wrote: Hey all I have a mapping pattern which looks like this action name=movie/* class=com.bubbleclip.web.struts.action.PlayMovie param name=movieTitle{1}/param result/movie.jsp/result /action The wildcard is for backwards compability since our original JSP/Servlet web-layer mapped movie titles like http:localhost:8080/movie/movieTitle This works fine if I set struts.action.extension to , this way I preserve compatibility since the movie title is the actual action name. The problem is that S2 will also interpret everything else as being actions - even CSS names making the pages not render correctly. Is there a way around this? -- View this message in context: http://www.nabble.com/struts.action.extension-question-tf3548145.html#a9934814 Sent from the Struts - User mailing list archive at Nabble.com. - To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED] -- View this message in context: http://www.nabble.com/struts.action.extension-question-tf3548145.html#a9946297 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] Adding Calendar function to a form.
it is possible, if you extend and modify whatever theme you're using. Then you can put that code wherever you want it to show up right inside the freemarker template that renders it. http://struts.apache.org/2.x/docs/extending-themes.html hth, -a Skip Hollowell wrote: Trying again, due to bad formatting on Nabble... I saw cilquirms reply, but I don't think I phrased my problems correctly. I understand that the tag libraries are very accomodating, but I am at a loss as to how to insert this code. This little calendar image and the associated href for clickability would need to go somewhere inside the generated code that the tag outputs. Is that even possible? I want to have the little calendar icon be next to the field input, so user's can use it instead of typing in a date by hand. Hopefully that is a bit more clear on my issues. Any ideas? --- I tried the s:datetimepicker to work on things, but since I am not using AJAX, I believe that is a dead end, no? There'd be no point in bringing in the ajax theme if I wasn't using AJAX. So how do I incorporate a standard js calendar routine into a field on my form? What I want to add is this calendar clickable icon that brings up a date picker: pre javascript:NewCal('demo1','ddmmm',true,24) images/cal.gif /pre Where I want to add it is next to my input box on my form for the datePaid field: s:textfield key=p.datePaid / I am just missing the concept here on how to plug custom code into the s: tags. I am trying very hard not to hack this thing to bits with tricks and cheats. Skip Hollowell - To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED] -- View this message in context: http://www.nabble.com/-S2--Adding-Calendar-function-to-a-form.-tf3555209.html#a9946512 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: struts.action.extension question
I believe I didn't follow the original issue, then. I thought that struts2 was swallowing the requests for the css files because they fit the pattern specified by the filter. I can't see how making them absolute urls would be any different for the filter, because when the request is made by the browser, it all looks the same to the filter. meeboo wrote: Unfortunately I'm running Tomcat. I did come up with a pretty clean solution though, what I do is that I link to the CSS /JS/Image files via an absolute URL, so instead of public/css/design.css I use http://mydomain.com/public/css/design.css; - good enough for me at the moment. cilquirm wrote: I don't believe this can be cleanly handled with just the web 2.4 spec and struts2. Some container, like Resin, allow for url-patterns to be regexes, which would help in this scenario. meeboo wrote: The problem is that I have a lot of URL:s which look like /user/username, movie/movieTitle or account/create - and I don't want to forward or redirect for each URL since this will slow down my application. Is there a way to exclude .css extensions maybe? joey-30 wrote: keep struts.action.extension default.and create a filter to make sure it's before the struts filter.like this: filter-mapping filter-nameyourfilter/filter-name url-patternmovie/*/url-pattern /filter-mapping filter-mapping filter-namestruts2/filter-name url-pattern/*/url-pattern /filter-mapping u can foward or redirect to the url movie.action?movieTitle=* or something else in your filter. regards joey On 4/11/07, meeboo [EMAIL PROTECTED] wrote: No takers on this? meeboo wrote: Hey all I have a mapping pattern which looks like this action name=movie/* class=com.bubbleclip.web.struts.action.PlayMovie param name=movieTitle{1}/param result/movie.jsp/result /action The wildcard is for backwards compability since our original JSP/Servlet web-layer mapped movie titles like http:localhost:8080/movie/movieTitle This works fine if I set struts.action.extension to , this way I preserve compatibility since the movie title is the actual action name. The problem is that S2 will also interpret everything else as being actions - even CSS names making the pages not render correctly. Is there a way around this? -- View this message in context: http://www.nabble.com/struts.action.extension-question-tf3548145.html#a9934814 Sent from the Struts - User mailing list archive at Nabble.com. - To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED] -- View this message in context: http://www.nabble.com/struts.action.extension-question-tf3548145.html#a9946608 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] How to pass a Javascript variable to Struts parameter?
Hi musachy, Thanks for pointing it out. I forgot what environment I am in now. My last project was .NET desktop application. Anyhow, what I am trying to do is to pick up a id from a table. Then, pass this id to an Ajax link as parameter. I used an onClick function to setup a javascript variable as id. Then, in the struts part, I have the following lines s:url action=parameterlist id=parlistUrl s:param name=orderid value=%{id} / /s:url div id=search_parameters div style=text-align: right; s:a theme=ajax notifyTopics=/refreshRefresh/s:a /div s:div id=searchParameters theme=ajax href=%{parlistUrl} loadingText=Loading... listenTopics=/refresh/ /div Obviously, this won't work as you already pointed out the tags run on the server side. Is there anyway I can get around it? Thanks, Willa - Original Message From: Musachy Barroso [EMAIL PROTECTED] To: Struts Users Mailing List user@struts.apache.org Sent: Tuesday, April 10, 2007 2:16:24 PM Subject: Re: How to pass a Javascript variable to Struts parameter? Tags are evaluated on the *server* side, javascript runs on the *client* side. Can you give more details on what you are trying to do? regards musachy On 4/10/07, Minerva CC [EMAIL PROTECTED] wrote: Hi, I tried to pass a Javascript variable to a struts url tag and I did it as follow: In the Javascript part: var id_ = 10; In the struts tag par: s:url action=myAction id=myUrl s:param name=id value=%{id_} / /s:url But, it didn' work. Would somebody tell me how to do it? Thanks in advance for you help. Willa TV dinner still cooling? Check out Tonight's Picks on Yahoo! TV. http://tv.yahoo.com/ -- Hey you! Would you help me to carry the stone? Pink Floyd Be a PS3 game guru. Get your game face on with the latest PS3 news and previews at Yahoo! Games. http://videogames.yahoo.com/platform?platform=120121
Re: [S2] How to pass a Javascript variable to Struts parameter?
Using the ajax tags you can submit a form on the request, using the formId attribute (http://struts.apache.org/2.0.6/docs/ajax-tags.html), like: form id=data //fields here // if you need to submit an id, use input type=hidden value=superId / /form s:a theme=ajax formId=data href=%{#url} Submit/s:a I'm assuming that the mentioned id parameter is something that will change on the client based on some user selection or something, otherwise you could build your url using the url tag, and just use it in the href attribute of the ajax tags. regards musachy On 4/11/07, Minerva CC [EMAIL PROTECTED] wrote: Hi musachy, Thanks for pointing it out. I forgot what environment I am in now. My last project was .NET desktop application. Anyhow, what I am trying to do is to pick up a id from a table. Then, pass this id to an Ajax link as parameter. I used an onClick function to setup a javascript variable as id. Then, in the struts part, I have the following lines s:url action=parameterlist id=parlistUrl s:param name=orderid value=%{id} / /s:url div id=search_parameters div style=text-align: right; s:a theme=ajax notifyTopics=/refreshRefresh/s:a /div s:div id=searchParameters theme=ajax href=%{parlistUrl} loadingText=Loading... listenTopics=/refresh/ /div Obviously, this won't work as you already pointed out the tags run on the server side. Is there anyway I can get around it? Thanks, Willa - Original Message From: Musachy Barroso [EMAIL PROTECTED] To: Struts Users Mailing List user@struts.apache.org Sent: Tuesday, April 10, 2007 2:16:24 PM Subject: Re: How to pass a Javascript variable to Struts parameter? Tags are evaluated on the *server* side, javascript runs on the *client* side. Can you give more details on what you are trying to do? regards musachy On 4/10/07, Minerva CC [EMAIL PROTECTED] wrote: Hi, I tried to pass a Javascript variable to a struts url tag and I did it as follow: In the Javascript part: var id_ = 10; In the struts tag par: s:url action=myAction id=myUrl s:param name=id value=%{id_} / /s:url But, it didn' work. Would somebody tell me how to do it? Thanks in advance for you help. Willa TV dinner still cooling? Check out Tonight's Picks on Yahoo! TV. http://tv.yahoo.com/ -- Hey you! Would you help me to carry the stone? Pink Floyd Be a PS3 game guru. Get your game face on with the latest PS3 news and previews at Yahoo! Games. http://videogames.yahoo.com/platform?platform=120121 -- Hey you! Would you help me to carry the stone? Pink Floyd
Re: Tiles 2 woes
Thanks Torsten -- This is what I finally got to work after snooping around in the jars. Too bad the online documentation shows the wrong URI! That was my problem. Scott On 4/11/07, Torsten Römer [EMAIL PROTECTED] wrote: This one works for me: http://tiles.apache.org/tags-tiles Torsten [EMAIL PROTECTED] schrieb: I'm starting to realize this! I had a nice S1 Tiles application just die under S2 tiles. Should the taglib be: http://struts.apache.org/tags-tiles or http://tiles.apache.org/tags-tiles Also what supersedes the controllerClass tag? Scott - To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED] -- Scott [EMAIL PROTECTED]
Re: Tiles 2 Lifecycycle
So is there a way to redirect to a tile definition? On 4/11/07, Dave Newton [EMAIL PROTECTED] wrote: --- [EMAIL PROTECTED] wrote: result type=tilescourse.page/result Shouldn't returning SUCCESS from my action result in a new Action class instance and it's dependencies being injected? No; it's not a redirect. It's just like you put a JSP value in for the result. d. 8:00? 8:25? 8:40? Find a flick in no time with the Yahoo! Search movie showtime shortcut. http://tools.search.yahoo.com/shortcuts/#news - To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED] -- Scott [EMAIL PROTECTED]
Can labelValueBean be used in S2 select
I am converting a Struts1 page to Struts2. Can I reuse the labelValueBeans used in the optionsCollection tag in the S2 select tag or must I convert my list to a map? I tried using the labelValueBean in S2 but got the error: The requested list key 'countryInfoList' could not be resolved as a collection/array/map/enumeration/iterator type. Thanks, Any help will be appreciated The information contained in this communication may be CONFIDENTIAL and is intended only for the use of the recipient(s) named above. If you are not the intended recipient, you are hereby notified that any dissemination, distribution, or copying of this communication, or any of its contents, is strictly prohibited. If you have received this communication in error, please notify the sender and delete/destroy the original message and any copy of it from your computer or paper files.
Eclipse WTP / Struts 2 - Not working!!
Hi all This problem has been driving me crazy and I know that it should be a simple problem. I have already posted this in this mailing list, but a simply configuration issue is stopping my development work!! Please help. There is a reason why I post this in the struts mailing list because a non-struts web application works fine with Eclipse WTP. I have written the simplest struts-enabled HelloWorld application. It works fine if I deploy it directly to the Tomcat server. But I get a 404 error while configuring it with Eclipse WTP. Below is my configuration: Java - 1.4.2_13 Tomcat 5.5.23 with Java 1.4 compatible jars Struts 2.0.6 with Java 1.4 compatible jars Eclipse WTP 3.2.2 I created a new dynamic web project with Tomcat 5.5 as runtime, test as context root and WebContent as Content Directory. I copied the struts jars to the WebContent/WEB-INF/lib folder. The jsp files are placed in WebContent/WEB-INF/jsp folder. The following is my folder structure: + WebContent - + WEB-INF - + classes - struts.xml - + jsp - + lib - + src - web.xml Following are my codes: web.xml ?xml version=1.0 encoding=UTF-8? web-app id=WebApp_9 version=2.4 xmlns=http://java.sun.com/xml/ns/j2ee; xmlns:xsi=http://www.w3.org/2001/XMLSchema-instance; xsi:schemaLocation=http://java.sun.com/xml/ns/j2ee http://java.sun.com/xml/ns/j2ee/web-app_2_4.xsd; display-nametest/display-name filter filter-namestruts2/filter-name filter-classorg.apache.struts2.dispatcher.FilterDispatcher/ filter-class /filter filter-mapping filter-namestruts2/filter-name url-pattern/*/url-pattern /filter-mapping /web-app struts.xml !DOCTYPE struts PUBLIC -//Apache Software Foundation//DTD Struts Configuration 2.0//EN http://struts.apache.org/dtds/struts-2.0.dtd; struts !-- Configuration for the default package. -- package name=default extends=struts-default action name=HelloWorld class=gov.epa.r5sis.HelloWorld result/WEB-INF/jsp/HelloWorld.jsp/result /action /package /struts HelloWorld.java package gov.epa.r5sis; import com.opensymphony.xwork2.ActionSupport; public class HelloWorld extends ActionSupport { private static final long serialVersionUID = 1L; public static final String MESSAGE = Hello World! Struts is up and running ...; public String execute() throws Exception { setMessage(MESSAGE); return SUCCESS; } private String message; public void setMessage(String message){ this.message = message; } public String getMessage() { return message; } } HelloWorld.jsp %@ page contentType=text/html; charset=iso-8859-1 language=java import=java.sql.* errorPage= % %@ taglib prefix=s uri=/struts-tags % !DOCTYPE html PUBLIC -//W3C//DTD XHTML 1.0 Transitional//EN http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd; html xmlns=http://www.w3.org/1999/xhtml; head meta http-equiv=Content-Type content=text/html; charset=iso-8859-1 / titleHello World!/title /head body h2s:property value=message //h2 /body /html When I run the application by using run on server option, the tomcat server starts without a problem and opens the url http://localhost :8080/test/ in the browser. http://localhost :8080/test/HelloWorld.action gives a 404 error. But the same application deployed directly in Tomcat, works fine!! Please help. Thanks Vignesh Manickam Periaswamy Web Application Developer Intern, Information Management Section WPTD, EPA Region 5 312-886-0887 email: [EMAIL PROTECTED]
Re: Eclipse WTP / Struts 2 - Not working!!
Did you publish your project before starting tomcat through eclipse? [EMAIL PROTECTED] wrote: Hi all This problem has been driving me crazy and I know that it should be a simple problem. I have already posted this in this mailing list, but a simply configuration issue is stopping my development work!! Please help. There is a reason why I post this in the struts mailing list because a non-struts web application works fine with Eclipse WTP. I have written the simplest struts-enabled HelloWorld application. It works fine if I deploy it directly to the Tomcat server. But I get a 404 error while configuring it with Eclipse WTP. Below is my configuration: Java - 1.4.2_13 Tomcat 5.5.23 with Java 1.4 compatible jars Struts 2.0.6 with Java 1.4 compatible jars Eclipse WTP 3.2.2 I created a new dynamic web project with Tomcat 5.5 as runtime, test as context root and WebContent as Content Directory. I copied the struts jars to the WebContent/WEB-INF/lib folder. The jsp files are placed in WebContent/WEB-INF/jsp folder. The following is my folder structure: + WebContent - + WEB-INF - + classes - struts.xml - + jsp - + lib - + src - web.xml Following are my codes: web.xml ?xml version=1.0 encoding=UTF-8? web-app id=WebApp_9 version=2.4 xmlns=http://java.sun.com/xml/ns/j2ee; xmlns:xsi=http://www.w3.org/2001/XMLSchema-instance; xsi:schemaLocation=http://java.sun.com/xml/ns/j2ee http://java.sun.com/xml/ns/j2ee/web-app_2_4.xsd; display-nametest/display-name filter filter-namestruts2/filter-name filter-classorg.apache.struts2.dispatcher.FilterDispatcher/ filter-class /filter filter-mapping filter-namestruts2/filter-name url-pattern/*/url-pattern /filter-mapping /web-app struts.xml !DOCTYPE struts PUBLIC -//Apache Software Foundation//DTD Struts Configuration 2.0//EN http://struts.apache.org/dtds/struts-2.0.dtd; struts !-- Configuration for the default package. -- package name=default extends=struts-default action name=HelloWorld class=gov.epa.r5sis.HelloWorld result/WEB-INF/jsp/HelloWorld.jsp/result /action /package /struts HelloWorld.java package gov.epa.r5sis; import com.opensymphony.xwork2.ActionSupport; public class HelloWorld extends ActionSupport { private static final long serialVersionUID = 1L; public static final String MESSAGE = Hello World! Struts is up and running ...; public String execute() throws Exception { setMessage(MESSAGE); return SUCCESS; } private String message; public void setMessage(String message){ this.message = message; } public String getMessage() { return message; } } HelloWorld.jsp %@ page contentType=text/html; charset=iso-8859-1 language=java import=java.sql.* errorPage= % %@ taglib prefix=s uri=/struts-tags % !DOCTYPE html PUBLIC -//W3C//DTD XHTML 1.0 Transitional//EN http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd; html xmlns=http://www.w3.org/1999/xhtml; head meta http-equiv=Content-Type content=text/html; charset=iso-8859-1 / titleHello World!/title /head body h2s:property value=message //h2 /body /html When I run the application by using run on server option, the tomcat server starts without a problem and opens the url http://localhost :8080/test/ in the browser. http://localhost :8080/test/HelloWorld.action gives a 404 error. But the same application deployed directly in Tomcat, works fine!! Please help. Thanks Vignesh Manickam Periaswamy Web Application Developer Intern, Information Management Section WPTD, EPA Region 5 312-886-0887 email: [EMAIL PROTECTED]
Re: Eclipse WTP / Struts 2 - Not working!!
Sorry, I do not understand what you mean by publishing project. Vignesh Manickam Periaswamy Web Application Developer Intern, Information Management Section WPTD, EPA Region 5 312-886-0887 email: [EMAIL PROTECTED] Adam Ruggles [EMAIL PROTECTED] 04/11/2007 04:35 PM Please respond to Struts Users Mailing List user@struts.apache.org To Struts Users Mailing List user@struts.apache.org cc Subject Re: Eclipse WTP / Struts 2 - Not working!! Did you publish your project before starting tomcat through eclipse? [EMAIL PROTECTED] wrote: Hi all This problem has been driving me crazy and I know that it should be a simple problem. I have already posted this in this mailing list, but a simply configuration issue is stopping my development work!! Please help. There is a reason why I post this in the struts mailing list because a non-struts web application works fine with Eclipse WTP. I have written the simplest struts-enabled HelloWorld application. It works fine if I deploy it directly to the Tomcat server. But I get a 404 error while configuring it with Eclipse WTP. Below is my configuration: Java - 1.4.2_13 Tomcat 5.5.23 with Java 1.4 compatible jars Struts 2.0.6 with Java 1.4 compatible jars Eclipse WTP 3.2.2 I created a new dynamic web project with Tomcat 5.5 as runtime, test as context root and WebContent as Content Directory. I copied the struts jars to the WebContent/WEB-INF/lib folder. The jsp files are placed in WebContent/WEB-INF/jsp folder. The following is my folder structure: + WebContent - + WEB-INF - + classes - struts.xml - + jsp - + lib - + src - web.xml Following are my codes: web.xml ?xml version=1.0 encoding=UTF-8? web-app id=WebApp_9 version=2.4 xmlns=http://java.sun.com/xml/ns/j2ee; xmlns:xsi=http://www.w3.org/2001/XMLSchema-instance; xsi:schemaLocation=http://java.sun.com/xml/ns/j2ee http://java.sun.com/xml/ns/j2ee/web-app_2_4.xsd; display-nametest/display-name filter filter-namestruts2/filter-name filter-classorg.apache.struts2.dispatcher.FilterDispatcher/ filter-class /filter filter-mapping filter-namestruts2/filter-name url-pattern/*/url-pattern /filter-mapping /web-app struts.xml !DOCTYPE struts PUBLIC -//Apache Software Foundation//DTD Struts Configuration 2.0//EN http://struts.apache.org/dtds/struts-2.0.dtd; struts !-- Configuration for the default package. -- package name=default extends=struts-default action name=HelloWorld class=gov.epa.r5sis.HelloWorld result/WEB-INF/jsp/HelloWorld.jsp/result /action /package /struts HelloWorld.java package gov.epa.r5sis; import com.opensymphony.xwork2.ActionSupport; public class HelloWorld extends ActionSupport { private static final long serialVersionUID = 1L; public static final String MESSAGE = Hello World! Struts is up and running ...; public String execute() throws Exception { setMessage(MESSAGE); return SUCCESS; } private String message; public void setMessage(String message){ this.message = message; } public String getMessage() { return message; } } HelloWorld.jsp %@ page contentType=text/html; charset=iso-8859-1 language=java import=java.sql.* errorPage= % %@ taglib prefix=s uri=/struts-tags % !DOCTYPE html PUBLIC -//W3C//DTD XHTML 1.0 Transitional//EN http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd; html xmlns=http://www.w3.org/1999/xhtml; head meta http-equiv=Content-Type content=text/html; charset=iso-8859-1 / titleHello World!/title /head body h2s:property value=message //h2 /body /html When I run the application by using run on server option, the tomcat server starts without a problem and opens the url http://localhost :8080/test/ in the browser. http://localhost :8080/test/HelloWorld.action gives a 404 error. But the same application deployed directly in Tomcat, works fine!! Please help. Thanks Vignesh Manickam Periaswamy Web Application Developer Intern, Information Management Section WPTD, EPA Region 5 312-886-0887 email: [EMAIL PROTECTED]
[OT] Re: Eclipse WTP / Struts 2 - Not working!!
--- [EMAIL PROTECTED] wrote: Sorry, I do not understand what you mean by publishing project. Did you add a project deployment for the Struts app and deploy it? In other words, did you configur things such that Eclipse/WTP knows things about your app, where you're deploying it to etc.? d. Bored stiff? Loosen up... Download and play hundreds of games for free on Yahoo! Games. http://games.yahoo.com/games/front - To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED]
Re: THEMES AND TEMPLATES
Juan Espinosa wrote: Hi is there any theme repository ??? I want to change my theme, like putting the field errors in red, in the right of the component (field) who cause the error... I'm not sure what you mean by a theme repository, but documentation on customizing Struts 2 themes and templates is here: http://struts.apache.org/2.x/docs/themes-and-templates.html For simple tweaks like changing colours, you can use plain ol' CSS. For more extensive changes, you'll want a customized theme. L. - To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED]
Re: S2 Action Validation
I think labelPosition will only affect the field label, not the error message placement. You'll probably have to go with customizing the theme for that. L. [EMAIL PROTECTED] wrote: I can't get labelposition or requiredposition to do anything! top/bottom/right/left/*random* -- I tried them all. On 4/10/07, Dave Newton [EMAIL PROTECTED] wrote: --- [EMAIL PROTECTED] wrote: addFieldError(course.text... I really do not like placing a jsp field name name in Java source code, but I could not find another way to correlate the message to the field. No, I think that's how it works. Technically you already have the field name in the java code since you're using a Java object. I'm not really sure what the alternatices would be. is there an easy way to get the messages to appear to the right of the field as opposed to the top? There's a labelposition parameter but I don't recall what the options are; I think if you want any major changes you'd have to modify the theme. A general comment (not directed specifically at you): my view is that the default themes and templates are intended to serve as a launching point: they cover simple use cases, but if your pages have a specific layout then extension, modification, and/or creation of existing or new templates is almost certain to be required. And lastly, can I specify the color I would like the messages to be. CSS-ily, errorMessage class. d. Get your own web address. Have a HUGE year through Yahoo! Small Business. http://smallbusiness.yahoo.com/domains/?p=BESTDEAL - 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 Action Validation
--- Laurie Harper [EMAIL PROTECTED] wrote: I think labelPosition will only affect the field label, not the error message placement. D'oh, yeah, that's right; my bad. d. Bored stiff? Loosen up... Download and play hundreds of games for free on Yahoo! Games. http://games.yahoo.com/games/front - To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED]
RE: struts.action.extension question
Are you fronting with Apache? What we normally do if we are fronting with apache is serve all the static content from there (of course) so it never gets to the app server to cause this kind of confusion there. A simple JkUnmount /movie/*.css workerName will do it for Apache-Tomcat (or Apache-jboss for that matter) Al Unfortunately I'm running Tomcat. I did come up with a pretty clean solution though, what I do is that I link to the CSS /JS/Image files via an absolute URL, so instead of public/css/design.css I use http://mydomain.com/public/css/design.css; - good enough for me at the moment. - To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED]
RE: struts.action.extension question
Hmm Yes... What is the problem then? I don't think I understand it now either. Al I believe I didn't follow the original issue, then. I thought that struts2 was swallowing the requests for the css files because they fit the pattern specified by the filter. I can't see how making them absolute urls would be any different for the filter, because when the request is made by the browser, it all looks the same to the filter. - To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED]
How to desing?
Hello Every one: I have been working on a small application for few days. Just to learn by doing, how Struts 2 works, and how to design applications for struts 2. My little app is a small billing system to store invoices for accounts. Each Service (object) belongs to an Invoice which belongs to an Account. The application retrieves this info from the DB for display or update. Now my question is, how do I design this app? do I create many actions and many views ? what about the business logic ? If I create a class called Accout that populate the account info from the DB and encapsulated all the functionality in it, then I can not pass it to the view, since it has the DB connection. So, I created another class called AccountBean which holds only the data that I need to view. What If I want to update the account? The first idea that came to my head is to pass back the AccountBean to Account, where it will be populated again with the values and a new DB connection will be created ... but it doesn't really sound very cool. Someone have pointed to me in a previous post to use ModelDriven ! This will just make the learning curve steeper. On the other hand, I couldn't find any documentation for this approach. Is there a tutorial about how to design app that will work with struts? I assumed (since its purpose is to separate the business Logic form the Presentation) that I design the app as if it was for any thing else ( desktop app) so I have the three mentioned classes (Account , Invoice, Service) plus some support classes (DataBaseAdapter ) that is not related to struts classes either. And I don't know if that's right. thanks in Advance. - To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED]
Re: R: Array of Bean and optionsCollection (up)
Marcello Savino wrote: At first sight, u miss the name of the collection in html:optionsCollection property=aBean value=code label=descr/ Do you mean i have to specify the attribute name=aBeaninstead of property=aBean ? You only need to specify the 'name' attribute if you want to specify a bean other than the form bean. Assuming the data you want to reference is in the form bean, as in your case, you only need to specify the 'property' attribute. second u forgot the dot in myBeanCode , it's myBean.code , Struts will do myBean.getCode(). myBeanCode is only a name for the current bean in the select tag The 'property' attribute on the select tag should name a property in your form bean. That tells Struts where to store/retrieve the associated value (current selection). third : your form property aBean is an array u use a select ( which a single property) Do you mean i have to specify the attribute name=aBeaninstead of property=aBean ? You need *two* properties on your form bean: one to hold the list of options, which you have (the 'aBean' property); and one to hold the value that's actually selected. The html:select tag's 'property' attribute should reference the second one: public class MyForm extends ActionForm { private myBean[] arrayOfMyBean; private String selectedValue; public myBean[] getABean() {return arrayOfMyBean;} public String getSelectedValue() {return selectedValue;} public String setSelectedValue(String val) { selectedValue = val;} } html:select property=selectedValue html:optionsCollection property=aBean value=code label=descr/ /html:select L. Thanks for your attention 2007/4/11, Marcello Savino [EMAIL PROTECTED]: Please excuse me but i try again ... (hope will never die) Hi all, i've the following problem using the tag html:optionsCollection, the jsp give the following error: org.apache.jasper.JasperException: No bean specified Let's say this is my code (actionForm, jsp, bean class) public class MyForm extends ActionForm { private myBean[] arrayOfMyBean; public void reset(ActionMapping mapping, HttpServletRequest request){ arrayOfMyBean=someClass.getMyBeanArray(); request.setAttribute(aBean, arrayOfMyBean); super.reset( mapping, request); } public myBean[] getABean(return arrayOfMyBean); // i forgot this on my previous post, not on my code! } __ The jsp: %@ taglib uri=/WEB-INF/struts-html.tld prefix=html % html:xhtml / html:html locale=true body html:form action=/MyAction html:select property=myBeanCode html:optionsCollection property=aBean value=code label=descr/ /html:select /html:form /body /html:html myBean Class: public class myBean implements java.io.Serializable{ private Integer code; private String descr; public Integer getCode(){return code;} public String getDescr(){return descr;} public void setCode(Integer val){ code=val;} public void setDescr(String val){ descr=val;} } _ Could anyone help me? Any help will be greatly appreciated. Thanks in advance Marcello - To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED] - To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED] - To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED] - To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED]
Re: [OT] [JAVA] Iterate a collection and modify
First, this list is for Struts issues, not a general Java programming help. That said, here's a quick response: Modifying an Iterator while iterating it is not guaranteed to work. It depends on the specific Iterator implementation. This is clearly documented in the Javadoc for the Collections APIs, so read those to find out if what you are doing is safe. The general solution would be to take a copy of the iterator, iterate the copy and modify the original (or vica versa). L. temp temp wrote: How can I iterate a collection and modify at the same time ? Example public static Collection getAncestors( Entity aEntity, Object aContext ){ Collection vAncestors=new ArrayList(); IDocument vDocument= findDocumentByName( aEntity.getSuper(), aContext); vAncestors.add(vDocument); for( Iterator i=vAncestors.iterator(); i.hasNext(); ){ getAncestors(vAncestors, (IDocument)i.next(), aContext); } return vAncestors; } public static void getAncestors( Collection aAncestors, IDocument aDocument , Object aContext){ Entity vEntity=(Entity)aDocument.get(); if(vEntity.getSuper()!=null){ IDocument vDocument=findDocumentByName( vEntity.getSuper(), aContext); aAncestors.add(vDocument); } } Thanks Miro - Sucker-punch spam with award-winning protection. Try the free Yahoo! Mail Beta. - To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED]
Re: S2 s:text Currency Format
Dave's point was that what you're using didn't match the example, which he also provided. See my response to your other post for more explanation. L. Harring Figueiredo wrote: Dave: Thank you for the email. That was exactly what I wrote. s:text name=currency s:param name=amount value=amount/ /s:text It the value does no appear at all. If there any way we can have output for TLD to see what goes on? Thank you again for the response. Harring On 4/10/07, Dave Newton [EMAIL PROTECTED] wrote: --- Harring Figueiredo [EMAIL PROTECTED] wrote: How can I format a number with the currency format? I have taken a look at http://struts.apache.org/2.x/docs/text.html and still cannot figure out the correct syntax. Is s:text name=format.money s:param name=value value=myMoneyValue/ /s:text where format.money={0,number,currency} Not the correct syntax? I ask because it doesn't seem like it's what you're using: I tried this and it does not work. s:text s:param name=amount value=amount/ /s:text d. Don't pick lemons. See all the new 2007 cars at Yahoo! Autos. http://autos.yahoo.com/new_cars.html - 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: I am getting an error : java.lang.NoSuchMethodError: org.apache.commons.fileupload.FileUpload.setSizeMax(I)V
What version of Struts are you using? What version of Commons FileUpload? Did you try using the version of FileUpload that ships with your version of Struts? Upgrading libraries to the latest version is never guaranteed to work, since they may not be binary-compatible with the version Struts was compiled against. L. dshivhare wrote: Hello All, I want to use struts dynamic form feature. There is form which has an upload file field. I am having the following settings in struts config file form-bean name=uploadItemForm type=org.apache.struts.validator.DynaValidatorForm form-property name=newItem type=org.apache.struts.upload.FormFile / /form-bean action path=/uploadItem type=net.anet.projects.UserMgmt.controller.UploadItemAction name=uploadItemForm forward name=forwardPage path=/projects/UserMgmt/web/CPanelListBucketItem.jsp contextRelative=true / forward name=invalidSession path=/LoginUser.anet?showInvalid=true contextRelative=true/ /action the jsp file contains the following form settings html:form action=uploadItem.anet enctype=multipart/form-data Select file: html:file property=newItem/ html:submit value=Drop into bucket/ /html:form code in UploadItemAction is: public class UploadItemAction extends Action{ public ActionForward execute(ActionMapping mapping, ActionForm form, HttpServletRequest request, HttpServletResponse response) throws Exception{ System.out.println(Upload Item); HttpSession session = request.getSession(); String validSession =(String)session.getAttribute(validLoginSession); AtUsers currentUser=GlobalEnv.getCurrentSessionUser(session); boolean isSuperAdmin = UserMgmtAPI.isApptilityAdmin(currentUser.getRoles()); if(validSession==null||validSession.equals(false)){ return (mapping.findForward(invalidSession)); } if(!isSuperAdmin){ return (mapping.findForward(accessVoilation)); } DynaValidatorForm uploadItemForm=(DynaValidatorForm)form; FormFile newItem=(FormFile)uploadItemForm.get(newItem); System.out.println(newItem.getFileName().toString()); AWSAuthConnection s3Conn= (AWSAuthConnection) request.getSession().getAttribute(S3_CONN); S3Object s3Object = new S3Object(); return mapping.findForward(forwardPage); } } upon clicking the submit button in jsp I am getting the following error: java.lang.NoSuchMethodError: org.apache.commons.fileupload.FileUpload.setSizeMax(I)V I have searched various mailing list and as suggeste by most of them, downloaded the latest version of org.apache.commons.fileupload.jar also tried deleting the previous version of org.apache.commons.fileupload.jar from tomcat and classpath, but the error is still there. Am I missing something? - To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED]
Re: [S2] s:text help on formatting output
Harring Figueiredo wrote: Folks: It is clear that I MUST be doing something wrong, but I have tried all the options with the s:text to format a number. Here is what I have tried: lis:text name=currencys:param name=money value=%{#session.Account.balance}//s:text/li lis:text name=format.moneys:param name=money value=%{#session.Account.balance}//s:text/li lis:text name=currencys:param name=money value=122. //s:text/li lis:text name=format.moneys:param name=money value=122. //s:text/li lis:text name=currencys:param value=122.//s:text/li lis:text name=currencys:param value='122.'//s:text/li lis:text name=currencys:param name=money .1 /s:param /s:text/li lis:text name=currencys:param .1 /s:param /s:text/li lis:property value=%{#session.Account.balance}//li And Here is the Corresponding output on the page: currency format.money currency format.money currency currency currency currency 1003.9 What in the world ami I missing? ( I am wither misreading the example, or it is clearly not correct. I hope it is the former) I followed the example on this page: http://struts.apache.org/2.x/docs/text.html Other example s:text name=format.moneys:param name=value value=myMoneyValue//s:text where format.money={0,number,currency} Thank you in advance for any input. hf None of your attempts actually follows the example, though; you're using s:param name=money ... instead of s:param name=value ... Try this: s:text name=format.money s:param name=value value=%{#session.Account.balance}/ /s:text From your sample output it looks like you haven't set up the format.money or currency resource strings, either, which you will need to do. L. - To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED]
Re: [S2] Iterator and Index
Minerva CC wrote: Hi, I want to generate indexed html elements via iterator. In Struts 1, I would do it as follows: logic:iterate name=namesForm property=names id=name html:text name=name property=firstname indexed=true size=30/ html:text name=name property=lastname indexed=true size=30/ /logic:iterate Then Struts 1 will generate the output like this: input type=text name=name[0].firstname size=30 value= input type=text name=name[0].lastname size=30 value= input type=text name=name[1].firstname size=30 value= input type=text name=name[1].lastname size=30 value= Now, how can I do the same with Struts 2? I tried s:iterator and s:textfield. But, they don't have have equivalent attributes. Is there anyone who has an idea how to do it? What did you try? s:iterator and s:textfield seem like the right pair of tags to use. I think Struts 2 will take care of the property indexing for you automatically (could be wrong on that though). L. - To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED]
Re: How to use datetimepicker localization
Ibrahim Sayed wrote: Hi, I use struts 2 blank war to use the struts tags tag library , and I use it but the calendar of datetimepicker shown in English language , I want to use another local ar , I try to extract the struts2-core-2.0.6.jar file and see the dojo files org\apache\struts2\static\dojo\src\i18n\calendar\nls\en\gregorian.js and change the values of the months and days even for the en and repackage it as a jar and check , no changes I found , Thanks to help me in add my local, Unfortunately I don't think Dojo supports localization. However, if you modified the Javascript source directly, your changes should show up. Perhaps you didn't re-package the JAR file correctly, or didn't replace the original jar with your repackaged one? L. - To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED]
Re: Struts Submission
Chetan Pandey wrote: Hi All: I have a list of Checkboxes with UserIDs. User checks a few number of Check-boxes and then clicks 'SUBMIT'. All Checked Items received are then added to a DB - which happens in a fraction of a Second. However, all of the UserIds are also sent an Email which takes a very long Time. Therefore, the User is forced to wait. Is their a WAY I can only do the DBInsertion on click of Submit Button and do email Sending in the back-ground whilst the User stares at a JSP saying: All Users selected have been registered. Currently Email Transmission is being processed. Pls WAIT and donot click the BACK BUTTON. I don't see how using regular Struts 1.2 I can fwd to a page but do work in the Background. Any Ideas or Improvements to this Idea. First, I would suggest that you make the sending of emails an asynchronous process, and don't ask the user to wait for it to complete. Just put the emails in a delivery queue and use a separate daemon thread to monitor the queue and deliver the email in the background. If you really need to make the user wait until the emails have been sent, you can do that. You'll still need to launch a separate thread to do the work so the main thread can return a 'please wait...' response straight away. There's relevant documentation on the wiki here: http://wiki.apache.org/struts/StrutsPleaseWait L. - To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED]
Re: How to desing?
Mansour wrote: Hello Every one: I have been working on a small application for few days. Just to learn by doing, how Struts 2 works, and how to design applications for struts 2. My little app is a small billing system to store invoices for accounts. Each Service (object) belongs to an Invoice which belongs to an Account. The application retrieves this info from the DB for display or update. Now my question is, how do I design this app? do I create many actions and many views ? what about the business logic ? If I create a class called Accout that populate the account info from the DB and encapsulated all the functionality in it, then I can not pass it to the view, since it has the DB connection. So, I created another class called AccountBean which holds only the data that I need to view. What If I want to update the account? The first idea that came to my head is to pass back the AccountBean to Account, where it will be populated again with the values and a new DB connection will be created ... but it doesn't really sound very cool. Someone have pointed to me in a previous post to use ModelDriven ! This will just make the learning curve steeper. On the other hand, I couldn't find any documentation for this approach. Is there a tutorial about how to design app that will work with struts? I assumed (since its purpose is to separate the business Logic form the Presentation) that I design the app as if it was for any thing else ( desktop app) so I have the three mentioned classes (Account , Invoice, Service) plus some support classes (DataBaseAdapter ) that is not related to struts classes either. And I don't know if that's right. thanks in Advance. OK I haven' get any response which means I don't have enough details. I have 3 classes Account.java, Invoice and Service. I need to be able to retrieve account and add Invoice or Service and update them as well. I dont want to send the whole Account object to the webpage. So I put it in AccountBean, and set it through the GetAccountAction. Now, If I need to add an Invoice to this object, I need the Account object back. So do I pass the whole AccountBean back to the original Account object to perform this functionality ? - 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] Iterator and Index
Since there are no indexed and property attributes for the s:textfield tag. So, I tried this: s:iterator value=names id=name s:textfield id=name name=firstname label=First Name s:textfield id=name name=lastname label=Last Name/ /s:iterator Then, Struts 2 generated this: tr td class=tdLabellabel for=name class=labelFirst Name:/label/td td input type=text name=firstname value=Campbell id=name/ /td /tr tr td class=tdLabellabel for=name class=labelLast Name:/label/td td input type=text name=lastname value= id=name/ /td /tr Thanks, Willa - Original Message From: Laurie Harper [EMAIL PROTECTED] To: user@struts.apache.org Sent: Wednesday, April 11, 2007 3:35:15 PM Subject: Re: [S2] Iterator and Index Minerva CC wrote: Hi, I want to generate indexed html elements via iterator. In Struts 1, I would do it as follows: logic:iterate name=namesForm property=names id=name html:text name=name property=firstname indexed=true size=30/ html:text name=name property=lastname indexed=true size=30/ /logic:iterate Then Struts 1 will generate the output like this: input type=text name=name[0].firstname size=30 value= input type=text name=name[0].lastname size=30 value= input type=text name=name[1].firstname size=30 value= input type=text name=name[1].lastname size=30 value= Now, how can I do the same with Struts 2? I tried s:iterator and s:textfield. But, they don't have have equivalent attributes. Is there anyone who has an idea how to do it? What did you try? s:iterator and s:textfield seem like the right pair of tags to use. I think Struts 2 will take care of the property indexing for you automatically (could be wrong on that though). L. - To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED] Never miss an email again! Yahoo! Toolbar alerts you the instant new Mail arrives. http://tools.search.yahoo.com/toolbar/features/mail/
Re: [S2] s:text help on formatting output
Hi Laurie, Thanks for the response. I tried what you suggested, and actually did not get a value back (empty). Where should I set the resource string? (I thought it was _smart_ enough to get from the Locale. Thank you. On 4/11/07, Laurie Harper [EMAIL PROTECTED] wrote: Harring Figueiredo wrote: Folks: It is clear that I MUST be doing something wrong, but I have tried all the options with the s:text to format a number. Here is what I have tried: lis:text name=currencys:param name=money value=%{#session.Account.balance}//s:text/li lis:text name=format.moneys:param name=money value=%{#session.Account.balance}//s:text/li lis:text name=currencys:param name=money value=122. //s:text/li lis:text name=format.moneys:param name=money value=122. //s:text/li lis:text name=currencys:param value=122.//s:text/li lis:text name=currencys:param value='122.'//s:text/li lis:text name=currencys:param name=money .1 /s:param /s:text/li lis:text name=currencys:param .1 /s:param /s:text/li lis:property value=%{#session.Account.balance}//li And Here is the Corresponding output on the page: currency format.money currency format.money currency currency currency currency 1003.9 What in the world ami I missing? ( I am wither misreading the example, or it is clearly not correct. I hope it is the former) I followed the example on this page: http://struts.apache.org/2.x/docs/text.html Other example s:text name=format.moneys:param name=value value=myMoneyValue//s:text where format.money={0,number,currency} Thank you in advance for any input. hf None of your attempts actually follows the example, though; you're using s:param name=money ... instead of s:param name=value ... Try this: s:text name=format.money s:param name=value value=%{#session.Account.balance}/ /s:text From your sample output it looks like you haven't set up the format.money or currency resource strings, either, which you will need to do. L. - To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED] -- 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] s:text help on formatting output
Another thing is that your example, according to the example provided on the web site, is not correct either. s:text name=format.money s:param name=value value=%{#session.Account.balance}/ /s:text format.money should actually be one of the values { 0, number, currency }, at least that is what it says on the documentation page. I wish someone from the Struts team would give a better example on this. Thank you to all that have replied and will still reply. Solution NOT yet found. Harring On 4/11/07, Harring Figueiredo [EMAIL PROTECTED] wrote: Hi Laurie, Thanks for the response. I tried what you suggested, and actually did not get a value back (empty). Where should I set the resource string? (I thought it was _smart_ enough to get from the Locale. Thank you. On 4/11/07, Laurie Harper [EMAIL PROTECTED] wrote: Harring Figueiredo wrote: Folks: It is clear that I MUST be doing something wrong, but I have tried all the options with the s:text to format a number. Here is what I have tried: lis:text name=currencys:param name=money value=%{#session.Account.balance}//s:text/li lis:text name=format.money s:param name=money value=%{#session.Account.balance}//s:text/li lis:text name=currencys:param name=money value= 122. //s:text/li lis:text name=format.moneys:param name=money value=122. //s:text/li lis:text name=currencys:param value=122.//s:text/li lis:text name=currencys:param value='122.'//s:text/li lis:text name=currencys:param name=money .1 /s:param /s:text/li lis:text name=currencys:param .1 /s:param /s:text/li lis:property value=%{#session.Account.balance}//li And Here is the Corresponding output on the page: currency format.money currency format.money currency currency currency currency 1003.9 What in the world ami I missing? ( I am wither misreading the example, or it is clearly not correct. I hope it is the former) I followed the example on this page: http://struts.apache.org/2.x/docs/text.html Other example s:text name=format.moneys:param name=value value=myMoneyValue//s:text where format.money={0,number,currency} Thank you in advance for any input. hf None of your attempts actually follows the example, though; you're using s:param name=money ... instead of s:param name=value ... Try this: s:text name=format.money s:param name=value value=%{#session.Account.balance}/ /s:text From your sample output it looks like you haven't set up the format.money or currency resource strings, either, which you will need to do. L. - To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED] -- 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. -- 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: Tiles 2 Lifecycycle
--- [EMAIL PROTECTED] wrote: So is there a way to redirect to a tile definition? Not that I know of; so far if I'm returning a result from an action that needs a redirect I've been redirecting to an action with a tile success or input result. d. On 4/11/07, Dave Newton [EMAIL PROTECTED] wrote: --- [EMAIL PROTECTED] wrote: result type=tilescourse.page/result Shouldn't returning SUCCESS from my action result in a new Action class instance and it's dependencies being injected? No; it's not a redirect. It's just like you put a JSP value in for the result. d. 8:00? 8:25? 8:40? Find a flick in no time with the Yahoo! Search movie showtime shortcut. http://tools.search.yahoo.com/shortcuts/#news - To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED] -- Scott [EMAIL PROTECTED] Looking for earth-friendly autos? Browse Top Cars by Green Rating at Yahoo! Autos' Green Center. http://autos.yahoo.com/green_center/ - To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED]
Re: [S2] s:text help on formatting output
--- Harring Figueiredo [EMAIL PROTECTED] wrote: [...] Dude, just type it in. In my properties file: format.money={0,number,currency} On my JSP: s:text name=format.money s:param name=value value=123 / /s:text Rendered output: $123.00 Switch locale to Chinese (zh_CN, it's the only other language I know, sorry), rendered output: #65509;123.00 I simply don't know what else to tell you. Wait, that isn't the right symbol. But you get the point... ar_SA renders as: #1585;.#1587;.#8207; 123 d. Now that's room service! Choose from over 150,000 hotels in 45,000 destinations on Yahoo! Travel to find your fit. http://farechase.yahoo.com/promo-generic-14795097 - To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED]
Re: [S2] s:text help on formatting output
DAVE! THANK YOU SO MUCH FOR THIS LITTLE DETAIL. It would be nice if the documentation was as CLEAR as your email. (i.e. where to the format.money, rather then where: format.money={0,number,currency}. To me, coming from Unix world, means a set in which the possible values are inside the brackets. Thank you ALL again for your patience, replies, and help! hf On 4/11/07, Dave Newton [EMAIL PROTECTED] wrote: --- Harring Figueiredo [EMAIL PROTECTED] wrote: [...] Dude, just type it in. In my properties file: format.money={0,number,currency} On my JSP: s:text name=format.money s:param name=value value=123 / /s:text Rendered output: $123.00 Switch locale to Chinese (zh_CN, it's the only other language I know, sorry), rendered output: ¥123.00 I simply don't know what else to tell you. Wait, that isn't the right symbol. But you get the point... ar_SA renders as: ر.س. 123 d. Now that's room service! Choose from over 150,000 hotels in 45,000 destinations on Yahoo! Travel to find your fit. http://farechase.yahoo.com/promo-generic-14795097 - To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED] -- 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] s:text help on formatting output
--- Harring Figueiredo [EMAIL PROTECTED] wrote: It would be nice if the documentation was as CLEAR as your email. (i.e. where to the format.money, rather then where: format.money={0,number,currency}. I update the s:text.../ docs to (hopefully!) better reflect this. Really, the documentation is fairly clear about what s:text.../'s name attribute is: Name of resource property to fetch but I can sort of see what you mean. Sometimes a bunch of values in brackets are just a bunch of values in brackets ;) d. Don't be flakey. Get Yahoo! Mail for Mobile and always stay connected to friends.http://mobile.yahoo.com/mail - To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED]
Re: How to use datetimepicker localization
Dojo has some support for i18, although I haven't use it myself I know you can put your resource file under their i18 folder: http://dojo.jot.com/WikiHome/Internationalization?revision=18 If you post to the Dojo mailing list you will probably get more help . musachy On 4/11/07, Laurie Harper [EMAIL PROTECTED] wrote: Ibrahim Sayed wrote: Hi, I use struts 2 blank war to use the struts tags tag library , and I use it but the calendar of datetimepicker shown in English language , I want to use another local ar , I try to extract the struts2-core-2.0.6.jar file and see the dojo files org\apache\struts2\static\dojo\src\i18n\calendar\nls\en\gregorian.js and change the values of the months and days even for the en and repackage it as a jar and check , no changes I found , Thanks to help me in add my local, Unfortunately I don't think Dojo supports localization. However, if you modified the Javascript source directly, your changes should show up. Perhaps you didn't re-package the JAR file correctly, or didn't replace the original jar with your repackaged one? L. - 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] Testing for size of Collection inside a s:if
Folks, How do I call the isEmpty() method (or any other non-bean conforming method) inside a s:if tag? I can test for null as: s:if test={collection == null } But, I also need to test for empty collection. Thank you in advance. hf
Re: [S2] Testing for size of Collection inside a s:if
--- Harring Figueiredo [EMAIL PROTECTED] wrote: s:if test={collection == null } s:if test=%{collection.isEmpty} d. Sucker-punch spam with award-winning protection. Try the free Yahoo! Mail Beta. http://advision.webevents.yahoo.com/mailbeta/features_spam.html - To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED]
Re: [S2] Testing for size of Collection inside a s:if
Dave, Thank for the reply. I thought that this would call getIsEmpty(), from other examples I have seen. Let me try it again. hf On 4/11/07, Dave Newton [EMAIL PROTECTED] wrote: --- Harring Figueiredo [EMAIL PROTECTED] wrote: s:if test={collection == null } s:if test=%{collection.isEmpty} d. Sucker-punch spam with award-winning protection. Try the free Yahoo! Mail Beta. http://advision.webevents.yahoo.com/mailbeta/features_spam.html - To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED] -- 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] Testing for size of Collection inside a s:if
--- Harring Figueiredo [EMAIL PROTECTED] wrote: I thought that this would call getIsEmpty(), from other examples I have seen. It's a fake property because Java collections (and arrays... and... etc. :) are broken :/ d. Don't pick lemons. See all the new 2007 cars at Yahoo! Autos. http://autos.yahoo.com/new_cars.html - To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED]
Re: Issue in compiling application in websphere
Hi I got the issue, it is the double quote , i change the jsp from html:hidden value=%= sppu0016.getSTEREGFLG() % property=siteregflg / to html:hidden value='%= sppu0016.getSTEREGFLG() %' property=siteregflg / and it worked, i dont understand by websphere was not able to compile with double quotes Ashish On 4/11/07, Ashish Kulkarni [EMAIL PROTECTED] wrote: Hi I am getting the following jsp compilation error in websphere 5.1 org.apache.jasper.compiler.ParseException: /pages/purchasing/contract.jsp(128,61) Attribute system has no value at org.apache.jasper.compiler.JspReader.parseAttributeValue ( JspReader.java:599) This jsp compiles fine in tomcat This is what i have in my jsp html:form action=pages/purchase/ContractApprovalAction focus=comment html:hidden value=%= sppu0016.getSTEREGFLG() % property=siteregflg / (This is line 128) html:hidden value=%=(String)request.getAttribute(system)% property=system / /html:form This is how i have defined in struts-config.xml file form-bean name=ContractApprovalForm type=org.apache.struts.validator.DynaValidatorForm dynamic=true form-property name=data type=com.pfizer.maps.file.purchase.SPPU0016 / form-property name=prcvar type= java.util.List / form-property name=comment type=java.lang.String / form-property name=comment1 type=java.lang.String / form-property name=system type=java.lang.String / form-property name=envName type=java.lang.String / form-property name=ttype type= java.lang.String / form-property name=reasoncode type=java.lang.String / form-property name=reasondesc type=java.lang.String / form-property name=reasonCodeValues type=java.util.List / form-property name=contractNotes type=java.util.List / form-property name=contractLineNotes type= java.util.List / form-property name=priceBreaks type=java.util.List / /form-bean Any idea what it might be Ashish
Re: S2 life cycle
Yes I know we can do this, but the argument is the previous struts ActionForm sharing across many action classes is achieved by ScopedModelDrivenT in Struts 2. Having session scoped beans as members in action classes doesnt sound as a good MVC pattern to me. If there is a infrastructure in place why should we manuanlly do this session.setAttibute etc. I am bit confused. Mine it works just that the values get reset all the time eventhough in struts.xml state form as a session scoped value. I believe ScopedModelDrivenT is a cleaner approach if it works, --- Harring Figueiredo [EMAIL PROTECTED] wrote: tom: I have not experience with the ModelDrivenInterface. What is that you are trying to do? (It it is to keep a bean around to share between action invocations, have you tried this? class FirstAction extends ActionSupport{ public String execute(){ Bean bean = new Bean(); bean.setWhaterver(...); session.setAttribute(MY_BEAN, bean); } } class SecondAction extends ActionSupport{ public String execute(){ Bean bean = (Bean)= session.getAttribute(MY_BEAN); bean.getWahtever(); } } Is that what you want to do? Thanks, Hf On 4/11/07, tom tom [EMAIL PROTECTED] wrote: Works but the values get reset all the time, doesnt stay in the session scope, if I update form in the one action class and if I try to retrieve from the other action class the values has been lost. Should I have to do any extra things --- Dave Newton [EMAIL PROTECTED] wrote: --- tom tom [EMAIL PROTECTED] wrote: How can I have a reference to the form class inside the action class. I did the following 1) Wrote a action class which implements ScopedModelDriven interface, the argo is not null inside setModel(Object arg0)method in the action class but I cant cast into test.TestForm (pojo) At the very least I believe you should implement ScopedModelDrivenT, not just ScopedModelDriven, and provide typed accessors: http://struts.apache.org/2.x/struts2-core/apidocs/com/opensymphony/xwork2/ModelDriven.html http://struts.apache.org/2.x/struts2-core/apidocs/com/opensymphony/xwork2/interceptor/ScopedModelDriven.html d. Don't get soaked. Take a quick peek at the forecast with the Yahoo! Search weather shortcut. http://tools.search.yahoo.com/shortcuts/#loc_weather - To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED] Don't be flakey. Get Yahoo! Mail for Mobile and always stay connected to friends. http://mobile.yahoo.com/mail - To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED] -- 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. Food fight? Enjoy some healthy debate in the Yahoo! Answers Food Drink QA. http://answers.yahoo.com/dir/?link=listsid=396545367 - To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED]
Re: S2 life cycle
should I have the following in my jsp s:hidden name=S2_CONVERSATION_ID value=%{conversationId} / Let me know? Thanks, Lalitha --- tom tom [EMAIL PROTECTED] wrote: Yes I know we can do this, but the argument is the previous struts ActionForm sharing across many action classes is achieved by ScopedModelDrivenT in Struts 2. Having session scoped beans as members in action classes doesnt sound as a good MVC pattern to me. If there is a infrastructure in place why should we manuanlly do this session.setAttibute etc. I am bit confused. Mine it works just that the values get reset all the time eventhough in struts.xml state form as a session scoped value. I believe ScopedModelDrivenT is a cleaner approach if it works, --- Harring Figueiredo [EMAIL PROTECTED] wrote: tom: I have not experience with the ModelDrivenInterface. What is that you are trying to do? (It it is to keep a bean around to share between action invocations, have you tried this? class FirstAction extends ActionSupport{ public String execute(){ Bean bean = new Bean(); bean.setWhaterver(...); session.setAttribute(MY_BEAN, bean); } } class SecondAction extends ActionSupport{ public String execute(){ Bean bean = (Bean)= session.getAttribute(MY_BEAN); bean.getWahtever(); } } Is that what you want to do? Thanks, Hf On 4/11/07, tom tom [EMAIL PROTECTED] wrote: Works but the values get reset all the time, doesnt stay in the session scope, if I update form in the one action class and if I try to retrieve from the other action class the values has been lost. Should I have to do any extra things --- Dave Newton [EMAIL PROTECTED] wrote: --- tom tom [EMAIL PROTECTED] wrote: How can I have a reference to the form class inside the action class. I did the following 1) Wrote a action class which implements ScopedModelDriven interface, the argo is not null inside setModel(Object arg0)method in the action class but I cant cast into test.TestForm (pojo) At the very least I believe you should implement ScopedModelDrivenT, not just ScopedModelDriven, and provide typed accessors: http://struts.apache.org/2.x/struts2-core/apidocs/com/opensymphony/xwork2/ModelDriven.html http://struts.apache.org/2.x/struts2-core/apidocs/com/opensymphony/xwork2/interceptor/ScopedModelDriven.html d. Don't get soaked. Take a quick peek at the forecast with the Yahoo! Search weather shortcut. http://tools.search.yahoo.com/shortcuts/#loc_weather - To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED] Don't be flakey. Get Yahoo! Mail for Mobile and always stay connected to friends. http://mobile.yahoo.com/mail - To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED] -- 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. Food fight? Enjoy some healthy debate in the Yahoo! Answers Food Drink QA. http://answers.yahoo.com/dir/?link=listsid=396545367 - To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED] Don't get soaked. Take a quick peak at the forecast with the Yahoo! Search weather shortcut. http://tools.search.yahoo.com/shortcuts/#loc_weather - To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED]