Java Mailing List Archive

http://www.gg3721.com/

Home » Struts Users Mailing List »

user Digest 9 Jul 2008 11:27:22 -0000 Issue 8129

user-digest-help

2008-07-09


Author LoginPost Reply

user Digest 9 Jul 2008 11:27:22 -0000 Issue 8129

Topics (messages 188587 through 188616):

Re: Ajax based login not working in IE but Working in FF
 188587 by: AjaySrini
 188590 by: AjaySrini

Re: Struts1 and Struts2 mailing lists separation ?
 188588 by: Musachy Barroso

Ajax based implementation for Radio Button in Struts 2.0
 188589 by: AjaySrini
 188592 by: Jeromy Evans

question on multipage form bean
 188591 by: Dimitris Mouchritsas
 188598 by: Lukasz Lenart

Re: [S2] Problem injecting String with Spring plugin
 188593 by: Gabriel Belingueres

Re: Struts 2 Page & Ctrl+R
 188594 by: Rubbinio
 188600 by: Lukasz Lenart
 188601 by: Rubbinio
 188602 by: Lukasz Lenart
 188603 by: Rubbinio
 188604 by: Lukasz Lenart

[S2] Struts configuration vizualization
 188595 by: Milan Milanovic

Re: static list with <s:select> problem.
 188596 by: Lukasz Lenart

Re: Struts templates
 188597 by: Lukasz Lenart

Re: Using Menu Links In Tiles2 + Struts 2
 188599 by: Lukasz Lenart

Re: Getting Struts2 Parameters?
 188605 by: Chris Miles

Injecting singleton beans into Servlets
 188606 by: Kleiderman, Matthew
 188610 by: Gabriel Belingueres

Introduction to Struts
 188607 by: Oscar Calderon
 188612 by: Lukasz Lenart

question about acton path
 188608 by: shrimpywu
 188609 by: shrimpywu
 188615 by: Lukasz Lenart

Re: Struts2 iterator tag
 188611 by: oraskin

[S2] s:iterator tag - var or id
 188613 by: Timothy Wonil Lee
 188614 by: Chris Pratt

Action method specific custom validation
 188616 by: ManiKanta G

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

Hi

Thanks for ur reply. It is working fine now.

Regards,
Srini :-)


Jeromy Evans - Blue Sky Minds wrote:
>
> AjaySrini wrote:
>> Hi all,
>>
>> I'm new to sturts 2.0.Currently i'm developing a web application in which
>> i
>> have a login screen which is ajax based(using <s:head theme="ajax">)
>> It works fine in FF but when i used to login through IE it is not
>> working.
>> Whether Struts2.0 + ajax functionality will support IE.
>> looking forward to ur reply.
>>
>>
>> Thanks,
>>
>> Srini
>>  
>
> Yes, Struts2 ajax works okay with IE. However it's very easy to do
> ajaxy things that don't work in IE and struts2 can do little to prevent
> that.
>
> The most common struts2-specific problem I've seen that occurs only in
> IE is that the TARGET for your ajax request (eg. a div) cannot contain
> the form that's used to generate the request unless you set the
> showLoadingText=false attribute on the tag. It's well documented in
> previous emails in this group so I won't go into details again, but in a
> nutshell, in IE the text that says "Loading..." overwrites the form
> PRIOR to making the request, so the request fails.
>
> If that's not the cause, it's possible that your html result cannot be
> inserted into the DOM by IE. There's so many things that can go astray
> here you'll need to be specific about what you've doing and what didn't
> work. Try turning on the s:head's debug feature.
>
> ---------------------------------------------------------------------
> 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_188590.ezm (zipped)

Hi,

Thanks for ur timely reply.

Do u have any idea regarding the following problem?

I'm developing a web application which consists of 4 radio buttons using
Struts 2.0 written in div tag. Based on the selection of the radio buttons i
need to display the other struts tags such as <s:optiontransferselect>,
<s:groupbox>, <s:combobox>, etc... using ajax implementation.

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


Attachment: user_188588.ezm (zipped)
Totally agree with Al.

