Author Login
Post Reply
user Digest 28 Jan 2008 14:21:34 -0000 Issue 7828
Topics (messages 181822 through 181851):
Re: Actions executing mulitple times.
181822 by: McDowell, Paula
Re: s:action with validation failure of form submit
181823 by: Martin Gainty
181835 by: jwpronto
How to restrict the user accessing pages from browser
181824 by: srinivasan anjan
Re: how to make ajax validation works with s:tabbedPanel in struts 2.0.11
181825 by: Wei, Mei
181832 by: Martin Gainty
Struts 1.3.8: DTDs are gone?
181826 by: Andreas Bachmann
181827 by: Antonio Petrelli
181828 by: Andreas Bachmann
181829 by: Antonio Petrelli
181831 by: Andreas Bachmann
181842 by: Laurie Harper
<s:include> example?
181830 by: Ashish Jain
181833 by: Dave Newton
181834 by: Ashish Jain
struts.objectTypeDeterminer
181836 by: bjousse
181837 by: Wes Wannemacher
181838 by: stanlick.gmail.com
181840 by: bjousse
Re: Type converters: please help!!! :(
181839 by: ravi_eze
181846 by: Dave Newton
[STRUTS2] Error in Dojo / Howto update Dojo
181841 by: Julien RICHARD
Re: [S2] dojo plugin - I don't find the resources
181843 by: paulbrickell
181844 by: Julien RICHARD
181845 by: paulbrickell
181847 by: Dave Newton
181848 by: paulbrickell
181849 by: Martin Gainty
181850 by: Dave Newton
181851 by: paulbrickell
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_181822.ezm (zipped)Thanks, and that's what I meant. . . Actions are executing expectedly.
-----Original Message-----
From: news on behalf of Laurie Harper
Sent: Sat 1/26/2008 11:16 AM
To: user@(protected)
Subject: Re: Actions executing mulitple times.
Paula McDowell wrote:
> Has anyone seen actions executing multiple times thus undoing and resetting fields and increasing performance overhead? We are currently using Struts 1.1.
All my actions execute multiple times, once each time they're requested
;-) Presumably you mean you are seeing your actions executed multiple
times for a single request? Without more information it's going to be
difficult to diagnose what's happening.
One immediate suggestion, though: check for any tags in the page you're
returning that have an empty of incorrect 'href' or 'src' attribute. The
most common cause of unexpected action executions is the browser trying
to retreieve a linked resource such as a stylesheet or an image whose
source isn't specified correctly.
L.
---------------------------------------------------------------------
To unsubscribe, e-mail: user-unsubscribe@(protected)
For additional commands, e-mail: user-help@(protected)
Private and confidential as detailed <a
href="http://www.sug.com/disclaimers/default.htm#Mail">here</a>. If you cannot access hyperlink, please e-mail sender.

Attachment:
user_181823.ezm (zipped)please post:
jsp
xwork.xml entries for actionTag
Action java source
M-
----- Original Message -----
From: "jwpronto" <jweinstock@(protected)>
To: <user@(protected)>
Sent: Saturday, January 26, 2008 6:41 PM
Subject: s:action with validation failure of form submit
>
> Hi All -
>
> I have an s:action tag embedded in a JSP. The s:action populates a List in
> the request which a select box uses to populate.
>
> When there is a validation failure the s:action tag is not being called.
>
> The interesting thing is that I have this exact setup on a previous page
> (this is a 3 page form) and the s:action does render on validation
failure,
> so I'm not sure why, only on page 2, this s:action tag is failing to get
> called.
>
> It works in normal scenarios and only fails when a validation error
occurs.
>
> Any thoughts?
>
> Thanks
> Jon
>
> --
> View this message in context:
http://www.nabble.com/s%3Aaction-with-validation-failure-of-form-submit-tp15
114170p15114170.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_181835.ezm (zipped)
As much info as possible below:
I traced through the action tag library and it looks like the proxy's
execute method is being called from the ActionComponent but no exception is
thrown and the action call is never actually called so somehow their is some
sort of swallowed exception or mis-configuration in the
DefaultActionInvocation's invoke method.
Struts.xml (I removed some unimportant info)
<!-- Page one of the enrollment wizard, when the "next-step" result
is evaluated the s:action
tag in question executes fine. -->
<action name="enrollment_ui/*" method="{1}" class="com.....Action">
<result
name="input">/WEB-INF/pages/enrollment_user_info.jsp</result>
<result
name="next-step">/WEB-INF/pages/enrollment_bus_info.jsp</result>
<result
name="final-step">/WEB-INF/pages/enrollment_confirmation.jsp</result>
</action>
<!-- A validation failure on form submit that hits this action
somehow prevents the s:action
tag on the "input" page from firing -->
<action name="enrollment_bi/*" method="{1}" class="com....Action">
<result
name="input">/WEB-INF/pages/enrollment_bus_info.jsp</result>
<result
name="final-step">/WEB-INF/pages/enrollment_confirmation.jsp</result>
</action>
JSP with s:action tag that yields different results based on access path:
<%@(protected)" %>
<s:action name="primary_cat_select_action" executeResult="false"
namespace=""/>
<s:form id="bi" name="bi" action="enrollment_bi" method="POST">
<label for="categories">Categories:</label>
<div class="formfields"><s:select list="#request.categories"
listKey="jobCategoryId"
listValue="name" name="selectedCategories"
cssClass="jobcat" id="primejobcat"
required="true" multiple="true" size="10"
value="preSelectedCategories"/>
.
.
.
</s:form>
Action:
I didn't include the java code since its pretty basic. Extends
ActionSupport, has a single execute method, and setters/getters.
Any help is appreciated!
mgainty wrote:
>
> please post:
> jsp
> xwork.xml entries for actionTag
> Action java source
>
> M-
> ----- Original Message -----
> From: "jwpronto" <jweinstock@(protected)>
> To: <user@(protected)>
> Sent: Saturday, January 26, 2008 6:41 PM
> Subject: s:action with validation failure of form submit
>
>
>>
>> Hi All -
>>
>> I have an s:action tag embedded in a JSP. The s:action populates a List
>> in
>> the request which a select box uses to populate.
>>
>> When there is a validation failure the s:action tag is not being called.
>>
>> The interesting thing is that I have this exact setup on a previous page
>> (this is a 3 page form) and the s:action does render on validation
> failure,
>> so I'm not sure why, only on page 2, this s:action tag is failing to get
>> called.
>>
>> It works in normal scenarios and only fails when a validation error
> occurs.
>>
>> Any thoughts?
>>
>> Thanks
>> Jon
>>
>> --
>> View this message in context:
> http://www.nabble.com/s%3Aaction-with-validation-failure-of-form-submit-tp15
> 114170p15114170.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)
>
>
>
--
Sent from the Struts - User mailing list archive at Nabble.com.

