Re: [s2] Custom field validator with params containing OGNL expression

2009-07-09 Thread Lukasz Lenart
2009/7/7 Cristian Peraferrer corellia...@gmail.com: field-validator type=usernameavailable      param name=userId${enterprise.enterpriseId}/param      messageThis username is already taken./message    /field-validator Do you have a getter called getEnteriprise() on an action? Regards --

Re: exceute() method in action class didn't called

2009-07-09 Thread Lukasz Lenart
2009/7/9 jayadevan jayadeva...@gmail.com:        action-mappings                        action                path=/helloWorld                type=examples.firstStruct.helloWorld.HelloWorldAction                name= Add name = HelloWorldFromBean Regards -- Lukasz

Re: exceute() method in action class didn't called

2009-07-09 Thread jayadevan
thanks Lukasz i tried it but i got one servelet exception Jul 9, 2009 12:02:11 PM org.apache.catalina.core.ApplicationContext log INFO: action: Looking for ActionForm bean under attribute 'HelloWorldFromBean' Jul 9, 2009 12:02:11 PM org.apache.catalina.core.ApplicationContext log INFO:

Re: dynamic return when validation failed

2009-07-09 Thread mailtolouis2020-struts
Hi Dale Greg, Thanks for all your discussion. The problem is that the OP doesn't understand his problem. If the validation step knows what the result page should be, he shouldn't be returning input, but rather the name of the logical step to be rendered. He's right that the code

Re: dynamic return when validation failed

2009-07-09 Thread mailtolouis2020-struts
Thanks for let me know another struts2 book, have a quick look in it, didn't found any good tip to solve my problem. Regards Louis From: Oscar Alvarez oialva...@gmail.com To: Struts Users Mailing List user@struts.apache.org Sent: Wednesday, July 8, 2009

Re: exceute() method in action class didn't called

2009-07-09 Thread Lukasz Lenart
Ok, but it's truncated, could you send more? Regards -- Lukasz http://www.lenart.org.pl/ http://dailylog.lenart.org.pl/ Eddie Izzard - Never put a sock in a toaster. - http://www.brainyquote.com/quotes/authors/e/eddie_izzard.html

Re: dynamic return when validation failed

2009-07-09 Thread Oscar Alvarez
Use Pattern Matching Wildcards in Configurations Action configuration files are somehow able to grow to extremely large at incredible speeds. On way to combat this phenomenon is to use pattern matching. Pattern matching works by defining one or more patterns that URLs will

Re: dynamic return when validation failed

2009-07-09 Thread Jim Kiley
On Thu, Jul 9, 2009 at 5:26 AM, mailtolouis2020-str...@yahoo.com wrote: Well, if I remove my validation code in the validate() method and put it into execute() method, then I can easily control which logical name to be return, but I thought that is not a good way to do that right? While

s:actionerrors not displaying errors!

