Java Mailing List Archive

http://www.gg3721.com/

Home » Struts Users Mailing List »

user Digest 13 May 2008 15:44:52 -0000 Issue 8025

user-digest-help

2008-05-13


Author LoginPost Reply

user Digest 13 May 2008 15:44:52 -0000 Issue 8025

Topics (messages 186369 through 186391):

Unit Test Validation Logic in Struts2
 186369 by: Pranav

hi, what is the difference between specify time out and do not specify the timeout value in the web.xml file
 186370 by: shrimpywu
 186372 by: Laurie Harper
 186379 by: Alberto A. Flores

Ajax <s:div> [loads once when refreshing the page]
 186371 by: Simon Sew

Setting HTML form parameters to Custom classes (not action support)
 186373 by: ravi_eze
 186380 by: Jim Kiley

HashMap< String, ArrayList<String> >: Unable to populate the Array List from JSP
 186374 by: ravi_eze

Re: problems nesting TileResults....
 186375 by: Darren James
 186376 by: Antonio Petrelli

File upload issue
 186377 by: Zoran Avtarovski

Struts2 & Tiles2
 186378 by: Pro1712

Re: redirect after logging in
 186381 by: Rushikesh Thakkar

[struts 2] Table question
 186382 by: Milan Milanovic
 186383 by: Jim Kiley
 186387 by: Milan Milanovic

<sx:div> tag with Validation problem
 186384 by: Håken Stark

struts2 access session Id
 186385 by: Jakub Milkiewicz

Re: [struts 2] Two forms for one action
 186386 by: Milan Milanovic
 186388 by: Randy Burgess
 186389 by: Milan Milanovic
 186391 by: Milan Milanovic

Selecting a jsp according to locale
 186390 by: Dimitris Mouchritsas

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_186369.ezm (zipped)
Hi,

I am having trouble with unit testing my validation logic in Struts2.

here's the code.

1) In UserLookupAction-validation.xml I have
<field name="memberId">
    <field-validator type="requiredstring">
      <message>You must enter a value for ${getText("memberId.label")}.</message>
    </field-validator>
</field>

2) In UserLookupActionTest.java I have the following method

public void setUp() throws Exception {
    super.setUp();
    ObjectFactory.setObjectFactory( new ObjectFactory() );
}

public void testValidationFailed() throws ValidationException {
    ActionValidatorManager avm = ActionValidatorManagerFactory.getInstance();
    UserLookupAction action = new UserLookupAction();
    action.setSession(sessionMap);
    action.setMemberId(null);

    avm.validate(action,"UserLookupAction");
    Map fieldErrors = action.getFieldErrors();
    assertTrue(action.hasErrors());
}

3) UserLookupActionTest extends from TestCase and not from StrutsTestCase but I think I am doing ObjectFactory.setObjectFactory( new ObjectFactory() ); as an alternative to that so it should not cause a problem.

When I run the test testValidationFailed, the ActionValidatorManager gets initialized but it has no properties. Afterwards, when I call validate method, it executes but then fieldErrors map is empty and the action.hasErrors() returns null so the assertion fails. Can someone tell me what is wrong here? Any help would be appreciated. This validation logic seems to work when I run the app.

Thanks
Pranav



   ____________________________________________________________________________________
Be a better friend, newshound, and
know-it-all with Yahoo! Mobile. Try it now. http://mobile.yahoo.com/;_ylt=Ahu06i62sR8HDtDypao8Wcj9tAcJ

Attachment: user_186370.ezm (zipped)

hi, what is the difference between specify time out and do not specify the
timeout value in the web.xml file

 <session-config>
    <session-timeout>30</session-timeout>
  </session-config>
 

before, i do not specify this in the web.xml file
when the session has been timeout, i sometime got some exception

but after i did that..no exception any more..why???
--
Sent from the Struts - User mailing list archive at Nabble.com.


Attachment: user_186372.ezm (zipped)
shrimpywu wrote:
> hi, what is the difference between specify time out and do not specify the
> timeout value in the web.xml file
>
>   <session-config>
>      <session-timeout>30</session-timeout>
>    </session-config>