On Tue, Jul 8, 2008 at 2:17 AM, Al Sutton <al.sutton@(protected):
> web forums are a nightmare for the dynamics shown by this list.
>
> There are a core few who respond to many of the questions asked, and there
> is a lot of traffic, which means with a web forum those few would need to
> either check for new posts every so often (which is a chore), or receive an
> endless string of messages saying "New thread, click here to read".
>
> Web forums are OK when then volume is low or there is a higher peer-to-peer
> solution ratio is high, but personally I'd read even less of the posts if I
> had to go to a web page and click through a few times just to see whats been
> said.
>
> Al.
>
>
> Gabriel Belingueres wrote:
>>
>> I personally would like to interact using a web based forum where you
>> can post with formatted java and xml code and even with emoticons
>> instead of this email based mailing list, but this would be even more
>> utopian....phpBB would do :)
>>
>> 2008/7/7 Jason Wyatt <jwyatt@(protected)>:
>>
>>>
>>> Dave, may I ask why it has been consistently voted down (and voted by
>>> who?). It would seem to be a logical separation IMHO, what's the benefit of
>>> keeping them together when the platforms have nothing in common except the
>>> name struts?
>>>
>>> If people still don't know about or use the [S1] and [S2] convention,
>>> which seems to be the case, its likely that won't change because new members
>>> will be joining the list all the time.
>>>
>>> +1 to split
>>>
>>> Regards
>>> Jason
>>>
>>> -----Original Message-----
>>> From: Dave Newton [mailto:newton.dave@(protected)]
>>> Sent: Tuesday, 8 July 2008 2:40 AM
>>> To: Struts Users Mailing List
>>> Subject: Re: Struts1 and Struts2 mailing lists separation ?
>>>
>>> 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)>
>>>> wrote:
>>>>
>>>>>
>>>>> 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)
>>>>
>>>
>>> ---------------------------------------------------------------------
>>> 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)
>>
>>
>
>
> ---------------------------------------------------------------------
> 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_188589.ezm (zipped)

Hi,

Currently i'm developing a web application which consists of 4 radio buttons
using Struts 2.0 written in div tag. Based on the selection of the radio
buttons i need to display the other struts tags such as
<s:optiontransferselect>, <s:groupbox>, <s:combobox>, etc... using ajax
implementation.

Looking forward to ur reply...

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


Attachment: user_188592.ezm (zipped)
AjaySrini wrote:
> Hi,
>
> Currently i'm developing a web application which consists of 4 radio buttons
> using Struts 2.0 written in div tag. Based on the selection of the radio
> buttons i need to display the other struts tags such as
> <s:optiontransferselect>, <s:groupbox>, <s:combobox>, etc... using ajax
> implementation.
>
> Looking forward to ur reply...
>
> Thanks,
> Srini.
>  

Simple solution (no ajax):
include the s:optiontransferselect etc in hidden divs in the page.
use javascript to show/hide the divs on radio button events.

Ajax solution:
Attach an event listener to the radio button (eg. with the onchange ).
Have the listener publish a topic.
Struts2 will make the ajax request and insert the response into your
target div.
Your response contains the s:optiontransferselect etc tags.

Topics are discussed here:
http://struts.apache.org/2.0.11/docs/ajax-tags.html

Attachment: user_188591.ezm (zipped)
Hi all,
I'm using a multipage form bean for a 3 page form. From what I tested,
if I leave the pages (by following another link) and
return later the bean is still in session scope. How can I tell struts
that I've left these pages and remove the bean from session?

I suppose if the user follows all the steps correctly I can do that in
the final action, but what about if he clicks another link in
the meantime? I'd like to invalidate the form bean in that case as well.

Thanks
Dimitris

Attachment: user_188598.ezm (zipped)
Hi,

I'm assuming that you're using Struts 1, if so ActionForms are stored
in session by default [1], change scope of your action mapping to
request [2]

[1] http://struts.apache.org/1.3.8/userGuide/building_controller.html#action_form_classes
[2] http://struts.apache.org/1.3.8/userGuide/building_controller.html#action_mapping_example


Regards
--
Lukasz
http://www.lenart.org.pl/

Attachment: user_188593.ezm (zipped)
Doing more testing, I changed the injected bean's datatype from String
to Integer, so that the setter became
void setTemplateDir(Integer), and this time it was not injected into
the action, but neither was injected into the ServletDispatcherResult
object.
This last behavior may be because the ServletDispatcherResult has a
constructor with a String parameter, but no constructor taking an
Integer.
From this I guess that something (Struts? the Spring plugin?) is
trying to set the bean into the wrong object?

