Java Mailing List Archive

http://www.gg3721.com/

Home » Struts Users Mailing List »

user Digest 7 Jul 2008 18:54:23 -0000 Issue 8127

user-digest-help

2008-07-07


Author LoginPost Reply

user Digest 7 Jul 2008 18:54:23 -0000 Issue 8127

Topics (messages 188530 through 188559):

how to access new javascript struts2 templates/xhtml/validation.js
 188530 by: webdev2
 188537 by: Musachy Barroso

Using Menu Links In Tiles2 + Struts 2
 188531 by: DEEP JADHAV

Struts1 and Struts2 mailing lists separation ?
 188532 by: MARCOSTOMSOBRAD.terra.es
 188534 by: Marc Logemann
 188535 by: Alessio Mereu
 188536 by: ManiKanta G
 188538 by: Owen Berry
 188551 by: Chris Pratt
 188553 by: Dave Newton

Re: Actions, properties and validation in separate packages?
 188533 by: Dallas

Re: [Semi-OT] Loading resources/files with wildcards
 188539 by: Owen Berry
 188542 by: Antonio Petrelli
 188543 by: Wes Wannemacher
 188544 by: Antonio Petrelli
 188546 by: Wes Wannemacher
 188547 by: Antonio Petrelli
 188548 by: Musachy Barroso
 188552 by: Antonio Petrelli

Re: [S2] Preserving messages across a Redirect in Struts 2
 188540 by: Greg Lindholm

Multipage forms
 188541 by: Dimitris Mouchritsas

Re: Struts 2 + Ajax and Back Button
 188545 by: cree
 188558 by: matt.payne

Getting Struts2 Parameters?
 188549 by: chris.chrismiles.org
 188550 by: Musachy Barroso

[S2] File download save dialog
 188554 by: Struts Two
 188556 by: Chris Pratt

Re: Slow performance with Struts2
 188555 by: matt.payne

Re: Firefox 3 and <s:head theme=ajax/> render issues
 188557 by: matt.payne
 188559 by: georz1

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_188530.ezm (zipped)

Validation.js is available in the struts core jar file.  There was a fix in
Aug 2007 that I would like to have working.  I have the download, and I
think I have found the patch too. Now how do I apply the update so that my
project uses the fix, and not the file currently in the core jar?  Thanks.
--
Sent from the Struts - User mailing list archive at Nabble.com.


Attachment: user_188537.ezm (zipped)
few options:

* you can replace the js file inside struts-core jar(quick and dirty)
* write a filter that checks the request URL and writes your version
of the file.
* overwrite the template that imports that file, and make it import
your own file (best option IMO)

musachy

On Mon, Jul 7, 2008 at 1:21 AM, webdev2 <vkeslar1@(protected):
>
> Validation.js is available in the struts core jar file.  There was a fix in
> Aug 2007 that I would like to have working.  I have the download, and I
> think I have found the patch too. Now how do I apply the update so that my
> project uses the fix, and not the file currently in the core jar?  Thanks.
> --
> View this message in context: http://www.nabble.com/how-to-access-new-javascript-struts2-templates-xhtml-validation.js-tp18310213p18310213.html
> Sent from the Struts - User mailing list archive at Nabble.com.
>
>
> ---------------------------------------------------------------------
> To unsubscribe, e-mail: user-unsubscribe@(protected)
> For additional commands, e-mail: user-help@(protected)
>
>



--
"Hey you! Would you help me to carry the stone?" Pink Floyd

Attachment: user_188531.ezm (zipped)

Hi everybody,
    I want list of links in menu region of my layout and I am not
getting how to configure it for rendering body region corresponding to
particular link.
If anybody can solve plz reply..!!
Thanks in advance.
--
Sent from the Struts - User mailing list archive at Nabble.com.


Attachment: user_188532.ezm (zipped)
Could Struts project admins separate Struts1 and Struts2 users mailing
lists?
I think it is bad for the users to have two frameworks under the same
mailing list.



Ahora también puedes acceder a tu correo Terra desde el móvil.
Infórmate pinchando aquí.



Attachment: user_188534.ezm (zipped)

+1 for the suggestion

Marc

On Mon, 7 Jul 2008 12:53:14 +0200 (MEST), "MARCOSTOMSOBRAD@(protected)"
<MARCOSTOMSOBRAD@(protected):
> Could Struts project admins separate Struts1 and Struts2 users mailing
> lists?
> I think it is bad for the users to have two frameworks under the same
> mailing list.
>
>
>
> Ahora también puedes acceder a tu correo Terra desde el móvil.
> Infórmate pinchando aquí.
>
>
>
> ---------------------------------------------------------------------
> To unsubscribe, e-mail: user-unsubscribe@(protected)
> For additional commands, e-mail: user-help@(protected)