According to the Servlet specification, if you don't specify this
session timeout will be set to the container's default (which will be
server dependent).

> before, i do not specify this in the web.xml file
> when the session has been timeout, i sometime got some exception
>
> but after i did that..no exception any more..why???

Without even knowing what the exception was there's no way to guess.
You'd probably be better off trying to diagnose why the exception occurs
in the first place, rather than ask why it goes away.

L.


Attachment: user_186379.ezm (zipped)
Please include container type, version, etc, etc.

Laurie Harper wrote:
> shrimpywu wrote:
>> hi, what is the difference between specify time out and do not specify
>> the
>> timeout value in the web.xml file
>>
>>   <session-config>
>>      <session-timeout>30</session-timeout>
>>    </session-config>
>
> According to the Servlet specification, if you don't specify this
> session timeout will be set to the container's default (which will be
> server dependent).
>
>> before, i do not specify this in the web.xml file
>> when the session has been timeout, i sometime got some exception
>>
>> but after i did that..no exception any more..why???
>
> Without even knowing what the exception was there's no way to guess.
> You'd probably be better off trying to diagnose why the exception occurs
> in the first place, rather than ask why it goes away.
>
> L.
>
>
> ---------------------------------------------------------------------
> To unsubscribe, e-mail: user-unsubscribe@(protected)
> For additional commands, e-mail: user-help@(protected)
>
>

--

Alberto A. Flores
http://www.linkedin.com/in/aflores


Attachment: user_186371.ezm (zipped)
Hi,

I have a problem where the ajax div (see source code) will initialize once when I load the page.What I wanted to do is to make it run only when i publish the topic. Am I missing something here. I'm using v2.0.11. Thanks.

   <s:div id="restore" href="<%=JspConstant.LINKS.CONF_SECURITY_RESTORE%>" listenTopics="/setRestoreAjax" showLoadingText="false" showErrorTransportText="false" theme="ajax">
     
   </s:div>

Regards,
Simon

   

Attachment: user_186373.ezm (zipped)

hi,

we have multiple classes (C1,C2,C3) each as java beans. now i have a form
as:
<s:form...>
<s:textfield name="a.field1" ../>
<s:textfield name="b.field1" ../>
<s:textfield name="c.field1" ../>

is it possible for me to populate the individual classes? The problem is
that we need to build a framework in struts2 and it requires the above to
happen.

After googling a lot... i found that that the current ActionSupport class is
kept in ognl value stack which is later filled. If this is true then can we
push the C1's object as a, C2's object as b etc into value stack???

Also, ModelInterceptor... would also push the object to the value stack. But
my problem is that i need all the 3 objects into the stack...

please correct me if i am wrong... any help would be great...

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


Attachment: user_186380.ezm (zipped)
I would handle this by creating an ordinary Java class for the page, and
then having the following fields:

public class MyAction {
C1 a;
C2 b;
C3 c;

//...
}

...and make sure I had a public getA() and setA(), getB() and setB(), and so
on.

If you need to preset values for a, b, and c, one option is to have MyAction
implement Preparable, and put the pre-population in the prepare() method
that it requires.

jk

On Tue, May 13, 2008 at 1:16 AM, ravi_eze <ravichandrac@(protected)>
wrote:

>
> hi,
>
> we have multiple classes (C1,C2,C3) each as java beans. now i have a form
> as:
> <s:form...>
> <s:textfield name="a.field1" ../>
> <s:textfield name="b.field1" ../>
> <s:textfield name="c.field1" ../>
>
> is it possible for me to populate the individual classes? The problem is
> that we need to build a framework in struts2 and it requires the above to
> happen.
>
> After googling a lot... i found that that the current ActionSupport class
> is
> kept in ognl value stack which is later filled. If this is true then can
> we
> push the C1's object as a, C2's object as b etc into value stack???
>
> Also, ModelInterceptor... would also push the object to the value stack.
> But
> my problem is that i need all the 3 objects into the stack...
>
> please correct me if i am wrong... any help would be great...
>
> cheers,
> ravi
> --
> View this message in context:
> http://www.nabble.com/Setting-HTML-form-parameters-to-Custom-classes-%28not-action-support%29-tp17201248p17201248.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)
>
>


--
Jim Kiley
Technical Consultant | Summa
[p] 412.258.3346 [m] 412.445.1729
http://www.summa-tech.com

Attachment: user_186374.ezm (zipped)

Team,

any help??? now i configured the validation, workflow interceptors in my xml
file. I see an error for this field variable.

I tried configuring the converter... but as always its also failing...

< actionclass>-conversion.properties:
mapOfList=com.company.CustomMapConverter
Element_mapOfList=java.util.ArrayList
Key_mapOfList=java.lang.string

I see a weird behavior: only the convertToString() function being called...

had any body fixed such issues???

please help

cheers,
ravi


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


Attachment: user_186375.ezm (zipped)
i downloaded the 2.0.5 version of tiles, and i see the same issue....
seems to be a pretty severe limitation of tiles....

- darren.

Antonio Petrelli wrote:
> 2008/5/12 Darren James <jdjames@(protected)>:
>  
>> struts 2.0.11, and the tiles bundled with that version, which is tiles 2.0.4
>>  
>
> Please try updating to Tiles 2.0.5:
> http://tiles.apache.org/download.html
>
> Antonio
>
> ---------------------------------------------------------------------
> To unsubscribe, e-mail: user-unsubscribe@(protected)
> For additional commands, e-mail: user-help@(protected)
>
>  

Attachment: user_186376.ezm (zipped)
2008/5/13 Darren James <jdjames@(protected)>:
> i downloaded the 2.0.5 version of tiles, and i see the same issue....
> seems to be a pretty severe limitation of tiles....

It's not a limitation, it's a bug :-)
https://issues.apache.org/struts/browse/TILES-232

Try using the SVN version of Tiles (branch: TILES_2_0_X):
http://svn.apache.org/repos/asf/tiles/framework/branches/TILES_2_0_X/
Or you can use the 2.0.6 snapshots:
http://people.apache.org/repo/m2-snapshot-repository/org/apache/tiles/

Antonio

Attachment: user_186377.ezm (zipped)
I¹m getting an error after uploading a file. Which manifests itself in my
redirect action.

I¹m using a simple post redirect pattern, where the file upload action
redirects to a separate fileList action.

After successfully uploading the file the browser is redirected to the
appropriate action, but Tomcat throws a
³ the request was rejected because its size is unknown ³ exception. If I
call the offending action from the browser it works fine.

Here¹s the relevant snippet from my struts.xml file:

    <action name="uploadFile" class="uploadFile">
       <result name="input">/WEB-INF/cms/formFile.jsp</result>
        <result name="success" type="redirect-action">
          <param name="actionName">getFile</param>
          <param name="namespace">/cms</param>
       </result>
    </action>


Any ideas would be appreciated.

Z.

Attachment: user_186378.ezm (zipped)

Hallo,

I'm new to struts so this may be a simple question for experts...

I started developing a classical webapp: Header and Menu on top, navigation
on the left side and details on the right side. When the user selects an
item in the navigation, the detail is displayed on the right side.

Depending on the detail, the user now can navigate and open the edit dialog
for the detail. The edit dialog should replace the detail. The user press
the save or cancel button on the edit dialog an show be redirected to the
detail again.
Depending on the detail and the user action, the header, menu and / or
navigation can change.

I want to only relaod the parts of the page that need to be changed maybe
using AJAX.

So far I use Struts 2.1.2 and Tiles 2.0.5.
But I could not find out how to "fill" tiles-definition with the action and
parameters from the navigation
How can I do this?

What is best practise for my problem?
How do you solve this?


Thanks for your help!
--
Sent from the Struts - User mailing list archive at Nabble.com.


Attachment: user_186381.ezm (zipped)
Hi,

