You are viewing a plain text version of this content. The canonical link for it is here.
Posted to user@struts.apache.org by Vikash Manoranjan <vi...@infotechsw.com> on 2007/02/23 05:58:20 UTC

sample code for LazyActionForm needed

Hi,
 
i want to use LazyActionForm in my program. Kindly provide me with complete
sample code like how to use it.

Thanks and Regards, 

Vikash Manoranjan

Senior Software Engineer

Infotech Enterprises Limited 
B-37, Sector-1, 
Noida - 201301 
Uttar Pradesh, India 

 

RE: [DESIGN] struts dialog / wizard

Posted by "Strachan, Paul" <Pa...@det.nsw.edu.au>.
Michael - thanks for your reply:
1. the progress menu is just an ordinary left-nav html menu which
displays all the steps of the wizard (plus a state icon - e.g. green
tick) and allows the user to navigate to any page.  As you say I can
probably do this myself based on the wizard state/context object.

2. thanks I'll look at that

3. I agree with you but that's what the business wants (to navigate
forward). In my wizard each page is independent (so that helps) +
there's a requirement at the end to display the review page with amend
buttons to take the user back to a previous page and to allow the user
to navigate back to the review page - this seems a reasonable request
???, but does imply forward navigation.  Anyway I'll take a look at the
method you suggest - thanks.

5. Yes, wizard state can be influenced by an external state. The
post-submitted (internal) processing uses a workflow system as it
travels through different actors/business units.  The user can retrieve
and modify certain parts of their application (in the wizard) if that
internal workflow stage is incomplete.

Usually I'm happy to work with the usual struts action/form components +
MVC but for this particular wizard (if I dare even call it that) I'm
thinking an established framework might be more appropriate, given the
unusual business requirements.

Thanks for your help/comments - should I post here for
struts-dialog/easywizard help or is there a more appropriate forum/list?

Thanks,
Paul

-----Original Message-----
From: Michael Jouravlev [mailto:jmikus@gmail.com] 
Sent: Tuesday, 27 February 2007 10:53 AM
To: Struts Users Mailing List
Subject: Re: [DESIGN] struts dialog / wizard

On 2/25/07, Strachan, Paul <Pa...@det.nsw.edu.au> wrote:
> Hi,
>
> I'm looking at implementing a struts wizard flow (of about 12 pages)
> into my struts-1.2.9 application.  The struts dialogue project seems
> to be along the lines of what I need (pattern-wise).
>
>  I have some extra quirements such as:
>
> 1. A progress menu (synch with the wizard)

What is that? A progress bar? You can draw it yourself. The wizard
engine used in Struts Dialogs does not do any UI. It can be used even
in a standalone console app ;-)

> 2. Some pages have options (eg radio buttons) which alter the later
flow

The wizard engine employed in Struts Dialogs example allows to alter
the flow. In the example, if you enable "add security info" checkbox
the wizard shows an intermediate page with "you favorite color"
question.

> 3. The usual next/previous buttons + ability for user to navigate
directly to some pages

The wizard engine employed in Struts Dialogs example allows to do
that, but it only allows to directly navigate to pages (well, to
wizard steps) that are PRECEDING current step. Try
IWizardStep.isStepInPath method. If it returns true then the step can
be directly navigated to.

Direct navigating opens a can of worms. One of the problems is that if
you change some data on a directly navigated page you will need to
verify and possibly to clear relevant data that was entered on later
steps. Say, if you have a wizard that chooses a car and the steps are:
(1) Choose year, (1) Choose make, (3) Choose model, (4) Choose trim.
Say, you selected 2004,Toyota,Camry,CE. Then you navigate to the
second step and change make to Ford. Now you will have to clean up
model and trim, thus changing overall state of the wizard. I have a
special object designed for that task with built-in observers that
track state on each step, but I have never submitted this class to any
library, I just used it for my own work.

I don't think that direct navigation is a good feature for wizards, it
is not surprising that most wizards do not allow this.

> 4. A review page which allow user to 'amend' sections (eg button to
navigate back to that page)
>
> 5. Once the wizard is complete (ie "submitted for processing"), the
user can still make changes to some pages while not others (actually
this depends a bit on the current state of the internal processing) - I
suspect each page needs to obtain its own state dynamically and present
a read-only or update view.

Are you really need this feature? This is like changing wizard
internal state based on some external state. Need to think about this.

> Can anyone advise there experience with struts-dialog (sourceforge) or
some other wizard or workflow framework/model that would suit this
requirement?

I am the author of Struts Dialogs as well as of Easy Wizard library,
so if you have questions on how to use this wizard engine I will be
happy to answer.

