Java Mailing List Archive

http://www.gg3721.com/

Home » Struts Users Mailing List »

user Digest 4 Feb 2012 07:30:49 -0000 Issue 9541

user-digest-help

2012-02-04


Author LoginPost Reply

user Digest 4 Feb 2012 07:30:49 -0000 Issue 9541

Topics (messages 212347 through 212353):

Re: Wizard (multipage flow) with Struts 2
 212347 by: Shrinivas Parashar
 212348 by: Biesbrock, Kevin

New Struts 2 plugin
 212349 by: Łukasz Lenart
 212350 by: Johannes Geppert

Re: how to use Advanced wildcards
 212351 by: Mounir Benzid
 212352 by: Maurizio Cucchiara

Returning additional data to the AutocompleterTag
 212353 by: Bruno Klava

Administrivia:

---------------------------------------------------------------------
To post to the list, e-mail: user@(protected)
To unsubscribe, e-mail: user-digest-unsubscribe@(protected)
For additional commands, e-mail: user-digest-help@(protected)

----------------------------------------------------------------------


Attachment: user_212347.ezm (zipped)
Yes, I am looking at that. Have you used that?

Regards,
Shrinivas

-----Original Message-----
From: Biesbrock, Kevin [mailto:Biesbrock.Kevin@(protected)]
Sent: 02 February 2012 00:54
To: 'Struts Users Mailing List'
Subject: RE: Wizard (multipage flow) with Struts 2

Did you already look at the ScopedModelDriven<E> approach?

Beez


-----Original Message-----
From: Shrinivas Parashar [mailto:Shrinivas_Parashar@(protected)]
Sent: Wednesday, February 01, 2012 8:39 AM
To: Struts Users Mailing List
Subject: RE: Wizard (multipage flow) with Struts 2

Thanks eric for the information.
I was looking for interceptor based approach where struts would handle putting model in the session, retrieving from the session, removing from session at the end of wizard. Scope interceptor provides similar thing, but this does not work with modeldriven actions.

-Shrinivas

-----Original Message-----
From: Eric Lentz [mailto:Eric.Lentz@(protected)]
Sent: 01 February 2012 18:46
To: Struts Users Mailing List
Subject: Re: Wizard (multipage flow) with Struts 2

> Has anyone developed Wizard in Struts 2 without using Spring webflow
plugin.

I have done it with and without jQuery, but find that the jQuery form
wizard plug-in [1] is by far the easiest. In short, you create a div each
to represent each step and add class="step" to the div, and you're pretty
much done as far as the wizard coding is considered. The plug-in handles
breaking the form into multiple wizard steps. Then the wizard pages look
like 1 big form to Struts 2 when the last page is submitted (the plug-in
handles making the last page a submit). Validations can be handled via the
validation plug-in. You probably want a paranoid validation step at the
action level. If there is an error there, that the jQuery validation
didn't catch, then there was probably some outside manipulation (if you
did validations correctly) and a generic error message, outside of the
wizard, would be acceptable and probably never seen by the average user.

If you don't use jQuery, then just store the object you're dealing with
(model) in the session and iteratively update it at the end of each wizard
step. If there is more than just the one model object, then store a DTO in
the session and call that your model. That's essentially how I did it
anyway, without going into every gory detail which I don't really have
time for.

[1] http://thecodemine.org/


---------------------------------------------------------------------
To unsubscribe, e-mail: user-unsubscribe@(protected)
For additional commands, e-mail: user-help@(protected)




---------------------------------------------------------------------
To unsubscribe, e-mail: user-unsubscribe@(protected)
For additional commands, e-mail: user-help@(protected)



Attachment: user_212348.ezm (zipped)
I haven't had a need for it. It just sounded like the best case for your scenario (I think).

Beez


-----Original Message-----
From: Shrinivas Parashar [mailto:Shrinivas_Parashar@(protected)]
Sent: Thursday, February 02, 2012 12:27 AM
To: Struts Users Mailing List
Subject: RE: Wizard (multipage flow) with Struts 2