Attachment:
user_181824.ezm (zipped)Hi all,
I want a solution for restricting the user from modifying the text
into the address bar and this has to be done at serverside level.
Madhavan
---------------------------------
Forgot the famous last words? Access your message archive online. Click here.

Attachment:
user_181825.ezm (zipped)Yes, I have theme='ajax' set for each href.
Below is my sample code, the problem is when the save button is clicked,
it does not go to the "success" page. If I take out <s:head
theme="ajax"/>, then it will go, but does not display as tabbedPanel any
more.
What can I do to make these two works together?
<%@(protected)"%>
<s:head theme="ajax"/>
<s:tabbedPanel id="test2" theme="ajax">
<s:div id="left" label="%{getText('persondata.title')}"
theme="ajax">
<p><s:text name="persondata.title" /></p>
<s:form action="save" validate="true" theme="ajax">
<s:textfield id="id" name="person.id"
cssStyle="display:none" />
<s:textfield id="firstName"
label="%{getText('person.firstName')}"
name="person.firstName" />
<s:textfield id="lastName"
label="%{getText('person.lastName')}"
name="person.lastName" />
<s:textfield id="address"
label="%{getText('address')}"
name="address" />
<s:submit value="%{getText('save')}" />
</s:form>
</s:div>
<s:div id="middle" label="test2" theme="ajax">
I'm the other Tab!!!
</s:div>
</s:tabbedPanel>
Thanks,
Mei
-----Original Message-----
From: Martin Gainty [mailto:mgainty@(protected)]
Sent: Saturday, January 26, 2008 8:26 AM
To: Struts Users Mailing List
Subject: Re: how to make ajax validation works with s:tabbedPanel in
struts 2.0.11
http://struts.apache.org/2.x/docs/tabbedpanel.html
assuming your theme='ajax' be sure to set the href attribute for the
individual div tags for content from a valid URL
Martin
----- Original Message -----
From: "Wei, Mei" <Mei-Chuan.Wei@(protected)>
To: <user@(protected)>
Sent: Saturday, January 26, 2008 2:02 AM
Subject: how to make ajax validation works with s:tabbedPanel in struts
2.0.11
Hi,
I would like to make a page has ajax validation and also display as
tabbedPanel.
I am using struts 2.0.11, and learned from
http://java-x.blogspot.com/2006/11/struts-2-validation.html
that to use ajax validation, in the jsp file, I can not have <s:head
theme="ajax"/>.
But to display tabbedPanel, I need to have <s:head theme="ajax"/> in the
jsp.
So I can not make tabbedPanel and ajax validation work on one page.
Does anyone have any experience about this?
Any help are appreciated.
Thanks,
Mei
---------------------------------------------------------------------
To unsubscribe, e-mail: user-unsubscribe@(protected)
For additional commands, e-mail: user-help@(protected)

