Re: Struts help with Tomcat

2007-12-24 Thread Gary Affonso
You might take a look at your XML-parsing libs. It's been awhile since i made the switch but some dim memory makes me think that either the transition from Tomcat 4 to 5 or java 4 to 5 either added, removed or changed some of the built-in xml parsers. Sorry to be so vague, it's been awhile si

Re: Can I access a constant in a Freemarker view?

2007-12-24 Thread Gary Affonso
matihost wrote: I've got an object that I expose to my view via getModel. That object has a typical "public static final" constant... public static final String firstName_KEY = "firstName"; Note that I purposefully don't provide a static getter (I don't want to have to write getters for al

Can I access a constant in a Freemarker view?

2007-12-23 Thread Gary Affonso
I've got an object that I expose to my view via getModel. That object has a typical "public static final" constant... public static final String firstName_KEY = "firstName"; Note that I purposefully don't provide a static getter (I don't want to have to write getters for all my constants).

Re: [OT] Exception.getLocalizedMessage()

2007-12-22 Thread Gary Affonso
A agree that you're going to have to bind something to the Exception in order to do I18N resolution. And I agree that creating that binding sucks. If you don't want to ditch getLocalizedMessage you could AOP it. Have your getLocalizedMessage() method wrapped with some advice that swaps in th

Re: struts 2 vs struts 1+spring

2007-12-21 Thread Gary Affonso
Joe Yuen wrote: Well, that's kind of the essence of the question. What would you loose if you did? It seems to me that there is quite a bit over overlap to Struts2 and Spring. I guess it depends on the app. In most spring apps I've worked with losing Spring is sort of like losing the hub of

Re: struts 2 vs struts 1+spring

2007-12-21 Thread Gary Affonso
Joe Yuen wrote: I have an application that currently is implemented using struts 1.2.8 + spring 1.2.8 + hibernate. What would be the advantages to migrate this > to a struts 2 + hibernate solution? Er, huh? In my experience it's *spring* that sits at the core of an app. That's the thing tha

Re: JSON and ExtJS

2007-12-20 Thread Gary Affonso
Rick Reumann wrote: On Dec 20, 2007 10:54 AM, Martin Gainty <[EMAIL PROTECTED]> wrote: JavaDoc mentions that shallow serialization will take place with the include being arbiter of which collection classes may be serialized.. hibernate has a similar situation where lazy_init="true" but I can re

Re: OpenSessionInView with Struts 2.x

2007-12-18 Thread Gary Affonso
This post is going to make a few assumptions: 1) You're using S2 and Spring 2) You're using Spring's OSIV filter (as opposed to Hibernate's) 3) You're using Spring's Hibernate DAO framework 4) You're using a Spring-configured transaction manager 5) You're declaring transaction boundaries and thei

Re: Exception Handling keeping user input

2007-12-18 Thread Gary Affonso
Jeremy JGR. Grumbach wrote: Thanks also for the answer, I'm using Velocity so no problem with the null values. And yes that's a way to manage exceptions, but I as said in my previous post, I was looking for something more generic, without specific code in all my actions. If you want a generi

Re: Exception Handling keeping user input