Yes, I am looking at that. Have you used that?

Regards,
Shrinivas

-----Original Message-----
From: Biesbrock, Kevin [mailto:Biesbrock.Kevin@(protected)]
Sent: 02 February 2012 00:54
To: 'Struts Users Mailing List'
Subject: RE: Wizard (multipage flow) with Struts 2

Did you already look at the ScopedModelDriven<E> approach?

Beez


-----Original Message-----
From: Shrinivas Parashar [mailto:Shrinivas_Parashar@(protected)]
Sent: Wednesday, February 01, 2012 8:39 AM
To: Struts Users Mailing List
Subject: RE: Wizard (multipage flow) with Struts 2

Thanks eric for the information.
I was looking for interceptor based approach where struts would handle putting model in the session, retrieving from the session, removing from session at the end of wizard. Scope interceptor provides similar thing, but this does not work with modeldriven actions.

-Shrinivas

-----Original Message-----
From: Eric Lentz [mailto:Eric.Lentz@(protected)]
Sent: 01 February 2012 18:46
To: Struts Users Mailing List
Subject: Re: Wizard (multipage flow) with Struts 2

> Has anyone developed Wizard in Struts 2 without using Spring webflow
plugin.

I have done it with and without jQuery, but find that the jQuery form
wizard plug-in [1] is by far the easiest. In short, you create a div each
to represent each step and add class="step" to the div, and you're pretty
much done as far as the wizard coding is considered. The plug-in handles
breaking the form into multiple wizard steps. Then the wizard pages look
like 1 big form to Struts 2 when the last page is submitted (the plug-in
handles making the last page a submit). Validations can be handled via the
validation plug-in. You probably want a paranoid validation step at the
action level. If there is an error there, that the jQuery validation
didn't catch, then there was probably some outside manipulation (if you
did validations correctly) and a generic error message, outside of the
wizard, would be acceptable and probably never seen by the average user.

If you don't use jQuery, then just store the object you're dealing with
(model) in the session and iteratively update it at the end of each wizard
step. If there is more than just the one model object, then store a DTO in
the session and call that your model. That's essentially how I did it
anyway, without going into every gory detail which I don't really have
time for.

[1] http://thecodemine.org/


---------------------------------------------------------------------
To unsubscribe, e-mail: user-unsubscribe@(protected)
For additional commands, e-mail: user-help@(protected)




---------------------------------------------------------------------
To unsubscribe, e-mail: user-unsubscribe@(protected)
For additional commands, e-mail: user-help@(protected)


---------------------------------------------------------------------
To unsubscribe, e-mail: user-unsubscribe@(protected)
For additional commands, e-mail: user-help@(protected)





Attachment: user_212349.ezm (zipped)
Hi,

If you missed that out, there is a new Struts 2 plugin which supports
Bootstrap and HTML 5

http://www.jgeppert.com/2012/02/new-struts2-bootstrap-plugin-released/

Kudos to Johannes!


Kind regards
--
Łukasz


Attachment: user_212350.ezm (zipped)
Thank you Łukasz for the Announcement. :-)

Just released a new Struts2 Bootstrap Plugin Version 1.1.0. This version is
now also available via maven repository.
The Showcase was extended with an new vertical form layout example.

http://code.google.com/p/struts2-bootstrap/

Have Fun

Johannes

-----
web: http://www.jgeppert.com
twitter: http://twitter.com/jogep
--
Sent from the Struts - User mailing list archive at Nabble.com.