2008/7/7 Gabriel Belingueres <belingueres@(protected)>:
> Thanks Musachy for your quick answer.
>
> Tried setting default-autowire="byName" in the beans tag but the
> behavior is the same, that is, the "templateDir" String bean is
> injected after method execution AND byType:
>
> 2008-07-07 16:52:40,562 DEBUG
> (org.springframework.beans.factory.support.DefaultListableBeanFactory:601)
> - Autowiring by type from bean name
> 'org.apache.struts2.dispatcher.ServletDispatcherResult' via
> constructor to bean named 'templatesDir'
>
> Also I tested with an action that inject _other_ objects but NOT the
> templateDir one, and the log is the same (even when I never defined
> any setTemplateDir(String) method in the action!)
>
> I'm seriously thinking in just put this templateDir String in my
> web.xml context parameter list and move on...
>
> 2008/7/7, Musachy Barroso <musachy@(protected)>:
>> Did you try forcing Spring to autowrie by name? Add
>> default-autowire="byName" to the "beans" tag in your spring config(s)
>> file(s).
>>
>> musachy
>>
>> On Mon, Jul 7, 2008 at 4:09 PM, Gabriel Belingueres
>> <belingueres@(protected):
>> > Debugging the Spring output I found the following:
>> >
>> > 2008-07-07 16:52:40,421 DEBUG
>> > (org.springframework.beans.factory.support.DefaultListableBeanFactory:214)
>> > - Returning cached instance of singleton bean 'allEventoService'
>> > 2008-07-07 16:52:40,421 DEBUG
>> > (org.springframework.beans.factory.support.DefaultListableBeanFactory:1033)
>> > - Added autowiring by name from bean name 'admin.EditConstancia' via
>> > property 'allEventoService' to bean named 'allEventoService'
>> > 2008-07-07 16:52:40,421 DEBUG
>> > (org.springframework.beans.factory.support.DefaultListableBeanFactory:214)
>> > - Returning cached instance of singleton bean 'constanciaService'
>> > 2008-07-07 16:52:40,421 DEBUG
>> > (org.springframework.beans.factory.support.DefaultListableBeanFactory:1033)
>> > - Added autowiring by name from bean name 'admin.EditConstancia' via
>> > property 'constanciaService' to bean named 'constanciaService'
>> > 2008-07-07 16:52:40,515 DEBUG (orm.SfapconstanciaManager:213) - EXECUTE
>> > 2008-07-07 16:52:40,562 DEBUG
>> > (org.springframework.beans.factory.support.DefaultListableBeanFactory:214)
>> > - Returning cached instance of singleton bean 'templatesDir'
>> > 2008-07-07 16:52:40,562 DEBUG
>> > (org.springframework.beans.factory.support.DefaultListableBeanFactory:601)
>> > - Autowiring by type from bean name
>> > 'org.apache.struts2.dispatcher.ServletDispatcherResult' via
>> > constructor to bean named 'templatesDir'
>> >
>> > I found several weird things:
>> >
>> > 1) templatesDir _is well defined_ in Spring since I did the following
>> > in my app context listener and it worked OK:
>> > WebApplicationContext context =
>> > WebApplicationContextUtils.getWebApplicationContext(event.getServletContext());
>> > System.out.println(context.getBean("templatesDir"));
>> >
>> > 2) In the above log trace, which corresponds to the execution of my
>> > action, the other Spring dependencies are injected correctly (before
>> > calling the action's execute() method)
>> >
>> > 3) The templateDir is NOT injected at this point (don't know why.)
>> >
>> > 4) AFTER my action's execute() method, templateDir _is_ injected into
>> > a ServletDispatcherResult instance!!:
>> > 2008-07-07 16:52:40,562 DEBUG
>> > (org.springframework.beans.factory.support.DefaultListableBeanFactory:601)
>> > - Autowiring by type from bean name
>> > 'org.apache.struts2.dispatcher.ServletDispatcherResult' via
>> > constructor to bean named 'templatesDir'
>> >
>> > (even it is injected by _TYPE_, which I never specified it before,
>> > because AFAIK the Spring plugin uses byName as the default)
>> >
>> > I'm using Spring 2.5.5 and S2 2.1.2.
>> >
>> > 2008/7/7, Musachy Barroso <musachy@(protected)>:
>> >> The plugin doesn't really inject anything, it is all up to Spring.
>> >>
>> >> musachy
>> >>
>> >> On Mon, Jul 7, 2008 at 3:03 PM, Gabriel Belingueres
>> >> <belingueres@(protected):
>> >> > Hi,
>> >> >
>> >> > I want to inject a String defined in the Spring's
>> >> > applicationContext.xml file like this:
>> >> >
>> >> > <bean id="templatesDir" class="java.lang.String">
>> >> > <constructor-arg><value>/WEB-INF/templates/</value></constructor-arg>
>> >> > </bean>
>> >> >
>> >> > but the Spring plugin does not try to inject it (It works with my
>> >> > other injected, non String class objects though)
>> >> >
>> >> > It is OK that the plugin does not try to inject String objects?
>> >> > (because they later can be overwritten with a parameter?)
>> >> > or is this just a bug in the plugin?
>> >> >
>> >> > Regards,
>> >> > Gabriel
>> >> >
>> >> > ---------------------------------------------------------------------
>> >> > 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)
>> >>
>> >>
>> >
>> > ---------------------------------------------------------------------
>> > 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_188594.ezm (zipped)

