Author Login
Post Reply
user Digest 31 Mar 2008 18:18:54 -0000 Issue 7951
Topics (messages 184804 through 184833):
Re: how to confirm eclipse wtp contain struts 2.x?
184804 by: tanmh
Re: Eroor Message display
184805 by: Dave Newton
Re: Validation
184806 by: Rodrigo Pereira
184812 by: Kibo
184824 by: ravi_eze
Re: Initializing Actions from Spring
184807 by: georgievh
184808 by: Dave Newton
184809 by: georgievh
184816 by: Laurie Harper
184818 by: georgievh
LazyValidatorForm Problem
184810 by: puneet duggal
184811 by: Dave Newton
Re: how to refresh only included pages
184813 by: Kibo
Re: Possible to unit test actions through type converters?
184814 by: Jeromy Evans
Re: Including Freemarker templates from JSP
184815 by: Jeromy Evans
184825 by: hernan gonzalez
184826 by: hernan gonzalez
Re: Running a prepare method before the assigned action method
184817 by: Kedar Choudhary
s:url escaping "+" character
184819 by: Blanco Emanuele
184820 by: Jeromy Evans
struts-dojo-plugin-2.1.0 and googlemaps-tags
184821 by: aj2r
Re: Client Side Validation with Struts
184822 by: Lukasz Lenart
Ant based Struts2 application
184823 by: HHB
Validator: validatorResult memory issue
184827 by: Martin Choma
testing file uploads
184828 by: Adam Hardy
184830 by: Dave Newton
ajax layout - how to place 2 submit buttons one after the other?
184829 by: xianwinwin
184831 by: Dave Newton
184832 by: Lalchandra Rampersad
184833 by: Roger Varley
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_184804.ezm (zipped)Thank you :). I will work on it.
Piero Sartini wrote:
>> yes, I did go to the site. but, i'm not sure on how to make it as a
>> plugin to deploy in eclipse 3.3.
>>
>
> There is no plugin for Eclipse or any other IDE that I know. There is the
> beginning of a NetBeans plugin... but I did not look at it yet.
>
>
>> i did downloaded the war file and import into eclipse 3.3, it 's working
>> fine. is it every project I just need to copy 5 files to Web App Libraries,
>> commons-logging-1.0.4.jar
>> freemarker=2.3.8.jar
>> ognl-2.6.11.jar
>> struts2-core-2.0.11.jar
>> xwork-2.0.4.jar
>> ?
>>
>
> These and any struts2 plugins you want to use. The "Blank" Application is a
> good starting point for own applications.
>
> If you do use maven2, there is an easier way:
> mvn archetype:create -DgroupId=org.yoursite \
> -DartifactId=appname \
> -DarchetypeGroupId=org.apache.struts \
> -DarchetypeArtifactId=struts2-archetype-starter \
> -DarchetypeVersion=2.0.11 \
> -DremoteRepositories=http://people.apache.org/builds/struts/m2-staging-repository
>
>
>> then, consider is struts enabled?
>>
>
> The JARs alone do not enable s2. You need the right entrys in web.xml and put
> the struts configuration file in place.
>
>
> Piero
>
> ---------------------------------------------------------------------
> To unsubscribe, e-mail: user-unsubscribe@(protected)
> For additional commands, e-mail: user-help@(protected)
>
>
>

Attachment:
user_184805.ezm (zipped)--- aum strut <aum.struts@(protected):
> 2) Second case is where i have to check if the useris valid with respect to
> the database, and in my action class i am using a
>
> addFieldError("UserID", "Either User name or Password is Wrong"); and
*Where* are you doing that? You need to explain *how* you're trying to do
things, not just show a line of code out of context.
> <s:fielderror/> to display he error but these two are not working
> together,my server side validation is working fine but the otheris not
> working
What does that mean, your "server side validation is working fine but the
other is not"? They're both server-side validations.
Anyway, I'll take a guess with what you've provided and posit that you're not
doing the UserID validation in the validate() method, but in an execute()
method.
This means that validation has already run and returned you to your "input"
result via the workflow interceptor.
Dave

