You are viewing a plain text version of this content. The canonical link for it is here.
Posted to user@struts.apache.org by Sidhartha Jain <si...@rediffmail.com> on 2002/01/23 22:32:51 UTC
Fwd: Href issue
Hi
I am having an issue with <html:link> tag of struts. I think I don't know how to use it.
Actually I have a java script fucntion which looks like this
function launchEdit(field, accField, relation, newType)
{
currentField = document.editForm.field;
currentAccField = document.editForm.accField;
isRelation = relation;
var url = 'LoadObject.do?parent=true&action=Edit&type='+newType+'&accNum='+accField.value;
window.open(url,'CreateNew','height=500,width=550,resizable=1,scrollbars=1');
}
And it needs to be called by passing the parameters that would also be dynamic for me (which will change everytime we call it.)
Can Someone throw some light on this issue as to how we achieve this functionality .
I would be highly thankful to you.
Thanks in Advance
Sidhartha
Re: persistance for wizard type forms
Posted by Mark Woon <mo...@SMI.Stanford.EDU>.
Ted Husted wrote:
> Because when you go from one page to another in a wizard, the properties
> from the prior page can be reset.
Ah. Whoops. Didn't read the subject line, and didn't get the context.
-Mark
--
To unsubscribe, e-mail: <ma...@jakarta.apache.org>
For additional commands, e-mail: <ma...@jakarta.apache.org>
Re: persistance for wizard type forms
Posted by Ted Husted <hu...@apache.org>.
Christian Bouessay wrote:
> What are the good reasons to store page number in a hidden form?
> Is it a design issue?
The Struts/Commons Validator lets you assign a page number to the
various validations, and then performs those which are equal to or less
than the page number in the request. This is to keep people from jumping
into the middle, and skipping prior forms.
-- Ted Husted, Husted dot Com, Fairport NY USA.
-- Java Web Development with Struts.
-- Tel +1 585 737-3463.
-- Web http://www.husted.com/struts/
--
To unsubscribe, e-mail: <ma...@jakarta.apache.org>
For additional commands, e-mail: <ma...@jakarta.apache.org>
Re: persistance for wizard type forms
Posted by Christian Bouessay <cb...@businessdecision.com>.
Ted Husted wrote:
> One approach to a wizard is to group the properties into pages, and pass
> the page number as a hidden property. The reset and validation methods
> can then use the page number to decide which set of properties to
> validate.
I'm using this approach, but don't store page number in a hidden
property : decision depends of the action name.
For example, in a form-bean.validate() :
if(mapping.getPath().equals("/form1") )
return validateForm1(mapping, request);
if(mapping.getPath().equals("/form2") )
return validateForm2(mapping, request);
What are the good reasons to store page number in a hidden form?
Is it a design issue?
--
C. Bouessay
--
To unsubscribe, e-mail: <ma...@jakarta.apache.org>
For additional commands, e-mail: <ma...@jakarta.apache.org>
Re: persistance for wizard type forms
Posted by Ted Husted <hu...@apache.org>.
Because when you go from one page to another in a wizard, the properties
from the prior page can be reset.
Select boxes and radio buttons would have one value or the other
submitted, and so resetting them is usually not important.
Checkboxes if not set are not submitted at all. Sometimes when they are
toggled, the toggle is lost because a new checkbox parameter does not
come along to change true to false. Which is where the reset comes in :)
All this really only comes into play when ActionForms are stored in
session scope and persist between requests. Otherwise, a new form is
instantiated for the new request.
One approach to a wizard is to group the properties into pages, and pass
the page number as a hidden property. The reset and validation methods
can then use the page number to decide which set of properties to
validate.
Mark Woon wrote:
>
> Ted Husted wrote:
>
> > Be sure your reset() method is not blindly resetting the properties. The
> > default reset() does nothing, but people often have it reset everything.
> > The only important thing to reset() is the checkboxes, since the
> > browsers do not resubmit these if they are unchecked.
>
> It's also important to reset() select boxes. I'd assume that radio buttons would
> fall into this category too.
>
> Still, I don't see why it would be a problem to blindly reset everything though...
>
> -Mark
>
> --
> To unsubscribe, e-mail: <ma...@jakarta.apache.org>
> For additional commands, e-mail: <ma...@jakarta.apache.org>
-- Ted Husted, Husted dot Com, Fairport NY USA.
-- Java Web Development with Struts.
-- Tel +1 585 737-3463.
-- Web http://www.husted.com/struts/
--
To unsubscribe, e-mail: <ma...@jakarta.apache.org>
For additional commands, e-mail: <ma...@jakarta.apache.org>
Re: persistance for wizard type forms
Posted by Mark Woon <mo...@SMI.Stanford.EDU>.
Ted Husted wrote:
> Be sure your reset() method is not blindly resetting the properties. The
> default reset() does nothing, but people often have it reset everything.
> The only important thing to reset() is the checkboxes, since the
> browsers do not resubmit these if they are unchecked.
It's also important to reset() select boxes. I'd assume that radio buttons would
fall into this category too.
Still, I don't see why it would be a problem to blindly reset everything though...
-Mark
--
To unsubscribe, e-mail: <ma...@jakarta.apache.org>
For additional commands, e-mail: <ma...@jakarta.apache.org>
Re: persistance for wizard type forms
Posted by Ted Husted <hu...@apache.org>.
Be sure your reset() method is not blindly resetting the properties. The
default reset() does nothing, but people often have it reset everything.
The only important thing to reset() is the checkboxes, since the
browsers do not resubmit these if they are unchecked.
-- Ted Husted, Husted dot Com, Fairport NY USA.
-- Java Web Development with Struts.
-- Tel +1 585 737-3463.
-- Web http://www.husted.com/struts/
Sriram Nookala wrote:
>
> I'm developing wizard-type forms using struts. The data I entered
> previously doesn't show up when I go back to the previous form even though I
> use the same 'ActionForm' for all the wizard forms and I set the scope in
> the action mapping to 'session'. What am I missing ?
>
> --
> To unsubscribe, e-mail: <ma...@jakarta.apache.org>
> For additional commands, e-mail: <ma...@jakarta.apache.org>
--
To unsubscribe, e-mail: <ma...@jakarta.apache.org>
For additional commands, e-mail: <ma...@jakarta.apache.org>
RE: persistance for wizard type forms
Posted by Alex Paransky <al...@individualnetwork.com>.
Make sure to put your form in the "session" scope.
-AP_
-----Original Message-----
From: Sriram Nookala [mailto:srinookala@mediaone.net]
Sent: Wednesday, January 23, 2002 1:47 PM
To: Struts Users Mailing List
Subject: persistance for wizard type forms
I'm developing wizard-type forms using struts. The data I entered
previously doesn't show up when I go back to the previous form even though I
use the same 'ActionForm' for all the wizard forms and I set the scope in
the action mapping to 'session'. What am I missing ?
--
To unsubscribe, e-mail:
<ma...@jakarta.apache.org>
For additional commands, e-mail:
<ma...@jakarta.apache.org>
--
To unsubscribe, e-mail: <ma...@jakarta.apache.org>
For additional commands, e-mail: <ma...@jakarta.apache.org>
persistance for wizard type forms
Posted by Sriram Nookala <sr...@mediaone.net>.
I'm developing wizard-type forms using struts. The data I entered
previously doesn't show up when I go back to the previous form even though I
use the same 'ActionForm' for all the wizard forms and I set the scope in
the action mapping to 'session'. What am I missing ?
--
To unsubscribe, e-mail: <ma...@jakarta.apache.org>
For additional commands, e-mail: <ma...@jakarta.apache.org>