auto-populate form from form-bean

2005-03-17 Thread wo_shi_ni_ba_ba
hi folks, suppose i have two forms formA and formB associated with actionA and actionB. The two forms are on the same jsp. when actionA is invoked i want to auto-populate the field b in formB, is this possible? I tried the following: in actionA.execute(): FormB =new FormB(); formB.setB(newVal); req

action-mapping with varying input

2005-03-16 Thread wo_shi_ni_ba_ba
hi folks, I have an action that might be called from many jsps. If i understand correctly the input specified for action tag will dictate where to go in case there's an error in validation.. How would I be able to specify the input as a variable.. My Actions allow user to pass in a URL and ERL indi

chain two actions together

2005-03-15 Thread wo_shi_ni_ba_ba
Is there a way to chain two Actions together? a lot of times I found that I need to have Action B that needs to do something then do Action C. What is the best practice here? thanks __ Do you Yahoo!? Yahoo! Small Business - Try our new resourc

RE: DynaActionForm

2005-03-11 Thread wo_shi_ni_ba_ba
David, thanks for the suggestion. I will try them. The problem disappeared magically the morning i walked into my office but anyway --- "David G. Friedman" <[EMAIL PROTECTED]> wrote: > Wo, > > I haven't used DynaActionForms in ages but these 2 > issues jump out at me: > > 1. You might stil

message-resource help!

