Parameters and chaining (was: Re: RE-2: cvs commit:jakarta-struts/src/share/org/apache/struts/acti on Action.javaActionForm.java)

2001-05-11 Thread Martin Cooper
Actually, one of the reasons I elected to use a separate form bean was actually to avoid one of the issues (for me, anyway) that a parameter stack would raise. When a request is chained using a forward, the set of parameters presented to the second action is the union of those supplied in the fir

Re: cvs commit: jakarta-struts/src/share/org/apache/struts/utilRequestUtils.java

2001-05-11 Thread Craig R. McClanahan
On Fri, 11 May 2001, Martin Cooper wrote: > At 03:44 PM 5/11/01, Craig R. McClanahan wrote: > > > >On 11 May 2001 [EMAIL PROTECTED] wrote: > > > > > mschachter01/05/11 15:33:38 > > > > > > Modified:src/share/org/apache/struts/action Action.java > > > ActionSe

Re: cvs commit: jakarta-struts/src/share/org/apache/struts/utilRequestUtils.java

2001-05-11 Thread Martin Cooper
At 03:44 PM 5/11/01, Craig R. McClanahan wrote: >On 11 May 2001 [EMAIL PROTECTED] wrote: > > > mschachter01/05/11 15:33:38 > > > > Modified:src/share/org/apache/struts/action Action.java > > ActionServlet.java > >src/share/org/apache/struts/uploa

Re: I'm back!

2001-05-11 Thread Charles Lee
Hi, Craig, We are developing an application in-house with Struts and have built a rudimentary Workflow. Myself and another coworker would definitely like to be involved with the Workflow effort. Please put us down on the mailing list: [EMAIL PROTECTED] [EMAIL PROTECTED] Charles Craig Tata

Re: cvs commit: jakarta-struts/src/share/org/apache/struts/utilRequestUtils.java

2001-05-11 Thread Craig R. McClanahan
On 11 May 2001 [EMAIL PROTECTED] wrote: > mschachter01/05/11 15:33:38 > > Modified:src/share/org/apache/struts/action Action.java > ActionServlet.java >src/share/org/apache/struts/upload > DiskMultipartRequestHandler.jav

cvs commit: jakarta-struts/src/share/org/apache/struts/util RequestUtils.java

2001-05-11 Thread mschachter
mschachter01/05/11 15:33:38 Modified:src/share/org/apache/struts/action Action.java ActionServlet.java src/share/org/apache/struts/upload DiskMultipartRequestHandler.java src/share/org/apache/struts/util Reque

RE: RE-2: cvs commit:jakarta-struts/src/share/org/apache/struts/acti on Action.javaActionForm.java