Attachment: user_188535.ezm (zipped)
+1 for me too

2008/7/7 Marc Logemann <ml@(protected)>:

>
> +1 for the suggestion
>
> Marc
>
> On Mon, 7 Jul 2008 12:53:14 +0200 (MEST), "MARCOSTOMSOBRAD@(protected)"
> <MARCOSTOMSOBRAD@(protected):
> > Could Struts project admins separate Struts1 and Struts2 users mailing
> > lists?
> > I think it is bad for the users to have two frameworks under the same
> > mailing list.
> >
> >
> >
> > Ahora también puedes acceder a tu correo Terra desde el móvil.
> > Infórmate pinchando aquí.
> >
> >
> >
> > ---------------------------------------------------------------------
> > 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_188536.ezm (zipped)
+1 me too

Alessio Mereu wrote:
> +1 for me too
>
> 2008/7/7 Marc Logemann <ml@(protected)>:
>
>  
>> +1 for the suggestion
>>
>> Marc
>>
>> On Mon, 7 Jul 2008 12:53:14 +0200 (MEST), "MARCOSTOMSOBRAD@(protected)"
>> <MARCOSTOMSOBRAD@(protected):
>>  
>>> Could Struts project admins separate Struts1 and Struts2 users mailing
>>> lists?
>>> I think it is bad for the users to have two frameworks under the same
>>> mailing list.
>>>
>>>
>>>
>>> Ahora también puedes acceder a tu correo Terra desde el móvil.
>>> Infórmate pinchando aquí.
>>>
>>>
>>>
>>> ---------------------------------------------------------------------
>>> 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)
>>
>>
>>  



********** DISCLAIMER **********
Information contained and transmitted by this E-MAIL is proprietary to
Sify Limited and is intended for use only by the individual or entity to
which it is addressed, and may contain information that is privileged,
confidential or exempt from disclosure under applicable law. If this is a
forwarded message, the content of this E-MAIL may not have been sent with
the authority of the Company. If you are not the intended recipient, an
agent of the intended recipient or a person responsible for delivering the
information to the named recipient, you are notified that any use,
distribution, transmission, printing, copying or dissemination of this
information in any way or in any manner is strictly prohibited. If you have
received this communication in error, please delete this mail & notify us
immediately at admin@(protected)

Attachment: user_188538.ezm (zipped)
And another, +1

On Mon, Jul 7, 2008 at 8:28 AM, ManiKanta G <manikanta.gade@(protected):
> +1 me too
>
> Alessio Mereu wrote:
>>
>> +1 for me too
>>
>> 2008/7/7 Marc Logemann <ml@(protected)>:
>>
>>
>>>
>>> +1 for the suggestion
>>>
>>> Marc
>>>
>>> On Mon, 7 Jul 2008 12:53:14 +0200 (MEST), "MARCOSTOMSOBRAD@(protected)"
>>> <MARCOSTOMSOBRAD@(protected):
>>>
>>>>
>>>> Could Struts project admins separate Struts1 and Struts2 users mailing
>>>> lists?
>>>> I think it is bad for the users to have two frameworks under the same
>>>> mailing list.
>>>>
>>>>
>>>>
>>>> Ahora también puedes acceder a tu correo Terra desde el móvil.
>>>> Infórmate pinchando aquí.
>>>>
>>>>
>>>>
>>>> ---------------------------------------------------------------------
>>>> 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)
>>>
>>>
>>>
>
>
>
> ********** DISCLAIMER **********
> Information contained and transmitted by this E-MAIL is proprietary to Sify
> Limited and is intended for use only by the individual or entity to which it
> is addressed, and may contain information that is privileged, confidential
> or exempt from disclosure under applicable law. If this is a forwarded
> message, the content of this E-MAIL may not have been sent with the
> authority of the Company. If you are not the intended recipient, an agent of
> the intended recipient or a person responsible for delivering the
> information to the named recipient, you are notified that any use,
> distribution, transmission, printing, copying or dissemination of this
> information in any way or in any manner is strictly prohibited. If you have
> received this communication in error, please delete this mail & notify us
> immediately at admin@(protected)
>
> ---------------------------------------------------------------------
> To unsubscribe, e-mail: user-unsubscribe@(protected)
> For additional commands, e-mail: user-help@(protected)
>
>

Attachment: user_188551.ezm (zipped)
Not that my vote counts, but +1 again.
(*Chris*)

