Struts CRUD generator

2012-07-05 Thread Mitch Claborn
I thought I saw a reference fairly recently to a Struts CRUD generator - generates a complete struts application for database manipulations. Can someone point me in the right direction? mitch - To unsubscribe, e-mail: user-un

set struts.devMode programatically?

2011-06-11 Thread Mitch Claborn
Is it possible to set struts.devMode programatically, rather than hard coded in struts.properties or struts.xml? If so, how? Mitch

Re: Retrieving values for which there is no specific getter

2011-05-11 Thread Mitch Claborn
If my action has "map" and getter getMap(), how would I specify the name= field in my struts tags to fetch specific values from the map? Mitch On 05/11/2011 02:32 PM, Dave Newton wrote: Not sure how to elaborate on using a map. Expose a map, use whatever key makes sense? Iterate over the k

Re: Retrieving values for which there is no specific getter

2011-05-11 Thread Mitch Claborn
- Original Message - From: Mitch Claborn To: user@struts.apache.org Sent: Wed May 11 14:03:33 2011 Subject: Retrieving values for which there is no specific getter In Struts 2, if my Action class has a variable named "fred" and a getter "getFred()", a will call that getter to ret

Re: Retrieving values for which there is no specific getter

2011-05-11 Thread Mitch Claborn
Can you elaborate a bit? My values will not necessarily be sequential. mitch On 05/11/2011 02:14 PM, Dave Newton wrote: On Wed, May 11, 2011 at 3:03 PM, Mitch Claborn wrote: Is there some kind of catch-all or generic method that is called to retrieve the value for a form field if there is

Re: Retrieving values for which there is no specific getter

2011-05-11 Thread Mitch Claborn
I think the ParameterAware is for setting values into my Action. I need to get the values from my action, into the HTML form. mitch On 05/11/2011 02:07 PM, Chris Pratt wrote: Not as such, but you can implement the ParameterAware[1] interface and retrieve the from the supplied map. (*Chris

Retrieving values for which there is no specific getter

2011-05-11 Thread Mitch Claborn
In Struts 2, if my Action class has a variable named "fred" and a getter "getFred()", a will call that getter to retrieve the value from the action. Is there some kind of catch-all or generic method that is called to retrieve the value for a form field if there is no specific getter? For ex

Re: Catch all method for actions?

2010-05-11 Thread Mitch Claborn
That catches unknown actions, but what I want to catch is a known action but an unknown method on that action. Mitch Greg Lindholm wrote: You can add a default action to catch any random hits Error.jsp On Tue, May 11, 2010 at 11:34 AM, Mitch Claborn wrote

Catch all method for actions?

2010-05-11 Thread Mitch Claborn
A security scan on our site is sending a request like /emailalink!"XxxX.html which produces an exception com.opensymphony.xwork2.interceptor.ExceptionMappingInterceptor com.csc.mm.web.action.EmailLink."XxxX() java.lang.NoSuchMethodException: com.csc.mm.web.action.EmailLink."XxxX() at

Re: input fields with dynamic names

2010-05-04 Thread Mitch Claborn
obligatoire. Étant donné que les email peuvent facilement être sujets à la manipulation, nous ne pouvons accepter aucune responsabilité pour le contenu fourni. Date: Mon, 3 May 2010 09:08:29 -0500 From: mi...@claborn.net To: user@struts.apache.org Subject: Re: input fields with dynamic

Re: input fields with dynamic names

2010-05-03 Thread Mitch Claborn
Bump. Any other ideas? mitch Mitch Claborn wrote: That works for setting parameter names, but not so well when the tags in the JSP need to retrieve the value for display in the page, particularly if there is a validation error. If there is a static field named "fred" and the ac

Re: input fields with dynamic names

2010-04-28 Thread Mitch Claborn
Apr 28, 2010 at 12:47 PM, Mitch Claborn wrote: I'm sure I've seen the answer to this somewhere, but darned if I can find it now when I need it! I have a page that allows edits of various options, the names of which are dynamically retrieved from the database. If I have the

input fields with dynamic names

2010-04-28 Thread Mitch Claborn
I'm sure I've seen the answer to this somewhere, but darned if I can find it now when I need it! I have a page that allows edits of various options, the names of which are dynamically retrieved from the database. If I have the code in the JSP as below, the value displayed in the text field is

Re: Interceptor doesn't forward

2009-09-10 Thread Mitch Claborn
It sounds like either the original page or the one being redirected to is being controlled by container managed security, configured in web.xml. Mitch Jim Collings wrote: > I want to send a user to the welcome page if they don't have something > set in their session. > > I have an interceptor t

Re: ajax validation problem in IE8

2009-08-31 Thread Mitch Claborn
Some more info: The generated HTML is below. validation.js (in the css_xhtml theme) uses this line to find the element before which to insert the new error div. var firstCtrNode = findWWCtrlNode(enclosingDiv); // either wwctrl_ or wwlbl_ That function looks for a child div or span whose c

Re: ajax validation problem in IE8

2009-08-29 Thread Mitch Claborn
I'll give that a try. I thought I remembered seeing instructions for a way to extract those .js files to somewhere so that I can put in some debugging statements. Do you know about that? Mitch Martin Gainty wrote: > /template/css_xhtml/validation.js > > function addErrorCSS(e, errorText) { >

ajax validation problem in IE8

2009-08-29 Thread Mitch Claborn
Struts 2.1.6 I have a form that uses ajax validation before a non-ajax POST. In IE8, if the ajax validation call returns a field error (like a missing field), I get the error in a pop up box in IE8: "An exception occurred: Error. Error message: Invalid argument." Only happens when there are field

Re: ajax submit and IE

2009-08-28 Thread Mitch Claborn
Seeing this behavior in IE7. The div is very plain: I use other Javascript to show/hide shippingDiv as needed. Mitch Martin Gainty wrote: > possibly XMLHttpRequest bug? > >> when > >> Underneath the UI layer you will need to match Struts (version 2) > >> Dojo-plugin to Dojo (v 1.2) and then D

Re: ajax submit and IE

2009-08-28 Thread Mitch Claborn
Some possible workarounds: 1) add this to the textfield: onkeypress="return !(event && event.keyCode && event.keyCode == 13);" This is a bit of javacript that suppresses the enter key. 2) or this onkeypress="if (event && event.keyCode && event.keyCode == 13) {dojo.byId('ajaxShippingSub

ajax submit and IE

2009-08-28 Thread Mitch Claborn
Using an ajax/dojo submit tag to do an ajax form submission. Code below. theme = css_xhtml. In FireFox it works like I want - the output from the form post goes inside the target div. In IE, if you press Enter in the text field, it submits the form and the output replaces the entire page, inste

controlling error message placement for client side validation

2009-08-22 Thread Mitch Claborn
css_xhtml theme. Using server-side validation, the error message for field validation is placed above the input field. Using client side, the error message is shown below. I prefer the messages above. Is there a way to force the client-side validation to put the messages above the input field?

Re: Struts tag inside Custom tag

2009-08-20 Thread Mitch Claborn
I suspect that the output of your tag is not passed through the processor again to resolve the other tags. I have been considering writing my own custom tag. Can you point me to some doc to get started? mitch AlexPresley wrote: > Hi !: > I created a Custom tag,it works fine,but when i try to d

dojo form submit and json

2009-08-03 Thread Mitch Claborn
I have a working page that using the tag to submit a form and put the output as html into a div. I'd like to "upgrade" that so that the action can return a JSON object and then take some more specific responses in the page depending on the contents of the JSON. Need some pointers on how to get

Re: custom tag development?

2009-07-24 Thread Mitch Claborn
conditionally and repetitively render the content within the tag. Any further ideas or pointers? Mitch Musachy Barroso wrote: > Look at the "component" tag, you might be able to create a tag without > writing any code. > > musachy > > On Thu, Jul 23, 2009 at 3:50 PM, M

Re: tag syntax question

2009-07-24 Thread Mitch Claborn
Is either of the following more or less efficient than the other? mitch Musachy Barroso wrote: > other attributes are expected to be expressions, so you can do: > > > > instead of the more verbose, but also correct: > > > > > -