Check out the login-interceptor in Mail-Reader application given on Planet
Struts. I found it useful. I think you are also looking for the same.
http://www.planetstruts.org/struts2-mailreader/Tour.do

(The application may be down sometimes, you can refer to cached pages in
Google search for the same.)

-Rushikesh

On Mon, May 12, 2008 at 1:35 PM, Laurie Harper <laurie@(protected):

> Acegi / Spring Security can certainly get this done, but may be overkill
> if the authentication and authorization requirements are simple. Container
> Managed Security is probably the quickest and easiest way to get the
> described behaviour, but that also doesn't always fit. For a home-brewed
> custom solution a Struts2 interceptor or simply a servlet filter will give
> more flexibility.
>
> So, the answer is yes, this can be achieved using interceptors. What
> specifically do you need help with?
>
> L.
>
>
> Jim Kiley wrote:
>
> > I wouldn't implement it with interceptors so much as I'd look into
> > something
> > like Acegi Security (now Spring Security if I remember right). I'm
> > having a
> > decent level of success on an Acegi / Sitemesh / Struts 2 / Spring /
> > Hibernate project right now.
> >
> > jk
> >
> > On Fri, May 9, 2008 at 6:01 PM, Jaarthy <aarthyjava@(protected):
> >
> > Hi,
> > >
> > > I'm trying to implement a scenario in which if the user who has not
> > > logged
> > > in clicks on a page "for logged in users only" should be
> > > redirected to "login page", and then after logging in he should be
> > > redirected to the page he originally requested for.
> > >
> > > I need to implement this in struts2.Can I achieve this using
> > > Interceptors?Kindly help.
> > >
> > > Thanks,
> > > Aarthy
> > >
> > > --
> > > View this message in context:
> > >
> > > http://www.nabble.com/redirect-after-logging-in-tp17157183p17157183.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)
> > >
> > >
> > >
> >
> >
>
> ---------------------------------------------------------------------
> To unsubscribe, e-mail: user-unsubscribe@(protected)
> For additional commands, e-mail: user-help@(protected)
>
>

Attachment: user_186382.ezm (zipped)
Hi,
first I'll ask again my earlier question, is there possibility to show in a combo box
two values, for example I want to show id and name of the every fruit: 1 Apple ?
The second question is, my struts 2 application on one jsp page will have 5 combo
boxes, 4 text boxes, two buttons and two datetime pickers, and below all these controls a table
that will show what is entered using controls above. The problem is that my table will have
about 100-120 records (rows) to show, and I think that is very much for one jsp page, and
also I want user to see about last 10 rows, because he need to see if there is any error.
How can I do this, can I use table pagination (how) ?
--
Thx in advance, Milan Milanovic


 

Attachment: user_186383.ezm (zipped)
I have to admit that in your first instance I would cheat -- I would dummy
up a method somewhere on my action class or my POJO that returned the
desired string, rather than trying to compose the string within the JSP.

I am unfamiliar with the various tags that can be used to display chunks of
a table. I know they're out there (the display tag library comes to mind).
The most recent time I had to do this I rolled my own; it was pretty
painless. I held the data in a List of data objects, and then used
List.subList() in my action method to determine the precise chunk of the
List that I wanted to show.

Hope this helps.

jk

On Tue, May 13, 2008 at 9:30 AM, Milan Milanovic <milanmilanovich@(protected)>
wrote:

> Hi,
> first I'll ask again my earlier question, is there possibility to show in
> a combo box
> two values, for example I want to show id and name of the every fruit: 1
> Apple ?
> The second question is, my struts 2 application on one jsp page will have
> 5 combo
> boxes, 4 text boxes, two buttons and two datetime pickers, and below all
> these controls a table
> that will show what is entered using controls above. The problem is that
> my table will have
> about 100-120 records (rows) to show, and I think that is very much for
> one jsp page, and
> also I want user to see about last 10 rows, because he need to see if
> there is any error.
> How can I do this, can I use table pagination (how) ?
> --
> Thx in advance, Milan Milanovic
>
>
>