Michael.

---------------------------------------------------------------------
To unsubscribe, e-mail: user-unsubscribe@struts.apache.org
For additional commands, e-mail: user-help@struts.apache.org

**********************************************************************
This message is intended for the addressee named and may contain
privileged information or confidential information or both. If you
are not the intended recipient please delete it and notify the sender.
**********************************************************************

---------------------------------------------------------------------
To unsubscribe, e-mail: user-unsubscribe@struts.apache.org
For additional commands, e-mail: user-help@struts.apache.org


Re: [DESIGN] struts dialog / wizard

Posted by Michael Jouravlev <jm...@gmail.com>.
On 2/25/07, Strachan, Paul <Pa...@det.nsw.edu.au> wrote:
> Hi,
>
> I'm looking at implementing a struts wizard flow (of about 12 pages)
> into my struts-1.2.9 application.  The struts dialogue project seems
> to be along the lines of what I need (pattern-wise).
>
>  I have some extra quirements such as:
>
> 1. A progress menu (synch with the wizard)

What is that? A progress bar? You can draw it yourself. The wizard
engine used in Struts Dialogs does not do any UI. It can be used even
in a standalone console app ;-)

> 2. Some pages have options (eg radio buttons) which alter the later flow

The wizard engine employed in Struts Dialogs example allows to alter
the flow. In the example, if you enable "add security info" checkbox
the wizard shows an intermediate page with "you favorite color"
question.

> 3. The usual next/previous buttons + ability for user to navigate directly to some pages

The wizard engine employed in Struts Dialogs example allows to do
that, but it only allows to directly navigate to pages (well, to
wizard steps) that are PRECEDING current step. Try
IWizardStep.isStepInPath method. If it returns true then the step can
be directly navigated to.

Direct navigating opens a can of worms. One of the problems is that if
you change some data on a directly navigated page you will need to
verify and possibly to clear relevant data that was entered on later
steps. Say, if you have a wizard that chooses a car and the steps are:
(1) Choose year, (1) Choose make, (3) Choose model, (4) Choose trim.
Say, you selected 2004,Toyota,Camry,CE. Then you navigate to the
second step and change make to Ford. Now you will have to clean up
model and trim, thus changing overall state of the wizard. I have a
special object designed for that task with built-in observers that
track state on each step, but I have never submitted this class to any
library, I just used it for my own work.

I don't think that direct navigation is a good feature for wizards, it
is not surprising that most wizards do not allow this.

> 4. A review page which allow user to 'amend' sections (eg button to navigate back to that page)
>
> 5. Once the wizard is complete (ie "submitted for processing"), the user can still make changes to some pages while not others (actually this depends a bit on the current state of the internal processing) - I suspect each page needs to obtain its own state dynamically and present a read-only or update view.

Are you really need this feature? This is like changing wizard
internal state based on some external state. Need to think about this.

> Can anyone advise there experience with struts-dialog (sourceforge) or some other wizard or workflow framework/model that would suit this requirement?

I am the author of Struts Dialogs as well as of Easy Wizard library,
so if you have questions on how to use this wizard engine I will be
happy to answer.

Michael.

---------------------------------------------------------------------
To unsubscribe, e-mail: user-unsubscribe@struts.apache.org
For additional commands, e-mail: user-help@struts.apache.org


Re: [DESIGN] struts dialog / wizard

Posted by Madhav Bhargava <un...@gmail.com>.
You can also have a look at easy wizard
http://superinterface.com/easywizard.htm

~madhav