On Mon, Jul 7, 2008 at 6:40 AM, Owen Berry <owen.berry@(protected):
> And another, +1
>
> On Mon, Jul 7, 2008 at 8:28 AM, ManiKanta G <manikanta.gade@(protected):
>> +1 me too
>>
>> Alessio Mereu wrote:
>>>
>>> +1 for me too
>>>
>>> 2008/7/7 Marc Logemann <ml@(protected)>:
>>>
>>>
>>>>
>>>> +1 for the suggestion
>>>>
>>>> Marc
>>>>
>>>> On Mon, 7 Jul 2008 12:53:14 +0200 (MEST), "MARCOSTOMSOBRAD@(protected)"
>>>> <MARCOSTOMSOBRAD@(protected):
>>>>
>>>>>
>>>>> Could Struts project admins separate Struts1 and Struts2 users mailing
>>>>> lists?
>>>>> I think it is bad for the users to have two frameworks under the same
>>>>> mailing list.
>>>>>
>>>>>
>>>>>
>>>>> Ahora también puedes acceder a tu correo Terra desde el móvil.
>>>>> Infórmate pinchando aquí.
>>>>>
>>>>>
>>>>>
>>>>> ---------------------------------------------------------------------
>>>>> 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)
>>>>
>>>>
>>>>
>>
>>
>>
>> ********** DISCLAIMER **********
>> Information contained and transmitted by this E-MAIL is proprietary to Sify
>> Limited and is intended for use only by the individual or entity to which it
>> is addressed, and may contain information that is privileged, confidential
>> or exempt from disclosure under applicable law. If this is a forwarded
>> message, the content of this E-MAIL may not have been sent with the
>> authority of the Company. If you are not the intended recipient, an agent of
>> the intended recipient or a person responsible for delivering the
>> information to the named recipient, you are notified that any use,
>> distribution, transmission, printing, copying or dissemination of this
>> information in any way or in any manner is strictly prohibited. If you have
>> received this communication in error, please delete this mail & notify us
>> immediately at admin@(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_188553.ezm (zipped)
This has been brought up from time to time over the years and has been consistently voted down. (I suggested it once myself and am in favor of it as well.)

In lieu of that happening I'd urge people to tag the subject line of all list messages with either [S1] or [S2] (or whatever, as long as it's adopted as an ad-hoc convention) and deal with it on the client side.

Dave

--- On Mon, 7/7/08, Chris Pratt <thechrispratt@(protected):
> Not that my vote counts, but +1 again.
>
> On Mon, Jul 7, 2008 at 6:40 AM, Owen Berry
> <owen.berry@(protected):
> > And another, +1
> >
> > On Mon, Jul 7, 2008 at 8:28 AM, ManiKanta G
> <manikanta.gade@(protected):
> >> +1 me too
> >>
> >> Alessio Mereu wrote:
> >>>
> >>> +1 for me too
> >>>
> >>> 2008/7/7 Marc Logemann
> <ml@(protected)>:
> >>>
> >>>
> >>>>
> >>>> +1 for the suggestion
> >>>>
> >>>> Marc
> >>>>
> >>>> On Mon, 7 Jul 2008 12:53:14 +0200 (MEST),
> "MARCOSTOMSOBRAD@(protected)"
> >>>> <MARCOSTOMSOBRAD@(protected):
> >>>>
> >>>>>
> >>>>> Could Struts project admins separate
> Struts1 and Struts2 users mailing
> >>>>> lists?
> >>>>> I think it is bad for the users to
> have two frameworks under the same
> >>>>> mailing list.
> >>>>>
> >>>>>
> >>>>>
> >>>>> Ahora también puedes acceder a tu
> correo Terra desde el móvil.
> >>>>> Infórmate pinchando aquí.
> >>>>>
> >>>>>
> >>>>>
> >>>>>
> ---------------------------------------------------------------------
> >>>>> 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)
> >>>>
> >>>>
> >>>>
> >>
> >>
> >>
> >> ********** DISCLAIMER **********
> >> Information contained and transmitted by this
> E-MAIL is proprietary to Sify
> >> Limited and is intended for use only by the
> individual or entity to which it
> >> is addressed, and may contain information that is
> privileged, confidential
> >> or exempt from disclosure under applicable law. If
> this is a forwarded
> >> message, the content of this E-MAIL may not have
> been sent with the
> >> authority of the Company. If you are not the
> intended recipient, an agent of
> >> the intended recipient or a person responsible
> for delivering the
> >> information to the named recipient, you are
> notified that any use,
> >> distribution, transmission, printing, copying or
> dissemination of this
> >> information in any way or in any manner is
> strictly prohibited. If you have
> >> received this communication in error, please
> delete this mail & notify us
> >> immediately at admin@(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)
> >
> >
>
> ---------------------------------------------------------------------
> To unsubscribe, e-mail: user-unsubscribe@(protected)
> For additional commands, e-mail:
> user-help@(protected)

