Re: Validation Framework

2007-03-13 Thread Balazs Michnay
Thanks guys, now it perfectly works. As a conclusion, most of the online articles on how to use the validation framework work just fine, but they all missed the validate="true" attribute. Besides this, I had a wrong value of my action's input attribute. Thanks again, you are very helpful. Regard

Re: Struts 2.0.6 portlets

2007-03-13 Thread Nils-Helge Garli
A couple of things you should be aware of is: - You cannot use result types that require full control of the response object (e.g. rendering PDFs, images, charts etc). To do that, you must dispatch a request to a servlet instead. - You should be aware of the lifecycle and the phases of a portlet,

Global messages.jsp file included in a SiteMesh decorator

2007-03-13 Thread mraible
I have a messages.jsp[1] that's included (using <%@ include file="/common/messages.jsp" %>) in my default decorator. This file has a couple of calls to the valueStack - namely hasActionErrors() and hasFieldErrors(). This worked fine in WebWork 2.1.x and Struts 2.0.1 - even when pages where render

Re: Validation on java.util.List

2007-03-13 Thread Dave Newton
--- Alex Wibowo <[EMAIL PROTECTED]> wrote: > I am using Struts 2.0. Has anyone ever done > validation on individual item in java.util.List > before? I'm drawing a blank on this one too after poking it with a stick for about an hour now... I have a similar requirement (but with fairly heavy inter-

Struts 2.0.6 portlets

2007-03-13 Thread tom tom
We were alble to successfully deploy the struts 2.06 portlet sample on our portal container which is uPortal. What we want to know is Can we write the portlet applications simillar to the Struts 2.0.6 web applications(not portlets). Does Struts 2.0.6 portlets got limitations compared to the norm

Re: OGNL - invalid syntax. JSP EL?

2007-03-13 Thread Dave Newton
--- Piero Sartini <[EMAIL PROTECTED]> wrote: > I don't think its good to be incompatible with JSP.. It wasn't incompatible until 2.1, IIRC, and it was JSF-only up until then, before the unification effort. Maybe take it up w/ the OGNL folks? I agree that this may cause a problem in some environme

Re: OGNL - invalid syntax. JSP EL?

2007-03-13 Thread Dave Newton
Sorry, meant to include this link: http://today.java.net/pub/a/today/2006/03/07/unified-jsp-jsf-expression-language.html d. --- Dave Newton <[EMAIL PROTECTED]> wrote: > --- Piero Sartini <[EMAIL PROTECTED]> wrote: > > On glassfish, it seems you have to disable EL: > > > > > > > >

Re: OGNL - invalid syntax. JSP EL?

2007-03-13 Thread Piero Sartini
> > Will this issue get resolved in the future? > > That may have to do with the JSF EL, which also uses # > as its "escape" char. > > If that's the case, probably not? That is the case. But why not? Its not JSF EL but JSP EL. I don't think its good to be incompatible with JSP.. -

Re: OGNL - invalid syntax. JSP EL?

2007-03-13 Thread Dave Newton
--- Piero Sartini <[EMAIL PROTECTED]> wrote: > On glassfish, it seems you have to disable EL: > > > > *.jspx > true > > > > Will this issue get resolved in the future? That may have to do with the JSF EL, which also uses # as its "escape" char. If that's the case,

Re: OGNL - invalid syntax. JSP EL?

2007-03-13 Thread Piero Sartini
Found the answer in the opensymphony forum: http://forums.opensymphony.com/thread.jspa?messageID=100059 On glassfish, it seems you have to disable EL: *.jspx true Will this issue get resolved in the future? Am Dienstag, 13. März 2007 schrieb Piero Sartini: > Hello

OGNL - invalid syntax. JSP EL?

2007-03-13 Thread Piero Sartini
Hello, I get the following error when trying to create a list with ognl: org.apache.jasper.JasperException: /jspx/users/completeProfile.jspx(27,48) "#{'F':'Female','M':'Male'}" contains invalid expression(s): javax.el.ELException: Error Parsing: #{'F':'Female','M':'Male'} the code in jspx:

Re: Dynamic parameter question - S2

2007-03-13 Thread Laurie Harper
For your posted example, where that value you want to pass is the value you're rendering in the hidden field, you can just use the same OGNL expression in both places: ... ... If that hidden input's field is being changed by client-side Javascript, though, or needs to come from a

Validation on java.util.List

2007-03-13 Thread Alex Wibowo
Hi all... I am using Struts 2.0. Has anyone ever done validation on individual item in java.util.List before? Say, I have a property List customers in my Action, and Customer is defined as: public class Customer{ private String username;// must not be empty private

Re: Dynamic parameter question - S2

2007-03-13 Thread Scott Nesbitt
Hmm, I see your point. I do not really need to do any fancy Ajax stuff here, I just want an action invoked by a url link to have access to what was selected on the page (which I was going to stuff into a hidden field.) I know I can do this with a form and submit button, but surely there is a way

Re: Dynamic parameter question - S2

2007-03-13 Thread Dave Newton
--- Scott Nesbitt <[EMAIL PROTECTED]> wrote: > I would like to have a url pass a parameter based on > the value of a field on the JSP. My code looks like > this: Unless the field is set by the Action before displaying the JSP the parameter won't hold a value until it's submitted. > actio

Dynamic parameter question - S2

2007-03-13 Thread Scott Nesbitt
I would like to have a url pass a parameter based on the value of a field on the JSP. My code looks like this: Lineup History Sadly, in my action class this: log.debug("In execute, parameters size: " + parameters.size()); says zero. If I use the name of a select tag instead of a hi

RE: S:SUBMIT action usage

2007-03-13 Thread King, Leon C
Sorry, here's my code.     -Original Message- From: Dave Newton [mailto:[EMAIL PROTECTED] Sent: Tuesday, March 13,

RE: S:SUBMIT action usage

2007-03-13 Thread King, Leon C
IE 6.0I noticed a note 'Please note that the button type has advantages by adding the possibility to seperate the submitted value from the text shown on the button face, but has issues with Microsoft Internet Explorer at least up to 6.0' I tried with Netscape, it all three buttons utilize th

RE: S:SUBMIT action usage

2007-03-13 Thread Dave Newton
--- "King, Leon C" wrote: > it seems that only the first action defined for the > first button is being submitted. I'm using MS IE.. > Is this a bug? http://cwiki.apache.org/WW/submit.html What version of IE are you using? I'm running a simplified version of multiple using multiple methods u

RE: S:SUBMIT action usage

2007-03-13 Thread King, Leon C
struts.enable.DynamicMethodInvocation=true Now almost working... I have 3 buttons on the form, it seems that only the first action defined for the first button is being submitted. I'm using MS IE.. Is this a bug? Thanks, Leon -Original Message- From: Dave Newton [mailto:[EMAIL PROTE

RE: S:SUBMIT action usage

2007-03-13 Thread Dave Newton
--- "King, Leon C" wrote: > Like this? action="CityCountryLevelQueryAction!getMhtTrend"> Er... I thought so :/ Do you have struts.enable.DynamicMethodInvocation set to false? And you know that you are both returning a valid result and that the result exists? d. ___

RE: S:SUBMIT action usage

2007-03-13 Thread King, Leon C
Like this? Getting a 'Could not find action or result' error... Code Snippet public String getMhtTrend() throws Exception { System.out.println( " getMhtTrend here " ); return SUCCESS; } Struts.xml snippet SQLExceptionAction

Re: S:SUBMIT action usage

2007-03-13 Thread Dave Newton
--- "King, Leon C" wrote: > How do you utilize the s:submit tag in > conjunction with 'Action Wildcards'. > [...] > will work and you don't need to do anything with wildcards. d. Get your own web address.

Re: Validation Framework

2007-03-13 Thread Dave Newton
--- Christopher Schultz wrote: > I didn't say that you need another URL that doesn't > perform validation. Oh. I guess I don't know another way to show a form via an Action without running validation except by defining an Action. d. __

Re: Validation framework question

2007-03-13 Thread Christopher Schultz
-BEGIN PGP SIGNED MESSAGE- Hash: SHA1 Dave, Dave Newton wrote: > --- Christopher Schultz wrote: >> I wrote: >>> Try breaking up the JSP into dynamic includes >> This might not help, depending in which type of >> include you use. Static includes, for example, [...] > > ... Heh. Missed "d

Re: [s1] Filters: distinguishing between user-requests and redirects

2007-03-13 Thread Michael Jouravlev
On 3/13/07, Christopher Schultz <[EMAIL PROTECTED]> wrote: Pierre, > I am trying to implement a flood control mechanism to prevent robots > requesting pages after pages at an "inhuman" rate. I know you've gotten lots of feedback already, but there's a super-simple way to do this: put a marker i

S:SUBMIT action usage

2007-03-13 Thread King, Leon C
Hi All, How do you utilize the s:submit tag in conjunction with 'Action Wildcards'. On my form I have 3 buttions: one to display tabular results, and the other 2 to display graphs. Here is my code excerpt.

Re: Validation Framework

2007-03-13 Thread Christopher Schultz
-BEGIN PGP SIGNED MESSAGE- Hash: SHA1 Dave, Dave Newton wrote: > --- Christopher Schultz wrote: >> Right. Under most circumstances, you should set >> validate="true" in your definition, and >> /not/ call form.validate() in your own action. >> You /are/ free to call validation by hand, b

Re: Validation framework question

2007-03-13 Thread Dave Newton
--- Christopher Schultz wrote: > I wrote: >> Try breaking up the JSP into dynamic includes > This might not help, depending in which type of > include you use. Static includes, for example, [...] ... d. Look

Re: Validation framework question

2007-03-13 Thread Mike Baroukh
for Websphere, in a subdirectory of AppServer/temp/ you should find _*java or, at least _*class if it doesn't keep generated files. There is a checkbox to check on the console to keep generated files but I never remember where ... (I hate WebSphere !). If you use the integrated instance of W

Re: Validation framework question

2007-03-13 Thread Christopher Schultz
-BEGIN PGP SIGNED MESSAGE- Hash: SHA1 Dave, Dave Newton wrote: > --- Mike Baroukh <[EMAIL PROTECTED]> wrote: >> jdk5 should not have the problem. > > Did 1.5+ remove the 64K limitation? The 64k is a limit for method bodies, not try/catch. It should still be very much in force: http://ja

Previous action's property file being accessed incorrectly

2007-03-13 Thread David Harland
> Hi, > > We have a problem. Our home page is made up of three actions etc. > > > > > > When a link is clicked on the home page to the User page via the User > action the User pages properties can't be found. It appears to be > looking at the action Home3 properties file... > > The home page

Re: Validation Framework

2007-03-13 Thread Dave Newton
--- Christopher Schultz wrote: > Right. Under most circumstances, you should set > validate="true" in your definition, and > /not/ call form.validate() in your own action. > You /are/ free to call validation by hand, but it's > generally more convenient to allow Struts to handle > the validate/f

Re: Validation Framework

2007-03-13 Thread Christopher Schultz
-BEGIN PGP SIGNED MESSAGE- Hash: SHA1 Balazs, Balazs Michnay wrote: > Thanks a lot for your help! It really does work! What I missed was > the validate="true" attribute of the action tag, however, this was > not mentioned by any of the articles I read. If it's not mentioned, you should p

Re: Validation framework question

2007-03-13 Thread Mike Baroukh
>Did 1.5+ remove the 64K limitation? I'm not absolutly sure, but think. I read this once and it's been a long time since I didn't saw this exception ... Mike Dave Newton a écrit : --- Mike Baroukh <[EMAIL PROTECTED]> wrote: jdk5 should not have the problem. Did 1.5+ remove the 64

RE: Validation framework question

2007-03-13 Thread Chaudhary, Harsh
I tried to do that but I could not find where my IDE stores those files. I am using WSAD 5.1.1 with WebSphere. Any suggestions would be appreciated. Harsh. -Original Message- From: Mike Baroukh [mailto:[EMAIL PROTECTED] Sent: Tuesday, March 13, 2007 11:56 AM To: Struts Users Mailing Lis

Re: Validation framework question

2007-03-13 Thread Dave Newton
--- Mike Baroukh <[EMAIL PROTECTED]> wrote: > jdk5 should not have the problem. Did 1.5+ remove the 64K limitation? > There may be or may be no code added for the > validation. But this is not the problem ... Technically, no, but it's the gating issue in this case. Try breaking up the JSP into

Re: Setting up actions

2007-03-13 Thread Skip Hollowell
Dave Newton-4 wrote: --- Skip Hollowell <[EMAIL PROTECTED] > wrote: > 1 action per functional part of the app, or 1 action > per data type, with many results corresponding to > each method that I call inside that partuclar ac

Re: Validation framework question

2007-03-13 Thread Mike Baroukh
then, you may try to look at the compiled jsp ? Chaudhary, Harsh a écrit : I know that the exception "Maximum try/catch size reached" has something to do with the compiler but what I would likt to know is that whether or not any validation code is added to the compiled JSP file itself. Hars

RE: Validation framework question

2007-03-13 Thread Chaudhary, Harsh
I know that the exception "Maximum try/catch size reached" has something to do with the compiler but what I would likt to know is that whether or not any validation code is added to the compiled JSP file itself. Harsh. -Original Message- From: Mike Baroukh [mailto:[EMAIL PROTECTED] Sen

Re: Validation framework question

2007-03-13 Thread Mike Baroukh
Hi. This is only a problem with javac and depending on wich java version you use. jdk5 should not have the problem. You may also try to use jikes for compiler. There may be or may be no code added for the validation. But this is not the problem ... Mike Chaudhary, Harsh a écrit : I am havi

Validation framework question

2007-03-13 Thread Chaudhary, Harsh
I am having an arguement with a co-worker here and here is how it goes. We have a JSP which has about 100 input fields. These fields have custom validators on them. When we try to run the JSP, it throws an exception something to the tune of "Maximum try/catch size reached" or something like that.

Re: [S2] Setting up actions

2007-03-13 Thread Dave Newton
--- Skip Hollowell <[EMAIL PROTECTED]> wrote: > 1 action per functional part of the app, or 1 action > per data type, with many results corresponding to > each method that I call inside that partuclar action? I think this is mostly a matter of preference, isn't it? I find it more concise (overal

[S2] Setting up actions

2007-03-13 Thread Skip Hollowell
I have spent a few weeks getting my hands dirty with Struts 2 now, and I have come to a crossroads of sorts, in my app design and layout of my actions. A good example of where I am looking for direction is the following: A user logs in and wants to add a transaction for an account. I have an

Re: Validation Framework

2007-03-13 Thread Balazs Michnay
Hi Dave, Thanks a lot for your help! It really does work! What I missed was the validate="true" attribute of the action tag, however, this was not mentioned by any of the articles I read. The other thing is that now, the validation error message DID show up, but it is displayed on "destination

Re: Struts Question - multiple instances of an actionForm

2007-03-13 Thread Dave Newton
--- xyz <[EMAIL PROTECTED]> wrote: > Any hints/ideas on achieving this? Have you considered using indexed properties? d. TV dinner still cooling? Check out "Tonight's Picks" on Yahoo! TV. http://tv.yahoo.c

Re: [s1] Filters: distinguishing between user-requests and redirects

2007-03-13 Thread Christopher Schultz
-BEGIN PGP SIGNED MESSAGE- Hash: SHA1 Pierre, > I am trying to implement a flood control mechanism to prevent robots > requesting pages after pages at an "inhuman" rate. I know you've gotten lots of feedback already, but there's a super-simple way to do this: put a marker in the request

Re: DynaValidatorForm with java.util.Date

2007-03-13 Thread Gareth Evans
You register the converter using: ConvertUtils.register( new DateConverter( "dd/MM/" , java.util.Date.class ) ); Gareth [EMAIL PROTECTED] wrote: I can't see how that can solve my problem? The ArrayList is actually gone. When I want to display the arraylist with ${formField.ke

Re: [s2] newbie - setting multiple values in an action

2007-03-13 Thread Mark Menard
On 3/13/07 3:45 AM, "Martin Fanta" <[EMAIL PROTECTED]> wrote: > I have a jsp with this body: > > > >name="days[%{#day.index}]"/> > > > > > It is meant to display a label and an edit box for each of the dates from the > 'dates' list. The 'dates' is a list set in the "prepare" action and

Re: Session values getting lost

2007-03-13 Thread Dilip Ladhani
Well I figured it out. When I accessed the index.jsp, I accesses it with a different context root (In tomcat, it was the project name). Tomvat is somehow allowing me to do that. Since the history page had no context root, it woked, but after that when I use the correctcontext root, a new session

Struts Question - multiple instances of an actionForm

2007-03-13 Thread xyz
Hi all, Is there any standard ways to manage multiple instances of one form with Struts? Say,I have application which is supposed to take theorerically unlimited number of person's descriptions. Every time user clicks "add one more person" he/she gets exactly the same form (with the same val

Re: Validation Framework

2007-03-13 Thread Dave Newton
--- Balazs Michnay <[EMAIL PROTECTED]> wrote: > I'm relatively new to Struts and am trying to get > the Validation Framework working without success. You neither set validate='true' on your Action (in the struts-config action-mapping configuration element) nor call the form bean's 'validate' metho

Re: Validation Framework

2007-03-13 Thread Mike Baroukh
I'm still using struts 1.1 and your struts config/form is really different from what I used to do. But, in struts 1.1, we had to add validate="true" in the struts-config on the action ... your struts-config doesn't have any. Maybe ... Mike Balazs Michnay a écrit : Dear Struts Users, I'm re

Validation Framework

2007-03-13 Thread Balazs Michnay
Dear Struts Users, I'm relatively new to Struts and am trying to get the Validation Framework working without success. I've read several tutorials and articles on using it, but it just doesn't want to work. I'm using NetBeans 5.5, so that I can use Struts 1.2.9. Having set everything, I get no

Re: [s1] Filters: distinguishing between user-requests and redirects

2007-03-13 Thread Tamas Szabo
Yes, setting the dispatcher will work just for ignoring the forwards, it won't work for redirects. You can check for attributes as Paul suggests, but setting the dispatcher seems to be easier if you have a servlet container supporting 2.4. You'll have to handle redirects in another way though. A

Re: [s1] handle exception in processPopulate?

2007-03-13 Thread Niall Pemberton
On 3/13/07, Paul Benedict <[EMAIL PROTECTED]> wrote: Strachan, Paul wrote: > I resolved this myself by simply overriding the set(String, Object) > method in my form, to ignore certain request parameter names that are > not of type String in my LazyValidatorForm. > If you feel strongly about

Re: DispachAction - does not contain specified method

2007-03-13 Thread Mark Shifman
You should look at the source http://svn.apache.org/viewvc/struts/struts1/trunk/extras/src/main/java/org/apache/struts/actions/DispatchAction.java?view=markup and the javadoc Method which is dispatched to when there is no value for specified request parameter included in the request. Subclasses o

[struts faces] How do i set default values?

2007-03-13 Thread David Delbecq
Hello, i am trying to convert some struts form to be JSf compatible using struts faces. However, there are a few problems with initialization for form. I have this: According to struts faces docs, i need to use the corresponding JSF tag: However, you all can guess my

[s2] newbie - setting multiple values in an action

2007-03-13 Thread Martin Fanta
Hi all, I started playing around with Struts 2.0.6 on Saturday. All went well until I've run into the need to call an Action setter for a list of strings submitted from an html form (will switch to dates later, but I want to solve the multiple aspect first). I have a jsp with this body:

DispachAction - does not contain specified method

2007-03-13 Thread Nitin Ahuja
Hi, I am using "DispatchAction" as my base action class. when submit url "http://.../myAction.do?action=view"; and there is no "view" method defined in my action class, then it throws following exception. Is there any way to call a default method when the method "view" does not exists ? Or how