Re: tag syntax question

2009-07-24 Thread Mitch Claborn
Thanks to both. The haze on the subject is beginning to clear. mitch Musachy Barroso wrote: > yes that's a good catch Dale, from the API point of view they are > stored in a map in the ValueStack instance, but from a user point of > view you could say they are stored in the "valuestack context"

tag syntax question

2009-07-23 Thread Mitch Claborn
I'm a big confused about the syntax in struts tags. For example, I have the following: "display" is a property on the action. The first one does not need the #, but the second one does. Why? What does the # signify? Some tags seem to need the ognl construct %{.}. What are the rules ar

custom tag development?

2009-07-23 Thread Mitch Claborn
Hoping someone can give me some pointers on how to get started on developing my own tag. I want to develop a custom tag to use within Struts 2, kind of like . What I have in mind is something like this: other stuff, including other struts tags the tag would iterate over the stuff contained in

session on every request?

2009-07-16 Thread Mitch Claborn
It appears that every request through struts is getting a copy of the Session object, even for those that don't need it, like static resources (.js, .css, etc). Can I disable this behavior somehow, only getting the session when I need it? Below is a sample stack trace. at org.apache.cata

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: user-unsu

caching Java objects

2009-07-08 Thread Mitch Claborn
What is the preferred method of caching arbitrary Java objects locally in a Struts application? I've been making my actions implement ApplicationAware and storing objects in that Map. (I think this comes from the ServletContext?) Is that the best way or is there something else? Mitch

Re: OgnlValueStack - Could not find property

2009-06-29 Thread Mitch Claborn
I did not have a standalone default.properties file, so I assume they were being pulled from the jar file. The default.properties in the jar did NOT have the two entires you mention. I extracted that file from the jar and put in in the classes directory, adding those two entries, but it did not a

Re: OgnlValueStack - Could not find property

2009-06-29 Thread Mitch Claborn
t will be off by default. > You can ignore those. > > musachy > > On Mon, Jun 29, 2009 at 8:35 AM, Mitch Claborn wrote: > >> Getting some odd messages that I don't understand, just running the >> basic tutorial code. Any ideas what this is? >> >> The

OgnlValueStack - Could not find property

2009-06-29 Thread Mitch Claborn
Getting some odd messages that I don't understand, just running the basic tutorial code. Any ideas what this is? The messages are: [WARN] OgnlValueStack - Could not find property [org.apache.catalina.jsp_file] [WARN] OgnlValueStack - Could not find property [struts.valueStack] [WARN] OgnlValueSta

RE: Client side validation for radio button

2007-10-12 Thread Mitch Claborn
e? M- - Original Message - From: "Mitch Claborn" <[EMAIL PROTECTED]> To: "'Struts Users Mailing List'" Sent: Thursday, October 11, 2007 5:38 PM Subject: Client side validation for radio button Using the xhtml theme, client-side validation for radio button is not

Client side validation for radio button

2007-10-11 Thread Mitch Claborn
errors = true; } } Which doesn't get the actual value of the selected radio. I can code a workaround in form-close-validation.ftl but it seems like this would have been solved already? Mitch Claborn [EMAIL PROTECTED] ---

RE: Validation not validating

2007-10-11 Thread Mitch Claborn
Ahh. The doc is a bit misleading. It reads: Validation rules can be specified: 1. Per Action class: in a file named ActionName-validation.xml Should probably be in a file named ActionClassName-validation.xml Thanks! _ Mitch Claborn [EMAIL PROTECTED] -Original Message

RE: Validation not validating

2007-10-11 Thread Mitch Claborn
p.put("x4", "Answer x4"); l_map.put("x5", "Answer x5"); setMap(l_map); System.out.println(this.getClass().getName() + ".execute() end"); return SUCCESS; } There is no validate() in my action.

Validation not validating

2007-10-11 Thread Mitch Claborn
b prefix="s" uri="/struts-tags" %> [snip] Mitch Claborn [EMAIL PROTECTED] - To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED]