Author Login
Post Reply
user Digest 29 Jan 2008 22:38:36 -0000 Issue 7832
Topics (messages 181940 through 181969):
Re: How does one get the "validate" method to be called?
181940 by: Laurie Harper
181941 by: Dave Newton
181942 by: specdev2
181944 by: Dave Newton
181946 by: specdev2
181947 by: Musachy Barroso
181948 by: Dave Newton
181949 by: specdev2
181951 by: Dave Newton
181953 by: specdev2
181954 by: Dave Newton
181955 by: Dave Newton
181962 by: specdev2
181963 by: specdev2
Re: just a simple onclick
181943 by: Chris Pat
181945 by: Dave Newton
struts2 forms and css
181950 by: xianwinwin
181965 by: Laurie Harper
181968 by: xianwinwin
Re: Struts 2.0.11 Validation and Conversion
181952 by: Adam Hardy
help with execAndWait
181956 by: Mazhar, Osman \(Home Office\)
Re: [struts] help with execAndWait
181957 by: Dale Newfield
181958 by: Mazhar, Osman \(Home Office\)
181959 by: Dale Newfield
181960 by: Mazhar, Osman \(Home Office\)
181961 by: Dale Newfield
Re: AJAX approach
181964 by: Jeromy Evans
Re: dojo 1.0 DateTextBox and ISO-8601
181966 by: Jeromy Evans
Re: Where did the target attribute go in the a-tag?
181967 by: niels
#request scope
181969 by: stanlick
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_181940.ezm (zipped)That would seem to suggest that the validation interceptor relies on
some work done by one of the interceptors you've removed from your
stack, no? Try listing all the validators that are in the default stack
and then commenting out the ones you don't want, one at a time, until
you identify which one you need to retain.
L.
specdev2 wrote:
> 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)
>>
>>
>>
>

Attachment:
user_181941.ezm (zipped)Reviewing your action configuration from a few emails ago; you've defined the interceptor as "validation" but the interceptor is actually named "interceptor". If you use the correct interceptor name does it work?
Dave
----- Original Message ----
> From: specdev2 <fraak72@(protected)>
> To: user@(protected)
> Sent: Tuesday, January 29, 2008 11:43:18 AM
> Subject: Re: How does one get the "validate" method to be called?
>
>
> A break point in debug mode.
> Again, I get to the break point if I use the default stack as follow:
>
>
> class="com.tchegbe.demo.action.ToHtmlActions">
>
> toHtmlUtilityViewDef
>
>
>
> newton.dave wrote:
> >
> > From: specdev2
> >> 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)
> >
> >
> >
>
> --
> View this message in
> context:
>
http://www.nabble.com/How-does-one-get-the-%22validate%22-method-to-be-called--
> tp15160502p15163537.html
> Sent from the Struts - User mailing list archive at Nabble.com.
>
>
> ---------------------------------------------------------------------
> To unsubscribe, e-mail: user-unsubscribe@(protected)
> For additional commands, e-mail: user-help@(protected)
>
>

Attachment:
user_181942.ezm (zipped)
Ok, I found the issue.
The Workflow Interceptor is the one that calls validate.
Hence, that's the interceptor I needed.
The application now works fine.
Thanks for all the help Dave.
--
Sent from the Struts - User mailing list archive at Nabble.com.

Attachment:
user_181944.ezm (zipped)From: specdev2 <fraak72@(protected)>
> The Workflow Interceptor is the one that calls validate.
> Hence, that's the interceptor I needed.
No it isn't. The validator interceptor calls validate().
The workflow interceptor checks to see if there are any error messages on the action and goes (by default) to the "input" result if there are.
Dave

Attachment:
user_181946.ezm (zipped)
Just to clarify, the following works as desired:
<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="workflow"/>
<result name="input">toHtmlUtilityViewDef</result>
</action>
The action validate() method gets called properly by the Workflow
Interceptor.
http://struts.apache.org/2.x/docs/workflow-interceptor.html
--
Sent from the Struts - User mailing list archive at Nabble.com.