--
Jim Kiley
Technical Consultant | Summa
[p] 412.258.3346 [m] 412.445.1729
http://www.summa-tech.com

Attachment: user_186387.ezm (zipped)
Thanks Jim!
Could you give me an example for the second thing (pagination) ? I need something
simple as you said.
For combo box, how can I tell my combobox to retrieve data from list of composed
strings (e.g. List<String> where I will compose "1 Apple"), but when selected to choose
in my action class from list of Fruits, e.g. List<Fruit>, where Fruit have id and name attributes ? 
--
Thx, Milan Milanovic


----- Original Message ----
From: Jim Kiley <jhkiley@(protected)>
To: Struts Users Mailing List <user@(protected)>
Sent: Tuesday, May 13, 2008 3:34:58 PM
Subject: Re: [struts 2] Table question

I have to admit that in your first instance I would cheat -- I would dummy
up a method somewhere on my action class or my POJO that returned the
desired string, rather than trying to compose the string within the JSP.

I am unfamiliar with the various tags that can be used to display chunks of
a table.  I know they're out there (the display tag library comes to mind).
The most recent time I had to do this I rolled my own; it was pretty
painless.  I held the data in a List of data objects, and then used
List.subList() in my action method to determine the precise chunk of the
List that I wanted to show.

Hope this helps.

jk

On Tue, May 13, 2008 at 9:30 AM, Milan Milanovic <milanmilanovich@(protected)>
wrote:

> Hi,
> first I'll ask again my earlier question, is there possibility to show in
> a combo box
> two values, for example I want to show id and name of the every fruit: 1
> Apple ?
> The second question is, my struts 2 application on one jsp page will have
> 5 combo
> boxes, 4 text boxes, two buttons and two datetime pickers, and below all
> these controls a table
> that will show what is entered using controls above. The problem is that
> my table will have
> about 100-120 records (rows) to show, and I think that is very much for
> one jsp page, and
> also I want user to see about last 10 rows, because he need to see if
> there is any error.
> How can I do this, can I use table pagination (how) ?
> --
> Thx in advance, Milan Milanovic
>
>
>




--
Jim Kiley
Technical Consultant | Summa
[p] 412.258.3346 [m] 412.445.1729
http://www.summa-tech.com




Attachment: user_186384.ezm (zipped)
Hi,

I'm facing a problem when I'm using a Struts form with client validation on a jsp page which is remotely fetch from a <sx:div>. This div is a tabpanel inside a <s:tabbedpanel> tabcontainer. When the form is submitted the following error displays inside the sx:div: 'ReferenceError: validateForm_saveProducer is not defined' (Firefox). The code is displayed below (Struts 2.1.2):

-- editProducer.jsp --

<s:form action="saveProducer" validate="true">
    <s:hidden name="producer.producerId" />
    <s:textfield key="producer.name" name="producer.name" />
    ...

    <sx:submit value="%{getText('button.save')}" targets="producerTab" />
</s:form>


-- mainPage.jsp with tabbedpanel --

<sx:tabbedpanel id="mainTabMenu">
    <s:url id="editProducer" action="editProducer" includeParams="none"/>
    <sx:div id="producerTab" href="%{editProducer}" />
</sx:tabbedpanel>


It looks like the validation script is not included when the jsp page is fetched remotely from the struts div tag. The problem occurs on both Struts version 2.0.11.1 and 2.1.2. Adding the executeScripts="true" and separateScripts="true" to the sx:div also has no effect. Any ideas!?

- Håken

Attachment: user_186385.ezm (zipped)
Hi
I have a problem with Struts 2.
I am looking for a way to access httpsession id?

I have tried using ActionContext.getContext().getSession().get("id") but it
returns null. i 've read there is a possibility to use Servlet Config
Interceptor<http://www.opensymphony.com/webwork/wikidocs/Servlet%20Config%20Interceptor.html>
but i would not like to do it.

Any help

milo

Attachment: user_186386.ezm (zipped)
I have one more question about this, if I define two <s:forms> in one page would
they work with the same action class ?

