RE: [s2] Making textfield input optional

2008-07-24 Thread Jishnu Viswanath
Ignore my last mail on this thread. I did not see the replies. Regards, Jishnu Viswanath Software Engineer *(+9180)41190300 - 222(Ext) ll * ( + 91 ) 9731209330ll Tavant Technologies Inc., www.tavant.com PEOPLE :: PASSION :: EXCELLENCE -Original Message- From: Gabriel Belingueres [m

RE: [s2] Making textfield input optional

2008-07-24 Thread Jishnu Viswanath
Hey if you are using int, float, or double instead of them use Wrapper Classes id Integer, Float, Double former does not allow null value while later does allow. Regards, Jishnu Viswanath Software Engineer *(+9180)41190300 - 222(Ext) ll * ( + 91 ) 9731209330ll Tavant Technologies Inc., www.ta

Re: [S2] url tag to construct href in different namespace

2008-07-24 Thread Dave Newton
Namespaces typically begin with a "/"; try that. Dave --- On Thu, 7/24/08, John Cartwright <[EMAIL PROTECTED]> wrote: > From: John Cartwright <[EMAIL PROTECTED]> > Subject: [S2] url tag to construct href in different namespace > To: "Struts Users Mailing List" > Date: Thursday, July 24, 2008, 7

[S2] url tag to construct href in different namespace

2008-07-24 Thread John Cartwright
Hello All, I'm trying to use the url tag to construct a href which goes to a different namespace. It seems that all of the constructed URLs have the same base as the original page. For example, given a page reached at: http://lynx.ngdc.noaa.gov:8080/tideloader/message/View.action The markup

Re: What is the best way to handle cancel, Update, Back Buttons in Struts2

2008-07-24 Thread matt.payne
Just set the value name to cancel/back. e.g. --> in struts.xml cancel cancel back

Re: [S2] how to have the form horizontally?

2008-07-24 Thread Piero Sartini
You can use the simple theme. Or customize the templates of the xhtml theme. If you use the css theme then you may style it via css as well. I am using the simple theme - it gives the most control. IMHO the other themes are not flexible enough and make more work than they save. Piero Am

RE: namespace headpain

2008-07-24 Thread Brad A Cupit
on Wednesday, July 23, 2008 3:22 AM, Lyallex [mailto:[EMAIL PROTECTED] wrote: > > > > ">Create New > Establishment > (absolutely no idea why this works) I seem to remember that there is a difference between and If the namespace is omitted, S2 puts it in the "default namespace" [1] which b

[S2] how to have the form horizontally?

2008-07-24 Thread xianwinwin
I have a form in which I wish to have it align horizontally. If I use the tags like this: I get it in a vertical way. Does anyone know how to set it horizontally? * the idea is to create a table and let the end-user fill the information as if he sees an e

Re: [s2] Making textfield input optional

2008-07-24 Thread Gabriel Belingueres
Yes, you need to write this setter in your action class. 2008/7/24 Milan Milanovic <[EMAIL PROTECTED]>: > > Dear Gabriel, > > You mean in my action class ? > > -- > Milan > > > Gabriel Belingueres-2 wrote: >> >> You don't need to modify your model, just delegate to it: >>public void setVal

Re: [s2] Making textfield input optional

2008-07-24 Thread Milan Milanovic
Dear Gabriel, You mean in my action class ? -- Milan Gabriel Belingueres-2 wrote: > > You don't need to modify your model, just delegate to it: >public void setValue(String s) { >if (!StringUtils.isBlank(s)) { >try { >model.s

Re: [s2] Making textfield input optional

2008-07-24 Thread Gabriel Belingueres
You don't need to modify your model, just delegate to it: public void setValue(String s) { if (!StringUtils.isBlank(s)) { try { model.setValue(new BigDecimal(s)); catch(NumberFormatException e) {

Re: [s2] Making textfield input optional

2008-07-24 Thread Milan Milanovic
Dear Gabriel, thank you. I tried without my Converter class for BigDecimal and it is the same, when user doesn't enter value I got that error in a log. I'm using S2 2.0.11.1. This solution is good, but my value that is set comes from model where I have class and attribute (BigDecimal) with its g

Re: [s2] Making textfield input optional

2008-07-24 Thread Gabriel Belingueres
I'm using S2.1.2 (are you using the same version?), and it will throw a NumberFormatException when setting an empty string, but this workaround will make ParameterInterceptor to think it is setting a String parameter: public void setValue(String s) { if (!StringUtils.isBlan

Re: [s2] Making textfield input optional

2008-07-24 Thread Milan Milanovic
Dear Newton, Yes, I'm using BigDecimal type converter given here: http://www.nabble.com/-s2--Formatting-input-textfields-tt18593985.html http://www.nabble.com/-s2--Formatting-input-textfields-tt18593985.html . -- Thx, Milan newton.dave wrote: > > Are you using a BigDecimal type converter (on

Re: [s2] Making textfield input optional

2008-07-24 Thread Dave Newton
Are you using a BigDecimal type converter (one of which was just posted)? AFAIK it won't work w/o the converter, but I could be remembering incorrectly. Dave --- On Thu, 7/24/08, Milan Milanovic <[EMAIL PROTECTED]> wrote: > From: Milan Milanovic <[EMAIL PROTECTED]> > Subject: Re: [s2] Making te

Re: [s2] Making textfield input optional

2008-07-24 Thread Milan Milanovic
Dear Gabriel, no, my actual question is related to the issue when user doesn't enter anything to the textfield which is connected to BigDecimal in my action class. -- Thx, Milan Gabriel Belingueres-2 wrote: > > Please make sure that the input string is according the BigDecimal format: > http

AW: [S2] Using SSL, HTTP, HTTPS and invoking Action classes

2008-07-24 Thread Anastasios Patrikis
Hi Nuwan, this is the stuff I was looking for. Just some configuration in struts.xml and a few annotations. The Struts PlugIs is easy to use, and now everything works as expected. Thanks a lot, regards, Anastasios. -Ursprüngliche Nachricht- Von: Nuwan Chandrasoma [mailto:[EMAI

Re: [s2] Making textfield input optional

2008-07-24 Thread Gabriel Belingueres
Please make sure that the input string is according the BigDecimal format: http://java.sun.com/j2se/1.5.0/docs/api/java/math/BigDecimal.html#BigDecimal(java.lang.String) 2008/7/24 Milan Milanovic <[EMAIL PROTECTED]>: > > Hi Gabriel, > > no I cannot do this because my field is of type BigDecimal an

Re: struts2 validation, tiles definition in input result type, problem!

2008-07-24 Thread Dave Newton
Your action is submitting to "ProjectStatus"; is that action defined? Dave --- On Thu, 7/24/08, Halil Ağın <[EMAIL PROTECTED]> wrote: > From: Halil Ağın <[EMAIL PROTECTED]> > Subject: struts2 validation, tiles definition in input result type, problem! > To: user@struts.apache.org > Date: Thursd

Re: struts2 validation, tiles definition in input result type, problem!

2008-07-24 Thread Antonio Petrelli
2008/7/24 Halil Ağın <[EMAIL PROTECTED]>: > tomcat : apache-tomcat-6.0.16.tar.gz > > > WEB-INF/lib content: > > tiles-api-2.0.5.jar > tiles-core-2.0.5.jar > tiles-defs.xml > tiles-jsp-2.0.5.jar > struts2-config-browser-plugin-2.1.2.jar > struts2-core-2.1.2.jar > struts2-tiles-plugin-2.1.2.jar It s

[s2] Making textfield input optional

2008-07-24 Thread Milan Milanovic
Hi, I have one form with multiple textfields, and I want to one of that textfield be optional for user, i.e., he doesn't need to enter information in that particular field. Now, when user don't enter I get this in my log: ERROR com.opensymphony.xwork2.interceptor.ParametersInterceptor:204 - Para

Re: [s2] Making textfield input optional

2008-07-24 Thread Milan Milanovic
Hi Gabriel, it is a BigDecimal. -- Thx, Milan Gabriel Belingueres-2 wrote: > > Which is the data type of inValue? > > 2008/7/24 Milan Milanovic <[EMAIL PROTECTED]>: >> >> Hi, >> >> I have one form with multiple textfields, and I want to one of that >> textfield be optional for user, i.e., he

Re: struts2 validation, tiles definition in input result type, problem!

2008-07-24 Thread Halil Ağın
tomcat : apache-tomcat-6.0.16.tar.gz WEB-INF/lib content: tiles-api-2.0.5.jar tiles-core-2.0.5.jar tiles-defs.xml tiles-jsp-2.0.5.jar struts2-config-browser-plugin-2.1.2.jar struts2-core-2.1.2.jar struts2-tiles-plugin-2.1.2.jar -Halil AGIN 2008/7/24 Antonio Petrelli <[EMAIL PROTECTED]>: > 2

Re: Unit testing Struts2 + Spring application?

2008-07-24 Thread Norris Shelton
Take a look at this. This is set-up for Maven. I had to copy my /WEB-INF/applicationResources.xml to test/resources/ package mil.army.usarec.ars.techdemo; import static org.junit.Assert.*; import org.junit.*; import org.junit.runner.*; import org.springframework.beans.factory.annotation.*; i

Re: [s2] Making textfield input optional

2008-07-24 Thread Milan Milanovic
Hi Gabriel, no I cannot do this because my field is of type BigDecimal and I must have get/set methods for it. -- Thx, Milan Gabriel Belingueres-2 wrote: > > instead of: > > public vlid setInValue(BigDecimal x) { > this.x = x; > } > > test with this: > > public vlid setInValue(String s)

Re: [s2] Making textfield input optional

2008-07-24 Thread Jim Kiley
Doesn't that exception usually get thrown when, in this case, ViewAction doesn't have a setInValue() method? jk On Thu, Jul 24, 2008 at 10:31 AM, Gabriel Belingueres <[EMAIL PROTECTED]> wrote: > Which is the data type of inValue? > > 2008/7/24 Milan Milanovic <[EMAIL PROTECTED]>: > > > > Hi, > >

Re: struts2 validation, tiles definition in input result type, problem!

2008-07-24 Thread Antonio Petrelli
2008/7/24 Halil Ağın <[EMAIL PROTECTED]>: > Hello List; > org.apache.tiles.definition.NoSuchDefinitionException: tvq.projectstatus. at > org.apache.tiles.impl.BasicTilesContainer.render(BasicTilesContainer.java:394) > at > org.apache.tiles.impl.BasicTilesContainer.render(BasicTilesContainer.java:37

Re: [s2] Making textfield input optional

2008-07-24 Thread Gabriel Belingueres
instead of: public vlid setInValue(BigDecimal x) { this.x = x; } test with this: public vlid setInValue(String s) { this.x = new BigDecimal(s); } 2008/7/24 Milan Milanovic <[EMAIL PROTECTED]>: > > Hi Jim, > > no, I have that method. > > -- > Thx, Milan > > > Jim Kiley wrote: >> >> Doesn't

struts2 validation, tiles definition in input result type, problem!

2008-07-24 Thread Halil Ağın
Hello List; I am trying to implement validation in struts2. My action is as follow: tvq.projectstatus.{1} tvq.projectstatus.{1} tvq.projectstatus.{1} /ProjectStatus_list.action Since when validation process returns false, i want stru

Re: [s2] Making textfield input optional

2008-07-24 Thread Milan Milanovic
Hi Jim, no, I have that method. -- Thx, Milan Jim Kiley wrote: > > Doesn't that exception usually get thrown when, in this case, ViewAction > doesn't have a setInValue() method? > > jk > > On Thu, Jul 24, 2008 at 10:31 AM, Gabriel Belingueres > <[EMAIL PROTECTED]> > wrote: > >> Which is th

[s2] How to force validation to combobox field

2008-07-24 Thread Milan Milanovic
Hi, does anyone know how I can force user to choose value from a combo box by using S2 validation ? Now, when he submit the form combobox is empty and the next time when he submit error my occur if he don't choose anything from combox box. -- Thx, Milan -- View this message in context: http:/

Re: [s2] Making textfield input optional

2008-07-24 Thread Gabriel Belingueres
Which is the data type of inValue? 2008/7/24 Milan Milanovic <[EMAIL PROTECTED]>: > > Hi, > > I have one form with multiple textfields, and I want to one of that > textfield be optional for user, i.e., he doesn't need to enter information > in that particular field. Now, when user don't enter I ge

RE: What is the best way to handle cancel, Update, Back Buttons in Struts2

2008-07-24 Thread Jishnu Viswanath
Did you try mailto:[EMAIL PROTECTED] Sent: Thursday, July 24, 2008 3:54 AM To: user@struts.apache.org Subject: What is the best way to handle cancel, Update, Back Buttons in Struts2 Hello Everyone I know this might be very easy for you guys but it is being difficult for me.:working: I am deve

RE: [s2] Formatting input textfields

2008-07-24 Thread Milan Milanovic
Hi John, Great, thank you VERY much! -- Regards, Milan John Koutros wrote: > > package util; > > import java.math.BigDecimal; > import java.text.DecimalFormat; > import java.text.NumberFormat; > import java.text.ParseException; > import java.util.Map; > > import org.apache.struts2.util.Str

RE: [s2] Formatting input textfields

2008-07-24 Thread John Koutros
package util; import java.math.BigDecimal; import java.text.DecimalFormat; import java.text.NumberFormat; import java.text.ParseException; import java.util.Map; import org.apache.struts2.util.StrutsTypeConverter; import com.opensymphony.xwork2.util.TypeConversionException; public class Currenc

Re: Unit testing Struts2 + Spring application?

2008-07-24 Thread Jukka Välimaa
Check out Appfuse , Struts 2 Modular version. It has this kind of setup 2008/7/23 Paweł Wielgus <[EMAIL PROTECTED]>: > Hi Joachim, > isn't StrutsTestCase for Struts 1.x ? > > Best regards, > Paweł Wielgus. > > On 23/07/2008, Joachim Ansorg <[EMAI

Re: S2 REST plugin

2008-07-24 Thread Mike Watson
Thanks mate. I'll give that a try tomorrow. 2008/7/24 Jeromy Evans <[EMAIL PROTECTED]>: > Mike Watson wrote: >> >> What I actually return is a DefaultHttpHeaders with a 404 set. >> getImage() returns an empty (not null) inputstream since there's no >> content for the body. >> >> > > You may need t

Re: sorting problem with display tag: please help

2008-07-24 Thread Al Sutton
As there are no struts tags you should post this to the displaytag list for a better response; http://displaytag.sourceforge.net/11/mail-lists.html Varun Deep wrote: Hi I am using the display tag for displaying the employee names . I want to short the names of the employee. Following is

Re : Configuration in the loading of the application

2008-07-24 Thread nabil Kouici
Thank your. It works now :) Best Regards, - Message d'origine De : Antonio Petrelli <[EMAIL PROTECTED]> À : Struts Users Mailing List Envoyé le : Jeudi, 24 Juillet 2008, 9h20mn 54s Objet : Re: Configuration in the loading of the application 2008/7/24 OTA_DZ <[EMAIL PROTECTED]>: > > Hi

sorting problem with display tag: please help

2008-07-24 Thread Varun Deep
Hi I am using the display tag for displaying the employee names . I want to short the names of the employee. Following is the code that is in .jsp file. <%@ taglib prefix="display" uri="http://displaytag.sf.net"%> when I use the above code nothing is display. Can anyone pl

Re: Configuration in the loading of the application

2008-07-24 Thread Antonio Petrelli
2008/7/24 OTA_DZ <[EMAIL PROTECTED]>: > > Hi, > I'm new in Struts 2 and I want to do some configuration (log4j, DataBase,…) > in the loading of my application. In Struts 1 I use an implementation of > PlugIn and do these configurations in init() method. Could you please help > me? You can use a Se

Configuration in the loading of the application

2008-07-24 Thread OTA_DZ
Hi, I’m new in Struts 2 and I want to do some configuration (log4j, DataBase,…) in the loading of my application. In Struts 1 I use an implementation of PlugIn and do these configurations in init() method. Could you please help me? Best Regards, OTA_DZ. -- View this message in context: http://

Re: website link info

2008-07-24 Thread Jeromy Evans
Fini Decima wrote: I'm posting here because I could not find a Web Master contact info: I'll like to know when the "Reporting Security Issues" link was added to the Struts home page.The link is under "Support". Is it a recent addition or has it been there for some time? Subversion shows the

Re: S2 REST plugin

2008-07-24 Thread Jeromy Evans
Mike Watson wrote: What I actually return is a DefaultHttpHeaders with a 404 set. getImage() returns an empty (not null) inputstream since there's no content for the body. You may need to return a different result type for the error case (HttpHeaderResult or NullResult) so it only attempts

Re: S2 REST plugin

2008-07-24 Thread Mike Watson
What I actually return is a DefaultHttpHeaders with a 404 set. getImage() returns an empty (not null) inputstream since there's no content for the body. I'll do some debugging when I get time and see where it's failing. It certainly seems to be StreamResult that has the issue. Thanks Mike 2008/

Re: [S2] i18n messages, Tiles2 l10n, "default" locale, and browser preferences.

2008-07-24 Thread Antonio Petrelli
Pierre, about the Tiles part, I suggest to ask this question at Tiles Users mailing list: http://tiles.apache.org/mail.html For the rest, see comments inline. 2008/7/23 Pierre Thibaudeau <[EMAIL PROTECTED]>: > Using Struts 2.1.2 > My browser (Firefox 3) has a prefered locale (and only one): fr_CA