2009-07-09 Thread Kavita Mehta
Hi, I am using Struts 2.0 and I am not able to display the action errors in my JSP. Action class code : if( ( getSelectedlocation() == null ) || getSelectedlocation().compareTo( ) == 0 ( (getLocation() == null ) ||( getLocation().compareTo( ) == 0

RE: How is the max file size controlled for file uploads in Struts 1.3.8?

2009-07-09 Thread Frank Russo
org.apache.struts.util.RequestUtils has the following at lines 408-415: Boolean maxLengthExceeded = (Boolean) request.getAttribute(MultipartRequestHandler.ATTRIBUTE_MAX_LENGTH_EXCEEDED); if ((maxLengthExceeded != null)

Re: s:actionerrors not displaying errors!

2009-07-09 Thread Robert Graf-Waczenski
My first guess would be that you are not properly dispatching back to your input page. A closer look at your struts.xml would clarify this, though. Robert Kavita Mehta schrieb: Hi, I am using Struts 2.0 and I am not able to display the action errors in my JSP. Action class code : if( (

Re: dynamic return when validation failed

2009-07-09 Thread Greg Lindholm
Well, if I remove my validation code in the validate() method and put it into execute() method, then I can easily control which logical name to be return, but I thought that is not a good way to do that right? While this might not be a good way to do that, it's what I would do and

RE: s:actionerrors not displaying errors!

2009-07-09 Thread Martin Gainty
if you could display the jsp we could see the actual component for the HTML id=err Martin Gainty __ Verzicht und Vertraulichkeitanmerkung/Note de déni et de confidentialité Diese Nachricht ist vertraulich. Sollten Sie

Re: s:actionerrors not displaying errors!

2009-07-09 Thread Kavita Mehta
Thanks Robert .. Lemme check the same. Robert Graf-Waczenski r...@lsoft.com 07/09/2009 06:51 PM Please respond to Struts Users Mailing List user@struts.apache.org To Struts Users Mailing List user@struts.apache.org cc Subject Re: s:actionerrors not displaying errors! My first guess

Validation performance

2009-07-09 Thread Mitch Claborn
Is there any performance difference between defining validations in an xml file (ActionName-validation.xml) or as annotations within the Action? Is one method preferred over the other? Mitch - To unsubscribe, e-mail:

Re: dynamic return when validation failed

2009-07-09 Thread mailtolouis2020-struts
result name=input/xxx/MyWizardPage${page}.jsp/result oh yes, this does the trick! Thanks! I just found another problem when using xml based validation. In struts1, there is a page attribute, which can tell the validator to validate certain fields which belong to that page, but this useful

Stripping Out Characters

2009-07-09 Thread Ratner Glenn A
I'm new to struts and work on an application with existing struts code. I have a text field in a .jsp and when doing the post struts seems to be automatically removing certain special characters from the string in the text field. In particular, it's removing these non-alpha characters: ( and )

RE: dynamic return when validation failed

2009-07-09 Thread Martin Gainty
check your web.xml to see if your filtering thru SiteMesh e.g. filter filter-namesitemesh/filter-name filter-classcom.opensymphony.module.sitemesh.filter.PageFilter/filter-class /filter filter-mapping filter-namesitemesh/filter-name

S2: Ajax tags -- how to return a message to a specific DIV?

2009-07-09 Thread fireapple
I wonder if this is durable with S2: JSP form: this form has a button FINALIZE, if all goes well - the result SUCCESS should be seen in placeA on the page and if it fails the result FAILURE should be seen in placeB (a different place on the page); the SUCCESS/FAILURE are just messages but they

Struts 2 Plug-in and JSP 404

2009-07-09 Thread stanlick
I am working on a plug-in that needs to display a JSP. I have the plug-in packaged with the following struts-plugin.xml, however, rather than the /pages/config.jsp page appearing, I get a 404! The folder pages is in the root of my config-plugin.jar file and I have changed the result by both

Re: Struts 2 Plug-in and JSP 404

2009-07-09 Thread Dale Newfield
stanlick wrote: I am working on a plug-in that needs to display a JSP. The folder pages is in the root of my config-plugin.jar I believe jsp files must be in the file system, not in jars. -Dale - To unsubscribe, e-mail:

Re: Struts 2 Plug-in and JSP 404

2009-07-09 Thread stanlick
Thanks Dale -- I hear what you are saying, and this seemed a little foreign to me too! However, for a plug-in to be a drop-n-go deal, I sort of think the goods should all be in the plug-in jar itself? Make sense? I was looking at this article, and it appears this cat has a JSP working in his

Re: Struts 2 Plug-in and JSP 404

2009-07-09 Thread Dale Newfield
stanlick wrote: However, for a plug-in to be a drop-n-go deal, I sort of think the goods should all be in the plug-in jar itself? Make sense? Agreed, but I believe I've been told that can't be done with jsp templates. This is why plugins that I've seen have been implemented in freemarker.

Re: Struts 2 Plug-in and JSP 404

2009-07-09 Thread Musachy Barroso
It is a limitation on the JSP API, you can't embed them. You will have to use FreeMarker or Velocity or any other decent template lib. musachy On Thu, Jul 9, 2009 at 12:47 PM, stanlickstanl...@gmail.com wrote: Thanks Dale -- I hear what you are saying, and this seemed a little foreign to me

Re: Struts 2 Plug-in and JSP 404

2009-07-09 Thread Musachy Barroso
Or if you are very brave, and using java 6, you can use jasper to compile the jsp to java, then use the java api compile to compile to a class file, load it and then execute it, but yeah FreeMarker would be easier :) musachy On Thu, Jul 9, 2009 at 1:06 PM, Dale Newfieldd...@newfield.org wrote:

Re: Struts 2 Plug-in and JSP 404

2009-07-09 Thread stanlick
Thanks brother! Do you know of a decent JSP --- Freemarker converter? I sort of wondered why the config-browser plug in was using Freemarker. It really sucks when something like this rears it ugly head and brings productivity to a screeching halt! P.S. And I really thought I was going to have

Re: Struts 2 Plug-in and JSP 404

2009-07-09 Thread stanlick
Please tell me it isn't the little woman that has you talking all crazy bro! P.S. You failed to mention the option about just writing the response with print statements from the action! Peace, Scott Musachy Barroso wrote: Or if you are very brave, and using java 6, you can use jasper to

Re: Getting OPTGROUP items to appear in the right order within a larger top-level SELECT list

2009-07-09 Thread Oscar Alvarez
Have you try to put lists in lists??? may be it works... another way can be if you put every item as a s:optgroup HTH 2009/7/2 mlevin marshall_le...@harvard.edu ** Many apologies if this goes through twice -- I posted a few hours ago and didn't see my own post show up yet ** Hi folks,