--
Thx, Milan Milanovic
----- Original Message ----
From: Jim Kiley <jhkiley@(protected)>
To: Struts Users Mailing List <user@(protected)>
Sent: Monday, May 12, 2008 6:15:07 PM
Subject: Re: [struts 2] Two forms for one action

Milan,

I'm not a Struts 1 guy, so this advice might not be useful to you (because
you didn't say whether this was a Struts 1 or 2 situation). But in my Struts
2 app I have plenty of places where I have multiple <s:submit> buttons each
triggering different action methods on the same action class.

jk


On Mon, May 12, 2008 at 12:10 PM, Milan Milanovic <milanmilanovich@(protected)>
wrote:

> Or maybe I should define two submit buttons for the same form and action
> class ?
> --
> Regards, Milan
>
>
> ----- Original Message ----
> From: Milan Milanovic <milanmilanovich@(protected)>
> To: Struts Users Mailing List <user@(protected)>
> Sent: Monday, May 12, 2008 5:57:50 PM
> Subject: [struts 2] Two forms for one action
>
> Hi,
> I need to have classic master/detail jsp page, so I need actually two
> forms in a jsp page to works with one action class,
> one main form that works with main elements of my object (e.g. User name,
> surname,...) for header and another one which works
> with some list that belongs to my main object (e.g., User.privileges)
> below such header part. How can I define this ?
> --
> Thx, Milan Milanovic
>
>
>
> ____________________________________________________________________________________
> Be a better friend, newshound, and
> know-it-all with Yahoo! Mobile.  Try it now.
> http://mobile.yahoo.com/;_ylt=Ahu06i62sR8HDtDypao8Wcj9tAcJ
>
>
>
>  ____________________________________________________________________________________
> Be a better friend, newshound, and
> know-it-all with Yahoo! Mobile.  Try it now.
> http://mobile.yahoo.com/;_ylt=Ahu06i62sR8HDtDypao8Wcj9tAcJ
>



--
Jim Kiley
Technical Consultant | Summa
[p] 412.258.3346 [m] 412.445.1729
http://www.summa-tech.com




Attachment: user_186388.ezm (zipped)
They could, if it were me I would have different methods on the action class
to handle the different forms if I were to do it this way. Personally I
would create an action class for each form.

Regards,
Randy Burgess
Sr. Web Applications Developer
Nuvox Communications



> From: Milan Milanovic <milanmilanovich@(protected)>
> Reply-To: Struts Users Mailing List <user@(protected)>
> Date: Tue, 13 May 2008 07:58:29 -0700 (PDT)
> To: Struts Users Mailing List <user@(protected)>
> Subject: Re: [struts 2] Two forms for one action
>
> I have one more question about this, if I define two <s:forms> in one page
> would
> they work with the same action class ?
>
> --
> Thx, Milan Milanovic
> ----- Original Message ----
> From: Jim Kiley <jhkiley@(protected)>
> To: Struts Users Mailing List <user@(protected)>
> Sent: Monday, May 12, 2008 6:15:07 PM
> Subject: Re: [struts 2] Two forms for one action
>
> Milan,
>
> I'm not a Struts 1 guy, so this advice might not be useful to you (because
> you didn't say whether this was a Struts 1 or 2 situation). But in my Struts
> 2 app I have plenty of places where I have multiple <s:submit> buttons each
> triggering different action methods on the same action class.
>
> jk
>
>
> On Mon, May 12, 2008 at 12:10 PM, Milan Milanovic <milanmilanovich@(protected)>
> wrote:
>
>> Or maybe I should define two submit buttons for the same form and action
>> class ?
>> --
>> Regards, Milan
>>
>>
>> ----- Original Message ----
>> From: Milan Milanovic <milanmilanovich@(protected)>
>> To: Struts Users Mailing List <user@(protected)>
>> Sent: Monday, May 12, 2008 5:57:50 PM
>> Subject: [struts 2] Two forms for one action
>>
>> Hi,
>> I need to have classic master/detail jsp page, so I need actually two
>> forms in a jsp page to works with one action class,
>> one main form that works with main elements of my object (e.g. User name,
>> surname,...) for header and another one which works
>> with some list that belongs to my main object (e.g., User.privileges)
>> below such header part. How can I define this ?
>> --
>> Thx, Milan Milanovic
>>
>>
>>
>> _____________________________________________________________________________
>> _______
>> Be a better friend, newshound, and
>> know-it-all with Yahoo! Mobile.  Try it now.
>> http://mobile.yahoo.com/;_ylt=Ahu06i62sR8HDtDypao8Wcj9tAcJ
>>
>>
>>
>>  
>> _____________________________________________________________________________
>> _______
>> Be a better friend, newshound, and
>> know-it-all with Yahoo! Mobile.  Try it now.
>> http://mobile.yahoo.com/;_ylt=Ahu06i62sR8HDtDypao8Wcj9tAcJ
>>
>
>
>
> --
> Jim Kiley
> Technical Consultant | Summa
> [p] 412.258.3346 [m] 412.445.1729
> http://www.summa-tech.com
>
>
>