Attachment:
user_181832.ezm (zipped)appears to be a bug in s:component not loading the
/template/${theme}/tabbedpanel:ftl
Anyone else?
M-
----- Original Message -----
From: "Wei, Mei" <Mei-Chuan.Wei@(protected)>
To: "Struts Users Mailing List" <user@(protected)>
Sent: Sunday, January 27, 2008 1:10 AM
Subject: RE: how to make ajax validation works with s:tabbedPanel in struts
2.0.11
Yes, I have theme='ajax' set for each href.
Below is my sample code, the problem is when the save button is clicked,
it does not go to the "success" page. If I take out <s:head
theme="ajax"/>, then it will go, but does not display as tabbedPanel any
more.
What can I do to make these two works together?
<%@(protected)"%>
<s:head theme="ajax"/>
<s:tabbedPanel id="test2" theme="ajax">
<s:div id="left" label="%{getText('persondata.title')}"
theme="ajax">
<p><s:text name="persondata.title" /></p>
<s:form action="save" validate="true" theme="ajax">
<s:textfield id="id" name="person.id"
cssStyle="display:none" />
<s:textfield id="firstName"
label="%{getText('person.firstName')}"
name="person.firstName" />
<s:textfield id="lastName"
label="%{getText('person.lastName')}"
name="person.lastName" />
<s:textfield id="address"
label="%{getText('address')}"
name="address" />
<s:submit value="%{getText('save')}" />
</s:form>
</s:div>
<s:div id="middle" label="test2" theme="ajax">
I'm the other Tab!!!
</s:div>
</s:tabbedPanel>
Thanks,
Mei
-----Original Message-----
From: Martin Gainty [mailto:mgainty@(protected)]
Sent: Saturday, January 26, 2008 8:26 AM
To: Struts Users Mailing List
Subject: Re: how to make ajax validation works with s:tabbedPanel in
struts 2.0.11
http://struts.apache.org/2.x/docs/tabbedpanel.html
assuming your theme='ajax' be sure to set the href attribute for the
individual div tags for content from a valid URL
Martin
----- Original Message -----
From: "Wei, Mei" <Mei-Chuan.Wei@(protected)>
To: <user@(protected)>
Sent: Saturday, January 26, 2008 2:02 AM
Subject: how to make ajax validation works with s:tabbedPanel in struts
2.0.11
Hi,
I would like to make a page has ajax validation and also display as
tabbedPanel.
I am using struts 2.0.11, and learned from
http://java-x.blogspot.com/2006/11/struts-2-validation.html
that to use ajax validation, in the jsp file, I can not have <s:head
theme="ajax"/>.
But to display tabbedPanel, I need to have <s:head theme="ajax"/> in the
jsp.
So I can not make tabbedPanel and ajax validation work on one page.
Does anyone have any experience about this?
Any help are appreciated.
Thanks,
Mei
---------------------------------------------------------------------
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_181826.ezm (zipped)
Hello!
I was developing Struts for 4 years. I looked at Struts 2.0 but haven't been
understanding it %-|
So I haven't switched to 2.x and am staying on the 1.x branch.
I downloaded the whole 1.3.8 (struts-1.3.8-all.zip) and started a new
project.
There are a few things I don't unterstand:
- In the past, I had to use also a validator-rules.xml with all the rules
like "minlength", "maxlength" and "intRange", if I would like to use the
Validator. Why is it not in the example projects?
- I don't find the 5 DTDs to validate my JSPs (=
http://wiki.apache.org/struts/StrutsUpgradeNotes12to13). The links like
http://struts.apache.org/tags-bean are gone :,(
Any ideas why these two things happened?
Andreas
--
Sent from the Struts - User mailing list archive at Nabble.com.

Attachment:
user_181827.ezm (zipped)2008/1/27, Andreas Bachmann <bachi@(protected)>:
> - I don't find the 5 DTDs to validate my JSPs (=
> http://wiki.apache.org/struts/StrutsUpgradeNotes12to13). The links like
> http://struts.apache.org/tags-bean are gone :,(
They are not DTDs, but JSP taglib URIs, the ones that are defined in
the <uri> element in the TLD files.
If you put struts-taglib.jar in your WEB-INF/lib, they are
automatically resolved.
HTH
Antonio

Attachment:
user_181828.ezm (zipped)
Antonio Petrelli-3 wrote:
>
> They are not DTDs, but JSP taglib URIs, the ones that are defined in
> the <uri> element in the TLD files.
> If you put struts-taglib.jar in your WEB-INF/lib, they are
> automatically resolved.
>
Oh... ok! Thank you!
I didn't know that the "Technologie" changed from DTD to TLD and I didn't
looked carefully in the "lib" directory.
--
Sent from the Struts - User mailing list archive at Nabble.com.

Attachment:
user_181829.ezm (zipped)2008/1/27, Andreas Bachmann <bachi@(protected)>:
>
>
>
> Antonio Petrelli-3 wrote:
> >
> > They are not DTDs, but JSP taglib URIs, the ones that are defined in
> > the <uri> element in the TLD files.
> > If you put struts-taglib.jar in your WEB-INF/lib, they are
> > automatically resolved.
> >
> Oh... ok! Thank you!
> I didn't know that the "Technologie" changed from DTD to TLD and I didn't
> looked carefully in the "lib" directory.
There is no technology change. The DTD is used to validate XML files,
TLD is used to define custom tag libraries for JSPs. They are totally
unrelated.
Antonio

Attachment:
user_181831.ezm (zipped)
Antonio Petrelli-3 wrote:
>
> There is no technology change. The DTD is used to validate XML files,
> TLD is used to define custom tag libraries for JSPs. They are totally
> unrelated.
>
Oh sh*t... excuse me for my stupidity. In the past, there was also only
TLDs.
I just wanted to get my empty Struts+Tiles+Validator project working and
didn't looked at the extensions exactly. I was writing own DTDs (for own
XMLs) and TLDs (for own TabLibs)... but it's too long ago (3 years).
Now, the project is set-up.
Thanks again!
--
Sent from the Struts - User mailing list archive at Nabble.com.

Attachment:
user_181842.ezm (zipped)Andreas Bachmann wrote:
> - In the past, I had to use also a validator-rules.xml with all the rules
> like "minlength", "maxlength" and "intRange", if I would like to use the
> Validator. Why is it not in the example projects?
The file is now bundled within struts.jar. You no longer need to include
it in your webapp.
L.

Attachment:
user_181830.ezm (zipped)I am new to struts2
I am struggling to include jsp in a jsp.
I am passing an param to included jsp and I want to access that param
in included jsp.
I tried different combinations.. none is seem to be working.
Only thing, working is <%= request.getParameter("configKey")%>
But how to use this param in struts tags?
here is my code
in main jsp
========
<s:include value="inc/settingsRow.jsp">
<s:param name="configKey" value="%{'domainName'}"/>
</s:include>
included jsp
=========
<%@(protected)" %>
<s:set name="configKey1" value="#request.configKey"></s:set>
<tr>
<td><s:text name="label.%{configKey1}"/></td>
</tr>
--
Thanks
Ashish