Attachment: user_188533.ezm (zipped)

Wow, you think like I think :-)

That´s exactly what I want, structure during development.
Thanks alot!


dusty wrote:
>
> Do you really want them in separate packages or do you just want them in
> separate directories. It seems to me that you are looking for a
> particular organization of files during development, so you can keep all
> the like files together. Seems reasonable enough. If that is the case
> then you can create a series of "src" directories that mirror the
> classpath but only hold particular files.
>
> So,
>
> src/main/java/actions/se/intranet/apps/actions/myAction.java
> src/main/java/properties/se/intranet/apps/actions/myAction.properties
> src/main/java/validation/se/intranet/apps/actions/myAction-validation.xml
>
> They all have the same packages and classpath, but they are organized how
> you think of them.  I think....or you think....or I think you think....
>
>
>
> Dallas wrote:
>>
>> Hi all!
>>
>> I´m wondering if there´s any way of configuring struts2 to allow
>> me to keep actions, properties and validation in separate packages?
>>
>> At the moment I have one packages, se.intranet.apps which includes
>> all my actions, properties and validations.
>>
>> I´d rather keep them in separate packages, like
>> se.intranet.apps.actions
>> se.intranet.apps.properties
>> se.intranet.apps.validation
>>
>> Any idea on how to do this?
>> I´ve tried reading up on localazation, but looking at
>> http://struts.apache.org/2.0.6/docs/localization.html the documentation
>> it doesn´t look possible...
>>
>
>

--
Sent from the Struts - User mailing list archive at Nabble.com.


Attachment: user_188539.ezm (zipped)
In terms of licensing, from the bottom of http://springframework.org/about

"All Spring projects are licensed under the terms of the Apache
License, Version 2.0."

On Sun, Jul 6, 2008 at 6:00 AM, Antonio Petrelli
<antonio.petrelli@(protected):
> Hi all,
> I would like to know if in S1 or in S2 there is a mechanism to load
> resources (from classpath) and/or files using wildcards. I really
> would like to use it inside Tiles.
> I noticed that there such a mechanism in Spring:
> http://static.springframework.org/spring/docs/2.5.x/api/org/springframework/core/io/support/PathMatchingResourcePatternResolver.html
> but I wish to remain in the Apache world to avoid licensing and
> dependencies implications.
>
> TIA
> Antonio
>
> ---------------------------------------------------------------------
> To unsubscribe, e-mail: user-unsubscribe@(protected)
> For additional commands, e-mail: user-help@(protected)
>
>

Attachment: user_188542.ezm (zipped)
2008/7/7 Owen Berry <owen.berry@(protected)>:
> In terms of licensing, from the bottom of http://springframework.org/about
>
> "All Spring projects are licensed under the terms of the Apache
> License, Version 2.0."
>

You're right, sorry for using the wrong term. The problem is that,
using a 3rd party software source, we need to create a different
header in source files, and I don't want to do so and, if it is
possible, I want to use software developed @Apache.
Anyway thank you :-)

Antonio

Attachment: user_188543.ezm (zipped)
Antonio,

I added some wildcard support to XMLConfigurationProvider a while ago.
It's not particularly feature-rich, but it works somewhat intuitively.
Check the unit tests for examples of using it...

http://svn.opensymphony.com/fisheye/browse/~raw,r=1833/xwork/trunk/src/test/com/opensymphony/xwork2/util/WildcardHelperTest.java



On Sun, Jul 6, 2008 at 6:00 AM, Antonio Petrelli
<antonio.petrelli@(protected):
> Hi all,
> I would like to know if in S1 or in S2 there is a mechanism to load
> resources (from classpath) and/or files using wildcards. I really
> would like to use it inside Tiles.
> I noticed that there such a mechanism in Spring:
> http://static.springframework.org/spring/docs/2.5.x/api/org/springframework/core/io/support/PathMatchingResourcePatternResolver.html
> but I wish to remain in the Apache world to avoid licensing and
> dependencies implications.
>
> TIA
> Antonio
>
> ---------------------------------------------------------------------
> To unsubscribe, e-mail: user-unsubscribe@(protected)
> For additional commands, e-mail: user-help@(protected)
>
>



--
Wesley Wannemacher
President, Head Engineer/Consultant
WanTii, Inc.
http://www.wantii.com

Attachment: user_188544.ezm (zipped)
2008/7/7 Wes Wannemacher <wesw@(protected)>:
> I added some wildcard support to XMLConfigurationProvider a while ago.
> It's not particularly feature-rich, but it works somewhat intuitively.
> Check the unit tests for examples of using it...
>
> http://svn.opensymphony.com/fisheye/browse/~raw,r=1833/xwork/trunk/src/test/com/opensymphony/xwork2/util/WildcardHelperTest.java

Thanks a lot Wes, I will check it out this evening, it seems useful.

But I have a couple of questions:
1. Is WildcardHelper used to get a list of files and resources that
match a pattern?
2. What about the header that I need to include in the modified
source? Since I know that there is a sort of "treaty" between XWork
and Struts 2, I think that no header is necessary... or yes?

Thanks again
Antonio

Attachment: user_188546.ezm (zipped)
I'm not an XWork committer, and I think Don actually wrote the
PatternMatcher, which is basically the main component behind
ClassPathFinder. Don ended up committing the patch for me. None of the
Struts code needed altered when this was added, so I never really
worried about the header.

WildcardHelper doesn't look for files, ClassPathFinder does though. It
searches recursively, so use with caution.

On Mon, Jul 7, 2008 at 10:50 AM, Antonio Petrelli
<antonio.petrelli@(protected):
> 2008/7/7 Wes Wannemacher <wesw@(protected)>:
>> I added some wildcard support to XMLConfigurationProvider a while ago.
>> It's not particularly feature-rich, but it works somewhat intuitively.
>> Check the unit tests for examples of using it...
>>
>> http://svn.opensymphony.com/fisheye/browse/~raw,r=1833/xwork/trunk/src/test/com/opensymphony/xwork2/util/WildcardHelperTest.java
>
> Thanks a lot Wes, I will check it out this evening, it seems useful.
>
> But I have a couple of questions:
> 1. Is WildcardHelper used to get a list of files and resources that
> match a pattern?
> 2. What about the header that I need to include in the modified
> source? Since I know that there is a sort of "treaty" between XWork
> and Struts 2, I think that no header is necessary... or yes?
>
> Thanks again
> Antonio
>
> ---------------------------------------------------------------------
> To unsubscribe, e-mail: user-unsubscribe@(protected)
> For additional commands, e-mail: user-help@(protected)
>
>



--
Wesley Wannemacher
President, Head Engineer/Consultant
WanTii, Inc.
http://www.wantii.com

Attachment: user_188547.ezm (zipped)
2008/7/7 Wes Wannemacher <wesw@(protected)>:
> I'm not an XWork committer, and I think Don actually wrote the
> PatternMatcher, which is basically the main component behind
> ClassPathFinder. Don ended up committing the patch for me. None of the
> Struts code needed altered when this was added, so I never really
> worried about the header.
>
> WildcardHelper doesn't look for files, ClassPathFinder does though. It
> searches recursively, so use with caution.

Thanks a lot Wes, I will check it :-)

Antonio

Attachment: user_188548.ezm (zipped)
There are also new classes under: com.opensymphony.xwork2.util.finder
(borrowed from xbeans) to find classes/resources in the classpath.
They are pretty handy if you use them with UrlSet (in that package
also).

musachy

On Mon, Jul 7, 2008 at 11:19 AM, Antonio Petrelli
<antonio.petrelli@(protected):
> 2008/7/7 Wes Wannemacher <wesw@(protected)>:
>> I'm not an XWork committer, and I think Don actually wrote the
>> PatternMatcher, which is basically the main component behind
>> ClassPathFinder. Don ended up committing the patch for me. None of the
>> Struts code needed altered when this was added, so I never really
>> worried about the header.
>>
>> WildcardHelper doesn't look for files, ClassPathFinder does though. It
>> searches recursively, so use with caution.
>
> Thanks a lot Wes, I will check it :-)
>
> Antonio
>
> ---------------------------------------------------------------------
> To unsubscribe, e-mail: user-unsubscribe@(protected)
> For additional commands, e-mail: user-help@(protected)
>
>



--
"Hey you! Would you help me to carry the stone?" Pink Floyd

Attachment: user_188552.ezm (zipped)
2008/7/7 Musachy Barroso <musachy@(protected)>:
> There are also new classes under: com.opensymphony.xwork2.util.finder
> (borrowed from xbeans) to find classes/resources in the classpath.
> They are pretty handy if you use them with UrlSet (in that package
> also).

Interesting too, thanks Musachy :-)

Antonio

Attachment: user_188540.ezm (zipped)


dusty wrote:
>
> I have found
>           <interceptor-ref name="messages">
>              &lt;param
> name="operationMode"&gt;AUTOMATIC&lt;/param&gt;
>           </interceptor-ref>
> to work great for addActionMessage. To tell you the truth I haven't tried
> it for addActionError or fieldErrors. You would redirect after an error
> that should render input? Really?
>
>

Sorry, don't know what "messages" is, it's not part of the
struts-default.xml (2.0.11.1).

I wanted an Interceptor that didn't require any per-action configuration and
would preserve all messages across a redirect. I have it configured as part
of my default stack.
(I don't have a use-case where the fieldErrors would be useful across a
redirect but somebody may and it was easy enough to include them.)


--
Sent from the Struts - User mailing list archive at Nabble.com.


Attachment: user_188541.ezm (zipped)
Hi all,
I'm starting to use multipage forms to have an organisation
registration, along with some codes and an admin, 3 steps in total.
In the first page, I check in the action if some data from the
organisation already exist, to give an error that the organisation is
already registered. Does this really belong there or should I move it
after the final step and forward to the first step?

Thanks
Dimitris

Attachment: user_188545.ezm (zipped)

Hello again everyone,

I guess I would like to give an update on my struts 2 and ajax integration.
I appreciate everyone's responses as they have helped a lot to resolve my
problem with ajax and the back button. My seemingly last problem I have has
to do with IE (no surprise).

I have implemented some javascript state object that uses the prototype.back
function to handle the back button. I also add that state object to the
dojo.undo.browser.addToHistory. To give an idea of the test javascript
functions I use they are:

<%@(protected)" %>
<%@(protected)" %>
<script language="JavaScript" type="text/javascript">
   // Dojo configuration
   //djConfig = { isDebug: true, debugAtAllCosts: true, preventBackButtonFix:
false };
   djConfig = { isDebug: true, preventBackButtonFix: false };
 </script>
 <s:head theme="ajax"/>
 <script language="JavaScript" type="text/javascript">
   dojo.require("dojo.lang.common");
   dojo.require("dojo.undo.browser");
   dojo.require("dojo.io.*");
   //dojo.hostenv.writeIncludes();
 
   var data = {
     link0: 'This is the initial state (page first loaded)',
     link1: 'This is data for link 1',
     link2: 'This is data for link 2',
     link3: 'This is data for link 3',
     link4: 'This is data for link 4',
     link5: 'This is data for link 5',
     link6: 'This is data for link 6',
     link7: 'This is data for link 7'
   };
 
   var HistoryTracker = function(id){
     this._id = id;
     //TODO: commenting this out breaks FF 1.5. Others? Can't seem to find
iframe id/name?
     this.changeUrl = shouldChangeUrl();
   }
   
   HistoryTracker.prototype.back = function(){
     updateOutput('BACK for id: ' + this._id);
     showDataForId(this._id);
   }

   HistoryTracker.prototype.forward = function(){
     updateOutput('FORWARD for id: ' + this._id);
     showDataForId(this._id);
   }

   createXhrHistoryTracker = function(url){
     var request = new dojo.io.Request(url, 'text/xml', null,
shouldChangeUrl());
     dojo.lang.mixin(request, {
       data: null,
       load: function(type, evaldObj){
         if(type == "load"){
           this.data =
evaldObj.getElementsByTagName('data')[0].childNodes[0].nodeValue;
//evaldObj.getElementsByTagName('data')[0].text;//.getElementsByTagName('data')[0];
           updateDataDisplay(this.data);
         }
       },
       
       back: function(){
         updateOutput('XHR BACK for URL: ' + this.url);
         updateDataDisplay(this.data);
       },
       
       forward: function(){
         updateOutput('XHR FORWARD for URL: ' + this.url);
         updateDataDisplay(this.data);
       }
     });
     
     return request;
   }
   
   function goIoBind(url){
     dojo.io.bind(createXhrHistoryTracker(url));
   }
   
   function goNav(id){
     showDataForId(id);
     var historyTracker = new HistoryTracker(id);
     dojo.undo.browser.addToHistory(historyTracker);
   }
 
   function shouldChangeUrl(){
     return document.getElementById('changeUrlCheckbox').checked;
   }
   
   function showDataForId(id){
     updateDataDisplay(data[id]);
   }
 
   function updateDataDisplay(dataString){
     document.getElementById('dataOutput').innerHTML = dataString;      
   }
   
   function updateOutput(message){
     document.getElementById('output').innerHTML += message + '<br />';
   }
   
   dojo.addOnLoad(function(){
     dojo.undo.browser.setInitialState(new HistoryTracker('link0'));
   });
 </script>

At this point, I can make it work fine for FF version <= 3.0. When I try to
use IE 6.0 and 7.0 there is the problem. When I press on the buttons the
back button does not notice there has been a change in state. This only
applies to when I import struts 2.0.11's dojo.js (head theme="ajax"). When
I directly include the v 0.4.3 dojo.js it works fine on IE.

