Author Login
Post Reply
user Digest 10 Jan 2008 17:17:06 -0000 Issue 7797
Topics (messages 181177 through 181201):
Re: [S2] OpenSessionInView implementation with Spring
181177 by: Al Sutton
Re: setting locale manually
181178 by: Raghuveer
Message resources - Application Resource - Polish
181179 by: Raghuveer
Commons logging in struts
181180 by: Raghuveer
181200 by: Chris Pratt
Re: Struts 1 or Struts 2
181181 by: Adam Hardy
181183 by: aum strut
181185 by: Adam Hardy
181186 by: aum strut
181187 by: Ted Husted
Shouldn't this work?
181182 by: Al Sutton
181192 by: Musachy Barroso
181194 by: Al Sutton
Re: TabbedPanel question
181184 by: Pablo Vázquez Blázquez
181189 by: Jeromy Evans
181197 by: Pablo Vázquez Blázquez
Re: Struts training...
181188 by: Ted Husted
Re: Catch the element param in a action class
181190 by: Manoel Pimentel
181201 by: Chris Pratt
SmartUrl Default Action
181191 by: Rich Lawrence
executeAndWait interceptor hibernate session closed
181193 by: bmoraillon
struts 2 and ognl
181195 by: Otto, Frank
(repost) en-us theme=ajax 404 error on Struts 2.0.9
181196 by: WayneFH
Wildcard mappings/templates need to refer to a package name
181198 by: matt.payne
How to access properties of Action when using ComposableRequestProcessor?
181199 by: Greg Roodt
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_181177.ezm (zipped)I tend to write it as a struts interceptor. That way I don't have to use
Spring, and all of the application specific cross cuts are configured in one
place (the interceptor stack), as opposed to having some as servlet filters
and some as interceptors.
Al.
(Before anyone says it, by application specific cross cuts I mean the cross
cuts where the code is part of the app and not part of a library)
-----Original Message-----
From: Gabriel Belingueres [mailto:belingueres@(protected)]
Sent: 09 January 2008 21:36
To: Struts Users Mailing List
Subject: [S2] OpenSessionInView implementation with Spring
Hi,
I'm developing a new application using S2 + Spring 2.0 + Hibernate 3.2.5.
I wanted to know which would be the best way of implementing the Open
Session in View pattern in S2:
Is there any standard implementation for S2?
I''ve seen it implemented as a servlet filter, but I think it would be good
to have it implemented as an S2 interceptor (so we can still have support
for S2 declarative exception handling too.)
Or should rather stick with the Spring's
org.springframework.orm.hibernate3.support.OpenSessionInViewFilterfilter?
Any experiences?
Regards,
Gabriel
---------------------------------------------------------------------
To unsubscribe, e-mail: user-unsubscribe@(protected)
For additional commands, e-mail: user-help@(protected)

Attachment:
user_181178.ezm (zipped)Hello,
Since I have only to languages ,I have provided a button in screen and
passing url parameter "english" and "polish".
In Action file taking this language and forming locale object and setting to
ACTION method "setLocale"
Wprowadź - Enter
Above polish word is not coming exactly as label in JSP page when page is
rendered.
Could any one suggest any solution to resolve the i18N for messages.
----------
if(strLanguage!=null && strLanguage.equalsIgnoreCase("english")){
strLanguage="en";
strCountry="US";
}else if(strLanguage!=null && strLanguage.equalsIgnoreCase("polish")){
strLanguage="pl";
strCountry="PL";
}else{
strLanguage="pl";
strCountry="PL";
}
Locale locale=new Locale(strLanguage,strCountry);
setLocale(request,locale);
-----Original Message-----
From: Raghuveer [mailto:raghuveerv@(protected)]
Sent: Friday, January 04, 2008 8:21 PM
To: 'Martin Gainty'
Cc: user@(protected)
Subject: RE: setting locale manually
So you mean if I add request_locale=en_US in all forward this will work
OR if I add in first forward it is sufficient?
_____
From: Martin Gainty [mailto:mgainty@(protected)]
Sent: Friday, January 04, 2008 8:10 PM
To: raghuveerv@(protected)
Subject: RE: setting locale manually
Czes Raghu
http://struts.apache.org/2.0.11/docs/i18n-interceptor.html
you can pass the locale on the request
and path accordingly
dziekuje!
Martin
______________________________________________
Disclaimer and confidentiality note
Everything in this e-mail and any attachments relates to the official
business of Sender. This transmission is of a confidential nature and Sender
does not endorse distribution to any party other than intended recipient.
Sender does not necessarily endorse content
> From: raghuveerv@(protected)
> To: user@(protected)
> Subject: setting locale manually
> Date: Fri, 4 Jan 2008 18:30:39 +0530
>
> How to set locale for my struts application.
>
> My application will have 2 languages.
>
> There will be 2 buttons in jsp page.
>
> One button is polish and other is English.
>
>
>
> on clicking of Polish button all the labels and button names and messages
> are to be changed into polis language.
>
>
>
> Any suggestions of implementing this
>
_____
Watch "Cause Effect," a show about real people making a real difference.
Learn <http://im.live.com/Messenger/IM/MTV/?source=text_watchcause> more