2005-03-11 Thread wo_shi_ni_ba_ba
hi folks, I am trying to use error message specified in the application resources I specified the following name=pair: newunit.failure = Failed to create a new {0}: {1} and then in my Action class I added an error like this: errors.add(ActionErrors.GLOBAL_ERROR, new ActionError("newunit.failure",

error message and validation

2005-03-11 Thread wo_shi_ni_ba_ba
I know that by default if I specify errors.required = {0} is required in the message resource , struts validator will use this message for missing parameter that is required. But what if I want to have very different error msgs for different missing parameters? can this be done? for example, if

efficiency question

2005-03-11 Thread wo_shi_ni_ba_ba
Are there any difference in performance between the following two scenarios? 1. creating and storing an attribute in the request in the action.execute() then use the attribute as a bean by struts from the jsp 2. creating the attribute store it in the request as scriplet in the jsp page, then use th

replacing attribute in session

2005-03-11 Thread wo_shi_ni_ba_ba
if I do a request.getSession().setAttribute(name,val1); then request.getSession().setAttribute(name,val2) would the val1 get garbage collected? So if I use session to store user, I don't really need to invalidate the session when the user log in again, right? thanks ___

RE: DynaActionForm

2005-03-10 Thread wo_shi_ni_ba_ba
Greg, thanks for the advise. However I don't think those are the causes of the problem. I tried changing them and it didn't make a difference. I still got the NullPointerException. --- Greg Pelly <[EMAIL PROTECTED]> wrote: > I think you have 2 errors in the HTML below > > 1. try changing acti

DynaActionForm

2005-03-10 Thread wo_shi_ni_ba_ba
Hi folks, I am using a DynaActionForm with an Action. I have the following exception when the form is submitted. but if I use a regular ActionForm it's ok... what's wrong? thanks in advance my form-bean: my action-mapping:

ActionError and message resource

2005-03-10 Thread wo_shi_ni_ba_ba
hi, I am trying to use . In my Action class I added an error with the key login.failure. My question is where should I specify the key=value pair. I specified it in the default message-resource file. My struts-config: but the key was not recognized. what's wrong? thanks in advance.

user management

2005-03-10 Thread wo_shi_ni_ba_ba
do struts developers usually store user as an object in session? or does struts have additional framework for handling user management. thanks in advance __ Do you Yahoo!? Yahoo! Small Business - Try our new resources site! http://smallbusiness.y

RE: session and request scope

2005-03-10 Thread wo_shi_ni_ba_ba
es, but if > you have a lot of users in your web app and they > stay for a long time, the > memory consuption can become significant if you have > a lot of session > objects. > > kr, > guenther > > -Original Message- > From: wo_shi_ni_ba_ba > [mailto:[EMA

session and request scope

2005-03-10 Thread wo_shi_ni_ba_ba
In terms of performance, does storing an attribute into the session cost more than storing it into the request? how significant is the overhead? __ Do you Yahoo!? Yahoo! Small Business - Try our new resources site! http://smallbusiness.yahoo.com/

RE: nested tags

2005-03-10 Thread wo_shi_ni_ba_ba
> The other part is that you would have to write some > kind of preprocessor > for the page that basically acts as a web container > to process your > tags, then pass the preprocessed page to the jsp > compiler. > > Its not "un-doable" but it is not very practical

Re: nested tags

2005-03-10 Thread wo_shi_ni_ba_ba
I am using it in a tile, it's mainly for reusability and efficiency. I created a jsp template that takes some tile parameters and fill them in and tries to create form elements on the fly. But i guess it wont' work --- Wendy Smoak <[EMAIL PROTECTED]> wrote: > Fro

struts version and difference between 1.1 and 1.2

2005-03-10 Thread wo_shi_ni_ba_ba
hi folks, Two questions: 1. this might be a silly question, but how do I find out what version of struts I am using. It came bundled with my websphere v6 rational web developer. how do I find out the version number for struts? I took note of struts-html.tld http://java.sun.com/j2ee/dtds/web-jsptagl

nested tags

2005-03-10 Thread wo_shi_ni_ba_ba
I want to have tags like the following: property=""/> My goal is to pass in attribute whose value can be used again to construt struts tags dynamically. Is this doable? for example, passing in the right struts html tag and concatenate it with other struts tags to form a new struts tag. but when

Re: validation issue

2005-03-10 Thread wo_shi_ni_ba_ba
ient side JavaScript thats generated includes > a "bCancel" var - which > if set to "true" causes the validation to be > skipped. So for your "previous" > processing, you can just set this variable to "true" > and submit the form. > > ---

Re: validation issue

2005-03-10 Thread wo_shi_ni_ba_ba
t set this variable to "true" > and submit the form. > > - Original Message - > From: "wo_shi_ni_ba_ba" <[EMAIL PROTECTED]> > Sent: Wednesday, March 09, 2005 11:30 PM > > > > I have a previous and next button, if the user > > clic

Re: struts validation

2005-03-09 Thread wo_shi_ni_ba_ba
;t it just populate the bean and forwards back to the input page with the error msg instead of giving a mysterious error? what's wrong with the way i m using struts validation? --- wo_shi_ni_ba_ba <[EMAIL PROTECTED]> wrote: > It seems like if I specify a field as required in > struts

struts validation

2005-03-09 Thread wo_shi_ni_ba_ba
It seems like if I specify a field as required in struts's validation-rule.xml and that field is missing from the form, when i submit the form it would say file not found /actionName without spitting out an exception. It is as if it's seeing the action specified by actionName as a file... any ide

Re: validation issue

2005-03-09 Thread wo_shi_ni_ba_ba
gt; action="/logon" method="post"> > > write a new function in your own javascript > function myFunction(myform) { > //set your form value here from hidden input > field. > > return validateLogonForm(myform); > } > > > On Wed, 9

Re: validation issue

2005-03-09 Thread wo_shi_ni_ba_ba
thanks, but I need it to be links to a graphics instead of button, any alternative? --- Hubert Rabago <[EMAIL PROTECTED]> wrote: > Use the tag for your Previous button. > > > On Wed, 9 Mar 2005 15:30:27 -0800 (PST), > wo_shi_ni_ba_ba > <[EMAIL PROTECTED]> wrote:

validation issue

2005-03-09 Thread wo_shi_ni_ba_ba
dear folks, I am using struts validator framework for both clientside and serverside validation. On the jsp page, I have a previous and next button, if the user clicks previous I don't want to validate; if the user clicks next I want to validate. However I can not modify the javascript function

RE: overwriting default tile attribute value

2005-03-09 Thread wo_shi_ni_ba_ba
Actually I just tried again and my approach worked. It did overwrite the default value of param1 I that I specified in tiles-def.xml... weird but anyway... thank you --- "Fogleson, Allen" <[EMAIL PROTECTED]> wrote: > In the tiles-def.xml subclass the common.default, > then use an action to > for

Re: tiles:insert and tiles:put an attribute and the import it to request scope

2005-03-09 Thread wo_shi_ni_ba_ba
thanks that helps --- Tim Christopher <[EMAIL PROTECTED]> wrote: > Try: > http://www.arc-mind.com/papers/advanced-tiles.pdf > > > On Tue, 8 Mar 2005 10:30:58 -0800 (PST), > wo_shi_ni_ba_ba > <[EMAIL PROTECTED]> wrote: > > Tim, > > thanks for the

overwriting default tile attribute value

2005-03-09 Thread wo_shi_ni_ba_ba
Hi folks, In my tile definition file I put an attribute with its value, in the jsp that uses this definition I attempted to put the same attribute in with another value. However , the default value always shows up at the end. Is there a way that I can provide a default value for a tile attribute

RE: problem with automation of struts html code

2005-03-08 Thread wo_shi_ni_ba_ba
> Don't write your own page templating system. Use > Tiles instead. > -Max > > On Tue, 2005-03-08 at 16:32 -0800, wo_shi_ni_ba_ba > wrote: > > Hi folks, > > In my webapplications there are many html page > with > > the similar look and structure. I

Re: problem with automation of struts html code

2005-03-08 Thread wo_shi_ni_ba_ba
> wrote: > Don't write your own page templating system. Use > Tiles instead. > > -Max > > On Tue, 2005-03-08 at 16:32 -0800, wo_shi_ni_ba_ba > wrote: > > Hi folks, > > In my webapplications there are many html page > with > > the similar look and st

RE: struts html tags and form-beans

2005-03-08 Thread wo_shi_ni_ba_ba
you need. > > > > -Original Message- > > From: wo_shi_ni_ba_ba > [mailto:[EMAIL PROTECTED] > > Sent: Tuesday, March 08, 2005 3:28 PM > > To: Struts Users Mailing List; Jeff Beal > > Subject: Re: struts html tags and form-beans > > > > &

problem with automation of struts html code

2005-03-08 Thread wo_shi_ni_ba_ba
Hi folks, In my webapplications there are many html page with the similar look and structure. I am trying to factor out them. So I created utility functions to print out html code to the jspWriter. But I am not able to incorporate struts tags into these functions because they will just be printed

Re: struts html tags and form-beans

2005-03-08 Thread wo_shi_ni_ba_ba
values from the > form and displaying them to the user. For example, > in the case of > displaying invalid responses to the user for them to > correct. > > > On Tue, 8 Mar 2005 11:07:15 -0800 (PST), > wo_shi_ni_ba_ba > <[EMAIL PROTECTED]> wrote: > > hi fol

struts html tags and form-beans

2005-03-08 Thread wo_shi_ni_ba_ba
hi folks, if I just use plain html code(not struts html: tags) for constructing input types like radios, textfield,etc, would I still be able to use form-bean for automatic retrieving and populating as long as I wrap all the inputs in a form and set the form action to be an action associated with

attribute passing between jsps

2005-03-08 Thread wo_shi_ni_ba_ba
Hi folks, I have A.jsp page that uses some layout as the following: Now I want to either 1)insert an attribute from A.jsp and then access its value from nav.jsp or 2) insert the attribute from the layout and modify the attribute value fro A.j

Re: tiles:insert and tiles:put an attribute and the import it to request scope

2005-03-08 Thread wo_shi_ni_ba_ba
Tim, thanks for the example. What I really want is to modify the value of the attribute title from content.jsp and then acess this attribute from somepage.jsp. How can this be achieved? thank you! --- Tim Christopher <[EMAIL PROTECTED]> wrote: > Not sure if this is what you're asking but here's