Tried that and it did not work at all. I got it working in a way but not the
way I want. Basically what I did was set the values in the session and then
on page refresh they are picked up ok. The problem is the data on the page
might change so I would like to have the action invoked when the user does a
page refresh.
But that does not happen.

So I got the struts 2 sources and see if the refresh makes a request to the
server, which it does and it gets in the Struts 2 filter dispatcher but it
never makes it to my action. I am guessing that is due to the fact that my
result for the previous action is a jsp.

Now the question is, is there any way to make the framework invoke my action
when the user presses CTRL+R or the browser refresh button ?

My config file looks like this:

<action name="*DashboardAction"
class="com.action.setup.dashboard.DashboardAction" method="{1}">
<interceptor-ref name="defaultStack">
  ... interceptor stack
</interceptor-ref>
<result name="input">/setup/dashboard/dashboard_config.jsp</result>
<result
name="deleteDashboard">/setup/dashboard/delete_confirm_dashboard.jsp</result>
<result name="listDashboards">/setup/dashboard/index.jsp</result>
<result name="finish" type="redirect-action">
  param name="actionName" - listDashboardAction
</result>
</action>


Lukasz Lenart wrote:
>
> You can check Scope Plugin
> http://cwiki.apache.org/S2PLUGINS/scope-plugin.html maybe it will be
> helpful
>
>

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


Attachment: user_188600.ezm (zipped)
Hi,

What you have in browser's address bar?

CTRL+R just make GET request to your application, if you have .action
in your url, apropreciated action has to be called.


Regards
--
Lukasz
http://www.lenart.org.pl/

Attachment: user_188601.ezm (zipped)

That's the thing,

the application is in a frameset and the struts 2 action is in on of the
frames. Now my action result is a JSP and not an action. When I hit refresh
in the Struts2 Filter I get the jsp name. So how can I make it have the
.action because my page is rendered as a result of an action ?



Lukasz Lenart wrote:
>
> Hi,
>
> What you have in browser's address bar?
>
> CTRL+R just make GET request to your application, if you have .action
> in your url, apropreciated action has to be called.
>
>
> Regards
> --
> Lukasz
> http://www.lenart.org.pl/
>
> ---------------------------------------------------------------------
> 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_188602.ezm (zipped)
Hi,

Put all your frameset's source to actions, not to jsp files.


Regards
--
Lukasz
http://www.lenart.org.pl/

Attachment: user_188603.ezm (zipped)

What do you mean ?

I have a link the user click on in Frame 1: listDashboardAction.action

That invokes my action, does some stuff and returns "input" which in my
struts.xml is

<result name="input">/setup/dashboard/dashboard_config.jsp</result>

And that gets loaded in frame 2.

Now how can i set the frame source cause i really can not see it ? Frame 2
gets to load different pages based on what the user selects in terms of
options.

Thanks