This email and any attachments ("Message") may contain legally privileged and/or confidential information. If you are not the addressee, or if this Message has been addressed to you in error, you are not authorized to read, copy, or distribute it, and we ask that you please delete it (including all copies) and notify the sender by return email. Delivery of this Message to any person other than the intended recipient(s) shall not be deemed a waiver of confidentiality and/or a privilege.

Attachment: user_186389.ezm (zipped)
Thank you Randy.
>They could, if it were me I would have different methods on the action class
>to handle the different forms if I were to do it this way. Personally I
>would create an action class for each form.

No, I cannot do this, because both forms need to work with the same objects in
a action class. First form works with some header data, and the second with list
of data and show table also of such data.
I asked this, because I wasn't sure if both forms would call the same instance of
action class.
--
Thx, Milan Milanovic
----- Original Message ----
From: Randy Burgess <RBurgess@(protected)>
To: Struts Users Mailing List <user@(protected)>
Sent: Tuesday, May 13, 2008 5:09:19 PM
Subject: Re: [struts 2] Two forms for one action

They could, if it were me I would have different methods on the action class
to handle the different forms if I were to do it this way. Personally I
would create an action class for each form.

Regards,
Randy Burgess
Sr. Web Applications Developer
Nuvox Communications



> From: Milan Milanovic <milanmilanovich@(protected)>
> Reply-To: Struts Users Mailing List <user@(protected)>
> Date: Tue, 13 May 2008 07:58:29 -0700 (PDT)
> To: Struts Users Mailing List <user@(protected)>
> Subject: Re: [struts 2] Two forms for one action
>
> I have one more question about this, if I define two <s:forms> in one page
> would
> they work with the same action class ?
>
> --
> Thx, Milan Milanovic
> ----- Original Message ----
> From: Jim Kiley <jhkiley@(protected)>
> To: Struts Users Mailing List <user@(protected)>
> Sent: Monday, May 12, 2008 6:15:07 PM
> Subject: Re: [struts 2] Two forms for one action
>
> Milan,
>
> I'm not a Struts 1 guy, so this advice might not be useful to you (because
> you didn't say whether this was a Struts 1 or 2 situation). But in my Struts
> 2 app I have plenty of places where I have multiple <s:submit> buttons each
> triggering different action methods on the same action class.
>
> jk
>
>
> On Mon, May 12, 2008 at 12:10 PM, Milan Milanovic <milanmilanovich@(protected)>
> wrote:
>
>> Or maybe I should define two submit buttons for the same form and action
>> class ?
>> --
>> Regards, Milan
>>
>>
>> ----- Original Message ----
>> From: Milan Milanovic <milanmilanovich@(protected)>
>> To: Struts Users Mailing List <user@(protected)>
>> Sent: Monday, May 12, 2008 5:57:50 PM
>> Subject: [struts 2] Two forms for one action
>>
>> Hi,
>> I need to have classic master/detail jsp page, so I need actually two
>> forms in a jsp page to works with one action class,
>> one main form that works with main elements of my object (e.g. User name,
>> surname,...) for header and another one which works
>> with some list that belongs to my main object (e.g., User.privileges)
>> below such header part. How can I define this ?
>> --
>> Thx, Milan Milanovic
>>
>>
>>
>> _____________________________________________________________________________
>> _______
>> Be a better friend, newshound, and
>> know-it-all with Yahoo! Mobile.  Try it now.
>> http://mobile.yahoo.com/;_ylt=Ahu06i62sR8HDtDypao8Wcj9tAcJ
>>
>>
>>
>>  
>> _____________________________________________________________________________
>> _______
>> Be a better friend, newshound, and
>> know-it-all with Yahoo! Mobile.  Try it now.
>> http://mobile.yahoo.com/;_ylt=Ahu06i62sR8HDtDypao8Wcj9tAcJ
>>
>
>
>
> --
> Jim Kiley
> Technical Consultant | Summa
> [p] 412.258.3346 [m] 412.445.1729
> http://www.summa-tech.com
>
>
>