Attachment: user_212351.ezm (zipped)
Am 30.01.2012 17:17, schrieb Maurizio Cucchiara:
> Hi Mounir,
>
>> It works like a charm now. Wondering why nobody else had a similar
>> problem.... maybe the majority is opting for the rest-plugin?
>
> Glad you finally worked out. Yeah, I think at rest-plugin, urlrewrite lib,
> plain wildcard, and so on or probably because it is just not a wellknown
> feature.
>
> BTW, Did you redefined the value of struts.action.extension constant? if
> yes, what is the current value?
> Have you ever experienced this behavior on plan redirect action (my guess
> is that this have no to do with the advanced wildcard mapping) ?
>
>
> Twitter   :http://www.twitter.com/m_cucchiara
> G+       :https://plus.google.com/107903711540963855921
> Linkedin   :http://www.linkedin.com/in/mauriziocucchiara
>
> Maurizio Cucchiara
>
Hi Maurizio,

I never touched the default value of that constant. The default must be
".action" I guess.
Well it's not a big deal breaker for now and like you said if it's not
related to the adv. wildcards
we should find the culprit very soon. My guess is, that somewhere in the
application I still use
the old-style parameter handling. So maybe that's the problem.


Cheers
-Mounir



Attachment: user_212352.ezm (zipped)
For starting you could change the struts.action.extension such that the
first extension is the empty one:

<constant name="struts.action.extension" value=",action"/>

This should erase the final .action from the url.


Twitter   :http://www.twitter.com/m_cucchiara
G+       :https://plus.google.com/107903711540963855921
Linkedin   :http://www.linkedin.com/in/mauriziocucchiara

Maurizio Cucchiara


On 3 February 2012 09:43, Mounir Benzid <mb@(protected):

> Am 30.01.2012 17:17, schrieb Maurizio Cucchiara:
>
> Hi Mounir,
>>
>> It works like a charm now. Wondering why nobody else had a similar
>>> problem.... maybe the majority is opting for the rest-plugin?
>>>
>>
>> Glad you finally worked out. Yeah, I think at rest-plugin, urlrewrite lib,
>> plain wildcard, and so on or probably because it is just not a wellknown
>> feature.
>>
>> BTW, Did you redefined the value of struts.action.extension constant? if
>> yes, what is the current value?
>> Have you ever experienced this behavior on plan redirect action (my guess
>> is that this have no to do with the advanced wildcard mapping) ?
>>
>>
>> Twitter   :http://www.twitter.com/m_**cucchiara<http://www.twitter.com/m_cucchiara>
>> G+       :https://plus.google.com/**107903711540963855921<https://plus.google.com/107903711540963855921>
>> Linkedin   :http://www.linkedin.com/in/**mauriziocucchiara<http://www.linkedin.com/in/mauriziocucchiara>
>>
>> Maurizio Cucchiara
>>
>> Hi Maurizio,
>
> I never touched the default value of that constant. The default must be
> ".action" I guess.
> Well it's not a big deal breaker for now and like you said if it's not
> related to the adv. wildcards
> we should find the culprit very soon. My guess is, that somewhere in the
> application I still use
> the old-style parameter handling. So maybe that's the problem.
>
>
> Cheers
> -Mounir
>
>
>
> ------------------------------**------------------------------**---------
> To unsubscribe, e-mail: user-unsubscribe@struts.**apache.org<user-unsubscribe@(protected)>
> For additional commands, e-mail: user-help@(protected)
>
>

Attachment: user_212353.ezm (zipped)
Hi everyone,

concerning the usage of the AutocompleterTag from the struts2-jquery plugin:

instead of returning just the autocomplete values (I'm returning just
a few results to be shown), I'd like to return additional data (the
total number of matches) to give a feedback to the user that there are
more results available and that the search can be refined (if this is
the case).

AFAIK, the AutocompleterTag expects a JSON result with a list (with
the possible values) on its root, so I cannot send both the results
and the additional data.

I could make an other AJAX request to get this additional data, but
I'd like to do this in a single request (so I don't have to store
anything in the session). Does anyone knows if this is possible?

Thanks in advance,
Bruno

©2008 gg3721.com - Jax Systems, LLC, U.S.A.