Lukasz Lenart wrote:
>
> Hi,
>
> Put all your frameset's source to actions, not to jsp files.
>
>
> Regards
> --
> Lukasz
> http://www.lenart.org.pl/
>
> ---------------------------------------------------------------------
> 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_188604.ezm (zipped)
Could you show source of your frame?


Regards
--
Lukasz
http://www.lenart.org.pl/

Attachment: user_188595.ezm (zipped)

Hi,

I'm wodering is there any Eclipse plug-in (or something similar) which will
vizualize struts.xml configuration ?

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


Attachment: user_188596.ezm (zipped)
Hi,

Maybe like that 'Do not have caller ID' ?


Regards
--
Lukasz
http://www.lenart.org.pl/

Attachment: user_188597.ezm (zipped)
Hi,

You can either develop your own theme or extended existing one [1]

[1] http://struts.apache.org/2.1.2/docs/extending-themes.html


Regards
--
Lukasz
http://www.lenart.org.pl/

Attachment: user_188599.ezm (zipped)
Hi,

I'm not sure what the problem you have, links in your menu should be
mapped to apropreciated actions and those actions should have defined
result type tiles with defined tile's name in tiles.xml configuration.


Regards
--
Lukasz
http://www.lenart.org.pl/

Attachment: user_188605.ezm (zipped)
Argh, You know I could not see that at all?

Thank you :)

Chris
----- Original Message -----
From: "Jim Kiley" <jhkiley@(protected)>
To: "Struts Users Mailing List" <user@(protected)>
Sent: Monday, July 07, 2008 10:52 PM
Subject: Re: Getting Struts2 Parameters?


> Your setter is private. It needs to be public.
>
> On Mon, Jul 7, 2008 at 5:49 PM, Chris Miles <chris@(protected):
>
>> No exceptions.
>>
>> The action class is as follows.
>>
>> public class AddToCartAction extends ActionSupport implements Action {
>>  private String productId = "";
>>  private int quantity = 0;
>>
>>  private void setProductId(String productId) {
>>     this.productId = productId;
>>  }
>>
>>  private void setQuantity(int quantity) {
>>     this.quantity = quantity;
>>  }
>>
>>  public String execute() {
>>     System.out.println("Product Id = " + productId);
>>     System.out.println("Quantity = " + quantity);
>>     return Action.SUCCESS;
>>  }
>> }
>>
>> My struts.xml is
>>
>> <?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>
>>  <package name="default" extends="struts-default" namespace="/checkout">
>>     <interceptors>
>>
>>       <interceptor name="static-params"
>> class="com.opensymphony.xwork2.interceptor.StaticParametersInterceptor"
>> />
>>       <interceptor name="params"
>> class="com.opensymphony.xwork2.interceptor.ParametersInterceptor" />
>>
>>       <interceptor-stack name="defaultStack">
>>          <interceptor-ref name="static-params" />
>>          <interceptor-ref name="params" />
>>       </interceptor-stack>
>>
>>     </interceptors>
>>
>>     <default-interceptor-ref name="defaultStack"/>
>>
>>     <!-- Product Form / addToCart -->
>>     <action name="viewCart"
>> class="cakeinabox.struts2.actions.AddToCartAction">
>>       <result name="success">/jsp/checkout/viewCart.jsp</result>
>>       <result name="error">/jsp/checkout/error.jsp</result>
>>     </action>
>>  </package>
>> </struts>
>>
>> and my JSP is:
>>
>> <form action="/checkout/addToCart.action" method="GET">
>>       <input type="hidden" value="<%=pId%>" name="productId">
>>       <input type="hidden" value="1" name="quantity">
>> ..............
>>
>> pId renders as a valid productId in the HTML - this has been checked.
>>
>> I have also tried a POST rather than a GET with no joy.
>>
>> many thanks
>>
>> Chrix
>> ----- Original Message ----- From: "Musachy Barroso" <musachy@(protected)>
>> To: "Struts Users Mailing List" <user@(protected)>
>> Sent: Monday, July 07, 2008 4:46 PM
>> Subject: Re: Getting Struts2 Parameters?
>>
>>
>> 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
>>>
>>> ---------------------------------------------------------------------
>>> To unsubscribe, e-mail: user-unsubscribe@(protected)
>>> For additional commands, e-mail: user-help@(protected)
>>>
>>>
>>>
>>> --
>>> Internal Virus Database is out-of-date.
>>> Checked by AVG Free Edition.
>>> Version: 7.5.446 / Virus Database: 268.18.12/724 - Release Date:
>>> 16/03/2007 12:12
>>>
>>>
>>>
>>
>> ---------------------------------------------------------------------
>> To unsubscribe, e-mail: user-unsubscribe@(protected)
>> For additional commands, e-mail: user-help@(protected)
>>
>>
>
>
> --
> Jim Kiley
> Technical Consultant | Summa
> [p] 412.258.3346 [m] 412.445.1729
> http://www.summa-tech.com
>


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


Internal Virus Database is out-of-date.
Checked by AVG Free Edition.
Version: 7.5.446 / Virus Database: 268.18.12/724 - Release Date: 16/03/2007
12:12


Attachment: user_188606.ezm (zipped)
Is there any way to inject beans defined in struts.xml with
scope=singleton into a Servlet so that it's available when the Servlet's
init method is called? Alternately, is there a way to access where
these instances are stored so I can get a reference to the instance?

Thanks,

Matt Kleiderman

Attachment: user_188610.ezm (zipped)
2008/7/8 Kleiderman, Matthew <Matthew.Kleiderman@(protected)>:
> Is there any way to inject beans defined in struts.xml with
> scope=singleton into a Servlet so that it's available when the Servlet's
> init method is called?

Did you really meant injecting a bean defined inside Spring's
applicationContext.xml file with scope="singleton" into a Servlet? If
so, the answer is yes:

public void init(FilterConfig filterConfig) throws ServletException {
...
ServletContext servletContext = filterConfig.getServletContext();
WebApplicationContext context =
WebApplicationContextUtils.getWebApplicationContext(servletContext);
// set up an injected bean into application scope
servletContext.setAttribute("mybean", context.getBean("aBean"));
...
}

Alternately, is there a way to access where
> these instances are stored so I can get a reference to the instance?
>
> Thanks,
>
> Matt Kleiderman
>
> ---------------------------------------------------------------------
> To unsubscribe, e-mail: user-unsubscribe@(protected)
> For additional commands, e-mail: user-help@(protected)
>
>

Attachment: user_188607.ezm (zipped)
Hi everybody, first of all i'm glad to take part of this mailing list, well
i'm new in Struts and i'm developing a simple application where the user
logins and then it goes to a JSP that has to show information of a database
table. I am studying all about Actions, FormBeans but i don't find jhow to
fill the JSP table with data when is requested, because i can create an
aditional method in the Action that is associated with the FormBean of the
JSP but i don't know how to activate that method.

--
Oscar Calderon

Soluciones de desarrollo a bajo costo?
http://www.oscarcalderon.info
Todo sobre Symbian UIQ? Visita
http://aeblogs.com/uiq

Attachment: user_188612.ezm (zipped)
Hi,

About which version you are talking? Struts1 or Struts2?


Regards
--
Lukasz
http://www.lenart.org.pl/

Attachment: user_188608.ezm (zipped)

hi guys,
if i can get the actionform,
how can i get the action path

u know, for the page, we have to specify a path for the page in the
struts-config

so that we can use that path
/mywebsit/mymodule/myform.do
to visit a page

for some reason from development side,
i want to know this path,
and what i have so far is that i can get the actionform

is it anyway go get the path as well???

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


Attachment: user_188609.ezm (zipped)

and i forgot to say that i am useing struts 1

shrimpywu wrote:
>
> hi guys,
> if i can get the actionform,
> how can i get the action path
>
> u know, for the page, we have to specify a path for the page in the
> struts-config
>
> so that we can use that path
> /mywebsit/mymodule/myform.do
> to visit a page
>
> for some reason from development side,
> i want to know this path,
> and what i have so far is that i can get the actionform
>
> is it anyway go get the path as well???
>
> thanks...
>

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


Attachment: user_188615.ezm (zipped)
Maybe this will help, inside execute()
request.getRequestURI()

or
request.getContextPath() + "/" + mapping.getModuleConfig().getPrefix()
+ "/" + mapping.getPath());



Regards
--
Lukasz
http://www.lenart.org.pl/

Attachment: user_188611.ezm (zipped)

Try the following:

<s:textarea name="%{'descList[' + #stat.index + '].destination'}"
value="%{destination}"/>