Attachment:
user_181833.ezm (zipped)http://struts.apache.org/2.x/docs/include.html
Note, specifically, the part that says "Note: Any additional params supplied
to the included page are not accessible within the rendered page through the
<s:property...> tag!"
d.
--- Ashish Jain <ajainy@(protected):
> I am new to struts2
> I am struggling to include jsp in a jsp.
> I am passing an param to included jsp and I want to access that param
> in included jsp.
>
> I tried different combinations.. none is seem to be working.
>
> Only thing, working is <%= request.getParameter("configKey")%>
> But how to use this param in struts tags?
>
>
> here is my code
> in main jsp
> ========
> <s:include value="inc/settingsRow.jsp">
> <s:param name="configKey" value="%{'domainName'}"/>
> </s:include>
>
>
> included jsp
> =========
> <%@(protected)" %>
> <s:set name="configKey1" value="#request.configKey"></s:set>
> <tr>
> <td><s:text name="label.%{configKey1}"/></td>
> </tr>
>
>
> --
> Thanks
> Ashish
>
> ---------------------------------------------------------------------
> To unsubscribe, e-mail: user-unsubscribe@(protected)
> For additional commands, e-mail: user-help@(protected)
>
>

Attachment:
user_181834.ezm (zipped)So, can we access supplied params somehow?
(I can't use <%= request.getParameters(...))%> inside <s:tags../>
If no, then why it accepts params? wht for?
Secondly,
i can use <jsp:include/> with params.
but again, it's visible as request.getParameter.. but not on valuestack.
On Jan 27, 2008 11:45 AM, Dave Newton <newton.dave@(protected):
> http://struts.apache.org/2.x/docs/include.html
>
> Note, specifically, the part that says "Note: Any additional params supplied
> to the included page are not accessible within the rendered page through the
> <s:property...> tag!"
>
> d.
>
>
> --- Ashish Jain <ajainy@(protected):
>
> > I am new to struts2
> > I am struggling to include jsp in a jsp.
> > I am passing an param to included jsp and I want to access that param
> > in included jsp.
> >
> > I tried different combinations.. none is seem to be working.
> >
> > Only thing, working is <%= request.getParameter("configKey")%>
> > But how to use this param in struts tags?
> >
> >
> > here is my code
> > in main jsp
> > ========
> > <s:include value="inc/settingsRow.jsp">
> > <s:param name="configKey" value="%{'domainName'}"/>
> > </s:include>
> >
> >
> > included jsp
> > =========
> > <%@(protected)" %>
> > <s:set name="configKey1" value="#request.configKey"></s:set>
> > <tr>
> > <td><s:text name="label.%{configKey1}"/></td>
> > </tr>
> >
> >
> > --
> > Thanks
> > Ashish
> >
> > ---------------------------------------------------------------------
> > 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)
>
>
--
Thanks
Ashish Jain
IntelliConcepts, Inc.
+1 (732) 259 9855 (voice)
+1 (609) 632 0081 (home, fax)

Attachment:
user_181836.ezm (zipped)
Hi,
I am working with Eclipse 3.3, tomcat 6 and a freshly downloaded Struts
2.0.11
i set up my project (almost nothing in), and when I start tomcat, I get this
message :
Unable to load bean: type:com.opensymphony.xwork2.util.ObjectTypeDeterminer
class:com.opensymphony.xwork2.util.GenericsObjectTypeDeterminer - bean -
jar:file: ...WEB-INF/lib/struts2-core-2.0.11.jar!/struts-default.xml:36:148
I searched on the web and everuthing about that seems old...
Does anybody have an idea ?
--
Sent from the Struts - User mailing list archive at Nabble.com.

Attachment:
user_181837.ezm (zipped)which jars do you have in WEB-INF/lib ?
Could you be missing the other requirements (xwork2, freemarker, OGNL,
etc.)?
-Wes
On Sun, 2008-01-27 at 14:42 -0800, bjousse wrote:
> Hi,
>
> I am working with Eclipse 3.3, tomcat 6 and a freshly downloaded Struts
> 2.0.11
>
> i set up my project (almost nothing in), and when I start tomcat, I get this
> message :
>
> Unable to load bean: type:com.opensymphony.xwork2.util.ObjectTypeDeterminer
> class:com.opensymphony.xwork2.util.GenericsObjectTypeDeterminer - bean -
> jar:file: ...WEB-INF/lib/struts2-core-2.0.11.jar!/struts-default.xml:36:148
>
> I searched on the web and everuthing about that seems old...
>
> Does anybody have an idea ?
>
>

Attachment:
user_181838.ezm (zipped)Sounds like you might not have all the jars necessary. Verify against the
required minimums.
On Jan 27, 2008 4:42 PM, bjousse <bjousse@(protected):
>
> Hi,
>
> I am working with Eclipse 3.3, tomcat 6 and a freshly downloaded Struts
> 2.0.11
>
> i set up my project (almost nothing in), and when I start tomcat, I get
> this
> message :
>
> Unable to load bean: type:
> com.opensymphony.xwork2.util.ObjectTypeDeterminer
> class:com.opensymphony.xwork2.util.GenericsObjectTypeDeterminer - bean -
> jar:file: ...WEB-INF/lib/struts2-
> core-2.0.11.jar!/struts-default.xml:36:148
>
> I searched on the web and everuthing about that seems old...
>
> Does anybody have an idea ?
>
>
> --
> View this message in context:
> http://www.nabble.com/struts.objectTypeDeterminer-tp15125254p15125254.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)
>
>
--
Scott
stanlick@(protected)