2001-05-11 Thread William Shulman
Sounds like another good solution might be to implement a parameter stack in the request object. The parameter stack is a stack of Dictionary objects. When parameters are introduced, they are placed in the Dictionary on the top of the stack. Similarly for lookup. Stack frames (i.e. the Dictiona

RE: RE-2: cvs commit:jakarta-struts/src/share/org/apache/struts/acti on Action.javaActionForm.java

2001-05-11 Thread Martin Cooper
As far as I am aware, you cannot add parameters to the request. I think storing values as request attributes and then looking there for parameter values would be very dangerous. You could potentially break existing code that uses request attributes to store data for chaining actions. Incidenta

RE: RE-2: cvs commit: jakarta-struts/src/share/org/apache/struts/acti on Action.java ActionForm.java

2001-05-11 Thread SCHACHTER,MICHAEL (HP-NewJersey,ex2)
What I'm doing is creating a MultipartRequestWrapper class, very similar to what HttpServletRequestWrapper does in the Servlet 2.3 API, and setting the request to that wrapper instead. That way, I can handle the getParameter() method calls on the request myself for multipart requests, and set par

RE: RE-2: cvs commit: jakarta-struts/src/share/org/apache/struts/acti on Action.java ActionForm.java

2001-05-11 Thread Deadman, Hal
I thought of that too but I don't know how to add parameters to the request. Maybe you could use request.setAttribute and store the multi-part request String parameters as attributes in the requet object. Then code that looks for parameters could be changed to a method that looks for parameters or

RE: Re[2]: Validating bean properties (WAS: Re: Stupd question aboutStru ts and EJB.)

2001-05-11 Thread Rey Francois
We actually now have gone for a similar approach. We have defined a Mapper class that encapsulate Mappings and MappedObjects, each Mapping being a relationship between one or more MappedObjects and containing the name of the fields to "import/export". We also created the notion of Converters, m

RE-2: cvs commit: jakarta-struts/src/share/org/apache/struts/action Action.java ActionForm.java

2001-05-11 Thread SCHACHTER,MICHAEL (HP-NewJersey,ex2)
On second thought, I'm going to toy around with putting the request parameters directly into the request from MultipartRequestHandler instead of using MultipartRequestHandler itself to store attributes. If I can get it to work this will solve all the problems without adding any new methods to any

RE: cvs commit: jakarta-struts/src/share/org/apache/struts/action Action.java ActionForm.java

2001-05-11 Thread Craig R. McClanahan
The controller servlet needs to correctly recognize a cancelled transaction, even on multi-part input, as Hal points out. The simplest approach is to update the logic in processValidate() that checks for cancellation so that it works in this case as well. Craig On Fri, 11 May 2001, SCHACHTER,M

RE: cvs commit: jakarta-struts/src/share/org/apache/struts/action Action.java ActionForm.java

2001-05-11 Thread SCHACHTER,MICHAEL (HP-NewJersey,ex2)
Is this an acceptable resolution to this problem for everybody? If so, I'll go ahead and fix the token problem in the Action class, be creating new isTokenValid() method that takes an HttpServletRequest and a MultipartRequestHandler as arguments, when using it for multipart forms. The other toke

RE: cvs commit: jakarta-struts/src/share/org/apache/struts/action Action.java ActionForm.java

2001-05-11 Thread Deadman, Hal
The developer should call isCancelled() but the check for the cancel tag in the request also exists in ActionServlet: protected boolean processValidate(ActionMapping mapping, ActionForm formInstance, HttpServletRequest request, HttpServletResponse response) throws IOEx

RE: cvs commit: jakarta-struts/src/share/org/apache/struts/action Action.java ActionForm.java

2001-05-11 Thread SCHACHTER,MICHAEL (HP-NewJersey,ex2)
Hal, It was my understanding that since isCancelled is a protected method in the Action class, that it was the Action developer's job to call the method. -Original Message- From: Deadman, Hal [mailto:[EMAIL PROTECTED]] Sent: Friday, May 11, 2001 1:24 PM To: [EMAIL PROTECTED] Subject: RE:

RE: cvs commit: jakarta-struts/src/share/org/apache/struts/action Action.java ActionForm.java

2001-05-11 Thread Deadman, Hal
Doesn't the Struts framework need to call this new method somewhere? The application code can't call the isCancelled method because the Action class code will never be called. If Struts ActionServlet calls the form validate when a user clicked cancel, the validation will likely fail and the user w

cvs commit: jakarta-struts/src/share/org/apache/struts/action Action.java ActionForm.java

2001-05-11 Thread mschachter
mschachter01/05/11 10:11:06 Modified:doc todo-1.1.xml src/share/org/apache/struts/action Action.java ActionForm.java Log: - Add an isCancelled() method to the Action class that takes a MultipartRequestHandler as an argument. This sh

Re: [BeanUtils] Need a type conversion hook

2001-05-11 Thread Paul Speed
Sorry to interject... >From personal experience I would recommend coming up with a custom solution in this case. I've built an entire GUI framework partially around PropertyEditors and their short-comings are numerous. For simple data conversion I think they are overkill. PropertyEdiors are d

cvs commit: jakarta-struts/doc struts-html.xml

2001-05-11 Thread craigmcc
craigmcc01/05/11 09:55:40 Modified:doc struts-html.xml Log: Make the "size" attribute available on the custom tag. The underlying base class already supports this. Submitted by: Andy Brook <[EMAIL PROTECTED]> Revision ChangesPath 1.10 +9 -0 jakart

Re: [BeanUtils] Need a type conversion hook

2001-05-11 Thread Craig R. McClanahan
Hi Dmitri, No, I don't think that your problem is unique -- but it's definitely one I haven't had time to think much about in a Struts 1.0 time frame. In addition to the two alternatives you have proposed, the JavaBeans spec provides a standard API for doing custom type conversions -- the Proper

RE: Adding a new "workflow" scope type

2001-05-11 Thread Rey Francois
We have also explored such idea, although this was just a discussion in our team. We however have also concluded that the notion of workflow, or "contexts" in our terms, is strongly related to the notion of command token already discussed in this user list in Dec. 2000, and therefore both should

RE: version that doesn't require name

2001-05-11 Thread Young, Wayne
Ok, my bad. Notice that the key is org.apache.struts.taglib.Constants.BEAN_KEY instead of org.apache.struts.taglib.html.Constants.BEAN_KEY. I was missing the "html" node in the package. Boy I'll be glad when all that source is gone. Thanks. Wayne -Original Message- From: Young, Wayne

[BeanUtils] Need a type conversion hook

2001-05-11 Thread Dmitri Plotnikov
BeanUtils are fantastic. There is just one minor issue I have with them. There are no hooks for me to augment their behavoir. Here's my specific problem. I am using an Enum framework that gives me very nice, fully automatic support for Enum types like Gender{Male, Female}. It is internationaliz

version that doesn't require name

2001-05-11 Thread Young, Wayne
I've been trying to make a version of that doesn't require the "name" attribute and just uses the default form bean if it isn't supplied. (like the HTML tags work) I've tried changing the name to Contants.BEAN_KEY just like in BaseFieldTag. // Look up the requested bean (if necessary)

FeatureRequest for tagname 'file' in struts-html.xml

2001-05-11 Thread Brook, Andy
Hi, The html:file tag attributes as specified in struts-html.xml dont specify 'size', can someone please it, thats all that is required to enable resizeable file input field boxes... Cheers, andy.