On 2/26/07, Tom Schneider <sc...@gmail.com> wrote:
>
> Mark Menard has done some work in this area for struts2:
> http://www.vitarara.org/cms/node/84
>
> For webwork I implemented something similar called a model repository.
> The problem that's being solved is that when the domain model reaches a
> certain complexity, using the null instantiation feature and reading the
> model from the database again fail to work.  The basic idea of the model
> repository was to save off the domain model somewhere (e.g. serial to a
> hidden field on the client, in an ehcache cache, in the session) before
> you go to the edit screen.  When the data is posted back, before the
> parameter interceptor runs, you restore the model.  This allows you to
> set the parameters back onto exactly the same model you edited.
>
> I like the idea of expanding the model repository idea to include the
> concept of conversation scope, but I don't want to loose simplicity of
> model repository.  I'll probably create a plugin at some point to
> provide this functionality.
>
> Finally, there's also the scope interceptor that Don wrote that is still
> in the sandbox.
>
> Of course, all of this is for struts 2, so it doesn't do you any good
> for 1.4.  :o)
>
> Paul Benedict wrote:
> > How often do people develop wizards with Struts? I have a custom
> > form/action which allows me to do that. Perhaps I should think about
> > putting it into Struts 1.4?
> >
> > Strachan, Paul wrote:
> >> Hi,
> >>
> >> I'm looking at implementing a struts wizard flow (of about 12 pages)
> >> into my struts-1.2.9 application.  The struts dialogue project seems
> >> to be along the lines of what I need (pattern-wise).  I have some
> >> extra quirements such as:
> >>
> >> 1. A progress menu (synch with the wizard)
> >>
> >> 2. Some pages have options (eg radio buttons) which alter the later
> flow
> >>
> >> 3. The usual next/previous buttons + ability for user to navigate
> >> directly to some pages
> >>
> >> 4. A review page which allow user to 'amend' sections (eg button to
> >> navigate back to that page)
> >>
> >> 5. Once the wizard is complete (ie "submitted for processing"), the
> >> user can still make changes to some pages while not others (actually
> >> this depends a bit on the current state of the internal processing) -
> >> I suspect each page needs to obtain its own state dynamically and
> >> present a read-only or update view.
> >>
> >> Can anyone advise there experience with struts-dialog (sourceforge)
> >> or some other wizard or workflow framework/model that would suit this
> >> requirement?
> >>
> >> Thanks,
> >>
> >> Paul
> >>
> >> **********************************************************************
> >> This message is intended for the addressee named and may contain
> >> privileged information or confidential information or both. If you
> >> are not the intended recipient please delete it and notify the sender.
> >> **********************************************************************
> >>
> >> ---------------------------------------------------------------------
> >> To unsubscribe, e-mail: user-unsubscribe@struts.apache.org
> >> For additional commands, e-mail: user-help@struts.apache.org
> >>
> >>
> >
> > ---------------------------------------------------------------------
> > To unsubscribe, e-mail: user-unsubscribe@struts.apache.org
> > For additional commands, e-mail: user-help@struts.apache.org
> >
> >
>
>
> ---------------------------------------------------------------------
> To unsubscribe, e-mail: user-unsubscribe@struts.apache.org
> For additional commands, e-mail: user-help@struts.apache.org
>
>


-- 
When I tell the truth, it is not for the sake of convincing those who do not
know it, but for the sake of defending those that do

Re: [DESIGN] struts dialog / wizard

Posted by Tom Schneider <sc...@gmail.com>.
Mark Menard has done some work in this area for struts2:
http://www.vitarara.org/cms/node/84

For webwork I implemented something similar called a model repository.  
The problem that's being solved is that when the domain model reaches a 
certain complexity, using the null instantiation feature and reading the 
model from the database again fail to work.  The basic idea of the model 
repository was to save off the domain model somewhere (e.g. serial to a 
hidden field on the client, in an ehcache cache, in the session) before 
you go to the edit screen.  When the data is posted back, before the 
parameter interceptor runs, you restore the model.  This allows you to 
set the parameters back onto exactly the same model you edited.

I like the idea of expanding the model repository idea to include the 
concept of conversation scope, but I don't want to loose simplicity of 
model repository.  I'll probably create a plugin at some point to 
provide this functionality.

Finally, there's also the scope interceptor that Don wrote that is still 
in the sandbox.

Of course, all of this is for struts 2, so it doesn't do you any good 
for 1.4.  :o)

Paul Benedict wrote:
> How often do people develop wizards with Struts? I have a custom 
> form/action which allows me to do that. Perhaps I should think about 
> putting it into Struts 1.4?
>
> Strachan, Paul wrote:
>> Hi,
>>
>> I'm looking at implementing a struts wizard flow (of about 12 pages) 
>> into my struts-1.2.9 application.  The struts dialogue project seems 
>> to be along the lines of what I need (pattern-wise).  I have some 
>> extra quirements such as:
>>
>> 1. A progress menu (synch with the wizard)
>>
>> 2. Some pages have options (eg radio buttons) which alter the later flow
>>
>> 3. The usual next/previous buttons + ability for user to navigate 
>> directly to some pages
>>
>> 4. A review page which allow user to 'amend' sections (eg button to 
>> navigate back to that page)
>>
>> 5. Once the wizard is complete (ie "submitted for processing"), the 
>> user can still make changes to some pages while not others (actually 
>> this depends a bit on the current state of the internal processing) - 
>> I suspect each page needs to obtain its own state dynamically and 
>> present a read-only or update view.
>>
>> Can anyone advise there experience with struts-dialog (sourceforge) 
>> or some other wizard or workflow framework/model that would suit this 
>> requirement?
>>
>> Thanks,
>>
>> Paul
>>
>> **********************************************************************
>> This message is intended for the addressee named and may contain
>> privileged information or confidential information or both. If you
>> are not the intended recipient please delete it and notify the sender.
>> **********************************************************************
>>
>> ---------------------------------------------------------------------
>> To unsubscribe, e-mail: user-unsubscribe@struts.apache.org
>> For additional commands, e-mail: user-help@struts.apache.org
>>
>>
>
> ---------------------------------------------------------------------
> To unsubscribe, e-mail: user-unsubscribe@struts.apache.org
> For additional commands, e-mail: user-help@struts.apache.org
>
>


