RE: [S2.1] dojo widget dialog
It's work with But you need also to move the dojo.require("dojo.widget.Dialog") into the init function. Thanks. -Message d'origine- De : Jeromy Evans [mailto:[EMAIL PROTECTED] Envoyé : jeudi 31 janvier 2008 07:56 À : Struts Users Mailing List Objet : Re: [S2.1] dojo widget dialog Your code likes fine so it appears that dojo has not parsed the html for widgets. I think there's an attribute on sx:head to enable this in Struts2.1 (parseContent=true or something like that) Desbois Arnaud wrote: > I'm using Struts 2.1.0, and I want to use the dojo widget dialog. > > > > I try this simple code: > > <[EMAIL PROTECTED] prefix="sx" uri="/struts-dojo-tags" %> > > > > > > > > > > dojo.require("dojo.widget.Dialog"); > > var dlg; > > function init() { > > dlg = dojo.widget.byId("dialogContent"); > > dojo.debug("dlg="+dlg); > > alert(dlg+" "+document.getElementById("dialogContent")); > > } > > dojo.addOnLoad(init); > > > > > > > > > > Show > > toggle="fade" toggleDuration="250" closeOnBackgroundClick="true"> > > Hello World! > > > > > > > > > > But the variable dlg is always undefined (but with the > document.getElementById("dialogContent"), the div is correctly present) > > > > How I can correctly use the widget dialog into Struts 2.1.0 ? > > > > Best regards > > Arnaud > > > > > > > > No virus found in this incoming message. > Checked by AVG Free Edition. > Version: 7.5.516 / Virus Database: 269.19.15/1249 - Release Date: 29/01/2008 > 9:51 AM > - 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 2 onchange event to get values from databases
I implemented straight AJAX: I have a element that has a onclick event defined. The onclick event calls a JavaScript function. So my element looks like this: And the Javascript functions (one is used the get the XmlHttpObject needed to make AJAX calls): // Get the XmlHttpObject to use for making AJAX calls function getXmlHttpObject() { var xmlHttp = null; try { // Firefox, Opera 8.0+, Safari xmlHttp = new XMLHttpRequest(); } catch (e) { // Internet Explorer try { xmlHttp = new ActiveXObject("Msxml2.XMLHTTP"); } catch (e) { try { xmlHttp = new ActiveXObject("Microsoft.XMLHTTP"); } catch (e) { alert("Your browser does not support AJAX!"); return false; } } } return xmlHttp; } function addToExpandedNodeList(id) { var xmlHttpObj = getXmlHttpObject(); if (xmlHttpObj) { var d = new Date(); var t = d.getTime(); xmlHttpObj.open("GET","display/display.action?idToChange=" + id + "&time=" + t); xmlHttpObj.onreadystatechange = function() { if (xmlHttpObj.readyState == 4) { //alert("returned"); } }; xmlHttpObj.send(); } else { alert("Could not get the XmlHttpObj!!"); } } The XmlHttpObject is used to do the call to the server. I use it to open the display action (with namespace display, that is why display/display.action) and pass it an id. You'll also notice that I pass the time across as without it, the browser does not want to refresh (can't remember which one, think it was IE). When the action returns a result, you will handle it with: xmlHttpObj.onreadystatechange = function() { if (xmlHttpObj.readyState == 4) { //alert("returned"); } }; You'll see that I commented a line there where I have an alert. I don't have to set anything when the action returns the result, so I don't use this. You might want to think of using the AJAX theme on your components though. For that you will have to read the tutorials on the pages I sent you originally. Jo -Original Message- From: Johnson nickel [mailto:[EMAIL PROTECTED] Sent: 31 January 2008 08:42 AM To: user@struts.apache.org Subject: RE: Struts 2 onchange event to get values from databases Thanks for your quick response. I have created Jsp and action and struts.xml. you are mistaken me(imlazy), i'm not asking the code for my requirement. I want to display the userdetails, at the time of Onchange event. I don't want to use javascript. My details are getting from db. If you provide some examples in AJAX than it will be helpful. Johan Snyman wrote: > > Dude, > > Me thinks you're lazy for not going through the tutorials supplied on the > documentation site: http://struts.apache.org/2.x/docs/home.html > > You'll have to set up 'n struts.xml file (saved in WEB-INF/classes folder) > that looks something like this: > > "-//Apache Software Foundation//DTD Struts Configuration 2.0//EN" > "http://struts.apache.org/dtds/struts-2.0.dtd";> > > > /> > > > > > userdetails,jsp > > > > You'll have to implement the action class, which has the values you want > to > pass to your jsp declared with getters and setter for each of them > (JavaBean > style): > > package com.imlazy; > > import **; > > @SuppressWarnings("serial") > public class DisplayUserDetails extends ActionSupport { > >private String userName; >private String userAddress; >private List userNameList; >// etc > > @Override > public String execute() throws Exception { > // HERE YOU DO YOUR DB ACCESS AND WHATEVER TO POPULATE YOUR FIELDS > } > > public String getUserName() { > return userName; > } > > public void setUsername(String userName) { > this.userName = username; > } > > // Other getters and setters > } > > And finally your jsp that will be displaying the fields: > > <%@ page contentType="text/html;charset=UTF-8" language="java" %> > <%@ taglib prefix="s" uri="/struts-tags" %> > > > > > > > > >headerKey="-1" /> > > > > > > > > > > This is just touching what you need to do and know. Most important is to > understand. Go through the tutorial, know what you need to get an action > to > display what you want to display (choose one user and just display the > values for that user). Only then start thinking about AJAX and how you > should be changing what is displayed as the combobox is changed. > > > > Jo > > > > > > -Original Message- > From: Johnson nickel [mailto:[EMAIL PROTECTED] > Sent: 31 January 2008 07:35 AM > To: user@struts.apache.org > Subject: RE: Struts 2 onchange event to get values from databases > > > > I am very new to Struts 2 and Ajax. If u have any samples please send it. > > Johan Snyman wrote: >> >> Hi Johnson (and others), >> I'm not really as retarded as I sound in the previous mail
Re: [S2.1] dojo widget dialog
Your code likes fine so it appears that dojo has not parsed the html for widgets. I think there's an attribute on sx:head to enable this in Struts2.1 (parseContent=true or something like that) Desbois Arnaud wrote: I'm using Struts 2.1.0, and I want to use the dojo widget dialog. I try this simple code: <[EMAIL PROTECTED] prefix="sx" uri="/struts-dojo-tags" %>dojo.require("dojo.widget.Dialog"); var dlg; function init() { dlg = dojo.widget.byId("dialogContent"); dojo.debug("dlg="+dlg); alert(dlg+" "+document.getElementById("dialogContent")); } dojo.addOnLoad(init); Show Hello World! But the variable dlg is always undefined (but with the document.getElementById("dialogContent"), the div is correctly present) How I can correctly use the widget dialog into Struts 2.1.0 ? Best regards Arnaud No virus found in this incoming message. Checked by AVG Free Edition. Version: 7.5.516 / Virus Database: 269.19.15/1249 - Release Date: 29/01/2008 9:51 AM - To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED]
RE: Struts 2 onchange event to get values from databases
Thanks for your quick response. I have created Jsp and action and struts.xml. you are mistaken me(imlazy), i'm not asking the code for my requirement. I want to display the userdetails, at the time of Onchange event. I don't want to use javascript. My details are getting from db. If you provide some examples in AJAX than it will be helpful. Johan Snyman wrote: > > Dude, > > Me thinks you're lazy for not going through the tutorials supplied on the > documentation site: http://struts.apache.org/2.x/docs/home.html > > You'll have to set up 'n struts.xml file (saved in WEB-INF/classes folder) > that looks something like this: > > "-//Apache Software Foundation//DTD Struts Configuration 2.0//EN" > "http://struts.apache.org/dtds/struts-2.0.dtd";> > > > /> > > > > > userdetails,jsp > > > > You'll have to implement the action class, which has the values you want > to > pass to your jsp declared with getters and setter for each of them > (JavaBean > style): > > package com.imlazy; > > import **; > > @SuppressWarnings("serial") > public class DisplayUserDetails extends ActionSupport { > >private String userName; >private String userAddress; >private List userNameList; >// etc > > @Override > public String execute() throws Exception { > // HERE YOU DO YOUR DB ACCESS AND WHATEVER TO POPULATE YOUR FIELDS > } > > public String getUserName() { > return userName; > } > > public void setUsername(String userName) { > this.userName = username; > } > > // Other getters and setters > } > > And finally your jsp that will be displaying the fields: > > <%@ page contentType="text/html;charset=UTF-8" language="java" %> > <%@ taglib prefix="s" uri="/struts-tags" %> > > > > > > > > >headerKey="-1" /> > > > > > > > > > > This is just touching what you need to do and know. Most important is to > understand. Go through the tutorial, know what you need to get an action > to > display what you want to display (choose one user and just display the > values for that user). Only then start thinking about AJAX and how you > should be changing what is displayed as the combobox is changed. > > > > Jo > > > > > > -Original Message- > From: Johnson nickel [mailto:[EMAIL PROTECTED] > Sent: 31 January 2008 07:35 AM > To: user@struts.apache.org > Subject: RE: Struts 2 onchange event to get values from databases > > > > I am very new to Struts 2 and Ajax. If u have any samples please send it. > > Johan Snyman wrote: >> >> Hi Johnson (and others), >> I'm not really as retarded as I sound in the previous mail, just >> distracted >> while I was composing the mail. Please contact me if you find it as >> difficult to follow as I did after reading the first reply... >> >> Jo >> >> >> >> >> -Original Message- >> From: Johan Snyman [mailto:[EMAIL PROTECTED] >> Sent: 30 January 2008 03:43 PM >> To: 'Struts Users Mailing List' >> Subject: RE: Struts 2 onchange event to get values from databases >> >> Hi Johnson, >> >> I'm no Struts expert but from my experience you have two ways of >> implementing what you want to achieve. >> >> 1. You can populate your dropdown box and have the fields empty. On your >> element you can set the onchange to call a javascript function that calls >> the same action, but passing it the content of your combobox, to do your >> database lookup on the server side and then pass the info to your >> userdetails.jsp where you can set your fields. >> >> 2. You can use AJAX to do the call asynchrononously, that is the value is >> passed to an action on the server and without the values passed back and >> filled into your fields. Nowadays you'll find plenty of tutorials and >> examples out there. Check out the following: >> >> http://struts.apache.org/2.x/docs/ajax.html >> (the official Struts AJAX guide) >> >> http://www.roseindia.net/struts/struts2/struts2ajax/index.shtml >> (easy login example) >> >> > http://www.javaworld.com/javaworld/jw-08-2007/jw-08-ajaxtables.html?fsrc=rss >> -index >> (although is a rather tough example to follow if you're new to AJAX) >> >> http://www.planetstruts.org/struts2-showcase/showcase.action >> (showcase examples) >> >> Hope this helps >> >> Jo >> >> >> >> -Original Message- >> From: Johnson nickel [mailto:[EMAIL PROTECTED] >> Sent: 30 January 2008 03:26 PM >> To: user@struts.apache.org >> Subject: Struts 2 onchange event to get values from databases >> >> >> Hi All, >> >> I am using Struts 2 application, i have userdetails.jsp its >> contains five text fields. >> two buttons save and update. In my action i have written save() method >> and >> update() method. >> >> In my jsp one drop down box its contains users. At the time of onchange >> event to populate the text fileds values from databases. >> can u give me any solutions
RE: Struts 2 onchange event to get values from databases
Dude, Me thinks you're lazy for not going through the tutorials supplied on the documentation site: http://struts.apache.org/2.x/docs/home.html You'll have to set up 'n struts.xml file (saved in WEB-INF/classes folder) that looks something like this: http://struts.apache.org/dtds/struts-2.0.dtd";> userdetails,jsp You'll have to implement the action class, which has the values you want to pass to your jsp declared with getters and setter for each of them (JavaBean style): package com.imlazy; import **; @SuppressWarnings("serial") public class DisplayUserDetails extends ActionSupport { private String userName; private String userAddress; private List userNameList; // etc @Override public String execute() throws Exception { // HERE YOU DO YOUR DB ACCESS AND WHATEVER TO POPULATE YOUR FIELDS } public String getUserName() { return userName; } public void setUsername(String userName) { this.userName = username; } // Other getters and setters } And finally your jsp that will be displaying the fields: <%@ page contentType="text/html;charset=UTF-8" language="java" %> <%@ taglib prefix="s" uri="/struts-tags" %> This is just touching what you need to do and know. Most important is to understand. Go through the tutorial, know what you need to get an action to display what you want to display (choose one user and just display the values for that user). Only then start thinking about AJAX and how you should be changing what is displayed as the combobox is changed. Jo -Original Message- From: Johnson nickel [mailto:[EMAIL PROTECTED] Sent: 31 January 2008 07:35 AM To: user@struts.apache.org Subject: RE: Struts 2 onchange event to get values from databases I am very new to Struts 2 and Ajax. If u have any samples please send it. Johan Snyman wrote: > > Hi Johnson (and others), > I'm not really as retarded as I sound in the previous mail, just > distracted > while I was composing the mail. Please contact me if you find it as > difficult to follow as I did after reading the first reply... > > Jo > > > > > -Original Message- > From: Johan Snyman [mailto:[EMAIL PROTECTED] > Sent: 30 January 2008 03:43 PM > To: 'Struts Users Mailing List' > Subject: RE: Struts 2 onchange event to get values from databases > > Hi Johnson, > > I'm no Struts expert but from my experience you have two ways of > implementing what you want to achieve. > > 1. You can populate your dropdown box and have the fields empty. On your > element you can set the onchange to call a javascript function that calls > the same action, but passing it the content of your combobox, to do your > database lookup on the server side and then pass the info to your > userdetails.jsp where you can set your fields. > > 2. You can use AJAX to do the call asynchrononously, that is the value is > passed to an action on the server and without the values passed back and > filled into your fields. Nowadays you'll find plenty of tutorials and > examples out there. Check out the following: > > http://struts.apache.org/2.x/docs/ajax.html > (the official Struts AJAX guide) > > http://www.roseindia.net/struts/struts2/struts2ajax/index.shtml > (easy login example) > > http://www.javaworld.com/javaworld/jw-08-2007/jw-08-ajaxtables.html?fsrc=rss > -index > (although is a rather tough example to follow if you're new to AJAX) > > http://www.planetstruts.org/struts2-showcase/showcase.action > (showcase examples) > > Hope this helps > > Jo > > > > -Original Message- > From: Johnson nickel [mailto:[EMAIL PROTECTED] > Sent: 30 January 2008 03:26 PM > To: user@struts.apache.org > Subject: Struts 2 onchange event to get values from databases > > > Hi All, > > I am using Struts 2 application, i have userdetails.jsp its > contains five text fields. > two buttons save and update. In my action i have written save() method and > update() method. > > In my jsp one drop down box its contains users. At the time of onchange > event to populate the text fileds values from databases. > can u give me any solutions how to do this? > > -- > View this message in context: > http://www.nabble.com/Struts-2-onchange-event-to-get-values-from-databases-t > p15182158p15182158.html > Sent from the Struts - User mailing list archive at Nabble.com. > > > - > To unsubscribe, e-mail: [EMAIL PROTECTED] > For additional commands, e-mail: [EMAIL PROTECTED] > > No virus found in this incoming message. > Checked by AVG Free Edition. > Version: 7.5.516 / Virus Database: 269.19.16/1250 - Release Date: > 2008/01/29 > 10:20 PM > > > No virus found in this outgoing message. > Checked by AVG Free Edition. > Version: 7.5.516 / Virus Database: 269.19.16/1250 - Release Date: > 2008/01/29 > 10:20 PM > > > > -
RE: Struts 2 onchange event to get values from databases
I am very new to Struts 2 and Ajax. If u have any samples please send it. Johan Snyman wrote: > > Hi Johnson (and others), > I'm not really as retarded as I sound in the previous mail, just > distracted > while I was composing the mail. Please contact me if you find it as > difficult to follow as I did after reading the first reply... > > Jo > > > > > -Original Message- > From: Johan Snyman [mailto:[EMAIL PROTECTED] > Sent: 30 January 2008 03:43 PM > To: 'Struts Users Mailing List' > Subject: RE: Struts 2 onchange event to get values from databases > > Hi Johnson, > > I'm no Struts expert but from my experience you have two ways of > implementing what you want to achieve. > > 1. You can populate your dropdown box and have the fields empty. On your > element you can set the onchange to call a javascript function that calls > the same action, but passing it the content of your combobox, to do your > database lookup on the server side and then pass the info to your > userdetails.jsp where you can set your fields. > > 2. You can use AJAX to do the call asynchrononously, that is the value is > passed to an action on the server and without the values passed back and > filled into your fields. Nowadays you'll find plenty of tutorials and > examples out there. Check out the following: > > http://struts.apache.org/2.x/docs/ajax.html > (the official Struts AJAX guide) > > http://www.roseindia.net/struts/struts2/struts2ajax/index.shtml > (easy login example) > > http://www.javaworld.com/javaworld/jw-08-2007/jw-08-ajaxtables.html?fsrc=rss > -index > (although is a rather tough example to follow if you're new to AJAX) > > http://www.planetstruts.org/struts2-showcase/showcase.action > (showcase examples) > > Hope this helps > > Jo > > > > -Original Message- > From: Johnson nickel [mailto:[EMAIL PROTECTED] > Sent: 30 January 2008 03:26 PM > To: user@struts.apache.org > Subject: Struts 2 onchange event to get values from databases > > > Hi All, > > I am using Struts 2 application, i have userdetails.jsp its > contains five text fields. > two buttons save and update. In my action i have written save() method and > update() method. > > In my jsp one drop down box its contains users. At the time of onchange > event to populate the text fileds values from databases. > can u give me any solutions how to do this? > > -- > View this message in context: > http://www.nabble.com/Struts-2-onchange-event-to-get-values-from-databases-t > p15182158p15182158.html > Sent from the Struts - User mailing list archive at Nabble.com. > > > - > To unsubscribe, e-mail: [EMAIL PROTECTED] > For additional commands, e-mail: [EMAIL PROTECTED] > > No virus found in this incoming message. > Checked by AVG Free Edition. > Version: 7.5.516 / Virus Database: 269.19.16/1250 - Release Date: > 2008/01/29 > 10:20 PM > > > No virus found in this outgoing message. > Checked by AVG Free Edition. > Version: 7.5.516 / Virus Database: 269.19.16/1250 - Release Date: > 2008/01/29 > 10:20 PM > > > > - > To unsubscribe, e-mail: [EMAIL PROTECTED] > For additional commands, e-mail: [EMAIL PROTECTED] > > No virus found in this incoming message. > Checked by AVG Free Edition. > Version: 7.5.516 / Virus Database: 269.19.16/1250 - Release Date: > 2008/01/29 > 10:20 PM > > > No virus found in this outgoing message. > Checked by AVG Free Edition. > Version: 7.5.516 / Virus Database: 269.19.16/1250 - Release Date: > 2008/01/29 > 10:20 PM > > > > - > To unsubscribe, e-mail: [EMAIL PROTECTED] > For additional commands, e-mail: [EMAIL PROTECTED] > > > -- View this message in context: http://www.nabble.com/Struts-2-onchange-event-to-get-values-from-databases-tp15182158p15198502.html 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: dojo script for DATEPICKER tag
Have you tried the startDate and endDate parameters for the tag and received an error? http://struts.apache.org/2.x/docs/datetimepicker.html -Wes On Thu, 2008-01-31 at 05:24 +, Naveen Kumar M wrote: > Hi, > > We have a reqierment to control startdate and enddate of the datepicker > dynamically, so i have tried out for controlling it by a dojo script, which > is breaking up the appearance of datepicker. So can any one suggest how to > control it dyanimcally. > > thanks in advance > > > regards, > minchu > > > - > Unlimited freedom, unlimited storage. Get it now - To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED]
dojo script for DATEPICKER tag
Hi, We have a reqierment to control startdate and enddate of the datepicker dynamically, so i have tried out for controlling it by a dojo script, which is breaking up the appearance of datepicker. So can any one suggest how to control it dyanimcally. thanks in advance regards, minchu - Unlimited freedom, unlimited storage. Get it now
Re: Question about Struts 2 Flow Control
actually, S2 have a equivelent to spring's command object. S2 can populate the model object for you, if you get right interceptor. and when a invalid submissiom comes in, s2 action can forward you back to the input page with error messages. s2 also has an oblivious advantage against spring mvc, that is s2 can do whatever spring mvc can do with only one type of action. 2008/1/30, Musachy Barroso <[EMAIL PROTECTED]>: > I am feeling really dumb now, that doesn't sound "very easy" at all > :). Could you re-write your question for non-spring mvc users? > > musachy > > On Jan 30, 2008 2:36 PM, claym <[EMAIL PROTECTED]> wrote: > > > > One of the things I really liked about Spring MVC was the fact that it was > > very easy to control the flow of a request. You could use referenceData() > to > > add data that was needed on the page but not necessarily form related, > then > > formBackingObject() for the actual pre-submission form population, and > then > > control the processing of pre-submit and post-submit with showForm() and > > onSubmit() > > > > It was also smart enough to repopulate things like referenceData if there > > was an invalid submission. > > > > Part of this was due to the fact that there were lots of different types > of > > controllers - all the referenceData and formBackingObject wasn't necessary > > if you're just displaying a non-form page, but you could always use > > SimpleFormController if you needed it. > > > > I'm not seeing that kind of behavior in Struts 2. I'm not saying it's > > required functionality, but I certainly appreciated it in Spring MVC. > > > > Is it there and I'm not seeing it? How would you control the request like > > this? > > -- > > View this message in context: > http://www.nabble.com/Question-about-Struts-2-Flow-Control-tp15190024p15190024.html > > Sent from the Struts - User mailing list archive at Nabble.com. > > > > > > - > > To unsubscribe, e-mail: [EMAIL PROTECTED] > > For additional commands, e-mail: [EMAIL PROTECTED] > > > > > > > > -- > "Hey you! Would you help me to carry the stone?" Pink Floyd > > - > To unsubscribe, e-mail: [EMAIL PROTECTED] > For additional commands, e-mail: [EMAIL PROTECTED] > > -- Best Regards Wong Tseng - To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED]
Re: #request scope
Yeah, that's what I thought too! I'm passing the parameter via: and the tag outputs the number to the top of the page just fine. In fact, if I use #parameters.model.parentId I get nothing. The problem is that I don't get anything from the tag once inside the iterator. On Jan 30, 2008 3:11 PM, Dave Newton <[EMAIL PROTECTED]> wrote: > --- [EMAIL PROTECTED] wrote: > > Parameters and it contains the value immediately before entering the > > iterator, as I am printing it out. Seems goofy to have to set a var > just > > to use it in the loop two lines later. > > #request is attributes. #parameters is parameters. > > I can't dupe the issue with attributes. > > d. > > > > > On Jan 29, 2008 5:10 PM, Dave Newton <[EMAIL PROTECTED]> wrote: > > > > > --- stanlick <[EMAIL PROTECTED]> wrote: > > > > I have a weird situation where I am losing a request > > > > parameter inside a loop! > > > > [...] > > > > > > > > > > Doesn't "#request" retrieve request *attributes*? > > > > > > Dave > > > > > > > > > - > > > To unsubscribe, e-mail: [EMAIL PROTECTED] > > > For additional commands, e-mail: [EMAIL PROTECTED] > > > > > > > > > > > > -- > > Scott > > [EMAIL PROTECTED] > > > > > - > To unsubscribe, e-mail: [EMAIL PROTECTED] > For additional commands, e-mail: [EMAIL PROTECTED] > > -- Scott [EMAIL PROTECTED]
Re: #request scope
--- [EMAIL PROTECTED] wrote: > Parameters and it contains the value immediately before entering the > iterator, as I am printing it out. Seems goofy to have to set a var just > to use it in the loop two lines later. #request is attributes. #parameters is parameters. I can't dupe the issue with attributes. d. > > On Jan 29, 2008 5:10 PM, Dave Newton <[EMAIL PROTECTED]> wrote: > > > --- stanlick <[EMAIL PROTECTED]> wrote: > > > I have a weird situation where I am losing a request > > > parameter inside a loop! > > > [...] > > > > > > > Doesn't "#request" retrieve request *attributes*? > > > > Dave > > > > > > - > > To unsubscribe, e-mail: [EMAIL PROTECTED] > > For additional commands, e-mail: [EMAIL PROTECTED] > > > > > > > -- > Scott > [EMAIL PROTECTED] > - To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED]
Re: Question about Struts 2 Flow Control
I am feeling really dumb now, that doesn't sound "very easy" at all :). Could you re-write your question for non-spring mvc users? musachy On Jan 30, 2008 2:36 PM, claym <[EMAIL PROTECTED]> wrote: > > One of the things I really liked about Spring MVC was the fact that it was > very easy to control the flow of a request. You could use referenceData() to > add data that was needed on the page but not necessarily form related, then > formBackingObject() for the actual pre-submission form population, and then > control the processing of pre-submit and post-submit with showForm() and > onSubmit() > > It was also smart enough to repopulate things like referenceData if there > was an invalid submission. > > Part of this was due to the fact that there were lots of different types of > controllers - all the referenceData and formBackingObject wasn't necessary > if you're just displaying a non-form page, but you could always use > SimpleFormController if you needed it. > > I'm not seeing that kind of behavior in Struts 2. I'm not saying it's > required functionality, but I certainly appreciated it in Spring MVC. > > Is it there and I'm not seeing it? How would you control the request like > this? > -- > View this message in context: > http://www.nabble.com/Question-about-Struts-2-Flow-Control-tp15190024p15190024.html > Sent from the Struts - User mailing list archive at Nabble.com. > > > - > To unsubscribe, e-mail: [EMAIL PROTECTED] > For additional commands, e-mail: [EMAIL PROTECTED] > > -- "Hey you! Would you help me to carry the stone?" Pink Floyd - To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED]
Question about Struts 2 Flow Control
One of the things I really liked about Spring MVC was the fact that it was very easy to control the flow of a request. You could use referenceData() to add data that was needed on the page but not necessarily form related, then formBackingObject() for the actual pre-submission form population, and then control the processing of pre-submit and post-submit with showForm() and onSubmit() It was also smart enough to repopulate things like referenceData if there was an invalid submission. Part of this was due to the fact that there were lots of different types of controllers - all the referenceData and formBackingObject wasn't necessary if you're just displaying a non-form page, but you could always use SimpleFormController if you needed it. I'm not seeing that kind of behavior in Struts 2. I'm not saying it's required functionality, but I certainly appreciated it in Spring MVC. Is it there and I'm not seeing it? How would you control the request like this? -- View this message in context: http://www.nabble.com/Question-about-Struts-2-Flow-Control-tp15190024p15190024.html Sent from the Struts - User mailing list archive at Nabble.com. - To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED]
Struts, Interceptor error message customization
Hello, So I am currently using Struts, including an action that has a fileUpload Interceptor that checks for files that are too large and certain allowable file types. Right now if either of these conditions are met, the system will throw a generic HTTP 500 error up. What I am wondering is how to customize this. in the docs: http://struts.apache.org/2.0.6/struts2-core/apidocs/org/apache/struts2/interceptor/FileUploadInterceptor.html i found these messages that i can supposedly customize. however, the doc does not specify WHERE i am supposed to put these error messages at, and furthermore, after looking at the source code for FileUploadInterceptor, I found that these messages are printed to the log file, and it doesn't look like it prints to the actual HTML. * struts.messages.error.uploading - a general error that occurs when the file could not be uploaded * struts.messages.error.file.too.large - occurs when the uploaded file is too large * struts.messages.error.content.type.not.allowed - occurs when the uploaded file does not match the expected content types specified The doc says that these error messages originate from struts-messages.properties. I'm guessing that's in the struts.jar itself because I don't see it anywhere else, so am I supposed to modify that directly? I'm a little bit iffy about doing that. So, in a nutshell, how do I catch an Interceptor error and make it redirect to a nice page instead of the generic HTTP 500 page? Actually, what would be better is to redirect to an action while passing into it a parameter "message" that will contain error messages. Then, in the JSP i want to do to grab that message. thank you!
session or interceptor initialization / configuration problem
I have an intermittent problem possibly related to session creation or Interceptor configuration. In a few words, when a browser is first opened and a valid action is requested, an exception is returned. After I request the base application name with no action, a successful response is returned, and then I can request any action. In detail: - When following a hyperlink to a page with or without parameters, error - when closing / opening browser and going directly to any valid action, get error - when closing / opening browser and going directly to anything that would invoke the default action, get error - after trying these things, there is no error when requesting the application by base name alone, with no action in the URL - once this has been done, the above things that didn't work, now work - I have a customer interceptor before 'prepare'. when request.getSession() is called, a session object is returned (as expected) - this interceptor calls session.setAttribute() to set various parameters - my action class implements SessionAware (and Preparable) to obtain the sessionMap object - following the above actions that result in errors, sessionMap is empty when called in the Preparable method - when the application is working, sessionMap is not empty as expected My interceptor configuration in struts.xml looks like: 20971520 dojo\..* input,back,cancel,browse input,back,cancel,browse Also, here is a debug stack trace when there is a problem: 10:24:46,453 DEBUG ConfigurationManager:156 - Checking ConfigurationProviders for reload. 10:24:46,453 DEBUG InstantiatingNullHandler:72 - Entering nullPropertyValue [EMAIL PROTECTED], property=struts] 10:24:46,453 DEBUG ConfigurationManager:156 - Checking ConfigurationProviders for reload. 10:24:46,453 DEBUG DefaultActionProxy:65 - Creating an DefaultActionProxy for namespace / and action name home 10:24:46,468 DEBUG I18nInterceptor:97 - intercept '//home' { 10:24:46,468 DEBUG I18nInterceptor:110 - requested_locale=null 10:24:46,468 DEBUG I18nInterceptor:140 - before Locale=en_US 10:24:46,468 INFO LocaleInterceptor:38 - url: http://localhost:8080/TechNotes 10:24:46,468 DEBUG LocaleInterceptor:57 - locale language (based on url) = technotes 10:24:46,468 DEBUG LocaleInterceptor:59 - application name (based on corresponding properties file): TechNotes 10:24:46,468 DEBUG PrefixMethodInvocationUtil:141 - cannot find method [prepareHome] in action [EMAIL PROTECTED] 10:24:46,468 DEBUG PrefixMethodInvocationUtil:141 - cannot find method [prepareDoHome] in action [EMAIL PROTECTED] 10:24:46,468 ERROR [default]:253 - Servlet.service() for servlet default threw exception java.lang.NullPointerException at com.wamnet.notes.webactions.NoteAction.prepare(NoteAction.java:163) at com.opensymphony.xwork2.interceptor.PrepareInterceptor.doIntercept(PrepareInterceptor.java:118) at com.opensymphony.xwork2.interceptor.MethodFilterInterceptor.intercept(MethodFilterInterceptor.java:86) at com.opensymphony.xwork2.DefaultActionInvocation$2.doProfiling(DefaultActionInvocation.java:224) at com.opensymphony.xwork2.DefaultActionInvocation$2.doProfiling(DefaultActionInvocation.java:223) at com.opensymphony.xwork2.util.profiling.UtilTimerStack.profile(UtilTimerStack.java:455) at com.opensymphony.xwork2.DefaultActionInvocation.invoke(DefaultActionInvocation.java:221) at org.apache.struts2.interceptor.ServletConfigInterceptor.intercept(ServletConfigInterceptor.java:170) at com.opensymphony.xwork2.DefaultActionInvocation$2.doProfiling(DefaultActionInvocation.java:224) at com.opensymphony.xwork2.DefaultActionInvocation$2.doProfiling(DefaultActionInvocation.java:223) at com.opensymphony.xwork2.util.profiling.UtilTimerStack.profile(UtilTimerStack.java:455) at com.opensymphony.xwork2.DefaultActionInvocation.invoke(DefaultActionInvocation.java:221) at com.mndigi.notes.util.LocaleInterceptor.intercept(LocaleInterceptor.java:65) at com.opensymphony.xwork2.DefaultActionInvocation$2.doProfiling(DefaultActionInvocation.java:224) at com.opensymphony.xwork2.DefaultActionInvocation$2.doProfiling(DefaultActi
Re: Error messages is repeated Using Struts 2 Annotation validation
The documentation covers using images in submit buttons. http://struts.apache.org/2.0.11/docs/submit.html * input: renders as html * image: renders as html * button: renders as html Regards, Randy Burgess Sr. Web Applications Developer Nuvox Communications > From: Johnson nickel <[EMAIL PROTECTED]> > Reply-To: Struts Users Mailing List > Date: Tue, 29 Jan 2008 23:28:42 -0800 (PST) > To: > Subject: Re: Error messages is repeated Using Struts 2 Annotation validation > > > Thanks for your quick response, > > In my Login.jsp, > > > > > Instead of using , I used html image tag . > If i used it works fine. > > > > > > newton.dave wrote: >> >> --- Johnson nickel <[EMAIL PROTECTED]> wrote: >>> >> @RequiredFieldValidator(type=ValidatorType.SIMPLE,fieldName="username",messag >> e="UserName >>> is required") >> >> For a string field you'll probably want to use the >> @RequiredStringValidator: >> a text field will return an empty string, whereas @RequiredFieldValidator >> only checks for null-ness (different from blank-ness). >> >>> Same as For password also , >> >> *Exactly* the same? (You put the right "fieldName" for the password field, >> right?) >> >>> When i have submit the Login button, the Error messages is displaying >> Repeated. >> >> You'll need to provide some JSP and possibly configuration in order to >> help >> diagnose the problem. >> >> Where are the duplicated messages appearing? >> >> Dave >> >> >> >> - >> To unsubscribe, e-mail: [EMAIL PROTECTED] >> For additional commands, e-mail: [EMAIL PROTECTED] >> >> >> > > -- > View this message in context: > http://www.nabble.com/Error-messages-is-repeated-Using-Struts-2-Annotation-val > idation-tp15157319p15176802.html > 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: [S2] Where should I save the I18N properties file?
Hi The problem is solved by saving the properties in src/main/resources/com/dummy/action/package.properties src/main/resources/com/dummy/action/MyAction.properties Thank you! On Jan 30, 2008 6:05 PM, hezjing <[EMAIL PROTECTED]> wrote: > Hi > > I have an action in src/main/java/com/dummy/action/MyAction.java > and the locale messages defined in MyAction.properties and package.properties. > > I saved these properties files in src/main/java/com/dummy/action directory. > > When run (e.g. mvn jetty:run), the locale messages are not displayed. > Maybe the properties files are not loaded? > > Where should I save the properties files in Maven project directory? > > > -- > > Hez > -- Hez - To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED]
Re: AW: AW: struts1 and struts2 together
I have been migrating code from struts 1.x to 2.x and depending on how decoupled your presentation logic is, you should expect significant amount of work. The results have been very successful thus far (3 of 4 modules were migrated completely). Definitely less code to maintain afterwards and sure it's more readable (in my opinion), however the migration is not as trivial and you may find some "gotchas" along the way depending on how you have used Struts 1.x (tags, servlet, dispatchers, etc). Expect a decent learning curve as well due to some new features (value stack, thread-safety, OGNL notation) The one thing I would recommend is to absolutely understand your need to migrate. We determined it was the right move based on some of the new features that Struts 2 provided out of the box, and we needed for our application (We were writing more code just to make Struts 1 look like Struts 2 basically). Hope this help Otto, Frank wrote: no problem. I haven't migrate our project, because I have realized a new topic with struts2 in our project. It's a configurator with ajax (YUI). the rest is still struts1. kind regards, frank -Ursprüngliche Nachricht- Von: nagendrabvvs [mailto:[EMAIL PROTECTED] Gesendet: Mittwoch, 30. Januar 2008 14:10 An: user@struts.apache.org Betreff: Re: AW: struts1 and struts2 together Thanks a lot for quick reply, frank. Can i ask you one question? That, Were you able to moigrate your proj successfully with out any problems? -- Alberto A. Flores http://www.linkedin.com/in/aflores - To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED]
AW: AW: struts1 and struts2 together
no problem. I haven't migrate our project, because I have realized a new topic with struts2 in our project. It's a configurator with ajax (YUI). the rest is still struts1. kind regards, frank -Ursprüngliche Nachricht- Von: nagendrabvvs [mailto:[EMAIL PROTECTED] Gesendet: Mittwoch, 30. Januar 2008 14:10 An: user@struts.apache.org Betreff: Re: AW: struts1 and struts2 together Thanks a lot for quick reply, frank. Can i ask you one question? That, Were you able to moigrate your proj successfully with out any problems? -- View this message in context: http://www.nabble.com/AW%3A-struts1-and-struts2-together-tp15176577p15181850.html 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: #request scope
Parameters and it contains the value immediately before entering the iterator, as I am printing it out. Seems goofy to have to set a var just to use it in the loop two lines later. On Jan 29, 2008 5:10 PM, Dave Newton <[EMAIL PROTECTED]> wrote: > --- stanlick <[EMAIL PROTECTED]> wrote: > > I have a weird situation where I am losing a request > > parameter inside a loop! > > [...] > > > > Doesn't "#request" retrieve request *attributes*? > > Dave > > > - > To unsubscribe, e-mail: [EMAIL PROTECTED] > For additional commands, e-mail: [EMAIL PROTECTED] > > -- Scott [EMAIL PROTECTED]
RE: Struts 2 onchange event to get values from databases
Hi Johnson (and others), I'm not really as retarded as I sound in the previous mail, just distracted while I was composing the mail. Please contact me if you find it as difficult to follow as I did after reading the first reply... Jo -Original Message- From: Johan Snyman [mailto:[EMAIL PROTECTED] Sent: 30 January 2008 03:43 PM To: 'Struts Users Mailing List' Subject: RE: Struts 2 onchange event to get values from databases Hi Johnson, I'm no Struts expert but from my experience you have two ways of implementing what you want to achieve. 1. You can populate your dropdown box and have the fields empty. On your element you can set the onchange to call a javascript function that calls the same action, but passing it the content of your combobox, to do your database lookup on the server side and then pass the info to your userdetails.jsp where you can set your fields. 2. You can use AJAX to do the call asynchrononously, that is the value is passed to an action on the server and without the values passed back and filled into your fields. Nowadays you'll find plenty of tutorials and examples out there. Check out the following: http://struts.apache.org/2.x/docs/ajax.html (the official Struts AJAX guide) http://www.roseindia.net/struts/struts2/struts2ajax/index.shtml (easy login example) http://www.javaworld.com/javaworld/jw-08-2007/jw-08-ajaxtables.html?fsrc=rss -index (although is a rather tough example to follow if you're new to AJAX) http://www.planetstruts.org/struts2-showcase/showcase.action (showcase examples) Hope this helps Jo -Original Message- From: Johnson nickel [mailto:[EMAIL PROTECTED] Sent: 30 January 2008 03:26 PM To: user@struts.apache.org Subject: Struts 2 onchange event to get values from databases Hi All, I am using Struts 2 application, i have userdetails.jsp its contains five text fields. two buttons save and update. In my action i have written save() method and update() method. In my jsp one drop down box its contains users. At the time of onchange event to populate the text fileds values from databases. can u give me any solutions how to do this? -- View this message in context: http://www.nabble.com/Struts-2-onchange-event-to-get-values-from-databases-t p15182158p15182158.html Sent from the Struts - User mailing list archive at Nabble.com. - To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED] No virus found in this incoming message. Checked by AVG Free Edition. Version: 7.5.516 / Virus Database: 269.19.16/1250 - Release Date: 2008/01/29 10:20 PM No virus found in this outgoing message. Checked by AVG Free Edition. Version: 7.5.516 / Virus Database: 269.19.16/1250 - Release Date: 2008/01/29 10:20 PM - To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED] No virus found in this incoming message. Checked by AVG Free Edition. Version: 7.5.516 / Virus Database: 269.19.16/1250 - Release Date: 2008/01/29 10:20 PM No virus found in this outgoing message. Checked by AVG Free Edition. Version: 7.5.516 / Virus Database: 269.19.16/1250 - Release Date: 2008/01/29 10:20 PM - To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED]
RE: Struts 2 onchange event to get values from databases
Hi Johnson, I'm no Struts expert but from my experience you have two ways of implementing what you want to achieve. 1. You can populate your dropdown box and have the fields empty. On your element you can set the onchange to call a javascript function that calls the same action, but passing it the content of your combobox, to do your database lookup on the server side and then pass the info to your userdetails.jsp where you can set your fields. 2. You can use AJAX to do the call asynchrononously, that is the value is passed to an action on the server and without the values passed back and filled into your fields. Nowadays you'll find plenty of tutorials and examples out there. Check out the following: http://struts.apache.org/2.x/docs/ajax.html (the official Struts AJAX guide) http://www.roseindia.net/struts/struts2/struts2ajax/index.shtml (easy login example) http://www.javaworld.com/javaworld/jw-08-2007/jw-08-ajaxtables.html?fsrc=rss -index (although is a rather tough example to follow if you're new to AJAX) http://www.planetstruts.org/struts2-showcase/showcase.action (showcase examples) Hope this helps Jo -Original Message- From: Johnson nickel [mailto:[EMAIL PROTECTED] Sent: 30 January 2008 03:26 PM To: user@struts.apache.org Subject: Struts 2 onchange event to get values from databases Hi All, I am using Struts 2 application, i have userdetails.jsp its contains five text fields. two buttons save and update. In my action i have written save() method and update() method. In my jsp one drop down box its contains users. At the time of onchange event to populate the text fileds values from databases. can u give me any solutions how to do this? -- View this message in context: http://www.nabble.com/Struts-2-onchange-event-to-get-values-from-databases-t p15182158p15182158.html Sent from the Struts - User mailing list archive at Nabble.com. - To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED] No virus found in this incoming message. Checked by AVG Free Edition. Version: 7.5.516 / Virus Database: 269.19.16/1250 - Release Date: 2008/01/29 10:20 PM No virus found in this outgoing message. Checked by AVG Free Edition. Version: 7.5.516 / Virus Database: 269.19.16/1250 - Release Date: 2008/01/29 10:20 PM - To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED]
Struts 2 onchange event to get values from databases
Hi All, I am using Struts 2 application, i have userdetails.jsp its contains five text fields. two buttons save and update. In my action i have written save() method and update() method. In my jsp one drop down box its contains users. At the time of onchange event to populate the text fileds values from databases. can u give me any solutions how to do this? -- View this message in context: http://www.nabble.com/Struts-2-onchange-event-to-get-values-from-databases-tp15182158p15182158.html 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: AW: struts1 and struts2 together
Thanks a lot for quick reply, frank. Can i ask you one question? That, Were you able to moigrate your proj successfully with out any problems? -- View this message in context: http://www.nabble.com/AW%3A-struts1-and-struts2-together-tp15176577p15181850.html 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: s:if test with empty String
hi, probably u can go this way: < s:if test="{members[#status.index][1] eq null} > or < s:if test="{''.equals(members[#status.index][1])} > ... this is ognl and should help u out. let me know if it works. cheers, ravi quinquin2209 wrote: > > Hi All, > > I have an array of String "members"... where member[0] is the member id > and member[1] is the member's name. > > In the jsp, I want to display member[1] if it is not empty, or member[0] > if member[1] is empty. > > > > > > > > > > However, the else logic is executed no matter member[1] is empty or not. > > How can I test with empty string? > > Thanks in advance > > Queenie > -- View this message in context: http://www.nabble.com/s%3Aif-test-with-empty-String-tp15174836p15181533.html 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: CompositeActionMapper
I wish to use CompositeActionMapper to chain multiple Custom ActionMappers. in this case I get 'Http status 404'.. Any idea regarding? Thanks, Neha Bhatt Deryl Seale wrote: > > As an update, I can obviously use url-pattern's in my web.xml to more > finely control which requests get sent to Struts, but there is still > the matter of the embedded static resources bundled with the struts > library. Is there any setting to get the RestfulActionMapper to get > it to ignore requests for static resources? > > thanks. > --Deryl > > - > > Well I got a little further with this -- thanks! > > Now I can get CompositeActionManager to work properly for actions > that are mapped both with traditional URL's (ie: /foo/bar.action) and > REST style URL's (/foo/bar/1). Unfortunately, this seems to have > screwed up loading static content url's (/foo/bar.css) such that I > cannot get to JSP pages directly, and none of my stylesheets load. > Is there another mapper I need to add to this declaration: > > > value="org.apache.struts2.dispatcher.mapper.CompositeActionMapper"/> > > > thanks. > --Deryl > > On Mar 29, 2007, at 3:09 PM, Darren Salomons wrote: > >> >> Deryl, >> >> I'm not sure if you solved your problem but this is how I got it to >> work. >> In the struts.mapper.composite value it is a list of the bean >> references >> from the struts-default.xml it is not a list of class names. The >> bean name >> for the DefaultActionMapper is struts. So you could configure the >> DefaultActionMapper and the RestfulMapper with the following >> configuration >> in your struts.xml file. >> >> > value="org.apache.struts2.dispatcher.mapper.CompositeActionMapper"/> >> >> >> Hope this helps, >> >> Darren Salomons >> >> >> >> Deryl Seale wrote: >>> >>> Yes, I tried that, and all I got was an exception when I started up >>> the application saying that an ActionMapper with the name "struts" >>> had already been loaded, presumedly from struts-default.xml. If >>> there is a way to make Struts use CompositeActionMapper with some >>> configuration entry in struts.xml, it is not obvious to me how to do >>> it (in spite of the documentation). >>> >>> --Deryl >>> >>> On Mar 20, 2007, at 10:26 AM, Dave Newton wrote: >>> --- Deryl Seale <[EMAIL PROTECTED]> wrote: > I am having some trouble getting the > CompositeActionMapper to work > properly. I have the following specified in my > struts.properties: > [...] Have you tried it like this in struts.xml? >>> type="org.apache.struts2.dispatcher.mapper.ActionMapper" name="struts" class="org.apache.struts2.dispatcher.mapper.CompositeActionMapper" /> >>> value="org.apache.struts2.dispatcher.mapper.DefaultActionMapper,foo. ba r.MyActionMapper,foo.bar.MyAnotherActionMapper" /> (I haven't; this is what's in the API docs, though, and I tend to avoid the properties file.) d. __ __ No need to miss a message. Get email on-the-go with Yahoo! Mail for Mobile. Get started. http://mobile.yahoo.com/mail - To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED] >>> >>> -- >>> Deryl Seale -- Director of Engineering >>> c: 734.883.9636 >>> [EMAIL PROTECTED] >>> www.intel-assess.com >>> >>> >>> >>> >>> >> >> -- >> View this message in context: http://www.nabble.com/ >> CompositeActionMapper-tf3433990.html#a9740579 >> Sent from the Struts - User mailing list archive at Nabble.com. >> >> >> - >> To unsubscribe, e-mail: [EMAIL PROTECTED] >> For additional commands, e-mail: [EMAIL PROTECTED] >> > > -- > Deryl Seale -- Director of Engineering > c: 734.883.9636 > [EMAIL PROTECTED] > www.intel-assess.com > > > > > -- View this message in context: http://www.nabble.com/CompositeActionMapper-tp9573442p15178593.html Sent from the Struts - User mailing list archive at Nabble.com. - To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED]
[S2] Where should I save the I18N properties file?
Hi I have an action in src/main/java/com/dummy/action/MyAction.java and the locale messages defined in MyAction.properties and package.properties. I saved these properties files in src/main/java/com/dummy/action directory. When run (e.g. mvn jetty:run), the locale messages are not displayed. Maybe the properties files are not loaded? Where should I save the properties files in Maven project directory? -- Hez - To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED]
[S2.1] dojo widget dialog
I'm using Struts 2.1.0, and I want to use the dojo widget dialog. I try this simple code: <[EMAIL PROTECTED] prefix="sx" uri="/struts-dojo-tags" %> dojo.require("dojo.widget.Dialog"); var dlg; function init() { dlg = dojo.widget.byId("dialogContent"); dojo.debug("dlg="+dlg); alert(dlg+" "+document.getElementById("dialogContent")); } dojo.addOnLoad(init); Show Hello World! But the variable dlg is always undefined (but with the document.getElementById("dialogContent"), the div is correctly present) How I can correctly use the widget dialog into Struts 2.1.0 ? Best regards Arnaud
Re: dojo 1.0 DateTextBox and ISO-8601
Hi Jeromy. Jeromy Evans wrote: Hi Roberto, This is precisely what a custom type-converter is for: http://struts.apache.org/2.x/docs/type-conversion.html It accepts a string and converts to an object, and vice versa. It's invoked by the conversion interceptor. I'm going to implement a converter right away! However, I thought the default Date converter is already setup to convert ISO-8601 strings to java.util.Date and vice versa. You might get a nice surprise if you add a Date property to your model with the startDate name. (The docs mention a locale-dependent date rather than ISO-8601 so I may be mistaken though). Unfortunately not. I have a Date object in my model named startDate and it complained about not being able to parse the string. That's true at least for jave 5.. don't know about java 6.. but it's strange that ISO-8601 is not supported. Roberto Nunnari wrote: Hi. I have a form that posts to a ModelDriven Action. In that form I'm trying to use raw dojo 1.0 DateTextBox, but I have trouble with the formatting of the date.. According to the dojo docs, when communicating to/from the server, it uses ISO-8601. As java.util.Date doesn't know how to parse ISO-8601 dates, I suppose I'll use a method on the action to parse, but I'm interested to know how others have solved this issue. Maybe with an interceptor? as for formatting the date to initialize the dojo input, here is the code I put in my jsp: required="true" value="/>" size="40"/> Best regards. - To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED] -- Robi - To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED]
Struts - Dojo Problem: Internet Explorer cannot open the internet site ... Operation Aborted
Hi I’ve been struggling of late to get the dojo-tags working (but that is another story all together), but have gotten it to the point where finally I can see a “tabbedpanel” displayed in Firefox. Unfortunately the same code does not display in IE, giving me rather a pop-up with the text in the subject line of this mail. >From HYPERLINK "http://support.microsoft.com/default.aspx/kb/927917"http://support.microsof t.com/default.aspx/kb/927917 I quote the MS explanation for the error: “This problem occurs because a child container HTML element contains script code that tries to modify the parent container element of the child container. The script code tries to modify the parent container element by using either the innerHTML method or the appendChild method.” Also on HYPERLINK "http://clientside.cnet.com/code-snippets/manipulating-the-dom/ie-and-operat ion-aborted/"http://clientside.cnet.com/code-snippets/manipulating-the-dom/i e-and-operation-aborted/ the explanation is: “IE does this when you attempt to modify a DOM element before it is closed.” My application uses Tiles to compose the page. - If I add the tag in the template file, I get the above mentioned error and after clicking “Okay” IE says the page could not be found (with no apparent errors in my JBoss terminal. - If I move the header tag to the jsp that describes the tile I want to display the tabbedpanel with, IE does not give me the error, but the div inside () the tag is displayed in the wrong position, that is, not inside the tabbedpanel. When I click on any other tab the div is displayed correctly (even the original). Also I have a filter set up to handle Hibernate transactions and the filter throws the following error: 09:58:02,281 ERROR [HibernateTransactionFilter] Exception caught when filtering ClientAbortException: java.net.SocketException: Connection reset by peer: socket write error Just for the record, I am using the struts-core-2.1.0.jar file, I use tiles 2.0.3 jars and the struts2-tiles-plugin-2.0.8.jar file. My question is if anybody else have run into a similar problem and found a solution. Also if anybody have got any comments on where the tag should be and if it makes sense to have it in the tile jsp (except that it seems to be only solution to get IE to display the page…) Thanks for reading all the way through this mail! J Jo No virus found in this outgoing message. Checked by AVG Free Edition. Version: 7.5.516 / Virus Database: 269.19.16/1250 - Release Date: 2008/01/29 10:20 PM