Re: Setting up 2.2.1 in maven for testing
Thanks for your comments! Please register a ticket and I try to put some love with the docs ;-) Kind regards -- Łukasz + 48 606 323 122 http://www.lenart.org.pl/ Kapituła Javarsovia 2010 http://javarsovia.pl - To unsubscribe, e-mail: user-unsubscr...@struts.apache.org For additional commands, e-mail: user-h...@struts.apache.org
Job opportunity in Europe
Hi all, Disclosure: I am not a recruiter, but looking to increase a development team that I lead. I sincerely apologize if this message is against mailing list etiquette; I have not seen any guidelines forbidding this. We are looking to expand the development team based in Copenhagen, Denmark. We run and operate an indexing system that provides access to biodiversity information, and specifically 100s millions of point based observations of species occurrence documented in the past century. Our live system is outgrowing a MySQL database, and runs using Spring and SpringMVC. Over the next 16 months we will rework the whole system, including custom reporting, custom maps and other visualizations, real time search indexes, reducing latency, quality control integration, custom vocabulary work etc. We have recently been developing using Struts2, and will be reworking our Portal backend (PostGIS, Hadoop, Hive, HBase) and the front end with Struts2. If you are familiar with these technologies, and the thought of some time working in Europe appeals to you, then we'd love to hear from you. Guidelines for applications are on the advert: http://tinyurl.com/gbif-dev-job (GBIF is a multi-government initiative hosted in Denmark and as such has certain visa privileges easing international recruitment) Thanks, Tim - To unsubscribe, e-mail: user-unsubscr...@struts.apache.org For additional commands, e-mail: user-h...@struts.apache.org
Re: Display GregorianCalendar Objects
Michal, I wanted the user to input his birth-date. Displaying the current date will be of no use for it.
Re: Display GregorianCalendar Objects
In that case you must use own converter like this: public class DateTimeConverter extends StrutsTypeConverter { @Override public Object convertFromString(Map context, String[] values, Class toClass) { try { return DateUtil.getConvertedDate(values[0], DateUtil.DATE_TIME); } catch (TypeConversionException tce) { log.error(Exception while parsing date., tce); } return null; } } Method getConvertedDate() just parse inserted date as string by user. Reeshi Agrawal wrote on 28.7.2010 15:05: Michal, I wanted the user to input his birth-date. Displaying the current date will be of no use for it.
Re: Struts2 - JSF Plugin - Richfaces
Hi, i've simply followed this: http://struts.apache.org/2.x/docs/jsf-plugin.html and in the struts.xml: package name=jsf extends=jsf-default namespace=/jsf result-types result-type name=jsf class=org.apache.struts2.jsf.FacesResult / /result-types interceptors interceptor-stack name=jsfFullStack interceptor-ref name=params / interceptor-ref name=basicStack/ interceptor-ref name=jsfStack/ /interceptor-stack /interceptors default-interceptor-ref name=jsfFullStack/ /package package name=jsfTest extends=jsf action name=hello class=test.HelloWorldAction method=execute result name=success type=jsf/ /action /package Il giorno mar, 27/07/2010 alle 05.55 +, Frans Thamura ha scritto: That will be awesome that componen can mix with action --Original Message-- From: Jyoo To: user@struts.apache.org ReplyTo: Struts Users Mailing List Subject: RE: Struts2 - JSF Plugin - Richfaces Sent: Jul 27, 2010 12:53 Hi Stefano Corallo-2 Can u able to work with richfaces now in your appilcation ..If yes please post the procedure here .How u have configured thnks - To unsubscribe, e-mail: user-unsubscr...@struts.apache.org For additional commands, e-mail: user-h...@struts.apache.org
Advice on replacing an image with fall-back?
I'm suffering from option overload and need advice on how best to accomplish loading resources based on the User's current skin. This would be something the user could set through an Action, and would be stored on the HttpSession. I'd like to have one set of templates and page resources normally, but sometimes override them with files from an alternate location, IF a skin is in effect AND a replacement is available. A skin is simply a directory name, which contains a set of resources that should take precedence over the normal ones. Consider the following webapp layout: WEB-INF/decorators/default.ftl index.ftl css/default.css images/header.png WEB-INF/skins/NewSkin/decorators/default.ftl WEB-INF/skins/NewSkin/css/default.css WEB-INF/skins/NewSkin/images/header.png If index.ftl has a header logo thanks to the default SiteMesh decorator, but if the user indicates that they want to change their skin to NewSkin how best to transparently look for resources in an alternate location and fall-back to the default location if they don't exist? Currently, references to the header in the template look like: img src=${base}/images/header.png / I'd like to avoid putting branches and skin logic in the templates themselves -- is there a lower layer, or a particular strategy that I should look into? I just don't know which of these avenues holds most promise: * A custom Struts2 theme * Wrapping every reference to any image in a getFileLocation() method call (perhaps from a BaseAction) that is itself aware of the current skin context * Using an OGNL expression in the FreeMarker result location parameter (good for templates, bad for things like images and css w/o more code in template) * Writing a servlet to serve up all .js, .css, and image files -- it would look for existence of the file in the skin, and if not found would fall-back and return the normal one * Somehow doing it at the SiteMesh layer -- perhaps a DecoratorMapper * Using my own JSP tag library within the FreeMarker templates to reference external resources Any guidance or ideas are appreciated! -rgm - To unsubscribe, e-mail: user-unsubscr...@struts.apache.org For additional commands, e-mail: user-h...@struts.apache.org
Re: Display GregorianCalendar Objects
On Tue, 2010-07-27 at 21:45 +0200, Michal Ciasnocha wrote: Why don't use Struts tag s:date for date formatting? in Action: public GregorianCalendar getMyDate() { return new GregorianCalendar(); } in jsp: s:date name=myDate format=d. M. HH:mm / Michal Hi all, i do it like that: in my POJO GregorianCalendar field, on my jsp text field + jquery calendar. If You want to create date in some kind of predefined format You can use Conventer for GregorianCalendar for your app. Ah, too easy... I had been using DateTimePicker and confused the two. Well in my efforts to output the GregorianCalendar object in OGNL I had troubles, although it is clearly not the best way (clearly to me now that is)... Perhaps someone can explain: 1) Casting in OGNL, and 2) Referencing static field definitions in OGNL... For instance in my efforts to get the date out I wrote: s:property value= '' + courseStartDate.get(1) + '-' + {courseStartDate.get(2) + 1} + '-' + courseStartDate.get(5)/ Where: courseStartDate.get(1) aught to be written courseStartDate.get(Calendar.YEAR), courseStartDate.get(2) aught to be written courseStartDate.get(MONTH) courseStartDate.get(5) aught to be written courseStartDate.get(Calendar.DATE), maybe it works it just didn't seem to for me... Then I had difficulties because of automatic type conversion... The Month is 0 based so I need to add 1 to the date, so I tried... (courseStartDate.get(2) + 1) but I think that resulted in the string 1 being appended to the end of everything... the closest I could get was {courseStartDate.get(2) + 1} and that prints the correct number but inside square brackets. So after all that Michal pointed out the obvious and I threw all this out the window and just used the date tag but I'd still like to address these issues.
Reading input stream (xml)
If we send XML content in the POST/PUT request to Struts action controller, how to read this content in the Action class? -- AB
getting label from property
Hi All, I'm working my way through properties and I'm kind of stuck. I have a properties file (package.properties) with a message entry... Index.message= Color ... I am able to pull this message via the s:text tag, so I know it's available in the value stack, but when I try to pull the same message for the select label below, it does not work. I've also tried %{message} and %{getText('message')}. Thanks, Ryan %@ page contentType=text/html; charset=UTF-8% %@ taglib prefix=s uri=/struts-tags% %@ taglib prefix=sx uri=/struts-dojo-tags % table class=w100p border=1 tr td s:text name=message/ /td td class=alR s:form class=mauto alR name=change_color action=/index.action method=GET javascriptTooltip=true s:select class=mauto tooltip=Choose Your Color label=message list=#{'b':'Blue', 'r':'Red'} name=request_color emptyOption=false value=color onchange=javascript: document.change_color.submit(); / /s:form /td /tr /table
Re: getting label from property
Hi Ryan, for getting translated text as label of select tag (and other tags) use key attribute. Usage is same as s:s text name=... /. Best regards, Michal Ryan Beckes wrote on 28.7.2010 20:16: Hi All, I'm working my way through properties and I'm kind of stuck. I have a properties file (package.properties) with a message entry... Index.message= Color ... I am able to pull this message via the s:text tag, so I know it's available in the value stack, but when I try to pull the same message for the select label below, it does not work. I've also tried %{message} and %{getText('message')}. Thanks, Ryan %@ page contentType=text/html; charset=UTF-8% %@ taglib prefix=s uri=/struts-tags% %@ taglib prefix=sx uri=/struts-dojo-tags % table class=w100p border=1 tr td s:text name=message/ /td td class=alR s:form class=mauto alR name=change_color action=/index.action method=GET javascriptTooltip=true s:select class=mauto tooltip=Choose Your Color label=message list=#{'b':'Blue', 'r':'Red'} name=request_color emptyOption=false value=color onchange=javascript: document.change_color.submit(); / /s:form /td /tr /table
Re: getting label from property
Thanks! On Wed, Jul 28, 2010 at 1:40 PM, Michal Ciasnocha m...@struts.cz wrote: Hi Ryan, for getting translated text as label of select tag (and other tags) use key attribute. Usage is same as s:s text name=... /. Best regards, Michal Ryan Beckes wrote on 28.7.2010 20:16: Hi All, I'm working my way through properties and I'm kind of stuck. I have a properties file (package.properties) with a message entry... Index.message= Color ... I am able to pull this message via the s:text tag, so I know it's available in the value stack, but when I try to pull the same message for the select label below, it does not work. I've also tried %{message} and %{getText('message')}. Thanks, Ryan %@ page contentType=text/html; charset=UTF-8% %@ taglib prefix=s uri=/struts-tags% %@ taglib prefix=sx uri=/struts-dojo-tags % table class=w100p border=1 tr td s:text name=message/ /td td class=alR s:form class=mauto alR name=change_color action=/index.action method=GET javascriptTooltip=true s:select class=mauto tooltip=Choose Your Color label=message list=#{'b':'Blue', 'r':'Red'} name=request_color emptyOption=false value=color onchange=javascript: document.change_color.submit(); / /s:form /td /tr /table
Parse url parameter
Hi group, Suppose I have an URL with parameters (e.g. http://localhost:8080/myApp/action/myAction/user/name/Peter). I would like to map those parameters in the following way. class MyAction { private String searchType; // user private String searchMethod; // name private String searchData // Peter } Is there any Action class can parse the parameters into properties of Action? Thanks Franz
Re: Parse url parameter
On 7/29/10 12:02 AM, Franz Wong wrote: http://localhost:8080/myApp/action/myAction/user/name/Peter). I would like to map those parameters in the following way. class MyAction { private String searchType; // user private String searchMethod; // name private String searchData // Peter } Is there any Action class can parse the parameters into properties of Action? action name=/action/myAction/*/*/* class=path.to.MyAction param name=searchType{1}/param param name=searchMethod{2}/param param name=searchData{3}/param result of some form / /action I think there's some flag to throw to allow slashes in action names... Or as was suggested earlier today: URLRewrite -Dale - To unsubscribe, e-mail: user-unsubscr...@struts.apache.org For additional commands, e-mail: user-h...@struts.apache.org
Re: Reading input stream (xml)
Doesn't this link (http://struts.apache.org/2.0.14/docs/file-upload.html) help you? From: Arun Kumar Boppudi arunkumar.bopp...@gmail.com To: Struts Users Mailing List user@struts.apache.org Date: 28-07-2010 22:09 Subject: Reading input stream (xml) If we send XML content in the POST/PUT request to Struts action controller, how to read this content in the Action class? -- AB =-=-= Notice: The information contained in this e-mail message and/or attachments to it may contain confidential or privileged information. If you are not the intended recipient, any dissemination, use, review, distribution, printing or copying of the information contained in this e-mail message and/or attachments to it are strictly prohibited. If you have received this communication in error, please notify us by reply e-mail or telephone and immediately and permanently delete the message and any attachments. Thank you
Re: Reading input stream (xml)
Actually, I am not uploading a file. I am creating XML from the data entered into the form and sending it to the action controller in the POST request body. In the action controller, I would like to parse the XML. How to do it in Struts 1.3? -- Arun Kumar Boppudi On Thu, Jul 29, 2010 at 10:24 AM, Rahul Mohan rahul.mo...@tcs.com wrote: Doesn't this link (http://struts.apache.org/2.0.14/docs/file-upload.html) help you? From: Arun Kumar Boppudi arunkumar.bopp...@gmail.com To: Struts Users Mailing List user@struts.apache.org Date: 28-07-2010 22:09 Subject: Reading input stream (xml) If we send XML content in the POST/PUT request to Struts action controller, how to read this content in the Action class? -- AB =-=-= Notice: The information contained in this e-mail message and/or attachments to it may contain confidential or privileged information. If you are not the intended recipient, any dissemination, use, review, distribution, printing or copying of the information contained in this e-mail message and/or attachments to it are strictly prohibited. If you have received this communication in error, please notify us by reply e-mail or telephone and immediately and permanently delete the message and any attachments. Thank you
Re: Reading input stream (xml)
Arun, You can keep a string property on action form and map it to the xml field so that the xml content is available here on page submit. In the action class, then you will be able to get the string and parse it using any available xml parser. I don't think Struts provides any shortcut for this requirement. - Rahul Mohan From: Arun Kumar Boppudi arunkumar.bopp...@gmail.com To: Struts Users Mailing List user@struts.apache.org Date: 29-07-2010 10:32 Subject: Re: Reading input stream (xml) Actually, I am not uploading a file. I am creating XML from the data entered into the form and sending it to the action controller in the POST request body. In the action controller, I would like to parse the XML. How to do it in Struts 1.3? -- Arun Kumar Boppudi On Thu, Jul 29, 2010 at 10:24 AM, Rahul Mohan rahul.mo...@tcs.com wrote: Doesn't this link (http://struts.apache.org/2.0.14/docs/file-upload.html ) help you? From: Arun Kumar Boppudi arunkumar.bopp...@gmail.com To: Struts Users Mailing List user@struts.apache.org Date: 28-07-2010 22:09 Subject: Reading input stream (xml) If we send XML content in the POST/PUT request to Struts action controller, how to read this content in the Action class? -- AB =-=-= Notice: The information contained in this e-mail message and/or attachments to it may contain confidential or privileged information. If you are not the intended recipient, any dissemination, use, review, distribution, printing or copying of the information contained in this e-mail message and/or attachments to it are strictly prohibited. If you have received this communication in error, please notify us by reply e-mail or telephone and immediately and permanently delete the message and any attachments. Thank you =-=-= Notice: The information contained in this e-mail message and/or attachments to it may contain confidential or privileged information. If you are not the intended recipient, any dissemination, use, review, distribution, printing or copying of the information contained in this e-mail message and/or attachments to it are strictly prohibited. If you have received this communication in error, please notify us by reply e-mail or telephone and immediately and permanently delete the message and any attachments. Thank you
How to check if a error for a certain property exists inside action errors.
Hi guys, I want to check if a error for a certain property is present in the Action Errors. How can I do that. BTB, I am using struts 1.3. Thanks and regards Vishnu NV