Attachment:
user_184806.ezm (zipped)Hi,
the problem is that I have a lot of fields and I'd like to position 2 fields
in a row, but xhrml theme is not letting me do that. Also, some of the
fields are poputated by an action based on the value of one of the fields in
the form (using xhtml triggers form's action vs link's). I was wondering if
there is another option.
Thanks,
Rodrigo Pereira
----- Original Message -----
From: "Nuwan Chandrasoma" <mymailnot@(protected)>
To: "Struts Users Mailing List" <user@(protected)>
Sent: Saturday, March 29, 2008 6:12 PM
Subject: Re: Validation
> Hi,
>
> Simple theme doesn't support Validation and error reporting. you may have
> to use some other theme like xhtml theme
>
> http://struts.apache.org/2.x/docs/xhtml-theme.html
>
> Thanks,
>
> Nuwan
>
> Rodrigo Pereira wrote:
>> Hi,
>> how can I position validation message on the screen? Also, when I have
>> a simple theme form I am getting JS error alert message "[object
>> Error]", does anybody know how to fix that?
>>
>> form:
>>
>> <s:form id="testForm" action="save" method="post" validate="true">
>> <table> <tr>
>> <td align="right"><s:text name="label.email"/><span
>> class="required">*</span>:</td>
>> <td><s:textfield name="user.email" value="%{user.email}" size="30"
>> theme="simple"/></td>
>> </tr>
>> </table>
>> </s:form>
>>
>> validation.xml:
>>
>> <validators>
>>
>> <field name="user.email">
>> <field-validator type="required">
>> <message key="errors.email.required"/>
>> </field-validator>
>>
>> <field-validator type="email">
>> <message key="errors.email.notValid" />
>> </field-validator>
>>
>> </field>
>>
>> </validators>
>>
>> Thanks,
>> Rodrigo Pereira
>>
>> ---------------------------------------------------------------------
>> 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_184812.ezm (zipped)
Hi
I had the same problem. The simplest is use the qxhtml theme.
See:
http://www.vitarara.org/cms/struts_2_cookbook/creating_a_theme
You can download the theme and use in Struts.
You can combine it with theme simple. See the source jsp page with form.
The second possibility is extend the simple theme and create own theme.
See:
http://struts.apache.org/2.0.9/docs/extending-themes.html
Tomas Jurman
Czech Republic
--
Sent from the Struts - User mailing list archive at Nabble.com.

Attachment:
user_184824.ezm (zipped)
hey!
you can use theme="simple". This would generate the tags as a simple text
box etc with out any trs and tds around.
positioning the errors:
<s:fielderror>
<s:param>fieldname</s:param>
</s:fielderror>
would display the erriors related to fieldname only. I think u can do the
similar way with action errors and actino messages. Give a try ;)
Hope I answered your question.
cheers,
ravi
Rodrigo Pereira wrote:
>
> Hi,
> the problem is that I have a lot of fields and I'd like to position 2
> fields
> in a row, but xhrml theme is not letting me do that. Also, some of the
> fields are poputated by an action based on the value of one of the fields
> in
> the form (using xhtml triggers form's action vs link's). I was wondering
> if
> there is another option.
>
> Thanks,
> Rodrigo Pereira
>
> ----- Original Message -----
> From: "Nuwan Chandrasoma" <mymailnot@(protected)>
> To: "Struts Users Mailing List" <user@(protected)>
> Sent: Saturday, March 29, 2008 6:12 PM
> Subject: Re: Validation
>
>
>> Hi,
>>
>> Simple theme doesn't support Validation and error reporting. you may have
>> to use some other theme like xhtml theme
>>
>> http://struts.apache.org/2.x/docs/xhtml-theme.html
>>
>> Thanks,
>>
>> Nuwan
>>
>> Rodrigo Pereira wrote:
>>> Hi,
>>> how can I position validation message on the screen? Also, when I have
>>> a simple theme form I am getting JS error alert message "[object
>>> Error]", does anybody know how to fix that?
>>>
>>> form:
>>>
>>> <s:form id="testForm" action="save" method="post" validate="true">
>>> <table> <tr>
>>> <td align="right"><s:text name="label.email"/>> class="required">*:</td>
>>> <td><s:textfield name="user.email" value="%{user.email}" size="30"
>>> theme="simple"/></td>
>>> </tr>
>>> </table>
>>> </s:form>
>>>
>>> validation.xml:
>>>
>>> <validators>
>>>
>>> <field name="user.email">
>>> <field-validator type="required">
>>> <message key="errors.email.required"/>
>>> </field-validator>
>>>
>>> <field-validator type="email">
>>> <message key="errors.email.notValid" />
>>> </field-validator>
>>>
>>> </field>
>>>
>>> </validators>
>>>
>>> Thanks,
>>> Rodrigo Pereira
>>>
>>> ---------------------------------------------------------------------
>>> To unsubscribe, e-mail: user-unsubscribe@(protected)
>>> For additional commands, e-mail: user-help@(protected)
>>>
>>>
>>>
>>
>>
>> ---------------------------------------------------------------------
>> To unsubscribe, e-mail: user-unsubscribe@(protected)
>> For additional commands, e-mail: user-help@(protected)
>>
>
>
> ---------------------------------------------------------------------
> To unsubscribe, e-mail: user-unsubscribe@(protected)
> For additional commands, e-mail: user-help@(protected)
>
>
>
--
Sent from the Struts - User mailing list archive at Nabble.com.

Attachment:
user_184807.ezm (zipped)Thank you for the reply.
I am new to both Spring and Struts2 and I apologise in advance should my
mistake is a silly one.
Please find the relevant code bellow:
web.xml:
============
<?xml version="1.0" encoding="UTF-8"?>
<!DOCTYPE web-app PUBLIC "-//Sun Microsystems, Inc.//DTD Web Application
2.3//EN" "http://java.sun.com/dtd/web-app_2_3.dtd">
<web-app >
<context-param>
<param-name>
org.apache.tiles.impl.BasicTilesContainer.DEFINITIONS_CONFIG</param-name>
<param-value>
/WEB-INF/tiles-definitions/elements/logo/logo.xml,
/WEB-INF/tiles-definitions/elements/widebanner/widebanner.xml,
/WEB-INF/tiles-definitions/elements/footer/footer.xml,
/WEB-INF/tiles-definitions/elements/navigation/navigation.xml,
/WEB-INF/tiles-definitions/layouts/layouts.xml,
/WEB-INF/tiles-definitions/pages/mainpage/mainpage.xml
</param-value>
</context-param>
<filter>
<filter-name>struts2</filter-name>
<filter-class>
org.apache.struts2.dispatcher.FilterDispatcher</filter-class>
<init-param>
<param-name>actionPackages</param-name>
<param-value>
com.gbsoft.belfin.communitypages.actions.mainpage
</param-value>
</init-param>
</filter>
<filter-mapping>
<filter-name>struts2</filter-name>
<url-pattern>/*</url-pattern>
</filter-mapping>
<listener>
<listener-class>
org.springframework.web.context.ContextLoaderListener </listener-class>
</listener>
<listener>
<listener-class>
org.apache.struts2.tiles.StrutsTilesListener
</listener-class>
</listener>
<welcome-file-list>
<welcome-file>/WEB-INF/jsp/index.jsp</welcome-file>
</welcome-file-list>
</web-app>
----------------------------
applicationContext.xml
=================
<?xml version="1.0" encoding="UTF-8"?>
<!DOCTYPE beans PUBLIC "-//SPRING//DTD BEAN//EN"
"http://www.springframework.org/dtd/spring-beans.dtd">
<beans>
<bean id="mainpageAction"
class="com.gbsoft.belfin.communitypages.actions.mainpage.MainpageAction"
singleton="false">
<constructor-arg>
<value>Buenos Dias!</value>
</constructor-arg>
</bean>
</beans>
------------------
struts.xml:
=========
<?xml version="1.0" encoding="UTF-8" ?>
<!DOCTYPE struts PUBLIC
"-//Apache Software Foundation//DTD Struts Configuration 2.0//EN"
"http://struts.apache.org/dtds/struts-2.0.dtd">
<struts>
<constant name="struts.objectFactory" value="spring" />
<constant name="struts.enable.DynamicMethodInvocation" value="false" />
<constant name="struts.devMode" value="true" />
<constant name="struts.action.extension" value="htm" />
<!-- Add packages here -->
</struts>
--------------------
MainpageAction.java:
================
package com.gbsoft.belfin.communitypages.actions.mainpage;
import
java.lang.Exception;
import
org.apache.struts2.config.Result;
import org.apache.struts2.views.tiles.TilesResult;
import
com.opensymphony.xwork2.ActionSupport;
@Result(
name="success",
value="mainpage.page",
type=TilesResult.class)
public class MainpageAction extends ActionSupport {
private String message;
public String execute() throws Exception {
return SUCCESS;
}
public String getMessage() { return message; }
public void setMessage(String message) {
this.message = message;
}
}
--
Sent from the Struts - User mailing list archive at Nabble.com.

Attachment:
user_184808.ezm (zipped)Did you say the problem was that the "message" property wasn't being
initialized?
I see a ctor arg in the Spring config, but I don't see any ctors in the
action class itself; is Spring able to "do the right thing" in this case?
I've always either used explicit ctors or set properties directly.
Dave
--- georgievh <georgievh@(protected):
>
> Thank you for the reply.
>
> I am new to both Spring and Struts2 and I apologise in advance should my
> mistake is a silly one.
> Please find the relevant code bellow:
>
> web.xml:
> ============
> <?xml version="1.0" encoding="UTF-8"?>
>
> <!DOCTYPE web-app PUBLIC "-//Sun Microsystems, Inc.//DTD Web Application
> 2.3//EN" "http://java.sun.com/dtd/web-app_2_3.dtd">
>
> <web-app >
> <context-param>
>
>
<param-name>
org.apache.tiles.impl.BasicTilesContainer.DEFINITIONS_CONFIG</param-name>
> <param-value>
> /WEB-INF/tiles-definitions/elements/logo/logo.xml,
> /WEB-INF/tiles-definitions/elements/widebanner/widebanner.xml,
> /WEB-INF/tiles-definitions/elements/footer/footer.xml,
> /WEB-INF/tiles-definitions/elements/navigation/navigation.xml,
> /WEB-INF/tiles-definitions/layouts/layouts.xml,
> /WEB-INF/tiles-definitions/pages/mainpage/mainpage.xml
> </param-value>
> </context-param>
>
> <filter>
> <filter-name>struts2</filter-name>
>
> <filter-class>
org.apache.struts2.dispatcher.FilterDispatcher</filter-class>
> <init-param>
> <param-name>actionPackages</param-name>
> <param-value>
> com.gbsoft.belfin.communitypages.actions.mainpage
> </param-value>
> </init-param>
> </filter>
>
> <filter-mapping>
> <filter-name>struts2</filter-name>
> <url-pattern>/*</url-pattern>
> </filter-mapping>
>
> <listener>
> <listener-class>
>
org.springframework.web.context.ContextLoaderListener> </listener-class>
> </listener>
>
> <listener>
> <listener-class>
> org.apache.struts2.tiles.StrutsTilesListener
> </listener-class>
> </listener>
>
>
> <welcome-file-list>
> <welcome-file>/WEB-INF/jsp/index.jsp</welcome-file>
> </welcome-file-list>
>
>
>
> </web-app>
>
> ----------------------------
>
> applicationContext.xml
> =================
> <?xml version="1.0" encoding="UTF-8"?>
> <!DOCTYPE beans PUBLIC "-//SPRING//DTD BEAN//EN"
> "http://www.springframework.org/dtd/spring-beans.dtd">
>
> <beans>
>
> <bean id="mainpageAction"
> class="com.gbsoft.belfin.communitypages.actions.mainpage.MainpageAction"
> singleton="false">
> <constructor-arg>
> <value>Buenos Dias!</value>
> </constructor-arg>
> </bean>
>
> </beans>
> ------------------
>
> struts.xml:
> =========
> <?xml version="1.0" encoding="UTF-8" ?>
> <!DOCTYPE struts PUBLIC
> "-//Apache Software Foundation//DTD Struts Configuration 2.0//EN"
> "http://struts.apache.org/dtds/struts-2.0.dtd">
>
> <struts>
>
> <constant name="struts.objectFactory" value="spring" />
> <constant name="struts.enable.DynamicMethodInvocation" value="false" />
> <constant name="struts.devMode" value="true" />
> <constant name="struts.action.extension" value="htm" />
>
>
> <!-- Add packages here -->
>
> </struts>
> --------------------
>
> MainpageAction.java:
> ================
> package com.gbsoft.belfin.communitypages.actions.mainpage;
>
> import
java.lang.Exception;
>
> import
org.apache.struts2.config.Result;
> import org.apache.struts2.views.tiles.TilesResult;
>
> import
com.opensymphony.xwork2.ActionSupport;
>
>
>
> @Result(
> name="success",
> value="mainpage.page",
> type=TilesResult.class)
> public class MainpageAction extends ActionSupport {
> private String message;
>
> public String execute() throws Exception {
> return SUCCESS;
> }
>
> public String getMessage() { return message; }
>
> public void setMessage(String message) {
> this.message = message;
> }
> }
> --
> View this message in context:
>
http://www.nabble.com/Initializing-Actions-from-Spring-tp16377674p16384249.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_184809.ezm (zipped)Sorry for the misleading.
I have a constructor.
The class is actually as follows:
package com.gbsoft.belfin.communitypages.actions.mainpage;
import
java.lang.Exception;
import
org.apache.struts2.config.Result;
import org.apache.struts2.views.tiles.TilesResult;
import
com.opensymphony.xwork2.ActionSupport;
@Result(
name="success",
value="mainpage.page",
type=TilesResult.class)
public class MainpageAction extends ActionSupport {
private String message;
public MainpageAction( String message ){
this.message = message;
}
public String execute() throws Exception {
return SUCCESS;
}
public String getMessage() { return message; }
public void setMessage(String message) {
this.message = message;
}
}
--
Sent from the Struts - User mailing list archive at Nabble.com.

Attachment:
user_184816.ezm (zipped)So what *is* the problem? Is Spring not loading the action? Is Struts
not finding the action? Something else? The code/configuration you've
posted looks basically OK.
L.
georgievh wrote:
> Sorry for the misleading.
>
> I have a constructor.
>
> The class is actually as follows:
>
> package com.gbsoft.belfin.communitypages.actions.mainpage;
>
> import
java.lang.Exception;
>
> import
org.apache.struts2.config.Result;
> import org.apache.struts2.views.tiles.TilesResult;
>
> import
com.opensymphony.xwork2.ActionSupport;
>
>
>
> @Result(
> name="success",
> value="mainpage.page",
> type=TilesResult.class)
> public class MainpageAction extends ActionSupport {
> private String message;
>
> public MainpageAction( String message ){
> this.message = message;
> }
>
> public String execute() throws Exception {
> return SUCCESS;
> }
>
> public String getMessage() { return message; }
>
> public void setMessage(String message) {
> this.message = message;
> }
> }

Attachment:
user_184818.ezm (zipped)
Attachment:
user_184810.ezm (zipped) frnds I am Using LazyValidatorForm and it dont resets when i reloads My application
thts My form bean
<form-bean name="auditorMasterbean"
type="
org.apache.struts.validator.LazyValidatorForm">
<form-property name="searchresult"
type="
java.util.ArrayList"/>
</form-bean>
<action
path="/search"
type="searchaudit"
input="/auditormaster.jsp"
name="auditorMasterbean">
<forward name="success" path="/auditormaster.jsp"/>
</action>
so when i reloads My application it still shows the previous Searched Result
Why it nor Resets
---------------------------------
Sent from Yahoo! Mail.
A Smarter Inbox.

Attachment:
user_184811.ezm (zipped)--- puneet duggal <duggal_punit@(protected):
> [...]
> <action
> path="/search"
> type="searchaudit"
> input="/auditormaster.jsp"
> name="auditorMasterbean">
> <forward name="success" path="/auditormaster.jsp"/>
> </action>
>
> so when i reloads My application it still shows the previous Searched
> Result Why it nor Resets
IIRC form beans have a default of "session" scope, meaning they'll be the
same object across user's request. You may need to add a scope attribute
(scope="request") to your <action...> element.
Dave

Attachment:
user_184813.ezm (zipped)
Hi
In Struts2 I use the ajax DIV tag
See:
http://struts.apache.org/2.x/docs/dojo-div.html
But You write: <q>I am also using a form bean uploadActionForm</q> ... and
it look like you use Struts1x.
Tomas Jurman
Czech Republic
--
Sent from the Struts - User mailing list archive at Nabble.com.

Attachment:
user_184814.ezm (zipped)I think it is possible but haven't tried it myself.
If you extend StrutsTestCase you'll have access to a Configuration
object and the ActionProxyFactory. You should be able to setup your
action and invoke it through the parameters interceptor. I couldn't
find any example unit tests that do this in Struts or XWork though.
It'll be horrible to setup but once complete you'll be able to reuse it.
Karr, David wrote:
> This might be a violation of pure "unit test" guidelines, but is it
> practical to test an action such that the type converters for properties
> are automatically executed, just like they would normally? It's nice
> that actions are plain POJOs, but I wonder if it's practical to test the
> processing of property values into the type converters.
>
> ---------------------------------------------------------------------
> To unsubscribe, e-mail: user-unsubscribe@(protected)
> For additional commands, e-mail: user-help@(protected)
>
>
>
>
>

Attachment:
user_184815.ezm (zipped)The Struts2 Component tag may be sufficient:
http://struts.apache.org/2.x/docs/component.html
hernan gonzalez wrote:
> I have some freemarker templates (general purpose, i.e. not
> specifically for struts2) that generate html fragments, which I would
> like to include in some jsp pages (in a struts2 environment).
>
> Which are my alternatives? At first I tought of making a general jsp
>
> <jsp:include page="includeFreemarkerS2.jsp">
> <jsp:param name="templateName" value="test/foo.ftl" />
> </jsp:include>
>
> where includeFreemarkerS2.jsp invokes (with Java scriptlet) my already
> working aplication logic that finds-parses-fills the template, getting
> the datamodel from the corresponding scope. But I am not sure of how
> to pass some datamodel that wraps the ValueStack to Freemarker. And I
> suspect there must be a simpler and nicer solution.
> Suggestions?
>
> Hernán
>
> ---------------------------------------------------------------------
> To unsubscribe, e-mail: user-unsubscribe@(protected)
> For additional commands, e-mail: user-help@(protected)
>
>
>
>
>

Attachment:
user_184825.ezm (zipped)Thanks.
It is indeed almost sufficient.
The docs had led to me think the "params" were the only way to pass
parameters to the template, but in fact it works as it should without
any parameters, seeking the values in the value stack.
That's fine.
The only inconvenience is the rigid scheme for specifying the file
path: ${templateDir}/${theme}/${template}. And it doesnt accept an
empty theme.
Hernán J. González
http://hjg.com.ar/
On Sun, Mar 30, 2008 at 7:40 PM, Jeromy Evans
<jeromy.evans@(protected):
> The Struts2 Component tag may be sufficient:
> http://struts.apache.org/2.x/docs/component.html
>
>
>
> hernan gonzalez wrote:
> > I have some freemarker templates (general purpose, i.e. not
> > specifically for struts2) that generate html fragments, which I would
> > like to include in some jsp pages (in a struts2 environment).
> >
> > Which are my alternatives? At first I tought of making a general jsp
> >
> > <jsp:include page="includeFreemarkerS2.jsp">
> > <jsp:param name="templateName" value="test/foo.ftl" />
> > </jsp:include>
> >
> > where includeFreemarkerS2.jsp invokes (with Java scriptlet) my already
> > working aplication logic that finds-parses-fills the template, getting
> > the datamodel from the corresponding scope. But I am not sure of how
> > to pass some datamodel that wraps the ValueStack to Freemarker. And I
> > suspect there must be a simpler and nicer solution.
> > Suggestions?
> >
> > Hernán
> >
> > ---------------------------------------------------------------------
> > 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_184826.ezm (zipped)Thanks.
It is indeed almost sufficient.
The docs had led to me think the "params" were the only way to pass
parameters to the template, but in fact it works as it should without
any parameters, seeking the values in the value stack.
That's fine.
The only inconvenience is the rigid scheme for specifying the file
path: ${templateDir}/${theme}/${template}. And it doesnt accept an
empty theme.
Hernán J. González
http://hjg.com.ar/
On Sun, Mar 30, 2008 at 7:40 PM, Jeromy Evans
<jeromy.evans@(protected):
> The Struts2 Component tag may be sufficient:
> http://struts.apache.org/2.x/docs/component.html
>
>
>
> hernan gonzalez wrote:
> > I have some freemarker templates (general purpose, i.e. not
> > specifically for struts2) that generate html fragments, which I would
> > like to include in some jsp pages (in a struts2 environment).
> >
> > Which are my alternatives? At first I tought of making a general jsp
> >
> > <jsp:include page="includeFreemarkerS2.jsp">
> > <jsp:param name="templateName" value="test/foo.ftl" />
> > </jsp:include>
> >
> > where includeFreemarkerS2.jsp invokes (with Java scriptlet) my already
> > working aplication logic that finds-parses-fills the template, getting
> > the datamodel from the corresponding scope. But I am not sure of how
> > to pass some datamodel that wraps the ValueStack to Freemarker. And I
> > suspect there must be a simpler and nicer solution.
> > Suggestions?
> >
> > Hernán
> >
> > ---------------------------------------------------------------------
> > 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_184817.ezm (zipped)meeboo wrote:
> Still no solution to this problem. How come parameters in actions with
> wildcards (for example myapp/modelObject/*) aren't parsed in the prepare
> method? They work fine when I parse them in my assigned action method :(
>
>
> meeboo wrote:
>
>> Hey again
>>
>> I'm posting via nabble, and it seems to strip out my wildcards, basically
>> my action looks like this now
>>
>> <action name="update/modelObject/*"
>> class="net.schemer.web.ObjectModelActions">
>> <interceptor-ref name="paramsPrepareParamsStack"/>
>> < param name= " id " > { 1 }
>> <result>/models/objectModel/update.jsp</result>
>> </action>
>>
>> Hopefully this is viewable.
>>
>>
>>
It is not really an issue with wildcard mapping.
Issue is with the way parameters are being set on your action class.
Your parameters are being set not by params interceptor but by staticParams interceptor.
StaticParams interceptor handles setting the parameters declared in your action mapping xml.
paramsPrepareParamsStack has staticParams interceptor after prepare, hence the issue.
To get it working prepare an interceptor stack similar to paramsPrepareParams, replace initial params with staticParams.
Regards
Kedar

Attachment:
user_184819.ezm (zipped)Hello there,
I've got a <s:url> parameter, rendered by <s:param> tag, that needs to be escaped of "+" character, because I can't get my action to work properly (I receive a space character instead of that "+" character). I guess I need to escape that character using HTML escape codes, but I don't know if Struts allows a way for doing it automatically (I'm in web development only for 1 month).
Do I need to implement a "manual" escaping using something like
java.net.URLEncoder.encode() in the prepare() method? I noticed there's an option in <s:url> tag, but it only escapes "&" characters.
Thanks in advance.
--
The information transmitted is intended for the person or entity to which it is addressed and may contain confidential and/or privileged material. Any review, retransmission, dissemination or other use of, or taking of any action in reliance upon, this information by persons or entities other than the intended recipient is prohibited. If you received this in error, please contact the sender and delete the material from any computer.

Attachment:
user_184820.ezm (zipped)Did the recent release of struts 2.0.11.1 fix this?
http://struts.apache.org/2.0.11.1/docs/release-notes-20111.html
See the JIRA details.
Blanco Emanuele wrote:
> Hello there,
>
> I've got a <s:url> parameter, rendered by <s:param> tag, that needs to be escaped of "+" character, because I can't get my action to work properly (I receive a space character instead of that "+" character). I guess I need to escape that character using HTML escape codes, but I don't know if Struts allows a way for doing it automatically (I'm in web development only for 1 month).
>
> Do I need to implement a "manual" escaping using something like
java.net.URLEncoder.encode() in the prepare() method? I noticed there's an option in <s:url> tag, but it only escapes "&" characters.
>
> Thanks in advance.
> --
> The information transmitted is intended for the person or entity to which it is addressed and may contain confidential and/or privileged material. Any review, retransmission, dissemination or other use of, or taking of any action in reliance upon, this information by persons or entities other than the intended recipient is prohibited. If you received this in error, please contact the sender and delete the material from any computer.
>
> ---------------------------------------------------------------------
> To unsubscribe, e-mail: user-unsubscribe@(protected)
> For additional commands, e-mail: user-help@(protected)
>
>
>
>
>

Attachment:
user_184821.ezm (zipped)
I'm trying to use googlemaps-tags http://www.lamatek.com/GoogleMaps/ with
struts-dojo, but when I load in a div the action that returns googlemaps
jsp, googlemaps-javascript is missing and obviously it doesn't work. If I
call the action directly from navigator all is ok. I've try to use
executeScript param but then the div shows the transport text error "Error
loading '/...../.../list.action (200 OK)". Really, javascript is missing
allways when I load actions using dojo tags. Any idea? Thanks
--
Sent from the Struts - User mailing list archive at Nabble.com.

Attachment:
user_184822.ezm (zipped)> Hello. I am using Struts 1.3.8. The issue is not one of making the
> Javascript work (it is working correctly), but rather preventing a
> Struts action from being called. Is this possible given that the
> action of a form is a Struts action?
I'm not sure if I understand you, but all you have to do is return
true or false from your JavaScript function (as you doing), and that
will prevent a web browser to submit form and send them to a www
server. And if there be no request from web browser, there be no
action called.
Please copy/paste the web page content you had got when you started your form.
Regards
--
Lukasz
http://www.linkedin.com/in/lukaszlenart

Attachment:
user_184823.ezm (zipped)
Hi.
Struts2 prefers Maven as the building tool, do know any on line sample
Struts2 application that uses Ant instead of Maven?
I can write one by hand but I'm looking for Ant script that is production
aware.
Thanks.
--
Sent from the Struts - User mailing list archive at Nabble.com.

Attachment:
user_184827.ezm (zipped)Hi everybody,
We wonder if it is possible to safely null validatorResult in ValidatorForm
after succesfull
validation. It could bring our application big memory effort as all our form
are session scope.
And validatorResult for some pages have 40K!!. As we found this structure is
already nulled in reset()
method of ValidatorForm and build again so IMHO should be safe. But aren't
we missing something?
We still question ourselves Why then isn't struts doing something like that
automatically.
Thanks for all yout comments.
(We are using struts 1.2.9 for our project and Jakarta Common Validator in
version 1.1.4)

Attachment:
user_184828.ezm (zipped)I need to test an action that is getting uploaded files and piping them straight
into Strings. I don't want to save actual files on server, so I'll get the
multipart request wrapper directly.
MultiPartRequestWrapper multiWrapper =
(MultiPartRequestWrapper) ServletActionContext.getRequest()
I'm thinking of using HttpUnit and ServletUnit to set this stuff up. Has anyone
set up Struts2 with ServletUnit?
By the way, has anyone used Mockito yet, the new mocking framework?
http://code.google.com/p/mockito/

Attachment:
user_184830.ezm (zipped)--- Adam Hardy <ahardy.struts@(protected):
> I need to test an action that is getting uploaded files and piping them
> straight into Strings. I don't want to save actual files on server, so I'll
> get the multipart request wrapper directly.
What, specifically, are you trying to test?
I ask because I've never had any particular reason to test file uploads
inside the container, because the container itself should have already tested
that and verified its operations. Everything else I've ever done with files
has been testable outside the container.
I may have misunderstood what you're asking, though.
Dave

Attachment:
user_184829.ezm (zipped)
Hi guys,
I've been strugling with this one for a while: How is it possible to
place 2 (or more) buttons one after the other?
Currently, my buttons looks like this:
[update]
[test]
and I wish to have: [update] [test]
my jsp code:
<s:submit action="email_updateEmail" value="%{'update'}" align="center"
theme="ajax" targets="confirm_result" />
<s:submit action="email_testEmail" value="%{'test'}" align="center"
theme="ajax" targets="confirm_result" />
--
Sent from the Struts - User mailing list archive at Nabble.com.

Attachment:
user_184831.ezm (zipped)--- xianwinwin <xianwinwin@(protected):
> I've been strugling with this one for a while: How is it possible to
> place 2 (or more) buttons one after the other?
>
> Currently, my buttons looks like this:
>
> [update]
> [test]
>
> and I wish to have: [update] [test]
There are at least three choices:
(1) Do something via CSS (inline or something)
(2) Modify the existing Ajax theme
(3) Create a new theme
(2) and (3) involve extracting one or more themes (a good idea for
performance anyway) and either modifying a current theme or creating a new
one.
Dave

Attachment:
user_184832.ezm (zipped)Check to see if your column is wide enough to hold 2 buttons side by side
-----Original Message-----
From: xianwinwin [mailto:xianwinwin@(protected)]
Sent: Monday, March 31, 2008 10:41 AM
To: user@(protected)
Subject: ajax layout - how to place 2 submit buttons one after the other?
Hi guys,
I've been strugling with this one for a while: How is it possible to
place 2 (or more) buttons one after the other?
Currently, my buttons looks like this:
[update]
[test]
and I wish to have: [update] [test]
my jsp code:
<s:submit action="email_updateEmail" value="%{'update'}" align="center"
theme="ajax" targets="confirm_result" />
<s:submit action="email_testEmail" value="%{'test'}" align="center"
theme="ajax" targets="confirm_result" />
--
http://www.nabble.com/ajax-layout---how-to-place-2-submit-buttons-one-after-
the-other--tp16397732p16397732.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_184833.ezm (zipped)>
> There are at least three choices:
>
> (1) Do something via CSS (inline or something)
> (2) Modify the existing Ajax theme
> (3) Create a new theme
>
I know I'm probably going to be shot down in flames for this, but why do the
Struts 2 tags attempt to control any sort of layout? Why is there not a theme
that simply renders the tags and relies on a seperate CSS to do the layout.
(I know .. and if I had the skill, I'd probably try)
Regards