Attachment:
user_181947.ezm (zipped)"workflow" interceptor used to call "validate" in 2.0.x, on 2.1
"validate" is called by the "validation" interceptor.
musachy
On Jan 29, 2008 12:02 PM, specdev2 <fraak72@(protected):
>
> Just to clarify, the following works as desired:
>
> <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="workflow"/>
> <result name="input">toHtmlUtilityViewDef</result>
> </action>
>
> The action validate() method gets called properly by the Workflow
> Interceptor.
> http://struts.apache.org/2.x/docs/workflow-interceptor.html
> --
> View this message in context: http://www.nabble.com/How-does-one-get-the-%22validate%22-method-to-be-called--tp15160502p15163957.html
>
> Sent from the Struts - User mailing list archive at Nabble.com.
>
>
> ---------------------------------------------------------------------
> To unsubscribe, e-mail: user-unsubscribe@(protected)
> For additional commands, e-mail: user-help@(protected)
>
>
--
"Hey you! Would you help me to carry the stone?" Pink Floyd

Attachment:
user_181948.ezm (zipped)From: specdev2 <fraak72@(protected)>
> The action validate() method gets called properly by the Workflow
> Interceptor.
> http://struts.apache.org/2.x/docs/workflow-interceptor.html
Oh, you're right [for that version of XWork].
You'll need to change that when you upgrade S2, though; current XWork does not work this way.
While I can appreciate the desire to "optimize" your interceptor stacks you are configuring yourself into a corner and are opening your application up to potential issues as the framework evolves.
IMO it's not worth it.
Dave

Attachment:
user_181949.ezm (zipped)
Dave,
I have to disagree with you on customizing the interceptors.
It is just sloppy to use a generic stack that calls every interceptor.
Important issues also get lost when you do that.
The true issue with Struts2 is the poor documentation.
Worst is the fact that some of the defaults just aren't smart.
I really wish there was a way to group actions for the purpose of applying
default stacks without being forced to define a namespace or overriding the
default stack of an existing namespace.
newton.dave wrote:
>
> From: specdev2 <fraak72@(protected)>
>> The action validate() method gets called properly by the Workflow
>> Interceptor.
>> http://struts.apache.org/2.x/docs/workflow-interceptor.html
>
>
> Oh, you're right [for that version of XWork].
>
>
> You'll need to change that when you upgrade S2, though; current XWork does
> not work this way.
>
>
> While I can appreciate the desire to "optimize" your interceptor stacks
> you are configuring yourself into a corner and are opening your
> application up to potential issues as the framework evolves.
>
>
> IMO it's not worth it.
>
>
> 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_181951.ezm (zipped)From: specdev2 <fraak72@(protected)>
> I have to disagree with you on customizing the interceptors.
> It is just sloppy to use a generic stack that calls every interceptor.
I guess I'm just "sloppy" then.
I have a general-purpose interceptor stack that works quite well; I have *very* few actions that don't need every interceptor in it. I have more important things to do than obsess over interceptor stack definitions for a hundred (or whatever) actions, particularly when most would only differ by at most one or two interceptors.
> Important issues also get lost when you do that.
Apparently important issues also get lost when you don't.
> I really wish there was a way to group actions for the purpose
> of applying default stacks without being forced to define a
> namespace or overriding the default stack of an existing namespace.
If you want your own default stack then overriding the default stack seems pretty natural to me.
Dave

Attachment:
user_181953.ezm (zipped)
Right now, I am forced to define a different namespace for each group of
actions with a different default stack.
Unlike the example discussed thus far, my action definitions don't specify
an interceptor.
The code posted is a little unique in that only this action uses the shown
set of interceptors.
So, this is what I do:
package x-name namespace X -> default stack -> actions
package y-name namespace Y -> different default stack -> actions
I wish I did not have to define a different namespace just to be able to
define different default stacks.
--
Sent from the Struts - User mailing list archive at Nabble.com.

Attachment:
user_181954.ezm (zipped)From: specdev2 <fraak72@(protected)>
> Right now, I am forced to define a different namespace
> for each group of actions with a different default stack.
Well, yeah...
> I wish I did not have to define a different namespace just to be
> able to define different default stacks.
I'm not sure I know what having different "default" stacks would look like; that doesn't make sense to me.
How would you determine which "default" stack an action uses? How is that different from creating an interceptor stack and using that as the action's <interceptor-ref.../> element?
It's not like you have to define each interceptor for each action; you can create a stack and use that.
Dave

