validations with selected option

2009-02-06 Thread Srikanth Goud
Hi, Iam writing validations in className-validation.xml file it is working fine. But in the form there are two radio buttons 1. If one is selected a new table appear on the form with 5 or 6 fields and vice versa. I written the validaions for all the fields including the table

Re: How to use "s:include" param in s:if

2009-02-06 Thread Wes Wannemacher
On Friday 06 February 2009 18:27:18 Struts Two wrote: > Wes , > > Thank you for your reply, Unfortunately that does not work. The if > statement return false [I print ${param.tab1} on the page and it has the > value 'tab1' yet if statement is false]. I am using struts 2.0.14. > Hmm... Strange. I d

Re: [S2] s:action in value stack?

2009-02-06 Thread Wolfgang Knauf
Hi Musachy, what you say makes sense, but then I think one thing is missing in the doc for s:action (http://struts.apache.org/2.1.6/docs/action.html): I suggest something like this: "The action is never placed on the value stack like an action called by URL, so that accessing fields of it wit

Re: How to use "s:include" param in s:if

2009-02-06 Thread Struts Two
Wes , Thank you for your reply, Unfortunately that does not work. The if statement return false [I print ${param.tab1} on the page and it has the value 'tab1' yet if statement is false]. I am using struts 2.0.14. --- On Fri, 2/6/09, Wes Wannemacher wrote: > From: Wes Wannemacher > Subject

Re: Can I use a Parameter in result definition?

2009-02-06 Thread Dale Newfield
Musachy Barroso wrote: Should we change the documentation? (Is it documented anywhere other than the javadocs?) Should we include that change in the upgrade instructions? Feel free to update the wiki. I added a bit to the upgrade instructions. Changing the javadoc requires svn commit priv

Re: Can I use a Parameter in result definition?

2009-02-06 Thread Dale Newfield
Griffith, Michael * wrote: Cool, but looking at the doc, it looks like the only place I can declare a parm is in the result tag? It looked like the only place you wanted to use this substitution was in a result tag. I didn't notice what value it was you wanted until now. The action is on to

Re: How to use "s:include" param in s:if

2009-02-06 Thread Wes Wannemacher
On Friday 06 February 2009 17:35:56 Struts Two wrote: > I have run out of options and I was hoping if someone can help me. I have > an include tag as follows: > > > > > > In my tabs.jsp, I tried to do the following: > > class="on" > class="off" > > > But of no avail. Using ${param.tabId},

Re: Can I use a Parameter in result definition?

2009-02-06 Thread Musachy Barroso
On Fri, Feb 6, 2009 at 5:51 PM, Dale Newfield wrote: > Musachy Barroso wrote: >>> >>> Yes. You can include OGNL there (except it uses the JSTL ${} syntax >>> instead >>> of OGNL %{} syntax for a reason I've never understood): >> >> I think we fixed that already. > > I just looked in the source an

Re: Can I use a Parameter in result definition?

2009-02-06 Thread Dale Newfield
Musachy Barroso wrote: Yes. You can include OGNL there (except it uses the JSTL ${} syntax instead of OGNL %{} syntax for a reason I've never understood): I think we fixed that already. I just looked in the source and see that it should now work with either. I changed my current app and i

How to use "s:include" param in s:if

2009-02-06 Thread Struts Two
I have run out of options and I was hoping if someone can help me. I have an include tag as follows: In my tabs.jsp, I tried to do the following: class="on" class="off" > But of no avail. Using ${param.tabId}, I can see the value of tablId. I even tried [crazy ideas like]: class=

Re: Can I use a Parameter in result definition?

2009-02-06 Thread Musachy Barroso
> Yes. You can include OGNL there (except it uses the JSTL ${} syntax instead > of OGNL %{} syntax for a reason I've never understood): > I think we fixed that already. musachy -- "Hey you! Would you help me to carry the stone?" Pink Floyd --

RE: Can I use a Parameter in result definition?

2009-02-06 Thread Griffith, Michael *
Cool, but looking at the doc, it looks like the only place I can declare a parm is in the result tag? Something like this: view-{packageName}.panel How do I declare the variable at the package level so I don't have to redeclare each action and result? MG -Original Message- From: Dale

Re: Can I use a Parameter in result definition?

2009-02-06 Thread Dale Newfield
Griffith, Michael * wrote: Does anyone know if it is possible to use a parameter in my action/result definition: Yes. You can include OGNL there (except it uses the JSTL ${} syntax instead of OGNL %{} syntax for a reason I've never understood): http://struts.apache.org/2.1.6/struts2-core/ap

Can I use a Parameter in result definition?

2009-02-06 Thread Griffith, Michael *
Hello all... Does anyone know if it is possible to use a parameter in my action/result definition: I want to use the package name in the result definition view-{0).panel Would become: view-component.panel Is this possible? Thanks in advance, MG -

RE: trouble deploying struts2 app to tomcat 1.5.0.05

2009-02-06 Thread Wick, Dan
Ok, to make the problem more simplified...I took the struts2-blank-2.0.12.war application & deployed it to my local tomcat. That works. Took the same war & deployed it to my server environment tomcat - FAILS. Note that I have commented out every other application running there, so it's a 1 to 1 co

[s2] file upload size validation indiced problems

2009-02-06 Thread Kawczynski, David
I have a form that has an element. When the upload exceeds that size, the input page is returned. Log4j records show this log message: org.apache.commons.fileupload.FileUploadBase$SizeLimitExceededException: the request was rejected because its size (xxx) exceeds the configured maximum (yyy) A

RE: What's the correct expression syntax?

2009-02-06 Thread Griffith, Michael *
Ah, thanks for the reply and to Richard as well. It's insane how much time it is easy to waste on small things like that. Thanks guys! -Original Message- From: Dale Newfield [mailto:d...@newfield.org] Sent: Friday, February 06, 2009 1:32 PM To: Struts Users Mailing List Subject: Re: What

RE: What's the correct expression syntax?

2009-02-06 Thread Richard Gundersen
I think it's because you're comparing a single character string, which OGNL treats as a bit of a special case for some reason. I dont have my code with me now but I'm pretty sure I had the same problem. Google 'comparing single character string in ognl' for some pointers (sorry, I cant verify

Re: What's the correct expression syntax?

2009-02-06 Thread Dale Newfield
Griffith, Michael * wrote: ... Do work Is the correct one, except for the one-character-string gotcha: http://struts.apache.org/2.1.6/docs/why-wont-the-if-tag-evaluate-a-one-char-string.html -Dale - To unsubscribe,

What's the correct expression syntax?

2009-02-06 Thread Griffith, Michael *
Hi, I don't think I fully understand OGNL and I need some help with an expression... I have a param that I am passing to an action. the parameter is called selectedType, and it has a getter and setter on the action. It is getting set correctly. When I try to evaluate the expression using the

RE: TypeConverter needs Spring Bean

2009-02-06 Thread Griffith, Michael *
Thanks for the suggestion. Maybe this should be considered as a future feature enhancement. MG -Original Message- From: Musachy Barroso [mailto:musa...@gmail.com] Sent: Friday, February 06, 2009 9:12 AM To: Struts Users Mailing List Subject: Re: TypeConverter needs Spring Bean The conve

Re: TypeConverter needs Spring Bean

2009-02-06 Thread Musachy Barroso
The converters are created by the internal IOC container, so the Spring beans wont be injected. A "hack" I can think of is to add something like this to the converter: @Inject(StrutsConstants.STRUTS_OBJECTFACTORY) public void setObjectFactory(ObjectFactory factory) { //save the factory for late

RE: TypeConverter needs Spring Bean

2009-02-06 Thread Griffith, Michael *
How can you tell? This is handed by the plug-in, right? From my struts.properties file: struts.objectFactory = spring struts.objectFactory.spring.autoWire = name struts.objectFactory.spring.useClassCache = true -Original Message- From: Musachy Barroso [mailto:musa...@gmail.com] Sent: Fr

Struts2 + tiles + i18n, getText issue

2009-02-06 Thread David Kerwick
Hi, I've come across a problem I can't figure out it seems similar to http://www.mail-archive.com/user@struts.apache.org/msg76063.html These two statements give different results when the language is changed With s:text giving the correct language text but getText always gives the def

Re: TypeConverter needs Spring Bean

2009-02-06 Thread Musachy Barroso
Are the converters created by the object factory? if not, then it will not work. musachy On Fri, Feb 6, 2009 at 9:46 AM, Griffith, Michael * wrote: > I also tried adding the @Autowired annotation to the dependency, but it > did not work. Can anyone clarify how this is supposed to work? > MG > >

Re: getter for a property problem

2009-02-06 Thread elyes sallem
in fact, CAjustComment can be null (the null problem i got it only with nested property, does this cause an exception with string property) Regards Elyes 2009/2/6 mitch gorman > elyes sallem wrote: > > Hello, > > i use a property in a jsp , "shortcomment" , which depend of another > > property

RE: TypeConverter needs Spring Bean

2009-02-06 Thread Griffith, Michael *
I also tried adding the @Autowired annotation to the dependency, but it did not work. Can anyone clarify how this is supposed to work? MG -Original Message- From: Steven Yang [mailto:kenshin...@gmail.com] Sent: Thursday, February 05, 2009 8:15 PM To: Struts Users Mailing List Subject: Re

Re: getter for a property problem

2009-02-06 Thread mitch gorman
elyes sallem wrote: > Hello, > i use a property in a jsp , "shortcomment" , which depend of another > property, "CAjustComment": > > public String getShortcomment() { > if (CAjustComment.length()>15) > return CAjustComment.substring(0,14); > else >

[S2][Convention] how to intercept all my actions

2009-02-06 Thread Paweł Wielgus
Hi All, some time ago, before 2.1.6 GA, i was wondering about how to intercept all my actions, but it was unclear how to do it. After I upgraded to 2.1.6 i finally did it. So in case someone is interested in intercepting all actions without need to modify them, here [1] is my post about it. 1. ht

Re: Get an InputStream for a file in my webapp

2009-02-06 Thread Musachy Barroso
You can implement the ServletContextAware interface in your action, and Struts will set the ServletContext which has a "getPath" method, or something like that. musachy On Fri, Feb 6, 2009 at 9:03 AM, Security Management wrote: > I have an action that returns an image, and the getImageStream met

Re: Get an InputStream for a file in my webapp

2009-02-06 Thread Nils-Helge Garli Hegvik
Using a FileInputStream like that won't work if the war is packaged. Take a look at the getResourceAsStream method in the ServletContext interface instead. Nils-H On Fri, Feb 6, 2009 at 3:03 PM, Security Management wrote: > I have an action that returns an image, and the getImageStream method >

Get an InputStream for a file in my webapp

2009-02-06 Thread Security Management
I have an action that returns an image, and the getImageStream method returns the stream associated with the blob in the database that I'm pulling. That works great, and displays/exports the image exactly like I want to. However, there are cases where there is no image, and I want to display a "N

getter for a property problem

2009-02-06 Thread elyes sallem
Hello, i use a property in a jsp , "shortcomment" , which depend of another property, "CAjustComment": public String getShortcomment() { if (CAjustComment.length()>15) return CAjustComment.substring(0,14); else return CAjustComment; } but i

Re: Struts2 + tiles +OC4J

2009-02-06 Thread Antonio Petrelli
2009/2/5 hesham : > java.lang.IllegalArgumentException: Resource > /portalframework/renderContents.action not found Does this resource exist? Antonio - To unsubscribe, e-mail: user-unsubscr...@struts.apache.org For additional co