---------------------------------------------------------------------
To unsubscribe, e-mail: user-unsubscribe@struts.apache.org
For additional commands, e-mail: user-help@struts.apache.org


Re: [DESIGN] struts dialog / wizard

Posted by Paul Benedict <pb...@apache.org>.
How often do people develop wizards with Struts? I have a custom 
form/action which allows me to do that. Perhaps I should think about 
putting it into Struts 1.4?

Strachan, Paul wrote:
> Hi,
> 
> I'm looking at implementing a struts wizard flow (of about 12 pages) into my struts-1.2.9 application.  The struts dialogue project seems to be along the lines of what I need (pattern-wise).  I have some extra quirements such as:
> 
> 1. A progress menu (synch with the wizard)
> 
> 2. Some pages have options (eg radio buttons) which alter the later flow
> 
> 3. The usual next/previous buttons + ability for user to navigate directly to some pages
> 
> 4. A review page which allow user to 'amend' sections (eg button to navigate back to that page)
> 
> 5. Once the wizard is complete (ie "submitted for processing"), the user can still make changes to some pages while not others (actually this depends a bit on the current state of the internal processing) - I suspect each page needs to obtain its own state dynamically and present a read-only or update view.
> 
> Can anyone advise there experience with struts-dialog (sourceforge) or some other wizard or workflow framework/model that would suit this requirement?
> 
> Thanks,
> 
> Paul
> 
> **********************************************************************
> This message is intended for the addressee named and may contain
> privileged information or confidential information or both. If you
> are not the intended recipient please delete it and notify the sender.
> **********************************************************************
> 
> ---------------------------------------------------------------------
> To unsubscribe, e-mail: user-unsubscribe@struts.apache.org
> For additional commands, e-mail: user-help@struts.apache.org
> 
> 

---------------------------------------------------------------------
To unsubscribe, e-mail: user-unsubscribe@struts.apache.org
For additional commands, e-mail: user-help@struts.apache.org


[DESIGN] struts dialog / wizard

Posted by "Strachan, Paul" <Pa...@det.nsw.edu.au>.
Hi,

I'm looking at implementing a struts wizard flow (of about 12 pages) into my struts-1.2.9 application.  The struts dialogue project seems to be along the lines of what I need (pattern-wise).  I have some extra quirements such as:

1. A progress menu (synch with the wizard)

2. Some pages have options (eg radio buttons) which alter the later flow

3. The usual next/previous buttons + ability for user to navigate directly to some pages

4. A review page which allow user to 'amend' sections (eg button to navigate back to that page)

5. Once the wizard is complete (ie "submitted for processing"), the user can still make changes to some pages while not others (actually this depends a bit on the current state of the internal processing) - I suspect each page needs to obtain its own state dynamically and present a read-only or update view.

Can anyone advise there experience with struts-dialog (sourceforge) or some other wizard or workflow framework/model that would suit this requirement?

Thanks,

Paul

**********************************************************************
This message is intended for the addressee named and may contain
privileged information or confidential information or both. If you
are not the intended recipient please delete it and notify the sender.
**********************************************************************

---------------------------------------------------------------------
To unsubscribe, e-mail: user-unsubscribe@struts.apache.org
For additional commands, e-mail: user-help@struts.apache.org


Re: sample code for LazyActionForm needed

Posted by Niall Pemberton <ni...@gmail.com>.
On 2/23/07, Vikash Manoranjan <vi...@infotechsw.com> wrote:
> Hi,
>
> i want to use LazyActionForm in my program. Kindly provide me with complete
> sample code like how to use it.

http://www.niallp.pwp.blueyonder.co.uk/lazyactionform.html

Niall

> Thanks and Regards,
>
> Vikash Manoranjan

---------------------------------------------------------------------
To unsubscribe, e-mail: user-unsubscribe@struts.apache.org
For additional commands, e-mail: user-help@struts.apache.org