Attachment:
user_181840.ezm (zipped)
Sure, I missed OGNL and Freemaker.
Thnks a lot.
Wes Wannemacher wrote:
>
> which jars do you have in WEB-INF/lib ?
>
> Could you be missing the other requirements (xwork2, freemarker, OGNL,
> etc.)?
>
--
Sent from the Struts - User mailing list archive at Nabble.com.

Attachment:
user_181839.ezm (zipped)
hi,
The code is as follows. Do not get terrified by the length of the post. I
tried formatting the post for better readability. Hope this helps you... to
help me ;)
@new.xml, this is included in struts.xml
<struts>
<package name="newsCreation" namespace="/new"
extends="struts-default">
<action name="configurenew"
class="com.comp.admin.news.newConfigurationAction"
method="viewnew">
<interceptor-ref name="scope">
< param name="session">
newData,disableFields
< /param>
</interceptor-ref>
<interceptor-ref name="conversionError" />
<interceptor-ref name="params" />
<result>/new/layout/newConfiguration_layout.jsp</result>
<result name="input">
/new/layout/new_layout.jsp
</result>
</action>
@com\comp\admin\news\newConfigurationAction-conversion.properties
newData.maxLimit=com.comp.util.converter.newLongConverter
...
@com.comp.util.converter.newLongConverter
public class newLongConverter extends StrutsTypeConverter {
public Object convertFromString(Map context, String[] values, Class
toClass) {
if (null == values || values.length == 0 || values[0]==null ||
values[0].trim().length()==0 )
return 0;
try {
int i = Integer.parseInt(values[0]);
return i;
} catch (Exception ex) {}
return 0;
}
public String convertToString(Map context, Object obj) {
if (null == obj)
return "0";
if(obj instanceof Long)
return ((Long)obj).longValue()+"";
return "";
}
}
mgainty wrote:
>
> Hi Ravi-
>
> Could you display your code for your StrutsTypeConverter class please
>
> M-
> ----- Original Message -----
> From: "ravi_eze" <ravichandrac@(protected)>
> To: <user@(protected)>
> Sent: Friday, January 25, 2008 12:58 AM
> Subject: RE: Type converters: please help!!! :(
>
>
>>
>> Thank you Jeff for the reply.
>>
>> did u mean the *converter* attribute of the action tag that we give in
>> struts.xml? I didnt give any such attribute in it. I added
>> ActionClass-conversion.properties: in which i mentioned the attribute to
>> pickup a class which implements convertFromString and viceversa
>> functions.
>>
>> My action tag in the xml are as follows:
>>
>> <struts>
>> <package name="eventsCreation" namespace="/event"
>> extends="struts-default">
>>
>> <interceptors>
>> <interceptor name="..." class="..." />
>> <interceptor name="..." class="..." />
>> </interceptors>
>>
>> <action name="oneAct" class="oneClass">
>> <interceptor-ref name="...">
>> ...
>> </interceptor-ref>
>> <result>one.jsp</result>
>> </action>
>> ...
>>
>> let me know if you are looking for anything else.
>>
>> cheers,
>> ravi
>>
>>
>> Jeff Hill (RR) wrote:
>> >
>> > Ravi,
>> > From my understanding of OGNL, it *should* use the model object's
>> > conversion
>> > descriptor. It's probably more surprising that it called
> convertFromString
>> > without it. Are you using defaultStack?
>> >
>> > I believe providing the model object's descriptor is the correct
> approach,
>> > and you indicate that it's working. So why the long face? ;-)
>> >
>> > -----Original Message-----
>> > From: ravi_eze [mailto:ravichandrac@(protected)]
>> > Sent: Thursday, January 24, 2008 11:45 PM
>> > To: user@(protected)
>> > Subject: Type converters: please help!!! :(
>> >
>> >
>> > hi,
>> >
>> > i badly need the solution to this problem. i had posted this issue on
>> > xwork
>> > forums, struts fourms previously also, but hardluck: no reply :(
>> >
>> > i am reposting the same again... atleast let me know if this idea
>> itself
>> > is
>> > wrong!!! or any better approach/ is there?
>> >
>> >
>> > ravi_eze wrote:
>> >>
>> >> hi,
>> >>
>> >> We have Action class with Employee Object with setters and getters.
>> The
>> >> Typeconverter was configured to be called when <EmployeeObject.empId>
> is
>> >> called by the jsp page. We found that convertFromString of type
> converter
>> >> is being called but convertToString is never called. Any idea why this
> is
>> >> happening? The details are as follows:
>> >>
>> >> Type converter:
>> >> public class LongConverter extends StrutsTypeConverter {
>> >> public Object convertFromString(Map context, String[] values, Class
>> >> toClass) {
>> >> ... ....
>> >> }
>> >> public String convertToString(Map context, Object o) {
>> >> ... ....
>> >> }
>> >> }
>> >>
>> >> in actionClass-conversion.properties located along with the class file
> in
>> >> the same package:
>> >> employee.empId=com.comp.util.converter.LongConverter
>> >>
>> >> After some debugging we found that we need to add a new file:
>> >> Employee-conversion.properties in the same package of Employee class
> with
>> >> entries:
>> >> empId=com.comp.util.converter.LongConverter
>> >>
>> >> and only then the convertToString would be called. I think we should
> have
>> >> only one conversion.prop file instead of 2. Any ideas why this is
>> >> happening this way? or am i missing any thing? please help.
>> >>
>> >> cheers,
>> >> ravi
>> >>
>> >
>> > --
>> > View this message in context:
>> >
> http://www.nabble.com/Type-converters%3A-convertToString-not-called-tp150349
>> > 25p15080943.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)
>> >
>> >
>> >
>>
>> --
>> View this message in context:
> http://www.nabble.com/Type-converters%3A-convertToString-not-called-tp150349
> 25p15081469.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)
>
>
>
--
Sent from the Struts - User mailing list archive at Nabble.com.

Attachment:
user_181846.ezm (zipped)--- ravi_eze <ravichandrac@(protected):
> public class newLongConverter extends StrutsTypeConverter {
> public Object convertFromString(Map context, String[] values, Class
> toClass) {
> if (null == values || values.length == 0 || values[0]==null ||
> values[0].trim().length()==0 )
> return 0;
> try {
> int i = Integer.parseInt(values[0]);
If it's a Long converter you might want to consider parsing a Long, not an
int.
That doesn't answer your question, but it still might be a good idea.
d.

Attachment:
user_181841.ezm (zipped)Hi,
I'm new in the mailing list, so hi to all users.
Little presentation : french java struts2 developer.
I have a question. I want to use richtext box with dojo (textarea
theme="ajax") but i cant. In fact, the embedded version of dojo have a error
and i need to update the dojo version. How can i make this with "simple"
operation ?
Thanks for your answers.

Attachment:
user_181843.ezm (zipped)
OK Dave, for those of us who are interested in getting 2.1 working the
original poster's question seems entirely relevant. Just what does the line
'- include the Dojo Plugin distributed with Struts 2 in your /WEB-INF/lib'
mean. I cannot find any distribution or source for said plugin either.
cheers,
Paul B.
newton.dave wrote:
>
> The docs regarding the "sx" prefix are for S2.1.
>
> d.
>
> --- greyshine <greyshine@(protected):
>
>>
>> Hi out there,
>>
>> I am trying to get a little Ajax running w/ the S2.
>> On the webpage:
>> http://struts.apache.org/2.x/docs/ajax-tags.html
>> it says:
>> - include the Dojo Plugin distributed with Struts 2
>> in your /WEB-INF/lib
>> folder.
>> - Add <%@(protected)"
>> %> to your page.
>> - Include the head tag on the page, which can be
>> configured for performance
>> or debugging purposes.
>>
>> Where do I find the plugin. I did not see one
>> shipped w/ S2 downloads?
>> I guess after I found it, it will be answer my next
>> question of the location
>> of the concerning tld to use.
>>
>> I spend hours so far looking for it and I just end
>> up feeling stupid not
>> finding it.
>>
>> If there's another post explaining the same problem.
>> I am sorry but I did
>> not find it so far...
>>
>> Best regards and thanks for any help.
>> D.
>> --
>> View this message in context:
>>
> http://www.nabble.com/-S2--dojo-plugin---I-don%27t-find-the-resources-tf4898788.html#a14030983
>> 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)
>
>
>
--
Sent from the Struts - User mailing list archive at Nabble.com.

Attachment:
user_181844.ezm (zipped)Hi,
The dojo plugin is embedded in the source struts package.
Look at struts2-core-2.0.11.jar\org.apache.struts2\static\dojo
Regards
On Jan 28, 2008 1:34 PM, paulbrickell <paul.brickell@(protected)>
wrote:
>
> OK Dave, for those of us who are interested in getting 2.1 working the
> original poster's question seems entirely relevant. Just what does the
> line
> '- include the Dojo Plugin distributed with Struts 2 in your /WEB-INF/lib'
> mean. I cannot find any distribution or source for said plugin either.
>
> cheers,
> Paul B.
>
>
> newton.dave wrote:
> >
> > The docs regarding the "sx" prefix are for S2.1.
> >
> > d.
> >
> > --- greyshine <greyshine@(protected):
> >
> >>
> >> Hi out there,
> >>
> >> I am trying to get a little Ajax running w/ the S2.
> >> On the webpage:
> >> http://struts.apache.org/2.x/docs/ajax-tags.html
> >> it says:
> >> - include the Dojo Plugin distributed with Struts 2
> >> in your /WEB-INF/lib
> >> folder.
> >> - Add <%@(protected)"
> >> %> to your page.
> >> - Include the head tag on the page, which can be
> >> configured for performance
> >> or debugging purposes.
> >>
> >> Where do I find the plugin. I did not see one
> >> shipped w/ S2 downloads?
> >> I guess after I found it, it will be answer my next
> >> question of the location
> >> of the concerning tld to use.
> >>
> >> I spend hours so far looking for it and I just end
> >> up feeling stupid not
> >> finding it.
> >>
> >> If there's another post explaining the same problem.
> >> I am sorry but I did
> >> not find it so far...
> >>
> >> Best regards and thanks for any help.
> >> D.
> >> --
> >> View this message in context:
> >>
> >
> http://www.nabble.com/-S2--dojo-plugin---I-don%27t-find-the-resources-tf4898788.html#a14030983
> >> 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)
> >
> >
> >
>
> --
> View this message in context:
> http://www.nabble.com/-S2--dojo-plugin---I-don%27t-find-the-resources-tp14030983p15134394.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_181845.ezm (zipped)
Thanks for the quick reply. I see the stuff now.
However I don't think its gonna be that easy.
When I use the sx:head element the template also gives me these...
<script language="JavaScript" type="text/javascript"
src="/application/struts/ajax/dojoRequire.js"></script>
<link rel="stylesheet" href="/application/struts/xhtml/styles.css"
type="text/css"/>
<script language="JavaScript" src="/application/struts/xhtml/validation.js"
type="text/javascript"></script>
<script language="JavaScript"
src="/application/struts/css_xhtml/validation.js"
type="text/javascript"></script>
which seem to scattered amongst various files in the distribution. I guess I
better start pulling them in. I hope I get compatible versions. Bleeding
edge eh ;-)
Julien RICHARD-2 wrote:
>
> Hi,
>
> The dojo plugin is embedded in the source struts package.
>
> Look at struts2-core-2.0.11.jar\org.apache.struts2\static\dojo
>
> Regards
>
> On Jan 28, 2008 1:34 PM, paulbrickell
> <paul.brickell@(protected)>
> wrote:
>
>>
>> OK Dave, for those of us who are interested in getting 2.1 working the
>> original poster's question seems entirely relevant. Just what does the
>> line
>> '- include the Dojo Plugin distributed with Struts 2 in your
>> /WEB-INF/lib'
>> mean. I cannot find any distribution or source for said plugin either.
>>
>> cheers,
>> Paul B.
>>
>>
>> newton.dave wrote:
>> >
>> > The docs regarding the "sx" prefix are for S2.1.
>> >
>> > d.
>> >
>> > --- greyshine <greyshine@(protected):
>> >
>> >>
>> >> Hi out there,
>> >>
>> >> I am trying to get a little Ajax running w/ the S2.
>> >> On the webpage:
>> >> http://struts.apache.org/2.x/docs/ajax-tags.html
>> >> it says:
>> >> - include the Dojo Plugin distributed with Struts 2
>> >> in your /WEB-INF/lib
>> >> folder.
>> >> - Add <%@(protected)"
>> >> %> to your page.
>> >> - Include the head tag on the page, which can be
>> >> configured for performance
>> >> or debugging purposes.
>> >>
>> >> Where do I find the plugin. I did not see one
>> >> shipped w/ S2 downloads?
>> >> I guess after I found it, it will be answer my next
>> >> question of the location
>> >> of the concerning tld to use.
>> >>
>> >> I spend hours so far looking for it and I just end
>> >> up feeling stupid not
>> >> finding it.
>> >>
>> >> If there's another post explaining the same problem.
>> >> I am sorry but I did
>> >> not find it so far...
>> >>
>> >> Best regards and thanks for any help.
>> >> D.
>> >> --
>> >> View this message in context:
>> >>
>> >
>> http://www.nabble.com/-S2--dojo-plugin---I-don%27t-find-the-resources-tf4898788.html#a14030983
>> >> 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)
>> >
>> >
>> >
>>
>> --
>> View this message in context:
>> http://www.nabble.com/-S2--dojo-plugin---I-don%27t-find-the-resources-tp14030983p15134394.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_181847.ezm (zipped)--- paulbrickell <paul.brickell@(protected):
> OK Dave, for those of us who are interested in getting 2.1 working the
> original poster's question seems entirely relevant.
Sure, but I'm not entirely clear how I'd know what version they wanted to use
if they don't tell me, and since 2.1 isn't released I'll generally provide
information for the currently released version, which isn't what the wiki
documents.
> Just what does the line '- include the Dojo Plugin distributed with
> Struts 2 in your /WEB-INF/lib' mean. I cannot find any distribution or
> source for said plugin either.
There is no distribution for the S2.1 Dojo plugin; the builds for 2.1 are
only struts-core, which isn't released. The source is available in the
repository which can be retrieved via Subversion and built with Maven. Take
the built JAR file and put it in WEB-INF/lib.
d.