2007-12-17 Thread Gary Affonso
To follow up on my previous post, here's some code from a "showForm" action that does exactly what I described... public void prepare() { if(session.get(SignUpFormBean.SESSION_KEY) == null) { // they're here for the first time. do nothing (leave the signUpFormBean model

Re: Exception Handling keeping user input

2007-12-17 Thread Gary Affonso
Jeremy JGR. Grumbach wrote: Let's take the following scenario: we have a database which manage car models (for example Dogde Viper). The column "name" of the "car model" table must be unique. The user wants to add a "car model" in the database, thus he has an "add screen" containing all the field

What's up with validationErrors?

2007-12-15 Thread Gary Affonso
I made the mistake of using the "validationErrors" map in my Freemarker page... ${(validationErrors["postalAddress.firstName"]) !} I did this reflexively without thinking and it worked. For awhile. Then it broke. In very strange ways. The problem I'm having with it is that if I add a fi

Re: StrutsTypeConverter API

2007-12-14 Thread Gary Affonso
Alberto A. Flores wrote: Does anyone knows why the API for the StrutsTypeConverter abstract class takes an array of Strings instead of a single one (the convertFromString method)? The sample app seems to be always checking for the first element. Is OGNL supposed to add more? Any feedback will

Re: How to redirect error message

2007-12-09 Thread Gary Affonso
Yayo wrote: Errors are stored in a request scope attribute and after a redirect they're lost because a new request is launched by the client browser. You must explicitly (by code) store them in a session attribute to get them in the second request. Preserving the messages by hand will work, of

Re: Required validator dosen't work

2007-12-07 Thread Gary Affonso
all the values get populated automatically. "assocAppID" is a long attribute. Actually I used "required" type for every data type, but in any case it doesn't work!!. I am facing this error for many days. Can anybody successfully use "required" type now? Gary Affonso wro

Re: Bug: getModel called twice - Status?

2007-12-06 Thread Gary Affonso
Wes Wannemacher wrote: In the past, the solution was to do the "work" using the prepareable interface then just returning the reference to your model. I could be remembering incorrectly, but I would avoid doing any work in a getter. Any reason you'd avoid it beyond the double-call bug? I've ge

Re: Bug: getModel called twice - Status?

2007-12-06 Thread Gary Affonso
Dave Newton wrote: That depends on what happens in your getModel() call... if it doesn't matter that it's called twice then there aren't any issues. Let me add that the code for the ModelDrivenInterceptor is near-trivial. It would be easy to copy-and-paste it into a custom interceptor, fix t

Re: Bug: getModel called twice - Status?

2007-12-06 Thread Gary Affonso
Dave Newton wrote: That depends on what happens in your getModel() call... if it doesn't matter that it's called twice then there aren't any issues. One of my getModel() methods is sensitive to multiple calls so my solution was to code around the bug: private boolean isFirstGetModelCall = tr

Re: Bug: getModel called twice - Status?

2007-12-06 Thread Gary Affonso
Wes Wannemacher wrote: It was patched for XWork 2.1, which will coincide with the Struts 2.1 release. Exactly what I wanted to know. Thanks! - Gary - To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail:

Bug: getModel called twice - Status?

2007-12-06 Thread Gary Affonso
I got bit yesterday by the getModel double-call bug (wherein the ModelDriven interceptor calls getModel twice). Some googling revealed that a patch has been submitted to the Xwork folks. Does anybody know what the status of a rollout/release containing this patch might be? I'm coding around

Re: Required validator dosen't work

2007-12-05 Thread Gary Affonso
xniit2003 wrote: Have anybody successfully used "required" validator. Yes. One thing to note about validation is that it *won't* automatically short-circuit if you're not using the workflow interceptor. Without that interceptor validation can fail and your action's execute method will stil

Re: How to restrict direct accessing .jsp and .do in struts webapp

2007-12-05 Thread Gary Affonso
SmokeTheSun wrote: Hi, Iam working in Struts1.2 application development. In that i want to restrict direct access(through URL) for jsp pages or by calling .do action. Specifically unauthenticated user must not access any pages. ACEGI is the current gold-standard for implementing auth

Re: S2 action mapping: How to return to previous action?

2007-12-05 Thread Gary Affonso
Joachim Ansorg wrote: Hi all, I have two actions (action1 and action2) which both call a third action. How can I do the mapping of the third action so that the calling action is called again (i.e. action1 or action2)? Before action1 or action2 finishes, store its name in one of the scopes (r

Re: my execute method of action class is getting executed twice

2007-12-01 Thread Gary Affonso
xniit2003 wrote: Hi, I am new in struts2. In my action class I declared some global fields and one execute method.This class extends another class, which extends Actionsupport class. Now my execute method is getting processed twice. From this execute method, execution goes to some other method,

Re: Get the list of all action names defined in struts.xml

2007-11-30 Thread Gary Affonso
George Dadulescu wrote: Hi. Is there any possibility to get the list of all the action names defined in struts.xml ? It's in the RunTimeConfiguration. Something like... RuntimeConfiguration runtimeConfiguration = ConfigurationManager.getConfiguration().getRuntimeConfiguration(); A

Re: Getting context properties

2007-11-29 Thread Gary Affonso
Dave Newton wrote: Why do you want it? That's a good question for Dave to be asking. Even though you now know how to get it, are you really sure you want it? The framework shields you from this data for a reason. :-) - Gary -

Re: Getting context properties

2007-11-29 Thread Gary Affonso
uts.properties". You are not getting the filter's url-mappings defined in web.xml. For practical purposes it doesn't matter, it would be a configuration error (in most cases) if web.xml's filter mappings differed from Struts internal notion of the extension. But just FYI on t

Re: Getting context properties

2007-11-29 Thread Gary Affonso
our case, defined in "xwork.xml"). That's not applicable to what you want, but hopefully the above points you in the right direction. Oh, and this is code running under WebWork (2.x), might be a bit different under S2. Good Luck, - Gary Gary Affonso wrote: Pablo Vázquez Blázque

Re: [OT] session state (was Re: Wizard like Screens)

2007-11-29 Thread Gary Affonso
the database for everything. Of course, in this case, it's important to use a "sticky session" clustering approach that works. REST is cool, but I don't know how we'd use pure REST to write, say, an online banking system. :) -- HTH, Ted <http://www.husted.com/ted/blog/

Re: Getting context properties

2007-11-29 Thread Gary Affonso
Pablo Vázquez Blázquez wrote: Hello, How can I red my application name and the actions' extension? For example: http://localhost:8080/scheduler-admintool-1.0/Workspace.do I'd need a code to get "scheduler-admintool-1.0" and "do" from the context. The first part ("scheduler-admintool-1.0") sh

Re: FreeMarker Question

2007-11-28 Thread Gary Affonso
MassimoH wrote: How do I do something like this: public class CustomFreemarkerManager extends FreemarkerManager { @Override protected BeansWrapper getObjectWrapper() { BeansWrapper beansWrapperInstance = super.getObjectWrapper(); // !!! This won't

Re: Wizard like Screens

2007-11-28 Thread Gary Affonso
Tom Schneider wrote: Both of those plugins, by default, would need the session to keep track of the state. Oh, duh. I didn't see that he wanted to avoid the session. What is up with that BTW? There seem to be quite a few posts lately from people wanting to do stuff and avoid the http sessio

Re: similar applications - tomcat deployment

2007-11-27 Thread Gary Affonso
Leonidas Papadakis wrote: Also if apart from the dependency libraries, if you gather all your classes in a jar file isn't it easier to overwrite one file so that all apps will receive the update at once ? In our case we rarely want each instance to be updated at the same time. We're typical

Re: similar applications - tomcat deployment

2007-11-27 Thread Gary Affonso
Leonidas Papadakis wrote: Greetings to all, i have the following scenario. I want to deploy 5 apps that have exactly the same classes (in jars). Only db access, static files and property files change. In short all WEB-INF/lib jar files are the same. So the question is : option1) If i put the

Re: Retrieving last inserted ID

2007-11-27 Thread Gary Affonso
Unnikrishnan wrote: Hi I am new to Struts 2. I would like to know how to retrieve last inserted id. I have page called "welcome" where I have 3 fields (name, telephone, email) my execute method is as follows. public String execute() throws Exception { CustomerFacadeLocal customer

Re: Wizard like Screens

2007-11-23 Thread Gary Affonso
My suggestion would be to checkout the scope plug-in or WebFlow and the WebFlow plug-in. - Gary Radha Krishna wrote: Hi, I have a wizard like screen where i need to pass the selected values (2 text box) at first page to last page,last page to again first page. Can anyone tell me the b

Re: Naming convention

2007-11-21 Thread Gary Affonso
Zhang, Larry (L.) wrote: I knew my question may not be very related to this list, but let me just ask anyway: I have many DB2 stored procedures, for each procedure I correspondingly have a Java parser to parser the result set. I currently name these classes the same name as stored procedure. E

Re: Problem with struts2 iterator and ognl

2007-11-21 Thread Gary Affonso
sagarlotiya wrote: Hi, "not going through the action " means that, directly set on "Model bean" without going through action. I don't think you want to avoid "going through the action". You may not want the property to be a direct property of the action (and instead have it be a property of

Re: [s2] (non trivial) custom made Interceptor and Action testing.

2007-11-21 Thread Gary Affonso
GF wrote: Hello, maybe someone of you have any good link about a non-trivial custom made interceptor My suggestion would be to download the source and take a look at the code for some of the built-in interceptors. I think there were some "server side" articles/tutorials for webwork intercep

Re: [s2] Prepare and Parameter Interceptors

2007-11-20 Thread Gary Affonso
Mark Steyn wrote: Thanks for your help Gary. I got to the bottom of the problem, or at least got around it in the end. After Struts created objects based on the submitted form values, I was using the ids of those objects to create corresponding objects instantiated with values from a database.

Re: concatenate Strings in tag attributes

2007-11-20 Thread Gary Affonso
Anton Pussep wrote: value="%{'/jsp/'+#parameters.file[0]}" I thought I tried that one out already, but apparently I remembered wrong, since it really works, which is great! Anyway, for my part this is very inconvenient. Also I don't know a way to pass an array to request parameters. Thus IMH

Re: Passing data from one form to another form using hyper link

2007-11-19 Thread Gary Affonso
Zhang, Larry (L.) wrote: Say I have page1 (form1) and page2 (form2), on page1 I have a hyper link. When I click on the hyperlink, it will call another action (let's say action2) which is associated to form2 in the struts-config.xml. My question is that how to make form1 data available in action2?

Re: concatenate Strings in tag attributes

2007-11-19 Thread Gary Affonso
Looks to me like the return value of parameters.file is *not* a String. It's a an *array* of strings. And a toString() on an Array of strings looks exactly like what you're seeing: [Ljava.lang.String;... (the prefixed "[" is the clue that it's a string *array*). If the "file" parameter ha

Re: [s2] Prepare and Parameter Interceptors

2007-11-19 Thread Gary Affonso
You've got the interceptor setup order correct. You haven't really provided enough info to really identify another other problems (we'd need to see the form fields, the action, and the object being exposed and hydrated in the action.) But here are some things you can try... 1) turn on debugg

Re: [S2] Struts/JPA Design Practices

2007-11-16 Thread Gary Affonso
Ted Husted wrote: I know the JPA is growing in popularlity among Struts developers. I was wondering if there are certain Struts 2 features that people where finding useful in using JPA or Hibernate 3 For us it's Hibernate 3 still. We'll be moving to JPA in the code (with Hibernate as the unde

Re: Basic Struts work flow question

2007-11-15 Thread Gary Affonso
Minghui Yu wrote: Hi there, I am new to Struts (version 1.2.7). I am developing a small app to learn Struts. Could you please give me some suggestions? Respectfully, my first suggestion would be to use Struts 2. If you're just getting started and you need to climb a learning-curve anyway, wh

Re: Struts Validator to Prevent SQL Injection Attacks

2007-11-15 Thread Gary Affonso
Dave Newton wrote: --- Mike Duffy <[EMAIL PROTECTED]> wrote: Does anyone have a great solution for a validator that will prevent users from entering malicious SQL into form entry text fields? I'm not sure that belongs in a validator; unless you never need to allow the use of a single quote. It

Re: Form Submission Question

2007-11-15 Thread Gary Affonso
Dave Newton wrote: The action that *processes* the form submission may extend ActionSupport. Yup. Note that it's commonly not just "form processing actions" that extend ActionSupport, it's often all actions. Dave knows that, of course, but I didn't want the emphasis on "*processes*" above

Re: [s2] How can I access the RequestMap from an Interceptor?

2007-11-15 Thread Gary Affonso
Thilo Ettelt wrote: I'm sorry I didn't make it clear enough. I do not want to access the parameters. I would like to access all attributes of a request (i.e. remote host, request uri, headers, etc) and I thought Struts2 would wrap that up in a servlet independent map so I don't have to depend o

Re: [s2] How can I access the RequestMap from an Interceptor?

2007-11-14 Thread Gary Affonso
Thilo Ettelt wrote: Yes, I know :) But I don't want to depend on HttpServletRequest. I would like to have the Request*Map*. Unfortunetely from looking at the code I only found out how to contruct a RequestMap from a HttpServletRequest. Omkar showed you how to get to the invocationContext(). F

Re: what login security&encription are good for struts...?

2007-11-13 Thread Gary Affonso
msg2ajay wrote: hello friends, I am developing a struts+hibernate application which contains a login page. I am not sure of which tools or API's to use for logn Authentication and encription. Can any bady suggest me which is best for login Authentication and what way c

Re: Is directly setting the Action's fieldErrors map OK?

2007-11-12 Thread Gary Affonso
Ted Husted wrote: Submit a patch :) I thought about it. But then I thought that I'm not feeling qualified to add generics support to a public API (and a heavily used one, at that). I'm pretty good at being a *user* of generic classes but I confess that creating generic classes/methods inti

Re: Is directly setting the Action's fieldErrors map OK?

2007-11-12 Thread Gary Affonso
rough my domain object's errors and add them to the action's errors via the addFieldError() method... for ( Map.Entry err : account.getValidationErrors().entrySet() ) { addFieldError( validationErrorEntry.getKey(), validationErrorEntry.getValue() ); } Sorry fo

Re: Is directly setting the Action's fieldErrors map OK?

2007-11-11 Thread Gary Affonso
nuking the internal by replacing it with my own. Now, if only the internal FieldErrors map was genericised. One of two isn't bad, though. :-) - Gary Gary Affonso wrote: I've got two questions, here's the summary: I'm doing validation in my domain objects. They kick b

Is directly setting the Action's fieldErrors map OK?

2007-11-11 Thread Gary Affonso
I've got two questions, here's the summary: I'm doing validation in my domain objects. They kick back a map.. public class DomainObject { public Map validate() {...} } In my action's validate method, I just delegate to the domain object's validate() method. Something like this...

ServletRedirect vs ServletActionRedirect (was: [struts] Thanks! Works also with redirect actions...)

2007-11-08 Thread Gary Affonso
Dale Newfield wrote: So it is clearly indicated that "redirectAction" is recommended over "redirect", but I neither understand why, nor quite what it is that this result type does... If so, the new request needs to have the same URL (which must be encoded) no matter which result type generated

Re: [S2] Retrieving values from the valuestack for the tag

2007-11-08 Thread Gary Affonso
Justin Frost wrote: Well, you're doing exactly (almost) what I suggested

Re: [S2] Retrieving values from the valuestack for the tag

2007-11-08 Thread Gary Affonso
So your container heirarchy is... Report - contains a Vector of ReportRow (called headerRow) - contains a Vector of ReportCell (called dataColumn) Shouldn't this just be a matter of a couple of nested loops? Something like... Does that (or the corrected syntax for that id

Re: How Many Methods Must an Action Walk Down (was Re: Annotation Validation, per method?)

2007-11-07 Thread Gary Affonso
Dave Newton wrote: --- Gary Affonso <[EMAIL PROTECTED]> wrote: > Look at the "Dynamic Method Invocation" section, > 1/2-2/3 of the way down. Well, that explains it. The wildcard feature seems to come from s1 (which I never used) and the "dynamic method invocation

Re: struts2 Action pojo can not bind beans

2007-11-07 Thread Gary Affonso
TANG Xigen wrote: > > Thank you very much for you reply! > > but i try remove from , s2 still do not > bind my beans. > > > also, i have no idea about the concept of defaultStack,could you > explain to me more or where i can get some help pages about it? For interceptor docs, this is a good

Re: Manually obtain previous action parameters after action "chaining"?

2007-11-07 Thread Gary Affonso
You can preserve errors and messages from one action to another, across a redirect, with the MessageStoreInterceptor. See here: http://struts.apache.org/2.x/docs/message-store-interceptor.html This lets you avoid chaining which, of course, is usually evil. :-) - Gary jjgould wrote: Ted, e

Re: How Many Methods Must an Action Walk Down (was Re: Annotation Validation, per method?)

2007-11-07 Thread Gary Affonso
Dave Newton wrote: Curiously, action!input is not a part of the framework I'm familiarwith. Can you point me to some docs that describe it? > > http://struts.apache.org/2.x/docs/action-configuration.html > > Look at the "Dynamic Method Invocation" section, > 1/2-2/3 of the way down. Well, that

Re: Thanks! Works also with redirect actions...

2007-11-07 Thread Gary Affonso
Gunnar Hillert wrote: Thanks for your helpful post! You bet. Interestingly, this also works with redirect actions. Since I have not seen any examples anywhere out there, I thought I also post an example for them: mySuccess?fooId=${fooId}${bartId ? "&barId=" + bar

Re: Redirects - Dynamic Parameters

2007-11-07 Thread Gary Affonso
Gary Affonso wrote: Your redirect needs to look something like... myAction.action${foo ? '?foo=' + foo : ''} Note that I'm pretty sure your OGNL lookups are not going to get url-escaped. I looked at the code for the result object. I was wrong. The url

Re: How Many Methods Must an Action Walk Down (was Re: Annotation Validation, per method?)

2007-11-07 Thread Gary Affonso
Ted Husted wrote: On Nov 6, 2007 8:10 PM, Gary Affonso <[EMAIL PROTECTED]> wrote: For some reason folks new to s2 seem to get it backwards and want to stuff a bunch of Action methods into a single Action class. It's probably because the standard S2/WW validation workflow impl

Re: Redirects - Dynamic Parameters

2007-11-06 Thread Gary Affonso
o" is a property of the Action and available to OGNL (a getter). If foo lives somewhere else (like in the session, for instance) then you'll need to do a little more work to write the proper ognl reference. Anyway, hope that helps. I think the above is (mostly) right this time. :-)

Re: Annotation Validation, per method?

2007-11-06 Thread Gary Affonso
Ted Husted wrote: Of course, if you use one-action-method per Action-class, then all the annotations work just fine. +1 on one-action-method per Action class. My personal opinion (after nearly 5 years of heavy WebWork/s2 use) is that this is the best-practice and that multiple action methods

Re: Struts2 Configutation alternative to sessions?

2007-11-06 Thread Gary Affonso
James Carr wrote: Hi All, I'm using struts 2 for a small web app that has an action attribute that needs to maintain state. Currently I'm using sessions but I would like to reconfigure my application to use something besides sessions, perhaps something like viewState in .NET that would be availbl

Re: S2: input by method for validations

2007-11-06 Thread Gary Affonso
Maybe this is obvious, but why not just break this into two different action classes? Then you get easy control of where you map the "INPUT" result code generated when the DefaultWorkflowInterceptor detects a validation error. - Gary Manuel Correa wrote: I found this:

Re: Redirects - Dynamic Parameters

2007-11-06 Thread Gary Affonso
I think you already know this, but in case you don't... When you specify the action to redirect to, you have access to the OGNL stack. So your redirect may look something like this.. myAction.action?param=${paramValue} I think what you're asking is, if "param" has no value, you don't want

Re: [S2] Restricting paths?

2007-11-06 Thread Gary Affonso
Did you checkout the namespace setting of your package? - Gary Jake Robb wrote: I have an action called MainMenu. It's defined as follows: mainMenu (I'm using the Spring plugin - mainMenuAction is the name of the spring bean) I want MainMenu to be accessible at

Re: Login checking before processing any action/class

2007-11-05 Thread Gary Affonso
Tom Schneider wrote: With Acegi, are you using an interceptor or is there a different way to enforce security? Acegi sets up it's own Servlet Filter to monitor incoming url requests. This filter is typically the first in the filter chain, Acegi gets a shot at processing the url before anythin

Re: Login checking before processing any action/class

2007-11-05 Thread Gary Affonso
Dave Newton wrote: Interceptor or Acegi. +1 on Acegi. We've been doing auth "by hand" for years, I think we've used just about every technique over time (writing servlet filters, writing WebWork interceptors, doing checks in the Action's exec method, using container-security, etc). But ha

Re: [OT] Write a thread to check database in web application

2007-11-05 Thread Gary Affonso
Ashish Kulkarni wrote: Hi I have to write a thread in web application which will check some values in database, and then perform some function depending on the values. There wont be any user input and this thread should be called after like 10 minutes, also i want to have a jsp page from where i

Re: Conditional Validation

2007-11-03 Thread Gary Affonso
[EMAIL PROTECTED] wrote: Can anyone tell me how to do conditional validation in struts 2? In one form I want validations for a particular category (say Category XYZ) only if the candidate in that. If he is NOT Category XYZ then by checking a checkbox he should be able to skip the validations f

Re: ModelDriven vs OGNL assignment?

2007-11-02 Thread Gary Affonso
Dave Newton wrote: --- Gary Affonso <[EMAIL PROTECTED]> wrote: And that does it. Direct model injection. Easy. Technically, no, it's indirected by one level. *All* ModelDriven does is push the model on to the stack so it's available at the top level. AFAIK there's no

Re: ModelDriven vs OGNL assignment?

2007-11-02 Thread Gary Affonso
Jon Wilmoth wrote: Besides the simplified view references, I've used the level of indirection to allow for a dynamic model on a single action class that implements a number of related actions. In my case the action configuration sets a static property that defines the model property. > The get

ModelDriven vs OGNL assignment?

2007-11-02 Thread Gary Affonso
In our previous WebWork app we were not using ModelDriven and just relying on OGNL assignment... * We ensure our action provides a getter for the domain object private Account account; public Account getAccount(); * We ensure html fieldnames include both the domain object name and the pro

Re: Validation Best Practices?

2007-10-29 Thread Gary Affonso
Tom Schneider wrote: This is essentially what we're doing as well, but it is far from an ideal situation. The issue I've seen is that you can't easily use the validators from the xml in the validate() method. Another disadvantage is that validation is in 2 different places. Also, some of our v

Re: Mixing Struts tags with naked EL expressions: ${}

2007-10-19 Thread Gary Affonso
Wes Wannemacher wrote: You can escape the # character so that UEL will not be invoked. In fact, this is necessary for anonymous OGNL list creation i.e. - https://issues.apache.org/struts/browse/WW-2213 Good to know, thanks Wes. - Gary -

Re: Mixing Struts tags with naked EL expressions: ${}

2007-10-19 Thread Gary Affonso
Dave Newton wrote: http://struts.apache.org/2.x/docs/can-we-use-jstl-with-the-framework.html Yah, I saw that. But I also saw this... http://struts.apache.org/2.x/docs/exposing-framework-objects-to-jstl-with-a-jstl-and-displaytag-example.html ...which, if I'm hearing you correctly, is unneces

Mixing Struts tags with naked EL expressions: ${}

2007-10-19 Thread Gary Affonso
I need some clarification on what is happening when I mix naked EL expressions with Struts tags in a JSP page. To put this in context, lets say I have an action that makes a "product" object available to the view via a getter (in the action). In the JSP view I can do this: ${product.name}