Hope it helps!



BGE Ger wrote:
>
> Hello,
> I'm struts(2) newbie and I need some help for the iterator tag.
> How can I access to an updated list in the action class?
> My JSP looks like:
>
> <s:form theme="simple">
>  <s:iterator  value="descList" status="stat">
>  <tr>
>      <td ><s:textarea name="descList[%{stat.index}].destination"
> value="%{destination}"  /></td>
>      <td ><s:textarea name="descList[%{stat.index}].category"  
> value="%{category}"  /></td>
>      <td ><s:textarea name="descrList[%{stat.index}].source"  
> value="%{source}" /></td>
>      <td><s:textarea name="descList[%{stat.index}].text"
> value="%{text}"/></td>
>  </tr>
>  </s:iterator>
>      <s:submit action="updateDescriptions" />
> </s:form>
>
> ---------------------------------------------------------------------
> Action class:
>
>
> public class DescriptionTestAction extends ActionSupport {
>
>   private List<Text> descList;
>  
>   public DescriptionTestAction () {
>   }
>
>  
>   public void setDescList(List descList) {
>    this.descList = descList;
>   }
>  
>   public List getDescList () {
>   return this.descList;  
>   }
>
> --------------------------------------------------
> The descList is a spring Bean and everything works well except the update
> process.
> If I make an update for the destination field e.g. and then submit this
> form the descList contains the old values! I've tried everything and spend
> lot of time for searching for a solution, please help!
> Thank you in advance!
>
>

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


Attachment: user_188613.ezm (zipped)
Hi all,

I was trying to use s:iterator tag, and when I looked at the documentation
on http://struts.apache.org/2.0.11.2/docs/iterator.html
it says, attribute (parameter) 'id' is deprecated and 'var' should be used.
So I did:
<s:iterator var="profile" value="profiles" status="row">

However, my IDE complained about the attribute 'var' being not valid
according to the TLD.
So I looked at the struts-tags.tld (which was inside
struts2-core-2.0.11.2.jar file) and I am lead to believe that the TLD indeed
does not define 'var' attribute.

Using the 'id' isn't too much of a problem for me at the moment, but I was
just wondering if this was a known issue.
Does anybody know if this is reported as a JIRA issue?

Timothy Wonil Lee

Java Developer
http://timundergod.blogspot.com/



Attachment: user_188614.ezm (zipped)
Unfortunately those docs are for the 2.1.x version of Struts even
though they say they are for the 2.0.x line (and are shipped with it).
At this point you have to use the id attribute. I'm not sure what
the technical reason that prevents the documentation being versioned
like the rest of the code, maybe one of the committers can explain.
(*Chris*)

On Tue, Jul 8, 2008 at 11:53 PM, Timothy Wonil Lee
<timothyl@(protected):
> Hi all,
>
> I was trying to use s:iterator tag, and when I looked at the documentation
> on http://struts.apache.org/2.0.11.2/docs/iterator.html
> it says, attribute (parameter) 'id' is deprecated and 'var' should be used.
> So I did:
> <s:iterator var="profile" value="profiles" status="row">
>
> However, my IDE complained about the attribute 'var' being not valid
> according to the TLD.
> So I looked at the struts-tags.tld (which was inside
> struts2-core-2.0.11.2.jar file) and I am lead to believe that the TLD indeed
> does not define 'var' attribute.
>
> Using the 'id' isn't too much of a problem for me at the moment, but I was
> just wondering if this was a known issue.
> Does anybody know if this is reported as a JIRA issue?
>
> Timothy Wonil Lee
>
> Java Developer
> http://timundergod.blogspot.com/
>
>
>
> ---------------------------------------------------------------------
> To unsubscribe, e-mail: user-unsubscribe@(protected)
> For additional commands, e-mail: user-help@(protected)
>
>

Attachment: user_188616.ezm (zipped)
Hi,

I've three execute() kind of methods in single action.

To validate the data, we can use
actionName-actionAliasName-validation.xml for validating actionName
specific validations.

But how to write custom validate() to deal specifically based on the
method being requested. Is there are provision like
validateMethodsName() kind of thing in S2? or some thing else?

Thanks in advance,

Regards,
ManiKanta G




********** 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)
©2008 gg3721.com - Jax Systems, LLC, U.S.A.