Attachment:
user_181955.ezm (zipped)From: Dave Newton <newton.dave@(protected)>
> It's not like you have to define each interceptor for each action;
> you can create a stack and use that.
(Or a combination of stacks and individual interceptors.)
Dave

Attachment:
user_181962.ezm (zipped)
When you specify a default stack for a package in which an action is part of,
you do not have to specify an interceptor or interceptor stack on the action
mapping.
This makes maintenance far easier.
In any case, I am referring to being able to do this:
<package name="A" extends="struts-default">
<interceptors>
<interceptor-stack name="emptyStack">
<interceptor-ref name="empty"/>
</interceptor-stack>
<interceptor-stack name="aGivenStack">
<interceptor-ref name="something"/>
<interceptor-ref name="something2"/>
</interceptor-stack>
</interceptors>
<default-interceptor-ref name="emptyStack"/>
<action name="action" class="my.package.AClass">
<result>aPage.jsp</result>
</action>
</package>
<package name="B" extends="A">
<default-interceptor-ref name="aGivenStack"/>
<action name="action" class="my.package.BClass">
<result>aPage.jsp</result>
</action>
</package>
The only thing preventing being able to do that, is that the default stack
defined in package B will override the default stack define in package A
because they have the same namespace.
--
Sent from the Struts - User mailing list archive at Nabble.com.

Attachment:
user_181963.ezm (zipped)
So, as I was saying, I don't like having to define multiple namespaces just
to be able to define a default stack for a different group of actions.
In the last example, if I give package B a namespace, it will work with each
package having its own default stack.
--
Sent from the Struts - User mailing list archive at Nabble.com.