This email and any attachments ("Message") may contain legally privileged and/or confidential information.  If you are not the addressee, or if this Message has been addressed to you in error, you are not authorized to read, copy, or distribute it, and we ask that you please delete it (including all copies) and notify the sender by return email.  Delivery of this Message to any person other than the intended recipient(s) shall not be deemed a waiver of confidentiality and/or a privilege.




Attachment: user_186391.ezm (zipped)
Hi,
regarding multiple submit buttons for the same form, if I have <s:form ...> with
defined action (which is actually a method name in a action class), then my submit
button calls that method. But, how can I define another submit button that will call
another method of the same action class ?
--
Thx in advance, Milan
----- Original Message ----
From: Jim Kiley <jhkiley@(protected)>
To: Struts Users Mailing List <user@(protected)>
Sent: Monday, May 12, 2008 6:15:07 PM
Subject: Re: [struts 2] Two forms for one action

Milan,

I'm not a Struts 1 guy, so this advice might not be useful to you (because
you didn't say whether this was a Struts 1 or 2 situation). But in my Struts
2 app I have plenty of places where I have multiple <s:submit> buttons each
triggering different action methods on the same action class.

jk


On Mon, May 12, 2008 at 12:10 PM, Milan Milanovic <milanmilanovich@(protected)>
wrote:

> Or maybe I should define two submit buttons for the same form and action
> class ?
> --
> Regards, Milan
>
>
> ----- Original Message ----
> From: Milan Milanovic <milanmilanovich@(protected)>
> To: Struts Users Mailing List <user@(protected)>
> Sent: Monday, May 12, 2008 5:57:50 PM
> Subject: [struts 2] Two forms for one action
>
> Hi,
> I need to have classic master/detail jsp page, so I need actually two
> forms in a jsp page to works with one action class,
> one main form that works with main elements of my object (e.g. User name,
> surname,...) for header and another one which works
> with some list that belongs to my main object (e.g., User.privileges)
> below such header part. How can I define this ?
> --
> Thx, Milan Milanovic
>
>
>
> ____________________________________________________________________________________
> Be a better friend, newshound, and
> know-it-all with Yahoo! Mobile.  Try it now.
> http://mobile.yahoo.com/;_ylt=Ahu06i62sR8HDtDypao8Wcj9tAcJ
>
>
>
>  ____________________________________________________________________________________
> Be a better friend, newshound, and
> know-it-all with Yahoo! Mobile.  Try it now.
> http://mobile.yahoo.com/;_ylt=Ahu06i62sR8HDtDypao8Wcj9tAcJ
>



--
Jim Kiley
Technical Consultant | Summa
[p] 412.258.3346 [m] 412.445.1729
http://www.summa-tech.com




Attachment: user_186390.ezm (zipped)
Hi all,
I want to show a system requirements page according to the web page's
locale.
Can I use the tiles-defs.xml to do it or I need to write code in a jsp?
Thanks
©2008 gg3721.com - Jax Systems, LLC, U.S.A.