Attachment:
user_181179.ezm (zipped)Hello,
Since I have only to languages ,I have provided a button in screen and
passing url parameter "english" and "polish".
In Action file taking this language and forming locale object and setting to
ACTION method "setLocale"
Wprowadź - Enter
Above polish word is not coming exactly as label in JSP page when page is
rendered.
Actual polish word is modified -
Could any one suggest any solution to resolve the i18N for messages.
----------
if(strLanguage!=null && strLanguage.equalsIgnoreCase("english")){
strLanguage="en";
strCountry="US";
}else if(strLanguage!=null && strLanguage.equalsIgnoreCase("polish")){
strLanguage="pl";
strCountry="PL";
}else{
strLanguage="pl";
strCountry="PL";
}

Attachment:
user_181180.ezm (zipped)Could any one provide information of using commons logging for logging my
application related logs in my JSP-STRUTS application

Attachment:
user_181200.ezm (zipped)On Jan 10, 2008 1:25 AM, Raghuveer <raghuveerv@(protected):
> Could any one provide information of using commons logging for logging my
> application related logs in my JSP-STRUTS application
>
>
Commons logging is just a logging facade, it is not a logging system
itself. It is used by libraries and frameworks so that the authors
can write logs that will eventually get logged to whatever logging
system the end user decides to embrace.
With that in mind, what you probably really need to decide is which
logging system you want to use. The two most popular are definitely,
the one built into Java (java.util.logging.*) and Log4j
(http://logging.apache.org).
One other thing you might want to look into is a more advanced facade
SLF4j (http://www.slf4j.org).
(*Chris*)

Attachment:
user_181181.ezm (zipped) From a career point-of-view, there are different factors affecting this,
including whether you are looking for permanent positions or contract work, what
the local job market is like where you are, and what sort of jobs you would
apply for.
In a consultancy for instance, you are more likely to need Struts1 I think, but
as a freelancer working on new projects, maybe Struts2 or Spring MVC (or even
Spring Webflow). But then if you are a recent graduate, you may not be expected
to know either.
There is even an argument that you should learn both (if learning is more a
priority rather than finishing a project).
I guess I am not giving you any answers, sorry.
aum strut on 10/01/08 04:31, wrote:
> Hi Ted,
>
> Thanks for the response.
> The point of my confusion was that i came to know from some where that
> Struts1 is more demanding in the market than Struts2.
>
> is there much diffreence between Struts1 and Struts2?
>
> On Jan 9, 2008 7:15 PM, Ted Husted <husted@(protected):
>
>> In this case, I'd suggest Struts 2.
>>
>> HTH, Ted
>> * <http://www.StrutsMentor.com/ <http://www.strutsmentor.com/>>
>>
>> On Jan 9, 2008 6:32 AM, aum strut <aum.struts@(protected):
>>> Hi All,
>>>
>>> I have a small query and hope that here i can get the best answer of my
>>> query. ihave just started learning Struts 2.
>>> the purpose of learning struts is simple i have some projects at my end
>>> which i want to develop using this framework.
>>> My purpose is also to learn this technology as much as possible.
>>> My only confusion is which one should i opt as both are new for me and
>> one
>>> more thing time is not much constraint for the development of project.
>>>
>>> Please suggest me the best possible options which will help in my
>> learning
>>> curve and well as my professional aspect.
>>>
>>> Thanks in advance..
>>> --aum
>> ---------------------------------------------------------------------
>> To unsubscribe, e-mail: user-unsubscribe@(protected)
>> For additional commands, e-mail: user-help@(protected)
>>
>>
>

Attachment:
user_181183.ezm (zipped)Hi Adam,
Currently i am working in java platform and have around 18 months of working
experience.
but this technology is new to me and yes i need to learn these tecnnology in
order to enhance my career and also to work side by side on my own as we are
not using this platform at my work place.
Thanks,
--Aum
On Jan 10, 2008 4:32 PM, Adam Hardy <ahardy.struts@(protected)>
wrote:
> From a career point-of-view, there are different factors affecting this,
> including whether you are looking for permanent positions or contract
> work, what
> the local job market is like where you are, and what sort of jobs you
> would
> apply for.
>
> In a consultancy for instance, you are more likely to need Struts1 I
> think, but
> as a freelancer working on new projects, maybe Struts2 or Spring MVC (or
> even
> Spring Webflow). But then if you are a recent graduate, you may not be
> expected
> to know either.
>
> There is even an argument that you should learn both (if learning is more
> a
> priority rather than finishing a project).
>
> I guess I am not giving you any answers, sorry.
>
> aum strut on 10/01/08 04:31, wrote:
> > Hi Ted,
> >
> > Thanks for the response.
> > The point of my confusion was that i came to know from some where that
> > Struts1 is more demanding in the market than Struts2.
> >
> > is there much diffreence between Struts1 and Struts2?
> >
> > On Jan 9, 2008 7:15 PM, Ted Husted <husted@(protected):
> >
> >> In this case, I'd suggest Struts 2.
> >>
> >> HTH, Ted
> >> * <http://www.StrutsMentor.com/ <http://www.strutsmentor.com/> <
> http://www.strutsmentor.com/>>
> >>
> >> On Jan 9, 2008 6:32 AM, aum strut <aum.struts@(protected):
> >>> Hi All,
> >>>
> >>> I have a small query and hope that here i can get the best answer of
> my
> >>> query. ihave just started learning Struts 2.
> >>> the purpose of learning struts is simple i have some projects at my
> end
> >>> which i want to develop using this framework.
> >>> My purpose is also to learn this technology as much as possible.
> >>> My only confusion is which one should i opt as both are new for me and
> >> one
> >>> more thing time is not much constraint for the development of project.
> >>>
> >>> Please suggest me the best possible options which will help in my
> >> learning
> >>> curve and well as my professional aspect.
> >>>
> >>> Thanks in advance..
> >>> --aum
> >> ---------------------------------------------------------------------
> >> 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_181185.ezm (zipped)I would say then if you will not be looking for a new job at all soon, then
forget struts1 and concentrate on struts2, especially if there is a chance that
your company might start a project or convert a project to it.
However if you will specialize in web applications and you will be looking for
work soon, learn the basics of struts1 and 2, but specialize in struts2.
aum strut on 10/01/08 11:44, wrote:
> Hi Adam,
>
> Currently i am working in java platform and have around 18 months of working
> experience.
> but this technology is new to me and yes i need to learn these tecnnology in
> order to enhance my career and also to work side by side on my own as we are
> not using this platform at my work place.
>
>
> Thanks,
> --Aum
>
> On Jan 10, 2008 4:32 PM, Adam Hardy <ahardy.struts@(protected)>
> wrote:
>
>> From a career point-of-view, there are different factors affecting this,
>> including whether you are looking for permanent positions or contract
>> work, what
>> the local job market is like where you are, and what sort of jobs you
>> would
>> apply for.
>>
>> In a consultancy for instance, you are more likely to need Struts1 I
>> think, but
>> as a freelancer working on new projects, maybe Struts2 or Spring MVC (or
>> even
>> Spring Webflow). But then if you are a recent graduate, you may not be
>> expected
>> to know either.
>>
>> There is even an argument that you should learn both (if learning is more
>> a
>> priority rather than finishing a project).
>>
>> I guess I am not giving you any answers, sorry.
>>
>> aum strut on 10/01/08 04:31, wrote:
>>> Hi Ted,
>>>
>>> Thanks for the response.
>>> The point of my confusion was that i came to know from some where that
>>> Struts1 is more demanding in the market than Struts2.
>>>
>>> is there much diffreence between Struts1 and Struts2?
>>>
>>> On Jan 9, 2008 7:15 PM, Ted Husted <husted@(protected):
>>>
>>>> In this case, I'd suggest Struts 2.
>>>>
>>>> HTH, Ted
>>>> * <http://www.StrutsMentor.com/ <http://www.strutsmentor.com/> <
>> http://www.strutsmentor.com/>>
>> >>
>>>> On Jan 9, 2008 6:32 AM, aum strut <aum.struts@(protected):
>>>>> Hi All,
>>>>>
>>>>> I have a small query and hope that here i can get the best answer of
>> my
>>>>> query. ihave just started learning Struts 2.
>>>>> the purpose of learning struts is simple i have some projects at my
>> end
>>>>> which i want to develop using this framework.
>>>>> My purpose is also to learn this technology as much as possible.
>>>>> My only confusion is which one should i opt as both are new for me and
>>>> one
>>>>> more thing time is not much constraint for the development of project.
>>>>>
>>>>> Please suggest me the best possible options which will help in my
>>>> learning
>>>>> curve and well as my professional aspect.
>>>>>
>>>>> Thanks in advance..
>>>>> --aum
>>>> ---------------------------------------------------------------------
>>>> 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_181186.ezm (zipped)Thanks for helping me out.
yes there are only 0.1% chances that my company will shift for this
technology but one thing is sure that i am very much interested in this
platform and will surely going to look for the opportunites in this area.
more over i want to mention here that my keen interest in not in developing
applications using this platform(but i have to develop applications ;)), but
my interest is in core programming.
-aum
On Jan 10, 2008 5:37 PM, Adam Hardy <ahardy.struts@(protected)>
wrote:
> I would say then if you will not be looking for a new job at all soon,
> then
> forget struts1 and concentrate on struts2, especially if there is a chance
> that
> your company might start a project or convert a project to it.
>
> However if you will specialize in web applications and you will be looking
> for
> work soon, learn the basics of struts1 and 2, but specialize in struts2.
>
> aum strut on 10/01/08 11:44, wrote:
> > Hi Adam,
> >
> > Currently i am working in java platform and have around 18 months of
> working
> > experience.
> > but this technology is new to me and yes i need to learn these
> tecnnology in
> > order to enhance my career and also to work side by side on my own as we
> are
> > not using this platform at my work place.
> >
> >
> > Thanks,
> > --Aum
> >
> > On Jan 10, 2008 4:32 PM, Adam Hardy <ahardy.struts@(protected)>
> > wrote:
> >
> >> From a career point-of-view, there are different factors affecting
> this,
> >> including whether you are looking for permanent positions or contract
> >> work, what
> >> the local job market is like where you are, and what sort of jobs you
> >> would
> >> apply for.
> >>
> >> In a consultancy for instance, you are more likely to need Struts1 I
> >> think, but
> >> as a freelancer working on new projects, maybe Struts2 or Spring MVC
> (or
> >> even
> >> Spring Webflow). But then if you are a recent graduate, you may not be
> >> expected
> >> to know either.
> >>
> >> There is even an argument that you should learn both (if learning is
> more
> >> a
> >> priority rather than finishing a project).
> >>
> >> I guess I am not giving you any answers, sorry.
> >>
> >> aum strut on 10/01/08 04:31, wrote:
> >>> Hi Ted,
> >>>
> >>> Thanks for the response.
> >>> The point of my confusion was that i came to know from some where that
> >>> Struts1 is more demanding in the market than Struts2.
> >>>
> >>> is there much diffreence between Struts1 and Struts2?
> >>>
> >>> On Jan 9, 2008 7:15 PM, Ted Husted <husted@(protected):
> >>>
> >>>> In this case, I'd suggest Struts 2.
> >>>>
> >>>> HTH, Ted
> >>>> * <http://www.StrutsMentor.com/ <http://www.strutsmentor.com/> <
> http://www.strutsmentor.com/> <
> >> http://www.strutsmentor.com/>>
> >> >>
> >>>> On Jan 9, 2008 6:32 AM, aum strut <aum.struts@(protected):
> >>>>> Hi All,
> >>>>>
> >>>>> I have a small query and hope that here i can get the best answer of
> >> my
> >>>>> query. ihave just started learning Struts 2.
> >>>>> the purpose of learning struts is simple i have some projects at my
> >> end
> >>>>> which i want to develop using this framework.
> >>>>> My purpose is also to learn this technology as much as possible.
> >>>>> My only confusion is which one should i opt as both are new for me
> and
> >>>> one
> >>>>> more thing time is not much constraint for the development of
> project.
> >>>>>
> >>>>> Please suggest me the best possible options which will help in my
> >>>> learning
> >>>>> curve and well as my professional aspect.
> >>>>>
> >>>>> Thanks in advance..
> >>>>> --aum
> >>>> ---------------------------------------------------------------------
> >>>> 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_181187.ezm (zipped)On Jan 9, 2008 11:31 PM, aum strut <aum.struts@(protected):
> is there much diffreence between Struts1 and Struts2?
The implementation details are different (in a good way!), but both
use the same architectural paradigms.
Struts 1 uses an ActionForm for input value and a singleton Action to
process the values. Struts 2 uses an requested-based Action for both.
Struts 1 can only use string-input. Struts 2 can use native types and
POJO classes. Struts 1 uses a chain of command to process requests
(one per application). Struts 2 uses sets of interceptors that can be
changed for individual actions. And so forth. But, in most cases it's
a one:one evolution, rather than a totally different way of doing
things.
People who try Struts 2 after using Struts 1, tend to find it to be a
welcome change.
If someone were to apply for a S1 project, S2 experience would
probably be a plus, since most everyone would at least be thinking
about migrating someday.
HTH, Ted
<http://www.StrutsMentor.com/>

Attachment:
user_181182.ezm (zipped)I've got the following in a page inside a displaytag table;
<s:checkbox name="#attr.userPermission.id" theme="simple"
value="#attr.userPermission.startable"/>
What I would expect to see for an entry with the id 1234 set to true would
be something along the lines of;
<input type="checkbox" name="1234" value="true"/>
What I actually see is;
<input type="checkbox" name="#attr.userPermission.id" value="true"
id="UpdateProcessPermissions_#attr_userPermission_id"/>
Shouldn't the name attribute be evaluated?, and if it's not how do I get the
id of an object to be the name of the checkbox?
Ta,
Al.

Attachment:
user_181192.ezm (zipped)The name attribute is assumed to be an string, as that would be the
most common use case. Just use %{expr} and it will work as you expect.
musachy
On Jan 10, 2008 6:03 AM, Al Sutton <al.sutton@(protected):
> I've got the following in a page inside a displaytag table;
>
> <s:checkbox name="#attr.userPermission.id" theme="simple"
> value="#attr.userPermission.startable"/>
>
> What I would expect to see for an entry with the id 1234 set to true would
> be something along the lines of;
>
> <input type="checkbox" name="1234" value="true"/>
>
> What I actually see is;
>
> <input type="checkbox" name="#attr.userPermission.id" value="true"
> id="UpdateProcessPermissions_#attr_userPermission_id"/>
>
> Shouldn't the name attribute be evaluated?, and if it's not how do I get the
> id of an object to be the name of the checkbox?
>
> Ta,
>
> Al.
>
>
>
>
>
> ---------------------------------------------------------------------
> 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_181194.ezm (zipped)Your a genius (or at least in my book) :).
I looked at the ftl template for checkbox and thought using #attr would get
the same result in both fields, but as soon as I switched to %{#attr
everything worked.
Thanks.
Al.
-----Original Message-----
From: Musachy Barroso [mailto:musachy@(protected)]
Sent: 10 January 2008 14:13
To: Struts Users Mailing List
Subject: Re: Shouldn't this work?
The name attribute is assumed to be an string, as that would be the most
common use case. Just use %{expr} and it will work as you expect.
musachy
On Jan 10, 2008 6:03 AM, Al Sutton <al.sutton@(protected):
> I've got the following in a page inside a displaytag table;
>
> <s:checkbox name="#attr.userPermission.id" theme="simple"
> value="#attr.userPermission.startable"/>
>
> What I would expect to see for an entry with the id 1234 set to true
> would be something along the lines of;
>
> <input type="checkbox" name="1234" value="true"/>
>
> What I actually see is;
>
> <input type="checkbox" name="#attr.userPermission.id" value="true"
> id="UpdateProcessPermissions_#attr_userPermission_id"/>
>
> Shouldn't the name attribute be evaluated?, and if it's not how do I
> get the id of an object to be the name of the checkbox?
>
> Ta,
>
> Al.
>
>
>
>
>
> ---------------------------------------------------------------------
> 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
---------------------------------------------------------------------
To unsubscribe, e-mail: user-unsubscribe@(protected)
For additional commands, e-mail: user-help@(protected)

Attachment:
user_181184.ezm (zipped)<script language="javascript">
var tab = dojo.widget.byId("extractionTab");
</script>
Where "extractionTab" is a tab (a local div) inside a tabbedpanel. Now
how can I access to style attributes?? I have searched for widget
attributes, but I couldn't find anything interesting.
Thanks,
Martin Gainty escribió:
> Pablo
> you can set highlightColor attribute which will set colour for any ids specified via targets=http://struts.apache.org/2.x/docs/tabbedpanel.html
> Saludos CordialesMartin______________________________________________Disclaimer and confidentiality noteEverything in this e-mail and any attachments relates to the official business of Sender. This transmission is of a confidential nature and Sender does not endorse distribution to any party other than intended recipient. Sender does not necessarily endorse content contained within this transmission.> Date: Mon, 31 Dec 2007 08:54:30 +0100> From: pvazquez@(protected)>
> _________________________________________________________________
> Share life as it happens with the new Windows Live.
> http://www.windowslive.com/share.html?ocid=TXT_TAGHM_Wave2_sharelife_122007
>

Attachment:
user_181189.ezm (zipped)Hi Pablo,
This is probably too late for you, but take a look at the generated HTML
for the tabs.
Unfortunately you'll see that each tab itself doesn't have a unique ID
(each container does, but not the tab itself).
Each tab is assembled from a couple of divs and spans based on a
"sliding doors" css pattern.
The selected tab nodes have a different style than the non-selected, but
otherwise they're all the same pattern.
Unless dojo has a method in the widget already (which I don't know of),
you can change the style of each individual tab only in two ways:
a. use CSS3 selectors to apply style to the divs/spans based on their
position in the DOM (eg. the 3rd div has a green image). It won't work
in IE though.
b. use javascript to simulate the same effect: iterate through these
nodes in the DOM and assign additional classes to them based on the tab
number/current tab. If you take the time to understand the structure
it'll be quite straightforward.
Hope that helps. Personally by now I would have started using a widget
from another library as you're not bound to use Dojo 0.4 with Struts2.
regards,
Jeromy Evans
Pablo Vázquez Blázquez wrote:
> <script language="javascript">
> var tab = dojo.widget.byId("extractionTab");
> </script>
>
> Where "extractionTab" is a tab (a local div) inside a tabbedpanel. Now
> how can I access to style attributes?? I have searched for widget
> attributes, but I couldn't find anything interesting.
>
> Thanks,
>
> Martin Gainty escribió:
>> Pablo
>> you can set highlightColor attribute which will set colour for any
>> ids specified via
>> targets=http://struts.apache.org/2.x/docs/tabbedpanel.html
>> Saludos
>> CordialesMartin______________________________________________Disclaimer
>> and confidentiality noteEverything in this e-mail and any attachments
>> relates to the official business of Sender. This transmission is of a
>> confidential nature and Sender does not endorse distribution to any
>> party other than intended recipient. Sender does not necessarily
>> endorse content contained within this transmission.> Date: Mon, 31
>> Dec 2007 08:54:30 +0100> From: pvazquez@(protected):
>> user@(protected)
>> somebody know if it is possible? I have a tabbedpanel and I would >
>> like to paint a tab in a different color if there is any validation >
>> error inside it.> > Thanks.> > Pablo Vázquez Blázquez escribió:> > Is
>> it possible to paint each tab in the tabbedpanel in a diferent > >
>> color? I´m using Struts 2.0.9> >> > Thanks.> >> >> >
>> --------------------------------------------------------------------->
>> > To unsubscribe, e-mail: user-unsubscribe@(protected)
>> additional commands, e-mail: user-help@(protected)> >> > >
>> --------------------------------------------------------------------->
>> To unsubscribe, e-mail: user-unsubscribe@(protected)
>> additional commands, e-mail: user-help@(protected)>
>> _________________________________________________________________
>> Share life as it happens with the new Windows Live.
>> http://www.windowslive.com/share.html?ocid=TXT_TAGHM_Wave2_sharelife_122007
>>
>>
>
>
>
> ---------------------------------------------------------------------
> To unsubscribe, e-mail: user-unsubscribe@(protected)
> For additional commands, e-mail: user-help@(protected)
>
>
>
>

Attachment:
user_181197.ezm (zipped)Thank you for your reply.
I already had done sth similar as your 2nd point, but I´m having still a
problem. My javascript code is executed before the document is loaded in
the browser, so it changes my tab color (the one I want), but, then, it
becames to the original color (because the load of the page overrides my
changes). Do you know how can I do to execute this js code *after* the
page is loaded?
Jeromy Evans escribió:
> Hi Pablo,
>
> This is probably too late for you, but take a look at the generated
> HTML for the tabs.
> Unfortunately you'll see that each tab itself doesn't have a unique ID
> (each container does, but not the tab itself).
> Each tab is assembled from a couple of divs and spans based on a
> "sliding doors" css pattern.
> The selected tab nodes have a different style than the non-selected,
> but otherwise they're all the same pattern.
>
> Unless dojo has a method in the widget already (which I don't know
> of), you can change the style of each individual tab only in two ways:
> a. use CSS3 selectors to apply style to the divs/spans based on their
> position in the DOM (eg. the 3rd div has a green image). It won't
> work in IE though.
> b. use javascript to simulate the same effect: iterate through these
> nodes in the DOM and assign additional classes to them based on the
> tab number/current tab. If you take the time to understand the
> structure it'll be quite straightforward.
>
> Hope that helps. Personally by now I would have started using a
> widget from another library as you're not bound to use Dojo 0.4 with
> Struts2.
>
> regards,
> Jeromy Evans
>
> Pablo Vázquez Blázquez wrote:
>> <script language="javascript">
>> var tab = dojo.widget.byId("extractionTab");
>> </script>
>>
>> Where "extractionTab" is a tab (a local div) inside a tabbedpanel.
>> Now how can I access to style attributes?? I have searched for widget
>> attributes, but I couldn't find anything interesting.
>>
>> Thanks,
>>
>> Martin Gainty escribió:
>>> Pablo
>>> you can set highlightColor attribute which will set colour for any
>>> ids specified via
>>> targets=http://struts.apache.org/2.x/docs/tabbedpanel.html
>>> Saludos
>>> CordialesMartin______________________________________________Disclaimer
>>> and confidentiality noteEverything in this e-mail and any
>>> attachments relates to the official business of Sender. This
>>> transmission is of a confidential nature and Sender does not endorse
>>> distribution to any party other than intended recipient. Sender does
>>> not necessarily endorse content contained within this transmission.>
>>> Date: Mon, 31 Dec 2007 08:54:30 +0100> From: pvazquez@(protected)>
>>> To: user@(protected)> >
>>> Does somebody know if it is possible? I have a tabbedpanel and I
>>> would > like to paint a tab in a different color if there is any
>>> validation > error inside it.> > Thanks.> > Pablo Vázquez Blázquez
>>> escribió:> > Is it possible to paint each tab in the tabbedpanel in
>>> a diferent > > color? I´m using Struts 2.0.9> >> > Thanks.> >> >> >
>>> --------------------------------------------------------------------->
>>> > To unsubscribe, e-mail: user-unsubscribe@(protected)
>>> additional commands, e-mail: user-help@(protected)> >> > >
>>> --------------------------------------------------------------------->
>>> To unsubscribe, e-mail: user-unsubscribe@(protected)
>>> additional commands, e-mail: user-help@(protected)>
>>> _________________________________________________________________
>>> Share life as it happens with the new Windows Live.
>>> http://www.windowslive.com/share.html?ocid=TXT_TAGHM_Wave2_sharelife_122007
>>>
>>>
>>
>>
>>
>> ---------------------------------------------------------------------
>> 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_181188.ezm (zipped)On Jan 9, 2008 5:42 PM, Jack Haynes <haynesjack@(protected):
>
> Hey Ted,
>
> Thanks. What do you charge for training through your site?
All the details are on the Struts Mentor site, and the materials are
hosted at <www.StrutsUniversity.org>.
HTH, Ted
<http://www.StrutsMentor.com/>

Attachment:
user_181190.ezm (zipped)
Hi Friends,
I did one small workaround, I used the
"ServletActionContext.getActionMapping().getName()" for catch the name of my
action and as i have two element action using the same action class, this
way work well.
But, I still can't catch the value into the param element.
Tks,
Manoel Pimentel
www.visaoagil.com
Manoel Pimentel wrote:
>
> Hi to everyone,
>
> Please, I need help :-).
>
> Like are possible catch the values in a session using the
> "ActionContext.getContext().getSession()", I want to know if have any way
> to catch in a action class, the value of one parameter set in the
> struts.xml file?
>
> Example:
> I need use in my Action class, the value set in a tag like: XLS inside a
> action element.
>
> Thanks for any help, ok?
>
> Manoel Pimentel
> www.visaoagil.com
>
>
--
Sent from the Struts - User mailing list archive at Nabble.com.

Attachment:
user_181201.ezm (zipped)One thing you can do is use the <param> tag in struts.xml (along with
the staticParams interceptor from the defaultStack) to inject the
value of a parameter into your action.
If you have something like this in your struts.xml:
<action name="login" class="my.company.controller.LoginAction">
<param name="role">anybody</param>
<result>home.jsp</result>
</action>
And then you add a setRole(String role) method to your LoginAction, it
will automatically be populated for you by the time your
LoginAction.execute() method is called.
(*Chris*)
On Jan 10, 2008 5:48 AM, Manoel Pimentel <manoelp@(protected):
>
> Hi Friends,
>
> I did one small workaround, I used the
> "ServletActionContext.getActionMapping().getName()" for catch the name of my
> action and as i have two element action using the same action class, this
> way work well.
> But, I still can't catch the value into the param element.
>
> Tks,
>
> Manoel Pimentel
> www.visaoagil.com
>
>
>
>
> Manoel Pimentel wrote:
> >
> > Hi to everyone,
> >
> > Please, I need help :-).
> >
> > Like are possible catch the values in a session using the
> > "ActionContext.getContext().getSession()", I want to know if have any way
> > to catch in a action class, the value of one parameter set in the
> > struts.xml file?
> >
> > Example:
> > I need use in my Action class, the value set in a tag like: XLS inside a
> > action element.
> >
> > Thanks for any help, ok?
> >
> > Manoel Pimentel
> > www.visaoagil.com
> >
> >
>
> --
> View this message in context: http://www.nabble.com/Catch-the-element-param-in-a-action-class-tp14716540p14733722.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)
>
>

