Re: [S2] Problem of validation with a select in my form
The Change() method is rather doing nothing, just modifying a flag : function Change(){ document.forms[0].change.value = '1'; } My validattion xml is simple, it is just a requiredstring on the select item : true true Laurie Harper <[EMAIL PROTECTED]> Envoyé par : news <[EMAIL PROTECTED]> 04/08/2007 00:50 Veuillez répondre à "Struts Users Mailing List" A user@struts.apache.org cc Objet Re: [S2] Problem of validation with a select in my form Sounds like an error in your validation rules, which you haven't listed, or possibly a result of whatever your Change() JavaScript function is doing. Without seeing all the pieces, it's difficult to diagnose. L. [EMAIL PROTECTED] wrote: > Hi, > > I have a select list in my form, and when I submit the form, the > javascript client validation passes, but the server validation failed. It > comes back to my JSP with the "required field" error message. > > The weird thing is that in my action the field is well filled (I put a > breakpoint in an empty validate() method), and when it comes back to the > JSP the selected option of my select is what I submitted. So why the > server validation doesn't see that the select is filled ? > > > id="familleProduit.gamme.idGamme" > list="gammes" > listKey="idGamme" > listValue="libelle" > emptyOption="true" > required="true" > onchange="javascript: Change();"/> > > > public class FamilleProduitVO extends CRUDVO { > private long idFamille; > private String nomFamille = ""; > private Double chargeTravail; > private String urlFamille = ""; > private GammeVO gamme; > > ... > } > public class GammeVO extends CRUDVO { > private long idGamme; > private String libelle; > private String urlGamme; > > ... > } > public class FamilleProduitGererAction extends CRMAction { > private FamilleProduitVO familleProduit; > private List gammes; > > ... > } > > Thanks for your help. > - To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED]
Re: Handling Session Objects
Thanks buddy for your reply, Very firstly I am sorry for provide the confusing code here. I am not putting the same data into each session and I am sure that I am getting the same instance of that data , not just separate copies of the same data. Actually I have a Login.jsp page and on click SUBMIT button the java class will be called. In the java class I am fetching the user name and password from the Login.jsp page and putting them into the session. Now if anyone copy and paste the url on another machine's browser, then How can he/she will get the user name and password there..? But it is happening in my case. I think now I am able to explain in detail...:-) Thanks & regards Sawan Laurie Harper wrote: > > Firstly, you're unconditionally putting the same data into each session, > so are you sure you're getting the same *instance* of that data, not > just separate copies of the same data? > > Actions should be instantiated for each request, so if your code is as > simple as you've presented and you really are getting the same instance > in different sessions, there must be something wrong with your > configuration somewhere. > > L. > > Sawan wrote: >> Hello experts, >> >> I have following code... >> >> JAVA class: >> public class Support extends ActionSupport implements SessionAware >> { >> protected Map session; >> public Map getSession() { return session; } >> @SuppressWarnings({"unchecked"}) public void setSession(Map session) >> { >> this.session = session; } >> } >> >> Action class: >> public class Child extends Support >> { >> ArrayList alt = new ArrayList(); >> alt.add("Test"); >> public String execute() throws Exception >> { >> if ((ArrayList)session.get("obj")==null) >> { >> session.put("obj",alt); >> } >> } >> } >> >> I have run this code first time and set the "alt" for this session only. >> Now >> I copied the link from the browser window and paste it in other machines >> browser. But unfortunately I also got the SAME "alt" on other machine's >> browser. >> >> I was assuming that for each new browser it will generate a new session >> and >> will set new alt for each session. >> >> Can any expert help me for this issue... >> >> Thanks in advance >> >> Sawan > > > - > To unsubscribe, e-mail: [EMAIL PROTECTED] > For additional commands, e-mail: [EMAIL PROTECTED] > > > -- View this message in context: http://www.nabble.com/Handling-Session-Objects-tf4211020.html#a12011091 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: How to use JFreeChartPlugin in tag
Is that escaping the output ? Can u post that weird characters. - Original Message - From: "Struts2 Fan" <[EMAIL PROTECTED]> To: Sent: Friday, August 03, 2007 1:20 PM Subject: How to use JFreeChartPlugin in tag Hi all, I am trying to put a JFreeChart in a tag ---jsp file--- ... Initial Content ... ---eof--- /TestChart.html displays correctly but when I try to put it in a tag it displays weird characters. http://www.nabble.com/file/p11978932/message.jpg Any thoughts? -- View this message in context: http://www.nabble.com/How-to-use-JFreeChartPlugin-in-%3Cs%3Adiv%3E-tag-tf4211109.html#a11978932 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]
Re: OT: Tomcat struts-2.0.9 noClassDefFoundError
Hi Dale, I should preface this by saying that we have only used Tomcat 6 and have found it to be great, no issues until this. Solid, fast, no complaints at all. I found a post on the Tomcat Users list from Frank Zammetti which looked pretty similar, which meant it wasn't a Mac issue (phew). Frank seemed to think it was a 6.0.10 issue and I agree. I think that there is something NQR there. I couldn't help myself so I tried a few things. I did a touch on the servlet-api.jar and it started working. Talk about scratching my head. Anyway both are now working absolutely fine, so I don't know where to from here. I guess we go into staging next week and if we don't run into any issues during the 5 weeks of staging we'll take tomcat through to production. Z. > Zoran Avtarovski wrote: >> Does anybody have any experience with Tomcat 6. Should I be downgrading back >> to 5.5? This project is slated to go into production in 6 weeks and the last >> thing I want is a similar issue a few months into its deployment. > > I have a project I've been developing against tomcat5.5, but I've been > considering deploying to tomcat6 in order to get JSP 2.1, mainly in > order to be able to set: > true. > > But I also don't know much about tomcat6... > ...so I'm also quite interested in learning about the experiences of > folks here on this topic. > > -Dale > > - > 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: Is it possible to pass a dynamic parameter to a redirectAction?
This might help http://www.vitarara.org/cms/struts_2_cookbook/post_and_redirect http://www.vitarara.org/cms/struts_2_cookbook/post_and_redirect Piero Sartini-3 wrote: > > I have the following situation: > a searchfield is on top of a table presenting results. if there is only > one > result, the user should be redirected without the need of clicking on the > list.. > > now my problem is how to redirect to an action and passing a parameter > from > within my original action.. > > I am working around this by putting the ID information into the user > session ... but I am sure there is a cleaner way of doing this ;) > > Piero > > - > To unsubscribe, e-mail: [EMAIL PROTECTED] > For additional commands, e-mail: [EMAIL PROTECTED] > > > -- View this message in context: http://www.nabble.com/Is-it-possible-to-pass-a-dynamic-parameter-to-a-redirectAction--tf4210445.html#a12010357 Sent from the Struts - User mailing list archive at Nabble.com. - To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED]
Cannot extend a theme
Does this (https://issues.apache.org/struts/browse/WW-1328) means, that at this moment we cannot create our own theme with a theme.properties that specifies that we extend an other theme ? I made a theme that extends xhtml and set it as the default one in struts.properties. But every template I didn't rewrite causes an exception when the related tag is used. The problem is that Struts does not look in the parent theme when it does not found a template. What I don't understand is that this mechanism is working for the css_xhtml theme that does not redefine every templates and extends xhtml. Am I missing something? -- Aymeric - To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED]
Re: popping messages from an action
Session, your question is not very much related to struts in the first place, but more to understanding web technologies such as html, http and javascript. The brief answer to your question is: yes, it works, but it is a bit complicated due to the http request/response system and usually introduces the need to write some javascript code. How about starting more simple at first? Use the struts2 form elements along with validation, and see how the information for bad input is rendered automatically within the form after validation process, at next to no costs in terms of having to program lots of js/html magic. Regards, Rene Session A Mwamufiya schrieb: Hi, I know that I've sent many questions today, so please bear with me once more. I'd like to have my action popup a message to the user if a submit button is pressed and the entered data is incorrect. Is that possible? Or if not from struts 2, is there a way for struts 2 to execute html code from within an action (which I could code to have a message box popup). Thanks, Session - To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED] -- Rene Gielen | http://it-neering.net/ Aachen | PGP-ID: BECB785A Germany | gielen at it-neering.net - To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED]
Re: obtaining a user selection, please help
Session, please make sure your read (at least) the following chapters carefully: http://struts.apache.org/2.x/docs/crud-demo-i.html http://struts.apache.org/2.x/docs/type-conversion.html After that, it would be quite good to have a look into the showcase app distributed with struts2. Most of your usage questions should be covered there, with handy and easy to understand examples. Regards, Rene Session A Mwamufiya schrieb: Hi, I've posted a number of times regarding this subject, but have not gotten a reply. I would think that others have used s:select before and know how to obtain a user's selection in data. Please help, because I have been stuck for a number of hours now. Thanks, Session - 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] Is it possible to replace/supplement i18n resolution logic?
Complaining about features in an open source program written by volunteers isn't really very nice, and I apologize for it. All programs have sub-optimal features, mine included, of course, and no one likes having their work sniped at by outsiders. The fundamental architecture of S2 is really sound, which allows me to use most of it in ways which suit me, even if they aren't part of the envisioned use when the app was written. This speaks well of its flexibility and modularity. The latest thing we've done is to use JSF components for all the display pages from S2 actions, and we found that we couldn't use the JSF plugin because it was too buggy. So we just declare that the action types are "redirect", and the JSF processor seems to handle everything. I was surprised that this worked, since now there is no tie between the S2 process and the JSF process. The app has had some pure JSF pages for some time, but now to use JSF with S2 but not have to rely on the JSF plugin is really great. Probably there are JSF-things we couldn't do with this method, but the things we want it to do, it does very nicely. We have a 'builder' architecture for all the actions, which 'export' the data to the view. Of course, in a pure exporter, the exporter actually creates the view, but that would require giving up the JSP-idiom, which would be unthinkable at this juncture. Having the JSF components render the exported data items is an ideal compromise for me. We just treat the components as a super-powerful tag set. Again, I apologize for the earlier rant. - Ray Clough [EMAIL PROTECTED] > - Original Message - > From: "Ted Husted" <[EMAIL PROTECTED]> > To: "Struts Users Mailing List" > Subject: Re: [s2] Is it possible to replace/supplement i18n resolution logic? > Date: Sun, 5 Aug 2007 06:32:17 -0400 > > > On 8/4/07, Ray Clough <[EMAIL PROTECTED]> wrote: > > Sorry for the rant, but I do like many of the S2 features well > > enough that I continue to use > > it > > Feel free to start a Struts 3 roadmap on the wiki that identifies some > of the "features" we might subtract, as well as those that we might > add. > > -Ted. > > - > To unsubscribe, e-mail: [EMAIL PROTECTED] > For additional commands, e-mail: [EMAIL PROTECTED] > - Ray Clough [EMAIL PROTECTED] - To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED]
Linking to wildcard URLs
Hi, Is there a way to make the tag generate 'nice' URLs linking to actions with wildcards in their names? For example, let's take the following mapping using DefaultActionMapper: < param name="galleryID">{1} /pages/galleries/GalleryViewer.jsp With this mapping an HTTP request to http://server/galleries/3 invokes the galleryViewer with the galleryID parameter set to 3. Unfortunately, when I try to link to this action in a JSP using , the URL generated by Struts isn't the nice "/galleries/3", but the standard "/galleries?galleryID=3" (which I'm trying to avoid). The JSP code: 3 View gallery 3 How can I make Struts generate 'nice' URLs based on the definitions in struts.xml? (Of course I could hardwire the custom URL format into each JSP that links to the action, but that would be redundant and would take a lot of work to change the URL structure later.) Thanks, Peter -- View this message in context: http://www.nabble.com/Linking-to-wildcard-URLs-tf4221102.html#a12007966 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: Cannot extend a theme
Thanks Pedro, But this is not really my problem. For all form related template, I had to copy them all in my new theme due to the fact that 'hard' xhtml templates references exists in the xhtml theme. (The following include is every where: <#include "/${parameters.templateDir}/xhtml/controlfooter.ftl" />) What I don't understand is that I have to copy all other templates from simple theme (a, a-close, actionmessage, actionerrors, div, ...), otherwise I get Exceptions (see below) when calling related tags (, , , ...) Normally, the FreemarkerTemplateEngine from Struts should look in xhtml theme then in simple theme. java.io.FileNotFoundException: Template /template/jbb/a-close.ftl not found. at freemarker.template.Configuration.getTemplate(Configuration.java:489) at freemarker.template.Configuration.getTemplate(Configuration.java:452) at org.apache.struts2.components.template.FreemarkerTemplateEngine.renderTemplate(FreemarkerTemplateEngine.java:96) at org.apache.struts2.components.UIBean.mergeTemplate(UIBean.java:530) at org.apache.struts2.components.UIBean.end(UIBean.java:484) at org.apache.struts2.views.jsp.ComponentTagSupport.doEndTag(ComponentTagSupport.java:43) at org.apache.jsp.WEB_002dINF.fragments.footer_jsp._jspx_meth_s_005fa_005f12(footer_jsp.java:597) at org.apache.jsp.WEB_002dINF.fragments.footer_jsp._jspService(footer_jsp.java:132) Pedro Herrera wrote: > > I had the same problem. > I´ve created my own template, in theme.properties I put 'parent=css_xhtml' > . > I´ve copied controlheader.flt from template.css_xhtml to my template and > changed to : > > <#include > "/${parameters.templateDir}/${themeProperties.parent}/controlheader.ftl" > /> > <#if parameters.labelposition?default("top") == 'top'> > > <#else> > > > <#if parameters.id?exists>id="wwctrl_${parameters.id}"<#rt/> > class="wwctrl"> > > > NOTE : the first line cames with error : > <#include "/${parameters.templateDir}/css_xhtml/controlheader-core.ftl"> > the correct is : > <#include > "/${parameters.templateDir}/${themeProperties.parent}/controlheader.ftl" > /> > > this workaround resolved my problem > > > Herrera > > > > > > > Aymeric Levaux wrote: >> >> Does this (https://issues.apache.org/struts/browse/WW-1328) means, that >> at this moment we cannot create our own theme with a theme.properties >> that specifies that we extend an other theme ? >> >> I made a theme that extends xhtml and set it as the default one in >> struts.properties. But every template I didn't rewrite causes an >> exception when the related tag is used. The problem is that Struts does >> not look in the parent theme when it does not found a template. >> >> What I don't understand is that this mechanism is working for the >> css_xhtml theme that does not redefine every templates and extends xhtml. >> >> Am I missing something? >> >> -- >> Aymeric >> >> > > -- View this message in context: http://www.nabble.com/Cannot-extend-a-theme-tf4217548.html#a12007690 Sent from the Struts - User mailing list archive at Nabble.com. - To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED]
[s1][ANNOUNCE] Commons BeanUtils 1.8.0 Beta release
The Commons team is pleased to announce the release of Commons BeanUtils 1.8.0 Beta. Commons BeanUtils provides easy-to-use wrappers around the Reflection and Introspection APIs provided by the Java language. BeanUtils 1.8.0 Beta is binary compatible with version 1.7.0 and contains quite a few bug fixes and enhancements. Since it has been nearly three years since the last BeanUtils release, it is hoped that this Beta release will facilitate wider testing to ensure that there are no major compatibility issues before the final 1.8.0 release. Commons BeanUtils Website: http://commons.apache.org/beanutils/ Release notes: http://commons.apache.org/beanutils/v1.8.0-BETA/RELEASE-NOTES.txt Download: http://commons.apache.org/downloads/download_beanutils.cgi Niall Pemberton, on behalf of the Commons community - To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED]
Re: MVC2 question
--- debussy007 <[EMAIL PROTECTED]> wrote: > what is the benfit of having the front controller > dispatching the request to the appropriate controllers? > Why not calling the appropriate controller directly? How would you do that? d. Shape Yahoo! in your own image. Join our Network Research Panel today! http://surveylink.yahoo.com/gmrs/yahoo_panel_invite.asp?a=7 - To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED]
Re: Problems migrating Roller to Struts 2.0.9
2007/8/5, Dave <[EMAIL PROTECTED]>: > On 8/4/07, Antonio Petrelli <[EMAIL PROTECTED]> wrote: > > > So I downloaded 2.0.9. First, I found that the old Tiles listener > > > "org.apache.tiles.listener.TilesListener" is gone. > > > > Wrong, it has been renamed to org.apache.tiles.web.startup.TilesListener. > > Thanks. I changed my web.xml accordingly. Unfortunately that did not > fix the problem. > > > > > DEBUG 2007-08-03 17:34:03,725 BasicTilesContainer:render - Dispatching > > > to definition path '/WEB-INF/jsps/tiles/tiles-simplepage.jsp ' > > > ERROR 2007-08-03 17:34:05,180 RoleSecurityTagSupport:doEndTag - Error > > > executing tag: Attribute 'head' not found. > > > > Err... did you upgrade your Tiles definitions files and JSP pages? > > Yes. I meant, did you upgrade the Tiles definition files and JSP pages to the final version? I noticed that you used an old version of the Tiles 2.0 definition files DTD. See the new structure at: http://tiles.apache.org/framework/tiles-core/dtddoc/index.html and http://tiles.apache.org/framework/tiles-jsp/tlddoc/index.html HTH Antonio - To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED]
Re: Cannot extend a theme
I had the same problem. I´ve created my own template, in theme.properties I put 'parent=css_xhtml' . I´ve copied controlheader.flt from template.css_xhtml to my template and changed to : <#include "/${parameters.templateDir}/${themeProperties.parent}/controlheader.ftl" /> <#if parameters.labelposition?default("top") == 'top'> <#else> <#if parameters.id?exists>id="wwctrl_${parameters.id}"<#rt/> class="wwctrl"> NOTE : the first line cames with error : <#include "/${parameters.templateDir}/css_xhtml/controlheader-core.ftl"> the correct is : <#include "/${parameters.templateDir}/${themeProperties.parent}/controlheader.ftl" /> this workaround resolved my problem Herrera Aymeric Levaux wrote: > > Does this (https://issues.apache.org/struts/browse/WW-1328) means, that at > this moment we cannot create our own theme with a theme.properties that > specifies that we extend an other theme ? > > I made a theme that extends xhtml and set it as the default one in > struts.properties. But every template I didn't rewrite causes an exception > when the related tag is used. The problem is that Struts does not look in > the parent theme when it does not found a template. > > What I don't understand is that this mechanism is working for the > css_xhtml theme that does not redefine every templates and extends xhtml. > > Am I missing something? > > -- > Aymeric > > -- View this message in context: http://www.nabble.com/Cannot-extend-a-theme-tf4217548.html#a12004747 Sent from the Struts - User mailing list archive at Nabble.com. - To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED]
MVC2 question
Hello all, I understand the benefit of having a controller for each possible user action. But what is the benfit of having the front controller dispatching the request to the appropriate controllers ? Why not calling the appropriate controller directly ? Thank you for any help. -- View this message in context: http://www.nabble.com/MVC2-question-tf4219667.html#a12004319 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: Problems migrating Roller to Struts 2.0.9
On 8/4/07, Antonio Petrelli <[EMAIL PROTECTED]> wrote: > > So I downloaded 2.0.9. First, I found that the old Tiles listener > > "org.apache.tiles.listener.TilesListener" is gone. > > Wrong, it has been renamed to org.apache.tiles.web.startup.TilesListener. Thanks. I changed my web.xml accordingly. Unfortunately that did not fix the problem. > > DEBUG 2007-08-03 17:34:03,725 BasicTilesContainer:render - Dispatching > > to definition path '/WEB-INF/jsps/tiles/tiles-simplepage.jsp ' > > ERROR 2007-08-03 17:34:05,180 RoleSecurityTagSupport:doEndTag - Error > > executing tag: Attribute 'head' not found. > > Err... did you upgrade your Tiles definitions files and JSP pages? Yes. We migrated to Tiles 2.0 a couple of months ago using a Tiles 2.0-20070207.130156-4 (a snapshot release?) and things have been working fine until now when we try to upgrade to Struts 2.0.9. The problem is migrating from Tiles 2.0-20070207.130156-4 to Tiles 2.0. We already converted our tiles.xml file over and the log files indicate that it is being loaded. We also migrated our JSP pages over. Here are the JSP pages involved in the error above: * tiles.xml file: http://tinyurl.com/2o4cyr * tiles-simplepage.jsp http://tinyurl.com/2dr8g4 * login.jsp - http://tinyurl.com/yp5cut Any other ideas what I might be dong wrong? - Dave - To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED]
Re: [s2] Is it possible to replace/supplement i18n resolution logic?
On 8/4/07, Ray Clough <[EMAIL PROTECTED]> wrote: > Sorry for the rant, but I do like many of the S2 features well enough that I > continue to use > it Feel free to start a Struts 3 roadmap on the wiki that identifies some of the "features" we might subtract, as well as those that we might add. -Ted. - To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED]