Author Login
Post Reply
user Digest 29 Jan 2008 16:43:39 -0000 Issue 7831
Topics (messages 181910 through 181939):
Re: AJAX approach
181910 by: Pablo Vázquez Blázquez
Re: Problem setting id property of texfield tag
181911 by: Julien RICHARD
181924 by: David Tercero
181925 by: David Tercero
181927 by: Dave Newton
181928 by: Dave Newton
181930 by: David Tercero
Re: Error messages is repeated Using Struts 2 Annotation validation
181912 by: Dave Newton
181921 by: David Tercero
Re: Where did the target attribute go in the a-tag?
181913 by: Dave Newton
181918 by: David Tercero
181919 by: David Tercero
181922 by: Dave Newton
181936 by: Laurie Harper
Struts2 2.0.11 Validation with DWR
181914 by: Julien RICHARD
browse old posts?
181915 by: Mazhar, Osman \(Home Office\)
181916 by: Julien RICHARD
181917 by: Dave Newton
How does one get the "validate" method to be called?
181920 by: specdev2
181923 by: Dave Newton
181929 by: specdev2
181931 by: Dave Newton
181934 by: specdev2
181937 by: Dave Newton
181938 by: specdev2
181939 by: specdev2
Re: [S2] Starter application in IE & Firefox
181926 by: Laurie Harper
Re: best way to handle multiple buttons in a form?
181932 by: Laurie Harper
just a simple onclick
181933 by: Chris Pat
181935 by: Dave Newton
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_181910.ezm (zipped)Hi Jeromy,
Thank you very much for your explanation. I know it was a big question.
Well, I liked your suggestion of having a function with 2 timestamps
(that´s what I had thougth about), but, for "external" reasons, it won´t
be so.
Now, I will have a controller action that will keep at session scope the
actual state (the whole collection) and, from client, periodically will
ask the model for the actual state and match previous state with the new
one. Then, I will get only the differences between them and convert them
to a json string, which will be returned by the action. In this json
string I will have the rows that have changed, including those that have
been deleted or created, so that I can update the table in the document.
I would like to ask you if you know wheter YUI table lets me filter,
order by column and paginate the table using AJAX (without refreshing
the page) or doing it client-side. I couldn´t take a look to it yet. Sorry.
Thanks.
Jeromy Evans escribió:
> Hi,
>
> You're asking a big question. What follows is the approach I would
> take. There's many other approaches you could also try and my
> solution may be too javascript-centric for you.
>
> First, the interface is stateless, so I'd probably have my action
> always accept two timestamp parameters and always output the changes
> that occurred between the start timestamp and end timestamp. If the
> start timestamp is null you want all data. If the end timestamp is
> null you want most recent.
> This would simplify the action down to the single responsibility of
> providing the difference in the data between the start and end timestamp.
> If your data changes against something other than time, such as
> revision number, then use that as the arguments.
> The table data will need to be decorated with information about the
> timestamp/revision.
> I would output the data as JSON or XML, not HTML.
>
> The client (javascript) maintains the state for your user. It knows
> whether its loaded data yet, the timestamp/revision of the current
> data and controls when to get an update (periodically or triggered).
> I would use a javascript library that includes an ajax datagrid.
> That's a fancy name for a table that can update its data
> asynchronously. My favourite is YUI
> (http://developer.yahoo.com/yui/datatable/) but there are plenty
> available.
> Whatever the implementation, the datagrid will include a data model
> that contains the table data (eg. a RecordSet in YUI) and includes
> methods for updating the table model dynamically. If you ever used
> Swing, they generally work like Swing's TableModel.
>
> Your responsibility will be to map the changed data into the
> datagrid's model. As the current state and data is in memory (eg. in
> the RecordSet) and the changed data is available from your action's
> result (eg. in XML or a JSON structure) you can iterate through the
> changes and apply each them to the model. As the model is changed, the
> library will update the UI.
>
> Hope that gives you some direction.
> regards,
> Jeromy Evans
>
> pvazquez@(protected):
>> Hi!
>>
>> I would like to comment you a problem I have now when developing a
>> web application using Struts 2.
>>
>> I have a collection of items, which I want to show in a table. Those
>> items have some attributes that change with the time and I would like
>> to show the updated state in the view layer. I don´t know very well
>> how to achieve this. I suppose I must be polling the web server and
>> getting the whole collection each time, but this collection may be
>> huge, so I don´t think it would be a nice approach. What I would like
>> most would be changing only those attributes that changed from the
>> last polling.
>>
>> Supposing that I have an action at the model layer that returns me a
>> collection with only those item that have changed (the first time it
>> must return me the whole items), (or maybe, I could have 2 actions:
>> one for ask if sth has changed and another one to retrieve the whole
>> collection -if sth has changed-), how can I modify the HTML to update
>> the shown content? Could I convert the item's collection in the
>> controller action to JSON and retrieve it in the jspx? It is, call
>> this controller action directly from javascript? Is there an easier
>> way to do this using Struts2 or do I have to use "AJAX raw"?
>>
>> To sum up:
>> controller action -> model action -> returns collection<Item> ->
>> controller action returns jspx where I draw the table. Now how do I
>> update this table? The easy way would be using an s:div tag with
>> href="action" and a timer to update it, but it would involve update
>> the whole table.
>>
>> Any help would be grateful.
>>
>> Thanks.
>>
>>
>> ----------------------------------------------------------------
>> http://www.denodo.com
>>
>> Aviso Legal
>> Este mensaje es solamente para la persona a la que va dirigido.
>> Sus contenidos y cualquier archivo adjunto son confidenciales.
>> Si usted lo ha recibido por error, le rogamos que lo borre y
>> lo notifique a postmaster@(protected).
>> Gracias.
>>
>> Legal Notice
>> This message is intended for the addressee only and its contents
>> and any attached files are strictly confidential.
>> If you have received it in error, please remove this mail and
>> contact postmaster@(protected).
>> Thank you.
>>
>>
>> ---------------------------------------------------------------------
>> 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_181911.ezm (zipped)Do you tried :
<s:textfield id="stockTotal_%{house.id}" value="%{house.number}"/>
On Jan 29, 2008 12:32 PM, David Tercero <dtercero@(protected):
>
> Hi all,
>
> I'm having troubles setting the id property in a textfield tag. I use
> the version 2.0.11
>
> The case is I'm not able to introduce a variable value into the id
> property, I mean:
>
> <s:textfield>
> <s:param name="id">stockTotal_${house.id}</s:param>
> <s:param name="name">stockList[${house.id}].number</s:param>
> <s:param name="value">${house.number}</s:param>
> </s:textfield>
>
> I generate several textfields like this one and I need to reference it
> in
> javascript (that's because i need to set the id property). Using the param
> tag doesn't work for the id, but goes right for the name and value
> propertys.
>
> I tried several ways but none of them seems to work.
>
> Any help would be appreciated.
> --
> View this message in context:
> http://www.nabble.com/Problem-setting-id-property-of-texfield-tag-tp15157521p15157521.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)
>
>
--
RICHARD Julien,
UNILOG

Attachment:
user_181924.ezm (zipped)
Hi, thanks for the anwer.
It is a bit complicated, because house.id is not in the value stack but
in the page context. I use JSTL tag to complement the struts ones, so
sometimes the property is in the page context.
With the version 2.0.9 you could use the ${} expressions (Expression
Language), but not in the 2.0.11. Recently I updated my application from
2.0.9 to 2.0.11, and realized s: tags with EL expressions caused an
exception.
I can't reference house.id as an OGNL expression because house is not in
the stack value. The main problem seems to be I can't give the id property a
value using the s:param tag, what it's not exposed in the struts2
documentation.
I've tested something simillar
<s:set name="tmpId"><s:param
name="value">stockTotal_${house.id}</s:param></s:set>
<s:textfield id="stockTotal_%{#tmpId}" value=.../>
but this generate a dump of the value stack (like toString method):
id="stockTotal_{..... valueStack dump .....}
Thanks in advance.
Julien RICHARD-2 wrote:
>
> Do you tried :
>
> <s:textfield id="stockTotal_%{house.id}" value="%{house.number}"/>
>
> On Jan 29, 2008 12:32 PM, David Tercero <dtercero@(protected):
>
>>
>> Hi all,
>>
>> I'm having troubles setting the id property in a textfield tag. I use
>> the version 2.0.11
>>
>> The case is I'm not able to introduce a variable value into the id
>> property, I mean:
>>
>> <s:textfield>
>> <s:param name="id">stockTotal_${house.id}</s:param>
>> <s:param name="name">stockList[${house.id}].number</s:param>
>> <s:param name="value">${house.number}</s:param>
>> </s:textfield>
>>
>> I generate several textfields like this one and I need to reference it
>> in
>> javascript (that's because i need to set the id property). Using the
>> param
>> tag doesn't work for the id, but goes right for the name and value
>> propertys.
>>
>> I tried several ways but none of them seems to work.
>>
>> Any help would be appreciated.
>> --
>> View this message in context:
>> http://www.nabble.com/Problem-setting-id-property-of-texfield-tag-tp15157521p15157521.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)
>>
>>
>
>
> --
> RICHARD Julien,
> UNILOG
>
>
--
Sent from the Struts - User mailing list archive at Nabble.com.

Attachment:
user_181925.ezm (zipped)
Hi, thanks for the anwer.
It is a bit complicated, because house.id is not in the value stack but
in the request. I use JSTL tag to complement the struts ones, so sometimes
the property is in the request.
With the version 2.0.9 you could use the ${} expressions (Expression
Language), but not in the 2.0.11. Recently I updated my application from
2.0.9 to 2.0.11, and realized s: tags with EL expressions caused an
exception.
I can't reference house.id as an OGNL expression because house is not in
the stack value. The main problem seems to be I can't give the id property a
value using the s:param tag, what it's not exposed in the struts2
documentation.
I've tested something simillar
<s:set name="tmpId" scope="request"><s:param
name="value">stockTotal_${house.id}</s:param></s:set>
<s:textfield id="stockTotal_%{#tmpId}" value=.../>
but this generate a dump of the value stack (like toString method):
id="stockTotal_{..... valueStack dump .....}
Thanks in advance.
Julien RICHARD-2 wrote:
>
> Do you tried :
>
> <s:textfield id="stockTotal_%{house.id}" value="%{house.number}"/>
>
> On Jan 29, 2008 12:32 PM, David Tercero <dtercero@(protected):
>
>>
>> Hi all,
>>
>> I'm having troubles setting the id property in a textfield tag. I use
>> the version 2.0.11
>>
>> The case is I'm not able to introduce a variable value into the id
>> property, I mean:
>>
>> <s:textfield>
>> <s:param name="id">stockTotal_${house.id}</s:param>
>> <s:param name="name">stockList[${house.id}].number</s:param>
>> <s:param name="value">${house.number}</s:param>
>> </s:textfield>
>>
>> I generate several textfields like this one and I need to reference it
>> in
>> javascript (that's because i need to set the id property). Using the
>> param
>> tag doesn't work for the id, but goes right for the name and value
>> propertys.
>>
>> I tried several ways but none of them seems to work.
>>
>> Any help would be appreciated.
>> --
>> View this message in context:
>> http://www.nabble.com/Problem-setting-id-property-of-texfield-tag-tp15157521p15157521.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)
>>
>>
>
>
> --
> RICHARD Julien,
> UNILOG
>
>
--
Sent from the Struts - User mailing list archive at Nabble.com.

Attachment:
user_181927.ezm (zipped)From: David Tercero <dtercero@(protected)>
> It is a bit complicated, because house.id is not in the value
> stack but in the page context.
The "#attr" expression will search the various JEE scopes, so the OGNL expression "#attr.house.id" should find the "house.id" value in page scope.
http://struts.apache.org/2.x/docs/ognl.html
Dave

Attachment:
user_181928.ezm (zipped)From: David Tercero <dtercero@(protected)>
> It is a bit complicated, because house.id is not in the value
> stack but in the request.
...
#attr will also search the request scope.
Dave

Attachment:
user_181930.ezm (zipped)
Hi, it works fine :clap:, Dave you are a crack ;-)
Thank you very much =)
newton.dave wrote:
>
> From: David Tercero <dtercero@(protected)>
>> It is a bit complicated, because house.id is not in the value
>> stack but in the request.
>
>
> ...
>
>
> #attr will also search the request scope.
>
>
> Dave
>
>
>
>
> ---------------------------------------------------------------------
> 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_181912.ezm (zipped)--- Johnson nickel <saravanan@(protected):
>
@RequiredFieldValidator(type=ValidatorType.SIMPLE,fieldName="username",message="UserName
> is required")
For a string field you'll probably want to use the @RequiredStringValidator:
a text field will return an empty string, whereas @RequiredFieldValidator
only checks for null-ness (different from blank-ness).
> Same as For password also ,
*Exactly* the same? (You put the right "fieldName" for the password field,
right?)
> When i have submit the Login button, the Error messages is displaying
Repeated.
You'll need to provide some JSP and possibly configuration in order to help
diagnose the problem.
Where are the duplicated messages appearing?
Dave

Attachment:
user_181921.ezm (zipped)
Hi,
Something simillar happens to me when i started with Struts 2. I use
appfuse and I realized that a message displays just above the field I'd
validated, and where I included a messages.jsp (this jsp displays the action
and error messages), usually at the top of the html page.
To solve this I supressed the field messages (those that are displayed
above the field) rewriting the tag templates. Struts gives you the chance to
override the templates they provide. I created a tree at WEB-INF level just
like they are in the struts2-core library (template/css_xhtml/...). The
files you put there will overwrite the Struts2 ones, and change the default
behaviour of the tags.
Regards.
Johnson nickel wrote:
>
> Hi Friends,
>
> I am using Struts 2 application for my project. Before I was used Struts 1
> when compare to this
>
> Struts 2 is reduced lot of configuration problems. I have use the
> Annotation validation to validate the
> Username and password fields in my Login page.
>
> Code:
>
>
> @RequiredFieldValidator(type=ValidatorType.SIMPLE,fieldName="username",message="UserName
> is required")
> public String getUsername() {
> return username;
> }
>
>
>
> Same as For password also ,
>
> When i have submit the Login button, the Error messages is displaying
> Repeated. I have spend lot of time
> on this issue. Can u anybody give me the solution.
>
> Thanks and Regards,
> Johnson
>
--
Sent from the Struts - User mailing list archive at Nabble.com.

Attachment:
user_181913.ezm (zipped)----- Original Message ----
> From: niels <nielssiem@(protected)>
> To: Struts Users Mailing List <user@(protected)>
> Sent: Tuesday, January 29, 2008 8:00:16 AM
> Subject: Re: Where did the target attribute go in the a-tag?
>
> David,
>
> I don't understand what you mean by "anchor"
> imagine the next situation.
<s:url action="foo" id="fooUrl"/>
<a href="<s:property value='#fooUrl'/>" target="_blank">...</a>
Dave

Attachment:
user_181918.ezm (zipped)
If you do that, the url will be printed on the html page. You can put it all
together:
<s:url action= " target="_blank">...
You can use a html anchor ( .... ), and use the s:url tag to provide the
url. This is the way I usually code the links in my web applications.
Regards.
newton.dave wrote:
>
> ----- Original Message ----
>> From: niels <nielssiem@(protected)>
>> To: Struts Users Mailing List <user@(protected)>
>> Sent: Tuesday, January 29, 2008 8:00:16 AM
>> Subject: Re: Where did the target attribute go in the a-tag?
>>
>> David,
>>
>> I don't understand what you mean by "anchor"
>> imagine the next situation.
>
>
> <s:url action="foo" id="fooUrl"/>
> "<s:property value='#fooUrl' " target="_blank">...
>
>
> Dave
>
>
>
>
> ---------------------------------------------------------------------
> 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_181919.ezm (zipped)
If you do that, the url will be printed on the html page. You can put it all
together:
<a href="<s:url action="foo" id="fooUrl"/>"
target="_blank">...</a>
You can use a html anchor (<a href=....>), and use the s:url tag to
provide the url. This is the way I usually code the links in my web
applications.
Regards.
newton.dave wrote:
>
> ----- Original Message ----
>> From: niels <nielssiem@(protected)>
>> To: Struts Users Mailing List <user@(protected)>
>> Sent: Tuesday, January 29, 2008 8:00:16 AM
>> Subject: Re: Where did the target attribute go in the a-tag?
>>
>> David,
>>
>> I don't understand what you mean by "anchor"
>> imagine the next situation.
>
>
> <s:url action="foo" id="fooUrl"/>
> "<s:property value='#fooUrl' " target="_blank">...
>
>
> Dave
>
>
>
>
> ---------------------------------------------------------------------
> 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_181922.ezm (zipped)David Tercero wrote:
> Dave Newton wrote:
>> <s:url action="foo" id="fooUrl"/>
> If you do that, the url will be printed on the html page.
No it won't.
I prefer this method primarily for <s:a...> tags since I can avoid using the <s:property.../> tag for <s:a...>'s "href" attribute (if I use JSP EL I can avoid <s:property.../> for <a...> as well) since <s:a...> will evaluate "href":
<s:url action="foo" id="fooUrl"/>
<s:a href="%{#fooUrl}">...</s:a>
Dave

Attachment:
user_181936.ezm (zipped)niels wrote:
> There is no target attribute in de a-tag:
> http://struts.apache.org/2.x/docs/a.html
Correct, there isn't such an attribute. The Struts 2.0.9 documentation
for that tag lists a 'targets' attribute, but that's related to the Ajax
theme and doesn't do what you're looking for.
> I am a newbie, and want to open de link in another (specified) browser
> window..
>
> How to overcome this?
Dave's solution (using a vanilla <a> tag) is the correct way to do this.
L.

Attachment:
user_181914.ezm (zipped)I need some help with DWR.
I have find and follow an example of utilisation of DWR for struts2
validation.
this link : http://java-x.blogspot.com/2006/11/struts-2-validation.html
Im really new about DWR and this example doesn't work for me. I think DWR is
the correct way for me to ckeck my form in ajax but this example make null
execption and not working.
If someone have some times to help me for my first step in DWR, will be
appreciated ;)
Regards,
--
RICHARD Julien,

Attachment:
user_181915.ezm (zipped)Hello,
Before I start asking questions, I wanted to know if there is a way to
browse existing posts to see if my questions have already been answered.
So, is there a way to look at old posts?
- Osman
______________________________________________________________________
This e-mail has been scanned by The Leukemia & Lymphoma Society Managed Email Content Service, provided by Verizon Business.
NOTICE: This message, including all attachments transmitted with it, is for the use of the addressee only. It may contain proprietary, confidential and/or legally privileged information. No confidentiality or privilege is waived or lost by any mistransmission. If you are not the intended recipient, you must not, directly or indirectly, use, disclose, distribute, print or copy any part of this message. If you believe you have received this message in error, please delete it and all copies of it from your system and notify the sender immediately by reply e-mail. Thank you.

Attachment:
user_181916.ezm (zipped)Will be usefull for me too.
Thanks.
On Jan 29, 2008 3:31 PM, Mazhar, Osman (Home Office) <Osman.Mazhar@(protected)>
wrote:
> Hello,
>
>
>
> Before I start asking questions, I wanted to know if there is a way to
> browse existing posts to see if my questions have already been answered.
>
>
>
> So, is there a way to look at old posts?
>
>
>
> - Osman
>
>
> ______________________________________________________________________
> This e-mail has been scanned by The Leukemia & Lymphoma Society Managed
> Email Content Service, provided by Verizon Business.
>
> NOTICE: This message, including all attachments transmitted with it, is
> for the use of the addressee only. It may contain proprietary, confidential
> and/or legally privileged information. No confidentiality or privilege is
> waived or lost by any mistransmission. If you are not the intended
> recipient, you must not, directly or indirectly, use, disclose, distribute,
> print or copy any part of this message. If you believe you have received
> this message in error, please delete it and all copies of it from your
> system and notify the sender immediately by reply e-mail. Thank you.
>
>
--
RICHARD Julien,
UNILOG

Attachment:
user_181917.ezm (zipped)http://struts.apache.org/mail.html
There are about a half-dozen archives listed there.
Dave
----- Original Message ----
> From: "Mazhar, Osman (Home Office)" <Osman.Mazhar@(protected)>
> To: user@(protected)
> Sent: Tuesday, January 29, 2008 9:31:42 AM
> Subject: browse old posts?
>
> Hello,
>
>
>
> Before I start asking questions, I wanted to know if there is a way to
> browse existing posts to see if my questions have already
> been
>
answered.
>
>
>
> So, is there a way to look at old posts?
>
>
>
> - Osman
>
>
> ______________________________________________________________________
> This e-mail has been scanned by The Leukemia & Lymphoma Society
> Managed
>
Email Content Service, provided by Verizon Business.
>
> NOTICE: This message, including all attachments transmitted with it,
> is
>
for the use of the addressee only. It may contain
> proprietary,
>
confidential and/or legally privileged information. No confidentiality
> or
>
privilege is waived or lost by any mistransmission. If you are not
> the
>
intended recipient, you must not, directly or indirectly, use,
> disclose,
>
distribute, print or copy any part of this message. If you believe
> you
>
have received this message in error, please delete it and all copies
> of
>
it from your system and notify the sender immediately by reply
> e-mail.
>
Thank you.
>
>

Attachment:
user_181920.ezm (zipped)
Hi,
My action is extending ActionSupport and overriding the "validate" method.
However, the validate method is not being called.
I have set the form tag validate attribute to true, but it makes no
difference.
What am I missing?
Thanks.
--
Sent from the Struts - User mailing list archive at Nabble.com.

Attachment:
user_181923.ezm (zipped)specdev2 <fraak72@(protected):
> My action is extending ActionSupport and overriding the
> "validate" method. However, the validate method is not
> being called.
1. Are you using the default interceptor stack?
2. Have you configured any interceptors for the action in question?
> I have set the form tag validate attribute to true, but
> it makes no difference.
<s:form...>'s "validate" attribute does not control server-side validation (unless you're using the "ajax" theme, I guess).
Dave

Attachment:
user_181929.ezm (zipped)
Thanks Dave.
In fact, my problem relate to an interceptor stack problem.
If I use the defautStack, it works.
But if I do the following it does not:
<action name="toHtml" method="toHtml"
class="com.tchegbe.demo.action.ToHtmlActions">
<interceptor-ref name="servletConfig"/>
<interceptor-ref name="fileUpload"/>
<interceptor-ref name="params"/>
<interceptor-ref name="validation"/>
<result>toHtmlUtilityViewDef</result>
</action>
newton.dave wrote:
>
> specdev2 <fraak72@(protected):
>> My action is extending ActionSupport and overriding the
>> "validate" method. However, the validate method is not
>> being called.
>
>
> 1. Are you using the default interceptor stack?
> 2. Have you configured any interceptors for the action in question?
>
>
>> I have set the form tag validate attribute to true, but
>> it makes no difference.
>
>
> <s:form...>'s "validate" attribute does not control server-side validation
> (unless you're using the "ajax" theme, I guess).
>
>
> Dave
>
>
>
>
> ---------------------------------------------------------------------
> 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_181931.ezm (zipped)From: specdev2 <fraak72@(protected)>
> In fact, my problem relate to an interceptor stack problem.
> If I use the defautStack, it works.
> But if I do the following it does not:
> <action name="toHtml" method="toHtml"
> class="com.tchegbe.demo.action.ToHtmlActions">
> <interceptor-ref name="servletConfig"/>
> <interceptor-ref name="fileUpload"/>
> <interceptor-ref name="params"/>
> <interceptor-ref name="validation"/>
> <result>toHtmlUtilityViewDef</result>
> </action>
That's because you're leaving out some of the normal interceptors; see [1] for more information about (a) what's in the default stack and (b) what those interceptors do.
Why not just use the default interceptor stack?
Dave
[1] http://struts.apache.org/2.x/docs/interceptors.html

Attachment:
user_181934.ezm (zipped)
This is the default stack:
<interceptor-stack name="defaultStack">
<interceptor-ref name="exception"/>
<interceptor-ref name="alias"/>
<interceptor-ref name="servletConfig"/>
<interceptor-ref name="prepare"/>
<interceptor-ref name="i18n"/>
<interceptor-ref name="chain"/>
<interceptor-ref name="debugging"/>
<interceptor-ref name="profiling"/>
<interceptor-ref name="scopedModelDriven"/>
<interceptor-ref name="modelDriven"/>
<interceptor-ref name="fileUpload"/>
<interceptor-ref name="checkbox"/>
<interceptor-ref name="staticParams"/>
<interceptor-ref name="params">
dojo\..*
</interceptor-ref>
<interceptor-ref name="conversionError"/>
<interceptor-ref name="validation">
input,back,cancel,browse
</interceptor-ref>
<interceptor-ref name="workflow">
input,back,cancel,browse
</interceptor-ref>
</interceptor-stack>
There is just no logical reason as to why my stack would not work.
Again, here is my stack:
<action name="toHtml" method="toHtml"
class="com.tchegbe.demo.action.ToHtmlActions">
<interceptor-ref name="servletConfig"/>
<interceptor-ref name="fileUpload"/>
<interceptor-ref name="params"/>
<interceptor-ref name="validation"/>
<result name="input">toHtmlUtilityViewDef</result>
</action>
servletConfig, fileUpload, and params are called just fine.
--
Sent from the Struts - User mailing list archive at Nabble.com.

Attachment:
user_181937.ezm (zipped)From: specdev2 <fraak72@(protected)>
> There is just no logical reason as to why my stack would not work.
Oh.
> Again, here is my stack:
What evidence do you have that your validate() method isn't being called?
Dave

Attachment:
user_181938.ezm (zipped)
I also have this:
<interceptors>
<interceptor-stack name="emptyStack">
<interceptor-ref name="empty"/>
</interceptor-stack>
</interceptors>
<default-interceptor-ref name="emptyStack"/>
So:
1. I override the default stack.
2. I specify the exact interceptor(s) I need per action.
This is to avoid useless processing.
There is a fix in the work (a dtd fix) that will enable me to have a truely
empty stack.
Currently, the dtd forces you to define at least one interceptor whereas
there is no requirement to have an interceptor in a given stack.
--
Sent from the Struts - User mailing list archive at Nabble.com.

Attachment:
user_181939.ezm (zipped)
A break point in debug mode.
Again, I get to the break point if I use the default stack as follow:
<action name="toHtml" method="toHtml"
class="com.tchegbe.demo.action.ToHtmlActions">
<interceptor-ref name="defaultStack"/>
<result name="input">toHtmlUtilityViewDef</result>
</action>
newton.dave wrote:
>
> From: specdev2 <fraak72@(protected)>
>> There is just no logical reason as to why my stack would not work.
>
>
> Oh.
>
>
>> Again, here is my stack:
>
>
> What evidence do you have that your validate() method isn't being called?
>
>
> Dave
>
>
>
>
> ---------------------------------------------------------------------
> 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_181926.ezm (zipped)hezjing wrote:
> Hi
>
> I created Struts2 starter application as shown below,
>
> mvn archetype:create
> -DgroupId=com.fdar.apress.s2
> -DartifactId=app
> -DarchetypeGroupId=org.apache.struts
> -DarchetypeArtifactId=struts2-archetype-starter
> -DarchetypeVersion=2.0.9-SNAPSHOT
> -DremoteRepositories=http://people.apache.org/maven-snapshot-repository
>
> then, I modified pom.xml and changed the dependencies to JUnit 4.4 and
> Struts 2.0.11.
>
> When loaded the application in Firefox, I can see the menu bar ("Menu
> 1", "Menu 2" and etc) displayed on the top.
>
> When loaded the application in IE 6.0, the same menu bar is missing!
>
> Do you what could be the problem?
Did everything work before you updated the dependencies? If so, did you
check the release notes for 2.0.11 [1] to see if any changes may be
needed in the starter app code?
L.
[1] http://struts.apache.org/2.0.11/docs/release-notes-2011.html

Attachment:
user_181932.ezm (zipped)Jason Dolinger wrote:
> Hi all,
>
> I'm new to Struts 2 (and Struts in general), and I'm having a hard time figuring out how to handle the simple case of multiple buttons within a form. The method I'm trying to use is described in the Struts 2 cookbook here: http://struts.apache.org/2.x/docs/html-form-buttons-howto.html.
>
> I've copied these verbatim (along with a small struts.xml to wire them up), and both button boolean fields always remain false. Should this work? I'm using Struts 2.0.11. There's always the route of using Javascript to detect which button was clicked, but I'd rather avoid it if not necessary.
Are you sure you copied the example code faithfully? It should work as
advertised. Post your action mapping configuration and the action
code/JSP markup you're actually using; maybe there's a simple mistake in
there someone can spot.
> I've also seen mention of a Struts LookupDispatcher or MapDispatcher. Is there something similar in Struts 2?
There are no direct equivalents of those classes in Struts2 because they
aren't needed. The Struts2 core includes mechanisms that allow you to
achieve the same things more directly. See, for example, the 'method'
attribute on action mappings and on the s:form and s:submit tags.
L.

Attachment:
user_181933.ezm (zipped)Hello
I have a simple <html:button property="test" value="TestMe" onclick="testFunction()"/> in a <html:form> set.
and it just does not fire the function. However if I make the same onclick call in a <html:submit> it calls the function perfectly. Can someone explain? It is not typos, I have copied and pasted perfectly. I am nonplused. tia.

Attachment:
user_181935.ezm (zipped)From: Chris Pat <cpanon@(protected)>
> I have a simple <html:button...> [onclick handler]
> and it just does not fire the function.
What does the generated HTML look like? What does the JavaScript function look like, and have you put an alert(...) in the function to ensure it isn't being called? Since you're not returning the function's return value from the "onclick" attribute the browser will still do normal button processing in addition to calling the function.
Dave