Attachment:
user_181191.ezm (zipped)
I would like to replace the default action in a struts2 application which is
using smarturls. SmartUrls seems to default to ActionSupport for and actions
which aren't defined in the struts.xml file and don't have a class file that
matches the url pattern.
I have set the struts properties file to be:
smarturls.action.packages=com.mycompany.actions
struts.action.extension=
smarturls.action.default.parent.package=mypackage
And have the following package declared in struts.xml:
<package name="mypackage" extends="struts-default" namespace="/">
<default-class-ref
class="com.mycompany.actions.PrototypeAction"></default-class-ref>
</package>
But when I load the following url http://localhost:8080/myapp/randomUrl it
seems to still be using ActionSupport as the default class instead of the
default class declared in the default parent package.
Does anybody know how to override the default of ActionSupport?
--
Sent from the Struts - User mailing list archive at Nabble.com.

Attachment:
user_181193.ezm (zipped)
Hi,
How can i open hibernate session with executeAndWait interceptor ?
In fact OpenSessionInViewFiltered is not called before and i get
a session closed error...
Thanks in advance,
Benoît.
--
Sent from the Struts - User mailing list archive at Nabble.com.

Attachment:
user_181195.ezm (zipped)hi,
how can I build a ognl variable dynamic? Example:
I have an iteration with different url-definitions, because I need always another parameter (index):
<s:iterator value="myList" id="list" status="stat">
...
<s:url id="myMethod%{#stat.index}" action="test_myMethod.action">
<s:param name="myParam" value="%{#stat.index}"/>
</s:url>
<s:autocompleter ...
href="%{myMethod%{#stat.index}}"/> <--- I need here: %{myMethod0}, %{myMethod1}, ..., but it wasn't evaluated
</s:iterator>
Has someone an idea?
kind regards,
Frank

Attachment:
user_181196.ezm (zipped)
This repost includes the struts config file as requested by mgainty. Thanks.
NOTE: There is NO stack trace. These are errors we see in the FireBugs HTTP
log and also the lack of rendering the DropDownDatePicker.
In FireBug, we get the following errors when using <s:head theme="ajax">.
The source code follows the list of errors. Additionally, our
<s:dropdowndatepicker> tag doesn't appear.
NOTE: There are successfully "gets" for all of these files under the nls
directory without the en-us. Why is it looking in en-us? We're lost.
Pleeease help.
GET
http://localhost:8080/FirstHCM/struts/dojo/src/i18n/calendar/nls/en-us/gregorian.js
404 (47ms) dojo.js (line 734)
GET
http://localhost:8080/FirstHCM/struts/dojo/src/i18n/calendar/nls/en/gregorianExtras.js
404 (47ms)dojo.js (line 734)
GET
http://localhost:8080/FirstHCM/struts/dojo/src/i18n/calendar/nls/en-us/gregorianExtras.js
404 (31ms)dojo.js (line 734)
GET
http://localhost:8080/FirstHCM/struts/dojo/src/widget/nls/en/TimePicker.js
404 (62ms)dojo.js (line 734)
GET
http://localhost:8080/FirstHCM/struts/dojo/src/widget/nls/en-us/TimePicker.js
404 (47ms)dojo.js (line 734)
GET
http://localhost:8080/FirstHCM/struts/dojo/src/widget/nls/en/DropdownTimePicker.js
404 (31ms)dojo.js (line 734)
GET
http://localhost:8080/FirstHCM/struts/dojo/src/widget/nls/en-us/DropdownTimePicker.js
404 (47ms)dojo.js (line 734)
GET
http://localhost:8080/FirstHCM/struts/dojo/src/widget/nls/en/DropdownDatePicker.js
404 (46ms)dojo.js (line 734)
GET
http://localhost:8080/FirstHCM/struts/dojo/src/widget/nls/en-us/DropdownDatePicker.js
404 (47ms)dojo.js (line 734)
<%@(protected).*"%>
<%@(protected)" %>
<!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.0 Transitional//EN">
<html>
<head>
<s:head theme="ajax" debug="false"/>
</head>
<body>
<s:tabbedPanel id="Requestor" >
<s:div id="tab1" label="Name" labelposition="top" theme="ajax">
<s:form method="post">
<table>
<s:datetimepicker name="From" label="From"
displayFormat="MM-dd-yyyy"/>
<s:datetimepicker name="To" label="To"
displayFormat="MM-dd-yyyy"/>
<s:textfield label="Requestor Name/ Last name"
name="LASTNAME" size="25"/>
<s:textfield label="First Name" name="FIRSTNAME"
/>
<s:submit name="SUBMIT" value="Find Now"/>
</table>
</s:form>
</s:div>
<s:div id="tab2" label="Number" theme="ajax">
<s:form method="post">
<table>
<s:textfield label="Provider Number"
name="REQUESTOR_NUMBER" size="15"/>
<s:submit name="SUBMIT" value="Find Now"/>
</table>
</s:form>
</s:div>
</s:tabbedPanel>
</body>
</html>
In the following, company name is replaced by xxx.
<?xml version="1.0" encoding="UTF-8" ?>
<!DOCTYPE struts PUBLIC
"-//Apache Software Foundation//DTD Struts Configuration 2.0//EN"
"http://struts.apache.org/dtds/struts-2.0.dtd">
<struts>
<constant name="struts.enable.DynamicMethodInvocation" value="false" />
<constant name="struts.devMode" value="true" />
<package name="Requestor" extends="struts-default">
<interceptors>
<interceptor name="logon" class="com.xxx.hcm.struts.LogonInterceptor"/>
<interceptor-stack name="hcmStack">
<interceptor-ref name="logon"/>
<interceptor-ref name="defaultStack"/>
</interceptor-stack>
</interceptors>
<default-interceptor-ref name="hcmStack"/>
<global-results>
<result name="logon">/logon.jsp</result>
</global-results>
<action name="RequestorSearch"
class="com.xxx.hcm.action.RequestorSearchAction">
<result name="input">/Requestor/RequestorSearch.jsp</result>
<result>/Requestor/RequestorSearch.jsp</result>
</action>
<action name="RecipientSearch"
class="com.xxx.hcm.action.RecipientSearchAction">
<result>/RecipientSearch/SearchResults.jsp</result>
</action>
<action name="Case" class="com.xxx.hcm.action.CaseAction">
<result>/Case/Case.jsp</result>
</action>
</package>
</struts>
--
Sent from the Struts - User mailing list archive at Nabble.com.