Attachment:
user_181943.ezm (zipped)Hi Dave
It is really plain vanilla. I just set some form values. What is impossible is that the very same onclick call placed in the <html:submit/> tag works perfectly. It calls the function, the values are set and inaddition it submits the form. I want to separate that and first call the function then manually call the submit for testing and experimentation. Why I cant get the same call to work from the <html:button/> onclick tag is beyond me. I hope you can help, because the semantics says it should be trivial and simply work.
Dave Newton <newton.dave@(protected)
> I have a simple [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
---------------------------------------------------------------------
To unsubscribe, e-mail: user-unsubscribe@(protected)
For additional commands, e-mail: user-help@(protected)

Attachment:
user_181945.ezm (zipped)From: Chris Pat <cpanon@(protected)>
> What is impossible is that the very same onclick call placed
> in the tag works perfectly.
This word, "impossible", I do not think it means what you think it means.
Without actually answering my questions it'll be impossible for me to help any further.
Dave
> Dave Newton wrote:
> 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.

Attachment:
user_181950.ezm (zipped)
hi there,
I wonder how to change the font style of my form. Currently it is in a
simple 'Times New Roman' and I would like to have it differently (say
verdana).
the jsp page looks like this (below) and I wonder where the code should be
embedded?
<%@(protected)" %>
<h2 class="menu" id=title>Add new Entity</h2>
<%@(protected)">
<s:form action="customize" validate="true">
<s:textfield name="name" label="Legal Name" />
<s:textarea rows="5" cols="25" name="comment2" label="Comment" />
<s:submit action="customize_insert" label="Insert" align="center" />
</s:form>
--
Sent from the Struts - User mailing list archive at Nabble.com.

Attachment:
user_181965.ezm (zipped)xianwinwin wrote:
> hi there,
>
> I wonder how to change the font style of my form. Currently it is in a
> simple 'Times New Roman' and I would like to have it differently (say
> verdana).
>
> the jsp page looks like this (below) and I wonder where the code should be
> embedded?
>
>
> <%@(protected)" %>
> <h2 class="menu" id=title>Add new Entity</h2>
> <%@(protected)">
>
>
> <s:form action="customize" validate="true">
>
> <s:textfield name="name" label="Legal Name" />
> <s:textarea rows="5" cols="25" name="comment2" label="Comment" />
>
> <s:submit action="customize_insert" label="Insert" align="center" />
>
> </s:form>
Use CSS to describe the display characteristics (font, etc.) you want,
and an 'id' or 'cssClass' attribute on the s:form tag to link to the CSS
rules. Alternatively, use a 'cssStyle' attribute on the s:form tag to
inline the CSS.
L.

Attachment:
user_181968.ezm (zipped)
thanks, this solved it
--
Sent from the Struts - User mailing list archive at Nabble.com.

Attachment:
user_181952.ezm (zipped)Hi Filipe,
what is that regex that you are using in the annotations for setUnixGroupId()?
Is it required? It seems like unnecessary overhead for validating and converting
a long. Have you tried it without it?
What is the reason for your own NullLongConverter? I guess it's because there is
no out-of-the-box Struts LongConverter that handles null? (not had the need for
it myself yet).
The second error seems to come from the parameter coming in as an array. Is
there an obvious reason why, considering your HTML form?
Perhaps there are clues in the stacktraces.
Regards
Adam
Filipe David Manana on 28/01/08 15:48, wrote:
> I am getting errors from Parameters Interceptor while it tries to set
> a value for a property.
>
> My JSP is:
>
> <s:form theme="ajax" method="post" action="add_account"
> namespace="/lsf/accounts" validate="true">
> <s:textfield required="true" label="Name" name="account.name" />
> <s:textfield label="UNIX GroupID" name="account.unixGroupId" />
> <s:submit value="Add" onclick="this.form.submit();" />
> </s:form>
>
> The action is mapped to the method "String add()" of the following class:
>
>
> @Validation
> @Conversion
> public class AccountAction extends BaseAction
> {
> private Account account;
> private Long accountId;
>
>
> public void prepare() throws Exception
> {
> if ( accountId == null )
> account = new Account();
> else
> account = AccountManager.findById(accountId);
> }
>
>
> public String add() throws Exception
> {
> return SUCCESS;
> }
>
>
> public String update() throws Exception
> {
> return SUCCESS;
> }
>
>
> @VisitorFieldValidator(message = "")
> public Account getAccount()
> {
> return account;
> }
>
>
> public void setAccount(Account account)
> {
> this.account = account;
> }
>
>
> public Long getAccountId()
> {
> return accountId;
> }
>
> public void setAccountId(Long accountId)
> {
> this.accountId = accountId;
> }
>
>
> The definition of the Account class:
>
>
> @Validation
> @Conversion
> public class Account
> {
> private Long id;
> private String name;
> private Long unixGroupId;
>
> public Long getId()
> {
> return id;
> }
>
> public void setId(Long id)
> {
> this.id = id;
> }
>
> public String getName()
> {
> return name;
> }
>
> @RequiredStringValidator(message = "Account name is required", trim = true)
> public void setName(String name)
> {
> this.name = name;
> }
>
> public long getUnixGroupId()
> {
> return unixGroupId;
> }
>
> @TypeConversion(converter = "actions.NullLongConverter")
> @ConversionErrorFieldValidator(message = "UNIX GroupID must be in
> the range 0..65535")
> @RegexFieldValidator( message = "UNIX GroupID must be in the range
> 0..65535", expression = "^\\s*(?:[0-9]{1,6})?\\s*$")
> public void setUnixGroupId(Long unixGroupId)
> {
> this.unixGroupId = unixGroupId;
> }
> }
>
> My validator:
> public class NullLongConverter extends StrutsTypeConverter
> {
> public Object convertFromString(Map context, String[] values, Class toClass)
> {
> Long val = null;
>
> if ( values != null && values[0] != null && !values[0].equals("") )
> {
> try
> {
> values[0].trim();
> val = Long.parseLong(values[0]);
> long v = val.longValue();
> if ( v < 0 || v > 65535 ) val = null;
> }
> catch( Exception ex ) { }
> }
> return val;
> }
>
> public String convertToString(Map context, Object o)
> {
> if ( o == null ) return null;
> else return o.toString();
> }
> }
>
>
> My action is using the paramsPrepareParamsStack.
> I get this exceptions from
>
> [ERROR
com.opensymphony.xwork2.interceptor.ParametersInterceptor 28
> Jan 2008 16:37:50] ParametersInterceptor - [setParameters]: Unexpected
> Exception caught setting 'account.unixGroupId' on 'class
> actions.lsf.accounts.AccountAction: Error setting expression
> 'account.unixGroupId' with value '12'
>
> [ERROR
com.opensymphony.xwork2.interceptor.ParametersInterceptor 28
> Jan 2008 16:37:51] ParametersInterceptor - [setParameters
> ]: Unexpected Exception caught setting 'account.unixGroupId' on 'class
> actions.lsf.accounts.AccountAction: Error setting expression
> 'account.unixGroupId' with value'[Ljava.lang.String;@(protected)'
>
>
>
> Any ideia why this is not working?
>
> By the way, I also tried not using custom conversions / validations,
> that is, using the built in conversion mechanisms. I get similar
> errors.

Attachment:
user_181956.ezm (zipped)Hello,
I am trying to use the execAndWait interceptor. My struts.xml looks
like:
<action name="foo" method="input" class="org.lls.classA">
<result name="input">foo.jsp</result>
</action>
<action name="foo_process" method="processFoo" class="org.lls.classA">
<interceptor-ref name="defaultStack"/>
<interceptor-ref name="token"/>
<!--
<interceptor-ref name="execAndWait">
<param name="delay">100</param>
<param name="delaySleepInterval">50</param>
</interceptor-ref>
-->
<result name="success">foo-success.jsp</result>
<result name="wait">foo-wait.jsp</result>
<result name="input">foo.jsp</result>
<result name="invalid.token">foo.jsp</result>
</action>
Now in my action class, I have a bean with appropriate getter and setter
methods on it. The foo.jsp has a form which is mapped to attributes of
the bean in the action class. For example, <s:textfield
name="myBean.name".../>. The form tag looks like <s:form
action="foo_process"...>
When I run the application with the given struts.xml above, myBean gets
populated properly in the processFoo method (I'm assuming the Parameter
interceptor does that).
However, when I uncomment and try to use the execAndWait interceptor,
for some reason, myBean comes out to be NULL in processFoo().
Any help will be appreciated.
- 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_181957.ezm (zipped)Mazhar, Osman (Home Office) wrote:
> I am trying to use the execAndWait interceptor.
If this bean is retrieved from your DB, then it's likely the DB session
is being closed.
http://wiki.opensymphony.com/display/WW/HibernateAndSpringEnabledExecuteAndWaitInterceptor
-Dale

Attachment:
user_181958.ezm (zipped)That is an interesting point. The bean is a hibernate object, however, I
am not retrieving it from the database, but rather only trying to
populate it from the form values.
So, it's a CREATE operation if you look at it from the CRUD perspective.
After reading on HibernateAndSpringEnabledExecuteAndWaitInterceptor,
what I understand is it would be necessary for objects being populated
from the database (using Hibernate obviously)
Unless I'm mistaken....
-----Original Message-----
From: Dale Newfield [mailto:Dale@(protected)]
Sent: Tuesday, January 29, 2008 1:46 PM
To: Struts Users Mailing List
Subject: Re: [struts] help with execAndWait
Mazhar, Osman (Home Office) wrote:
> I am trying to use the execAndWait interceptor.
If this bean is retrieved from your DB, then it's likely the DB session
is being closed.
http://wiki.opensymphony.com/display/WW/HibernateAndSpringEnabledExecute
AndWaitInterceptor
-Dale
---------------------------------------------------------------------
To unsubscribe, e-mail: user-unsubscribe@(protected)
For additional commands, e-mail: user-help@(protected)
______________________________________________________________________
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_181959.ezm (zipped)Mazhar, Osman (Home Office) wrote:
> That is an interesting point. The bean is a hibernate object, however, I
> am not retrieving it from the database, but rather only trying to
> populate it from the form values.
You should be able to tell from the call stack which interceptors have
been called--can you verify that parameters is included?
I don't know if including more than one interceptor-ref inside the
action definition uses all of them (in what order?) or just the last
one--I always define the stacks I need separately and just refer to the
appropriate one within my action definition...
> So, it's a CREATE operation if you look at it from the CRUD perspective.
>
> After reading on HibernateAndSpringEnabledExecuteAndWaitInterceptor,
> what I understand is it would be necessary for objects being populated
> from the database (using Hibernate obviously)
Does this created object contain any references to other DB objects?
-Dale

Attachment:
user_181960.ezm (zipped)I turned debug level logging for struts and xwork packages.
I see that the ParametersInterceptor is being called indeed for both
scenarios (with or without execAndWait)
However, one interesting thing is when I comment out the "delay" and
"delaySleepInterval" params from the execAndWait interceptor, I don't
get this problem.
Maybe this problem has to do with timing? Not sure but this is weird...
-----Original Message-----
From: Dale Newfield [mailto:Dale@(protected)]
Sent: Tuesday, January 29, 2008 3:21 PM
To: Struts Users Mailing List
Subject: Re: [struts] help with execAndWait
Mazhar, Osman (Home Office) wrote:
> That is an interesting point. The bean is a hibernate object, however,
I
> am not retrieving it from the database, but rather only trying to
> populate it from the form values.
You should be able to tell from the call stack which interceptors have
been called--can you verify that parameters is included?
I don't know if including more than one interceptor-ref inside the
action definition uses all of them (in what order?) or just the last
one--I always define the stacks I need separately and just refer to the
appropriate one within my action definition...
> So, it's a CREATE operation if you look at it from the CRUD
perspective.
>
> After reading on HibernateAndSpringEnabledExecuteAndWaitInterceptor,
> what I understand is it would be necessary for objects being populated
> from the database (using Hibernate obviously)
Does this created object contain any references to other DB objects?
-Dale
---------------------------------------------------------------------
To unsubscribe, e-mail: user-unsubscribe@(protected)
For additional commands, e-mail: user-help@(protected)
______________________________________________________________________
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_181961.ezm (zipped)Mazhar, Osman (Home Office) wrote:
> I turned debug level logging for struts and xwork packages.
> I see that the ParametersInterceptor is being called indeed for both
> scenarios (with or without execAndWait)
>
> However, one interesting thing is when I comment out the "delay" and
> "delaySleepInterval" params from the execAndWait interceptor, I don't
> get this problem.
>
> Maybe this problem has to do with timing? Not sure but this is weird...
If you set those parameters in a stack definition, and then refer to
that stack in the action, what happens?
-Dale

Attachment:
user_181964.ezm (zipped)
>
> 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.
Yes, all that's possible on the client side with the YUI datatable. I
use all the above features.
They have some examples for client-side sorting, pagination and XHR.
Filtering is performed by via the DataTable's RecordSet API
http://developer.yahoo.com/yui/examples/datatable/index.html

Attachment:
user_181966.ezm (zipped)Hi Roberto,
This is precisely what a custom type-converter is for:
http://struts.apache.org/2.x/docs/type-conversion.html
It accepts a string and converts to an object, and vice versa. It's
invoked by the conversion interceptor.
However, I thought the default Date converter is already setup to
convert ISO-8601 strings to
java.util.Date and vice versa. You might
get a nice surprise if you add a Date property to your model with the
startDate name. (The docs mention a locale-dependent date rather than
ISO-8601 so I may be mistaken though).
Roberto Nunnari wrote:
> Hi.
>
> I have a form that posts to a ModelDriven Action.
> In that form I'm trying to use raw dojo 1.0 DateTextBox, but I have
> trouble with the formatting of the date.. According to the
> dojo docs, when communicating to/from the server, it uses
> ISO-8601.
>
> As
java.util.Date doesn't know how to parse ISO-8601
> dates, I suppose I'll use a method on the action to parse,
> but I'm interested to know how others have solved this
> issue. Maybe with an interceptor?
>
> as for formatting the date to initialize the dojo input, here
> is the code I put in my jsp:
>
> <input type="text" name="startDate" dojoType="dijit.form.DateTextBox"
> required="true" value="<s:date name="startDate" format="yyyy-MM-dd"
> />" size="40"/></td>
>
> Best regards.
>

Attachment:
user_181967.ezm (zipped)Thanks,
This works form me:
<s:url id="url" action="getCRUD" />
<a href="<s:property value='#url'/>" target="_blank">...</a>
niels
On Jan 29, 2008, at 5:36 PM, Laurie Harper wrote:
> 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.
>
>
> ---------------------------------------------------------------------
> To unsubscribe, e-mail: user-unsubscribe@(protected)
> For additional commands, e-mail: user-help@(protected)
>

Attachment:
user_181969.ezm (zipped)
I have a weird situation where I am losing a request parameter inside a loop!
I understand the scopes and have trouble understanding how a #request scoped
variable could be "masked" inside a loop! This outputs my value just fine:
<s:property value="#request.model.parentId" />
but once inside
<s:iterator value="notes">
it no longer contains a value!
Any clues? Aren't the loop vars scoped to page?
Scott
--
Sent from the Struts - User mailing list archive at Nabble.com.