Since this works for FF using strut's dojo.js I am curious to why it would
not work with IE.

In short when I press a button on IE no state changes, however the state
does change on FF. So on IE if there is a back available it is the back
state of the most recent page I was not on, and does not render any ajax
states.

I hope this makes sense and thank you all for the help
--
Sent from the Struts - User mailing list archive at Nabble.com.


Attachment: user_188558.ezm (zipped)

Just give in and use (jquery syntax))

 $("#back").click(function(event) {
     window.location.href='forgot.action';
 })

where

         <input type="button" class="submit cancel" name="back"
id="back" value="Back" class="buttonBack" title="Go to the previous page
bitch"/>
        <input type="submit" class="buttonFwd" value="Next"/>
        <input type="submit" class="submit cancel" name="cancel"
id="cancelButton" value="Cancel"/>



cree wrote:
>
> Hello All,
>
> I am attempting to resolve the ajax back button problem and have gotten
> into a situation. I am using struts v 2.0.11 and I know it comes with its
> own dojotoolkit. However I cannot find any support for the back button.
> I looked throughout and found dojotoolkit v1.1 and downloaded it. It has
> a back button fix in which I need to use.
>
> When I tried to implement it I used its tutorial code, which includes
> importing the version 1.1 dojo.js. Inside the jsp I am using an s:div
> theme="ajax" and also including s:head theme=ajax. When the jsp loads it
> has a confliction with the version 1.1 dojo.js and the version of dojo.js
> that is in struts 2.0.11.
>
> I tried to include all the javascript that is necessary to invoke the dojo
> 1.1 that I downloaded in the other jsp (the jsp that gets loaded when the
> s:div href gets called). And the javascript isnt being loaded or if it
> is, it would not go any further then when I load back.js.
>
> I guess in short I am looking to see if there is any way that I can
> utilize the back.js in the other jsp or throughout the two jsp's or if
> there is support in struts 2.0.11's dojo toolkit.
>
> Always, thank you all very much,
>
> Cree
>

--
Sent from the Struts - User mailing list archive at Nabble.com.


Attachment: user_188549.ezm (zipped)
In my struts.xml I have set up a stack for "defaultStack" to include the
Parameters Interceptor, and I have then set the default stack to
"defaultStack".

In my action class I have set up a setter injector called
setProductId(String productId) which sets to a local variable.

I then have a form which points to that action, which is AddToCart.action
to be precise. I have an hideen HTML input with the name "productId" and a
value set, however when I submit the form the productId variable in the
action class has not been set?

Is there something obvious that I might be missing?

Many thanks and best regards,

Chris

Attachment: user_188550.ezm (zipped)
Are there any exceptions in the logs? Does your class implement
ModelDriven? if you posts the relevant parts of your configuration
(jsp fragment, action and xml fragment), it will be easier to get
help.

musachy

On Mon, Jul 7, 2008 at 11:38 AM, <chris@(protected):
> In my struts.xml I have set up a stack for "defaultStack" to include the
> Parameters Interceptor, and I have then set the default stack to
> "defaultStack".
>
> In my action class I have set up a setter injector called
> setProductId(String productId) which sets to a local variable.
>
> I then have a form which points to that action, which is AddToCart.action
> to be precise. I have an hideen HTML input with the name "productId" and a
> value set, however when I submit the form the productId variable in the
> action class has not been set?
>
> Is there something obvious that I might be missing?
>
> Many thanks and best regards,
>
> Chris
>
> ---------------------------------------------------------------------
> To unsubscribe, e-mail: user-unsubscribe@(protected)
> For additional commands, e-mail: user-help@(protected)
>
>



--
"Hey you! Would you help me to carry the stone?" Pink Floyd

Attachment: user_188554.ezm (zipped)
I have an action class that downloads a file from db2 database. However; when the download occurs, the file is displayed in the browser. I would like to have the user prompted with the save/open dialog. I was wondering what I am missing here. Below are my configuration and action class for the file download:
       <action name="ticketFileDownload" class="ccol.action.ticket.TicketFileDownload">
            <result name="success" type="stream">
             <param name="contentType">application/octet-stream</param>
            </result>
        </action>
public class TicketFileDownload extends ActionSupport {
 @(protected)
 TicketLocal ticketLocal;
 private long attachmentId;
 
 private InputStream inputStream;
 public long getAttachmentId() {
  return attachmentId;
 }
 public void setAttachmentId(long attachmentId) {
  this.attachmentId = attachmentId;
 }
 public void setInputStream(InputStream inputStream) {
  this.inputStream = inputStream;
 }
 
 public InputStream getInputStream() {
  return inputStream;
 }
 
 public String execute(){
  Attachment attachment = ticketLocal.findAttachment(getAttachmentId());
  setInputStream(new ByteArrayInputStream(attachment.getAttachment()));
  return Action.SUCCESS;
  
 }
}
I would appreciate any hints in this regard, thanx.


   __________________________________________________________________
Instant Messaging, free SMS, sharing photos and more... Try the new Yahoo! Canada Messenger at http://ca.beta.messenger.yahoo.com/


Attachment: user_188556.ezm (zipped)
One way is to set the content type of the downloaded item to something
the browser doesn't know how to handle itself, like
application/octet-stream
(*Chris*)

On Mon, Jul 7, 2008 at 10:21 AM, Struts Two <strutstwo@(protected):
> I have an action class that downloads a file from db2 database. However; when the download occurs, the file is displayed in the browser. I would like to have the user prompted with the save/open dialog. I was wondering what I am missing here. Below are my configuration and action class for the file download:
>     <action name="ticketFileDownload" class="ccol.action.ticket.TicketFileDownload">
>         <result name="success" type="stream">
>         <param name="contentType">application/octet-stream</param>
>         </result>
>      </action>
> public class TicketFileDownload extends ActionSupport {
> @EJB3Local
> TicketLocal ticketLocal;
> private long attachmentId;
>
> private InputStream inputStream;
> public long getAttachmentId() {
>  return attachmentId;
> }
> public void setAttachmentId(long attachmentId) {
>  this.attachmentId = attachmentId;
> }
> public void setInputStream(InputStream inputStream) {
>  this.inputStream = inputStream;
> }
>
> public InputStream getInputStream() {
>  return inputStream;
> }
>
> public String execute(){
>  Attachment attachment = ticketLocal.findAttachment(getAttachmentId());
>  setInputStream(new ByteArrayInputStream(attachment.getAttachment()));
>  return Action.SUCCESS;
>
> }
> }
> I would appreciate any hints in this regard, thanx.
>
>
>    __________________________________________________________________
> Instant Messaging, free SMS, sharing photos and more... Try the new Yahoo! Canada Messenger at http://ca.beta.messenger.yahoo.com/
>
>
> ---------------------------------------------------------------------
> To unsubscribe, e-mail: user-unsubscribe@(protected)
> For additional commands, e-mail: user-help@(protected)
>
>

Attachment: user_188555.ezm (zipped)

Use firebug to measure you http. Firebug will give you a detail view of what
resources (e.g. dojo) are being pulled down with the http traffic.

Matt


yorlick kilroy-2 wrote:
>
> Hi,
>
> I was wondering if there is a way to tweak struts2 performance.
> I ported an old struts1 application to struts2. I have jsps that have
> rather large and complex lists that I now iterate using Struts2
> <s:iterate> and OGNL instead of <logic:iterate> and EL used in
> struts1. I noticed that the performance using Struts2 is pretty much
> lower than that of the Struts1 application, especially when displaying
> large lists and descending into complex objects using OGNL.
> I read that using dojo can cause this, but as far as I know I'm not
> (consciously) using dogo, ajax etc. just plain struts2 core.
>
> -- Joe
>
> ---------------------------------------------------------------------
> To unsubscribe, e-mail: user-unsubscribe@(protected)
> For additional commands, e-mail: user-help@(protected)
>
>
>

--
Sent from the Struts - User mailing list archive at Nabble.com.


Attachment: user_188557.ezm (zipped)


georz1 wrote:
>
> I'm using Struts 2.0.11 and it seem with Firefox 3 only there are
> rendering issues on pages where I have <s:head theme="ajax">. I can see
> the page load fully and there is a quick flash of the browser and then a
> blank page with FF3 stuck in a loading state.
>
> On certain pages I have made it theme=xhtml which solves the problem but
> some pages in my application have a <s:tabbedpanel> which requires the
> ajax theme
>
> Has anyone else seen this type of behavior or know of a work around?
>


Don't use the <s:head theme="ajax"> theme or write your own that uses jquery
instead.
--
Sent from the Struts - User mailing list archive at Nabble.com.


Attachment: user_188559.ezm (zipped)

I've avoided some of the pitfalls of the ajax theme before by using jquery
(datetimepicker). Only this time it's not an option.. I need to figure out
how to get the theme to work reliably with Firefox 3. FF2 there were no
issues.


matt.payne wrote:
>
>
> Don't use the <s:head theme="ajax"> theme or write your own that uses
> jquery instead.
>

--
Sent from the Struts - User mailing list archive at Nabble.com.

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