Attachment:
user_181198.ezm (zipped)
I looked through all the combinations of wild card configurations, zero
config, annotations and I can't find one that fits my work style and offers
any benefit. I have a pattern to my development, it just doesn't fit the
current proposed solutions.
I often have a namespace per pojo(sometimes nested).
These include typically edit, delete, save, list operations (and sometimes
search).
I think wildcard mappings would be more powerful of a configuration
technique if they could factor in the package name. That way, they could
take advantage of configuration inheritance.
Consider the example below. Just by being able to refer to the ${packName}
an enourmous amount of the configuration could be sliced and diced.
<!-- template out and abstract pattern -->
<package name="Abstract-crud" extends="struts-default" namespace="/example">
<!-- edit is often used as the create/view -->
<action name="edit" class="org.${packageName}Action">
<result name="input" type="velocity">{actionName}.vm</result>
<result name="success" type="velocity">{actionName}.vm</result>
<result name="error" type="velocity">{actionName}.vm</result>
</action>
<action name="save" class="org.${packageName}Action" method="save" >
<result name="input" type="velocity">edit.vm</result>
<result name="success" type="chain">list</result>
<result name="error" type="velocity">edit.vm</result>
<result name="cancel" type="redirect">list.action</result>
</action>
<action name="list" class="org.${packageName}Action" method="list">
<result name="success" type="redirectAction">list</result>
</action>
<action name="delete" class="org.${packageName}Action" method="delete">
<result name="success" type="redirectAction">list</result>
</action>
</package>
<!-- apply pattern over multple name spaces/mappings -->
<package name="Example" extends="abstract-crud" namespace="/example"/>
<package name="Example2" extends="abstract-crud" namespace="/example2">
<action name="override" class="org.${packageName}Action"
method="override">
<result name="success" type="velocity">somethingelse.vm</result>
</action>
</package>
<package name="SubItem" extends="abstract-crud"
namespace="/example2/subItem">
Matthew Payne
--
Sent from the Struts - User mailing list archive at Nabble.com.

Attachment:
user_181199.ezm (zipped)Hi
I am using Struts 1.3.8. I have written a command to replace the
processPreProcess method of a custom RequestProcessor from an older
verison of Struts. Basically, I want to perform a check for an object
in the session, but only for Actions that have a specific property
set. I hope that makes sense? i.e. check for a user in the session,
but only if the action requires it. i.e. SecureAction requires a valid
session, with a user in the session. HomeAction requires no such
check.
Relevant ActionServlet config in web.xml:
<init-param>
<param-name>chainConfig</param-name>
<param-value>
/WEB-INF/config/struts/chain-config.xml,
/WEB-INF/config/struts/chain-config-custom.xml
</param-value>
</init-param>
Content of /WEB-INF/config/struts/chain-config-custom.xml:
<?xml version="1.0" ?>
<catalog name="struts">
<chain name="servlet-standard-preprocess">
<command className="CustomCommand"/>
</chain>
</catalog>
Struts config:
<action-mappings>
<action path="/test"
type="TestAction">
<set-property key="RunLogic" value="true" />
<forward name="success"
path="success.jsp" />
</action>
</action-mappings>
CustomCommand.java:
public boolean execute(Context ctx) throws Exception {
ActionContext context = (ActionContext) ctx;
Map actionContextParams = context.getParameterMap();
String runLogic = (String) actionContextParams.get("RunLogic");
if (runLogic != null
&& runLogic.equalsIgnoreCase("true")) {
//check for user in session. If no user throw exception.
}
return CONTINUE_PROCESSING;
}
How do I access the "RunLogic" property in the CustomCommand class?
Prior to Struts 1.3.8 I would use a custom ActionMapping class and I
had access to the ActionMapping in the RequestProcessor. I see no way
to access my properties in the Context object.
Any help will be greatly appreciated.
Greg