Attachment:
user_181848.ezm (zipped)
Cant argue with that.
I guess a little background on what I am up to would help.
I am trying to build an application using the dojo plugin. So what I did was
include a dependency on struts core 2.1.0 snapshot and the dojo-plugin 2.1.0
snapshot in my pom file added the
http://people.apache.org/repo/m2-snapshot-repository repository and let
maven do its thing. Then following the instructions at..
http://struts.apache.org/2.x/docs/ajax-tags.html (which are public, I guess)
I tried to get my application going with a simple page using just the head
and a div tags.
what the head template outputs are some links (see my earlier post for the
details) to application/struts/* js and css files.
So what I am trying to do is assemble the components that the head template
requires and put them in the right place. It seems they are many and
distributed across multiple jars.
I will persevere as I really want to use the components, they just fit the
bill for my application perfectly.
Thanks for your help so far,
Paul B.
newton.dave wrote:
>
> --- paulbrickell <paul.brickell@(protected):
>> OK Dave, for those of us who are interested in getting 2.1 working the
>> original poster's question seems entirely relevant.
>
> Sure, but I'm not entirely clear how I'd know what version they wanted to
> use
> if they don't tell me, and since 2.1 isn't released I'll generally provide
> information for the currently released version, which isn't what the wiki
> documents.
>
>> Just what does the line '- include the Dojo Plugin distributed with
>> Struts 2 in your /WEB-INF/lib' mean. I cannot find any distribution or
>> source for said plugin either.
>
> There is no distribution for the S2.1 Dojo plugin; the builds for 2.1 are
> only struts-core, which isn't released. The source is available in the
> repository which can be retrieved via Subversion and built with Maven.
> Take
> the built JAR file and put it in WEB-INF/lib.
>
> d.
>
>
> ---------------------------------------------------------------------
> 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_181849.ezm (zipped)Hi Paul
any attempt to d/l the staging-plugin-1.0.0.zip displays invalid archive
this is perhaps a tar or gzip?
Thanks
Martin
----- Original Message -----
From: "paulbrickell" <paul.brickell@(protected)>
To: <user@(protected)>
Sent: Monday, January 28, 2008 8:26 AM
Subject: Re: [S2] dojo plugin - I don't find the resources
>
> Cant argue with that.
>
> I guess a little background on what I am up to would help.
>
> I am trying to build an application using the dojo plugin. So what I did
was
> include a dependency on struts core 2.1.0 snapshot and the dojo-plugin
2.1.0
> snapshot in my pom file added the
> http://people.apache.org/repo/m2-snapshot-repository repository and let
> maven do its thing. Then following the instructions at..
> http://struts.apache.org/2.x/docs/ajax-tags.html (which are public, I
guess)
> I tried to get my application going with a simple page using just the head
> and a div tags.
>
> what the head template outputs are some links (see my earlier post for the
> details) to application/struts/* js and css files.
>
> So what I am trying to do is assemble the components that the head
template
> requires and put them in the right place. It seems they are many and
> distributed across multiple jars.
>
> I will persevere as I really want to use the components, they just fit the
> bill for my application perfectly.
>
> Thanks for your help so far,
> Paul B.
>
>
>
> newton.dave wrote:
> >
> > --- paulbrickell <paul.brickell@(protected):
> >> OK Dave, for those of us who are interested in getting 2.1 working the
> >> original poster's question seems entirely relevant.
> >
> > Sure, but I'm not entirely clear how I'd know what version they wanted
to
> > use
> > if they don't tell me, and since 2.1 isn't released I'll generally
provide
> > information for the currently released version, which isn't what the
wiki
> > documents.
> >
> >> Just what does the line '- include the Dojo Plugin distributed with
> >> Struts 2 in your /WEB-INF/lib' mean. I cannot find any distribution or
> >> source for said plugin either.
> >
> > There is no distribution for the S2.1 Dojo plugin; the builds for 2.1
are
> > only struts-core, which isn't released. The source is available in the
> > repository which can be retrieved via Subversion and built with Maven.
> > Take
> > the built JAR file and put it in WEB-INF/lib.
> >
> > d.
> >
> >
> > ---------------------------------------------------------------------
> > To unsubscribe, e-mail: user-unsubscribe@(protected)
> > For additional commands, e-mail: user-help@(protected)
> >
> >
> >
>
> --
> View this message in context:
http://www.nabble.com/-S2--dojo-plugin---I-don%27t-find-the-resources-tp1403
0983p15135208.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_181850.ezm (zipped)--- paulbrickell <paul.brickell@(protected):
> what the head template outputs are some links (see my earlier post for the
> details) to application/struts/* js and css files.
>
> So what I am trying to do is assemble the components that the head template
> requires and put them in the right place. It seems they are many and
> distributed across multiple jars.
Mmm, all of the deps should be in the dojo-plugin and struts core, IIRC.
Are there specific issues you're running in to?
d.

Attachment:
user_181851.ezm (zipped)
Dave,
I hope you don't think you've taken on a lifetime commitment here;-)
I may be misunderstanding whats happening here, but here goes..
I have a really simple page that include the sx:head tag and an sx:div. Now
I do not not see any call to the target action for the div tag. So I started
looking at the page source and the template sources to see what the
templates for sx:head and sx:div were up to.
it appears that sx:head creates links for various resources...
<script language="JavaScript" type="text/javascript"
src="/application/struts/ajax/dojoRequire.js"></script>
<link rel="stylesheet" href="/application/struts/xhtml/styles.css"
type="text/css"/>
<script language="JavaScript" src="/application/struts/utils.js"
type="text/javascript"></script>
<script language="JavaScript" src="/application/struts/xhtml/validation.js"
type="text/javascript"></script>
<script language="JavaScript"
src="/application/struts/css_xhtml/validation.js"
type="text/javascript"></script>
None of which exists in my application. So I am guessing (never a good idea)
that I need to compose these bits from the distro.
You are right these components do exists in the libraries. Am I right in
thinking I need to copy these into my web application in the structure
required by the links in the head template?
Also I get various javascript errors...
1. Could not load 'dojo.io.BrowserIO'; last tried './io/BrowserIO.js'
2. dojo.hostenv has no properties
3. djConfig.searchIds has no properties
These I suspect are related to the version of dojo I am using (1.0.2 which
is the latest release). The path io.BrowserIO.js for example just doesn't
exists.
Man I would love to get this working. It is just what my app need.
Paul B.
newton.dave wrote:
>
> --- paulbrickell <paul.brickell@(protected):
>> what the head template outputs are some links (see my earlier post for
>> the
>> details) to application/struts/* js and css files.
>>
>> So what I am trying to do is assemble the components that the head
>> template
>> requires and put them in the right place. It seems they are many and
>> distributed across multiple jars.
>
> Mmm, all of the deps should be in the dojo-plugin and struts core, IIRC.
>
> Are there specific issues you're running in to?
>
> d.
>
>
> ---------------------------------------------------------------------
> 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.