Hi,
Thanks for your reply, but i am talking about UI screen, not a
table display. in the screen itself for every control i want to apply an
alternate back ground color. for example
s:textfield name=empid label=Employee ID :
s:textfield name=empname label=Employee Name :
these two
hi,
i didnt get you. I have a page for which i need to do some preprocessing to
display it. After the page is done by user it has to be processed. Can you
please elaborate on the soln given?
ravi
Gabriel Belingueres-2 wrote:
Sorry it seems I entered the conversation later and didn't saw
Pierre Thibaudeau wrote:
But your statement about EL intrigues me. How would you do that in EL? Is
there some value available to EL in the request context?
simply ${pageContext.request.requestURI}
The benefit of EL is that your IDE (hopefully) understands it, which in
my opinion is
Hi,
I have extended Simple theme (by modifying XHTML theme),
implemented the column span for every control as given below.
s:textfield label=Trucker name=truker size=70
s:param name=labelcolspan value=%{2} /
s:param name=inputcolspan value=%{6} /
/s:textfield
it is working
yes it doesnt. Atleast in version 2.0.9. i heard its fixed in 2.1 version.
you can write a reset interceptor also for this. i.e. always (before param
interceptor) reset the checkbox field. If there is some checkbox getting
submitted then you will get them, else the field would be reset by the
The benefit of EL is that your IDE (hopefully) understands it,
I wish my MyEclipse JSP editor was as clever as that... (Should I just
revert to Eclipse with the correct collection of plugins? or maybe switch to
IntelliJ?)
In any case, thanks a million!
Hi all!
Been looking all over the net but my validation simply isn't working :(
I have a JSP page with a dropdown box in a form.
I just want to make sure the value in the dropdown box is not empty.
It currently looks like this:
s:form action=3Dmyaction method=3Dpost validate=3Dtrue
s:textfield name=empid label=Employee ID : cssClass=class1
s:textfield name=empname label=Employee Name : cssClass=class2
.class1{
background-color:red;
}
.class2{
background-color:blue;
}
Sorry I have not seen your earlier mail, what ever you want to do using
class
Regards,
Nicole Luneburg wrote:
s:form action=3Dmyaction method=3Dpost validate=3Dtrue
The validate attribute here is used to enable client-side validation
only. That will only work if you include the s:head attribute in the
page.
My setup is that I have an Action class, which uses a Form
If you want validation like in struts1 you can implement the interface
com.opensymphony.xwork2.Validateable in your Action class. The method
validate() is the same as in your struts1 FormBean.
But maybe that's a bit old fashioned :)
Regards
--
Markus Stauffer
On Mon, Jul 14, 2008 at 8:54 AM,
ps. My post added some 3D text that isn't supposed to be there ...
Thanks Jeromy.
Yes I do have a s:head attribute, maybe not *exactly* but I have:
s:head theme=ajax /
Apologies for the confusion.
What I meant in my pevious post was that I had tried a few ways to do this
validation task.
In my
Struts2 does not have FormBeans anymore. All the form fields are
instance variables directly in your Action class. Simply include a
variable fieldName of type String with getters and setters in your
Action class. The setFieldName() method will be called when you submit
the form. In the execute()
Hi!
Will REST plugin replace JSON plugin in Struts 2.1?
To my mind JSON plugin was very REST-like, and I was
really hoping that it would evolve into something that
REST plugin claims to be.
Also, do REST and JSON plugins have anything in common?
After I read REST plugin author's Struts 2 in
Oleg Mikheev wrote:
Hi!
Will REST plugin replace JSON plugin in Struts 2.1?
To my mind JSON plugin was very REST-like, and I was
really hoping that it would evolve into something that
REST plugin claims to be.
Also, do REST and JSON plugins have anything in common?
They're not related except
Hi Jishnu,
Thanks for your reply, it applies background color to the text
field, but i want it to be applied to that entire row(that have label
employee id and text field), not to the text field component alone.
On Mon, Jul 14, 2008 at 12:19 PM, Jishnu Viswanath
[EMAIL PROTECTED]
hi
Thanks
i have see documents and search for applying single sign on feature and
jdbc realm for security but i can not get properly ,could you provide me
some links which can use to understand from scratch all this things,
thanks
--
View this message in context:
I don't have much idea, but you can give it a try on s:label
value=Employee ID cssClass=class2/
Regards,
Jishnu Viswanath
Software Engineer
*(+9180)41190300 - 222(Ext) ll * ( + 91 ) 9731209330ll
Tavant Technologies Inc.,
www.tavant.com
PEOPLE :: PASSION :: EXCELLENCE
-Original
Because I want just a simple list of actionErrors, I have an iterator for the
actionErrors such as:
s:iterator value=actionErrors
s:property/
/s:iterator
However, how can I use Css calsses on the property? I want to display the
error in red, but the property element doesn't have any CSS
Hi,
I'm having problem with Struts2 and indexed properties.
The list in my action is not being updated.
My JSP is something like:
logic:iterate id=coverTypes name=questionnaireVO.coverTypesList
indexId=index
input type=hidden
Hi,
I'm having problem with Struts2 and indexed properties.
The list in my action is not being updated.
My JSP is something like:
logic:iterate id=coverTypes name=questionnaireVO.coverTypesList
indexId=index
input type=hidden
Hello.
Some days ago I looked in source code of project in ASP.net 2.
Here I saw a good architectural alternative to:
lt;%@ include file=/include/header.jsp %
body
lt;%@ include file=/include/footer.jsp %
It looks like this:
Page 1:
lt;%@ CodeFile=EditUsers.aspx.cs
2008/7/14 Igor Vlasov [EMAIL PROTECTED]:
Do we have some similar mechanism is JSP 2 + struts2?
Well, Tiles:
http://tiles.apache.org/
Struts 2 has a Tiles plugin:
http://struts.apache.org/2.x/docs/tiles-plugin.html
Antonio
-
Hello,
Do we have some similar mechanism is JSP 2 + struts2?
Or Do i must use struts2++ library?
JSP can not do that out of the box. But there are very good solutions
available. Have a look at Sitemesh or Tiles2:
- http://struts.apache.org/2.x/docs/sitemesh-plugin.html
-
Piero Sartini-3 wrote:
Hello,
Do we have some similar mechanism is JSP 2 + struts2?
Or Do i must use struts2++ library?
JSP can not do that out of the box. But there are very good solutions
available. Have a look at Sitemesh or Tiles2:
-
Hello List...
I tried to extend a existing webapp based on a own framework with some
actions using struts2.
After I added all necessary libraries, the struts2 filter and the
struts.xml I have some errors when the tomcat starts up. (see further
below)
Whats odd about that - I can call a defined
Calling an action's input() method is a shortcut to render the page
pointed by the input result.
If you need to do some processing before displaying the page, just
implement a regular action.
2008/7/14 ravi_eze [EMAIL PROTECTED]:
hi,
i didnt get you. I have a page for which i need to do some
You could pass a css class to the s:actionerror tag.
If the HTML code that produces s:actionerror doesn't satisfy you,
you can define your own actionerror.ftl template.
2008/7/14 wild_oscar [EMAIL PROTECTED]:
Because I want just a simple list of actionErrors, I have an iterator for the
struts-config is not a the document root element of S2's struts.xml
file. That's the root element of S1 configuration file.
2008/7/14 Jan Froehlich [EMAIL PROTECTED]:
Hello List...
I tried to extend a existing webapp based on a own framework with some
actions using struts2.
After I added all
If you don't have an action property named fieldname then not only will
validation not work but neither will normal property copying (from form to
action).
If, for example, you have a MyForm named form, and has an appropriate
getter/setter, its form element would look like this:
s:textfield
--- On Mon, 7/14/08, wild_oscar [EMAIL PROTECTED] wrote:
s:iterator value=actionErrors
s:property/
/s:iterator
However, how can I use Css calsses on the property? I want
to display the error in red, but the property element doesn't
have any CSS property. What's the best way of applying
The S2 version is 2.1.3-SNAPSHOT. The exact same project was working some time
ago with 2.1.1-SNAPSHOT. So maybe this is something that got broken in newer
builds.
The problem seems to be that Freemarker can't get its configuration at this
point. But ActionContextCleanUp is the first filter in
I am new to the web development, but I like the concept of this answer. Could
you explain more about how to setup/configure the interceptor? i.e. How to hook
up your interceptor method with the server? Thanks!
-Original Message-
From: Struts Two [mailto:[EMAIL PROTECTED]
Sent:
Well, ok thats really odd... The libs and configuration I added are definetely
s2.
If you take a look at the other error I got - executed actions but in
properties just returns the DefaultTextProvider - can you give me a hint about
that? Might be that I got two issues
Thanks in advance!
Thank you.The tag works fine for now. I will also look into modifying the
actionerror template when I need a more customized tag.
newton.dave wrote:
--- On Mon, 7/14/08, wild_oscar [EMAIL PROTECTED] wrote:
s:iterator value=actionErrors
s:property/
/s:iterator
However, how can I use
The original idea behind the JSON plugin was to use an external
library to serialize the objects, xstream to be more specific. But
xstream json wasn't even usable at that point and json-lib didn't look
that good to me. I think Struts 2 should include a json plugin, and
yes we could delegate the
HI
According to help of some previous threads i have created Login
interceptor,i really such thankful to all helpful people who help me in this
discussion please
http://www.nabble.com/about-current-action-name-acsess-td15736383.html#a15755941
Check here and read out from first thread ,you
hi
it might be this question is not related s2 but still i want to ask
i am using one public function in one class which get key,value pair from
database query fire and fill in linked hashmap
and return iterator to access on jsp page
i have used jsp:usebean of this class to get access public
Maybe the header of your struts.xml does use the wrong DTD.
The correct header looks like this:
?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;
Am Montag, 14. Juli 2008
Hi all,
I am new on the list and new using struts. Trying to run a simple
application that I took from the web (
http://www.abqswt.com/tutorials/basicStruts/index.php ) keep getting
the following message, but cannot find out what the real problem is.
Any help will be very usefull.
Hi,
we have an action which we call with url paramters from other applications.
But now we found out, that we have problems with mutated wowels like äöü.
Instead of tls-hölter we get tls-hölter in the parameterMap of the
servletRequest (I debugged).
I assume that the parameters are decoded
Hello,
you can try the following settings in struts.xml:
constant name=struts.i18n.encoding value=UTF-8/
constant name=struts.locale value=de_DE/
Please let me know if this resolves your issue.
Piero
Am Montag, 14. Juli 2008 15:25:14 schrieb Marc Eckart:
Hi,
we have an
Without the configuration it'll be tough to help.
Any particular reason you're using Struts 1 instead of Struts 2?
Dave
--- On Mon, 7/14/08, Dante A. Castiglione Maldonado wrote:
From: Dante A. Castiglione Maldonado [EMAIL PROTECTED]
Subject: problem running a simple struts app
To:
Thanks a lot
No, no particular reason. I thought it would be easier to learn.
Should I go to version 2?
What configuration information/files should i send?
2008/7/14 Dave Newton [EMAIL PROTECTED]:
Without the configuration it'll be tough to help.
Any particular reason you're using Struts 1
--- On Mon, 7/14/08, Dante A. Castiglione Maldonado wrote:
I thought it would be easier to learn. Should I go to version 2?
Yes.
What configuration information/files should i send?
The struts configuration file.
Dave
-
To
Thank you very much
Here are the files
2008/7/14 Dave Newton [EMAIL PROTECTED]:
--- On Mon, 7/14/08, Dante A. Castiglione Maldonado wrote:
I thought it would be easier to learn. Should I go to version 2?
Yes.
What configuration information/files should i send?
The struts configuration
+1 for a pluggable serializer. I dont like the internal json plugin
serializer that much and yes, the plugin should be included in the
distro because json is that popular these days
--
Marc Logemann
blog http://logemannreloaded.blogspot.com
privat http://www.logemann.org
Am
--- On Mon, 7/14/08, Dante A. Castiglione Maldonado wrote:
Here are the files
In general, attachments are a bad idea on the mailing list.
You have an essentially empty web.xml; you need to configure the ActionServlet.
http://struts.apache.org/1.3.8/userGuide/configuration.html#dd_config
It
It should be easy to plug in a new serializer (only JSONUtil needs to
be changed I think). If you have suggestions on how to improve the
current serializer, let me know, or even better, a patch ;)
musachy
On Mon, Jul 14, 2008 at 11:05 AM, Marc Logemann [EMAIL PROTECTED] wrote:
+1 for a
Hi, I´m developing a project with Struts 1.2. When trying to display
html:errors in a jsp page, the errors saved in SaveMessages are displayed,
but not correctly, for example:
in showerrors.jsp:
???es.error.wrong.password???
instead of:
Your password is wrong.
The
Hi all,
maybe it's related with tomcat (or another container You use),
One should add URIEncoding=utf-8 in connector like this:
Connector port=8080 protocol=HTTP/1.1
connectionTimeout=2
redirectPort=8443
URIEncoding=utf-8/
Hope this helps.
Best
Hi,
How did you configure the messages in struts-config? It should be
something like this:
message-resources parameter=MessageResources/
Regards
--
Lukasz
http://www.lenart.org.pl/
-
To unsubscribe, e-mail: [EMAIL PROTECTED]
I have an interceptor that puts an object in the Session scope.
The interceptor calls the following when retrieving the Session:
public String intercept(ActionInvocation invocation) throws Exception {
ActionContext context = invocation.getInvocationContext();
Ok, the problem was that since 2.1.3 the filters changed:
org.apache.struts2.dispatcher.ng.filter.StrutsPrepareFilter
instead of ActionContextCleanup and
org.apache.struts2.dispatcher.ng.filter.StrutsExecuteFilter
instead of the FilterDispatcher.
Now everything works like expected. I will update
I have a mainLayout which has a header, body and footer.(and thus I have
4 jsps, mainLayout.jsp, header.jsp, body.jsp, and footer.jsp, and notice
that body.jsp will be different for each different screen page).
One setting can be of:
!-- shared by all --
definition name=mainLayout
I have a mainLayout which has a header, body and footer.(and thus I have
4 jsps, mainLayout.jsp, header.jsp, body.jsp, and footer.jsp, and notice
that body.jsp will be different for each different screen page).
One setting can be of:
!-- shared by all --
definition name=mainLayout
That's because the tiles inheritance you are trying to use doesn't make
sense. The managerPage1 tile does NOT have a middle element in the
parent tile (which is defined in the managerBody tile). You probably
need to use a different strategy, perhaps check the role and forward to
the proper
It is configured as:
struts-config.xml
message-resources parameter=ApplicationResources null=false /
In web.xml is not defined.
The ApplicationResources.properties file is under:
proyect_name/Webroot/WEB-INF/lib/ApplicationResources.properties
And the jsp code:
logic:messagesPresent
Don is still working on those changes, you could open a ticket to make
sure everything gets documented.
musachy
On Mon, Jul 14, 2008 at 1:22 PM, Piero Sartini [EMAIL PROTECTED] wrote:
Ok, the problem was that since 2.1.3 the filters changed:
I got the same problem a few moments ago
I put the ApplicationResources.properties file under WEB-INF/classes
and it worked ok
2008/7/14 [EMAIL PROTECTED]:
It is configured as:
struts-config.xml
message-resources parameter=ApplicationResources null=false /
In web.xml is not defined.
The ApplicationResources.properties file is under:
proyect_name/Webroot/WEB-INF/lib/ApplicationResources.properties
Move to the /WEB-INF/classes
Regards
--
Lukasz
http://www.lenart.org.pl/
-
To unsubscribe, e-mail: [EMAIL
Hi,
That was the correct path, I didn´t know about it.
Thank you for your answers, guys. ;-)
- Original Message -
From: Lukasz Lenart [EMAIL PROTECTED]
To: Struts Users Mailing List user@struts.apache.org
Sent: Monday, July 14, 2008 8:22 PM
Subject: Re: message resources ???key???
I added a warning box with title Struts 2.1.3 to the wiki page of
struts2-sitemesh-plugin. Hope this is ok... I looked there before searching
the code, maybe it helps others.
Is there a solution for the version problem in the wiki now? I remember
there was no way to handle this some time ago.
Where in the interceptor chain do your custom interceptor execute?
2008/7/14 Pierre Thibaudeau [EMAIL PROTECTED]:
I have an interceptor that puts an object in the Session scope.
The interceptor calls the following when retrieving the Session:
public String intercept(ActionInvocation
I added a warning box with title Struts 2.1.3 to the wiki page of
struts2-sitemesh-plugin. Hope this is ok... I looked there before searching
the code, maybe it helps others.
yes that is perfect, thanks.
Is there a solution for the version problem in the wiki now? I remember
there was no
Is anyone aware of how to use validation files in a way similar to message
resources? I am finding too much if/else code in Struts 2 actions where for
example input field lengths are a function of locale!
--
View this message in context:
Hi All,
I am using Strut 2.0 and tiles with Spring and I am having the following
issue in the validation framework.
When ever I submit a form with error in a field, subsequent submission of
the same form (without valid value), generates duplicate error messages.
i.e If i leave the first name
Hi,
you can save it into session and use it to display on jsp page.
--
Milan
hns wrote:
hi
it might be this question is not related s2 but still i want to ask
i am using one public function in one class which get key,value pair from
database query fire and fill in linked hashmap
2008/7/14 Gabriel Belingueres [EMAIL PROTECTED]:
Where in the interceptor chain do your custom interceptor execute?
interceptor-stack name=customStack
interceptor-ref name=userLanguage/
interceptor-ref name=debugging/
interceptor-ref
Extra update.
What makes this even more puzzling is that EL can find the object while OGNL
cannot. On the first request,
${userLanguage} will display the correct value, but
s:property value=#session['userLanguage']/ will display nothing.
On the second request, both expressions will display the
Did you put singleton=false or scope=prototype for action's beans in
spring config?
Regards
--
Lukasz
http://www.lenart.org.pl/
-
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]
that worked like a gem...thanks!
Lukasz Lenart wrote:
Did you put singleton=false or scope=prototype for action's beans in
spring config?
Regards
--
Lukasz
http://www.lenart.org.pl/
-
To unsubscribe, e-mail:
That's strange.
Which S2 version are you using?
2008/7/14 Pierre Thibaudeau [EMAIL PROTECTED]:
Extra update.
What makes this even more puzzling is that EL can find the object while OGNL
cannot. On the first request,
${userLanguage} will display the correct value, but
s:property
Hi:
Can anyone tell me where I can get the latest binaries for struts 2.1..x that
contains the fixes since the struts 2.1.2 build release on 02-May-2008. I would
like to test JIRA WW-2642 that I opened using 2.1.2 and have the issue closed.
All I need is the sample applicaiton{hello world) with
On Monday 14 July 2008 00:30:19 Jeromy Evans wrote:
Dave Belfer-Shevett wrote:
In my JSP, I have:
Preferred cid is s:property value=#attr.properties[preferredcid]/br
This expression reads evaluate perferredcid, then get the value of
#attr.properties[evalresult].
I expect you want.
2008/7/14 Gabriel Belingueres [EMAIL PROTECTED]:
That's strange.
Which S2 version are you using?
Struts 2.1.2
Please test your interceptor using the following to get the session:
Map session = invocation.getInvocationContext().getSession();
2008/7/14 Pierre Thibaudeau [EMAIL PROTECTED]:
2008/7/14 Gabriel Belingueres [EMAIL PROTECTED]:
That's strange.
Which S2 version are you using?
Struts 2.1.2
Re you using struts 2 itself?
If yes it would look something like this
s:iterator value=listName status=stat
input name=someName[s:property value='stat.index'/]
/s:iterator
The code you send looks like struts 1
Regards,
Jishnu Viswanath
Software Engineer
*(+9180)41190300 - 222(Ext)
Hi all,
Can any one tell me where do I specify that I want to use
messages_en.properties or messages_de.properties?
By the way I am using struts 2.
And one more thing, does browser any intention that it's DE or EN?
Regards,
Jishnu Viswanath
Software Engineer
*(+9180)41190300 -
2008/7/14 Gabriel Belingueres [EMAIL PROTECTED]:
Please test your interceptor using the following to get the session:
Map session = invocation.getInvocationContext().getSession();
Well, Gabriel:
a) I'll be d*mned!
b) You're a genius! ;) (I would never have thought of looking that way!)
Hi,
I´m trying to use Struts 1.2 Validator plugin. I guess something in
struts-config.xml is missing or wrong. If I add the necessary code to use the
plugin validator:
plug-in classname=org.apache.struts.validator.ValidatorPlugIn
set-property
property=pathnames
Jeromy,
Thanks *heaps* for finfing the time to do that. I'd pretty much done
everything your demo does except for one little detail:
constant name=struts.patternMatcher value=namedVariablePatternMatcher/
Doh!
Now to see if that's broken my fancy pants image handler...
BTW, if I want a
Seems like something is not correctly initialized in OGNL when you get
the session from the HTTPServletRequest object this way (it should be
documented somewhere or otherwise fix it.)
But you don't need to get both the HTTPSession and the Map to put
something in session scope. The SessionMap is
The easiest (and most reliable) is to build from source yourself... In a
nutshell, do the following -
svn co
https://svn.apache.org/repos/asf/struts/current/ struts
cd struts
svn co http://svn.opensymphony.com/svn/xwork/trunk xwork
cd xwork
mvn -Pall clean install
(wait until complete)
cd
Thanks for the heads up! I'm learning every day!
And yes, I concur: this definitely needs to be documented!
2008/7/14 Gabriel Belingueres [EMAIL PROTECTED]:
Seems like something is not correctly initialized in OGNL when you get
the session from the HTTPServletRequest object this way (it should
Ah!
Now I understand ... Looks like I will be changing a few things in this project
...
Thanks for your help!
-Original Message-
From: Dave Newton [mailto:[EMAIL PROTECTED]
Sent: Monday, 14 July 2008 10:22 PM
To: Struts Users Mailing List
Subject: RE: struts2 validation
If you don't
Dave Belfer-Shevett wrote:
That fixed it. Is there a chance we can update the 'collections' page in the
struts docs to give information like this?
Great! Can you please post a comment to the relevant docs page so one
of the developers remembers to update it?
You're also welcome to
Mike Watson wrote:
BTW, if I want a controller to work in multiple namespaces do I need
to declare seperate packages in struts.xml instead of just relying on
the @Namespace annotation?
Thanks again for all your help.
Unfortunately when using Codeheind, you do have to create a new package
any one please reply to this... i am kind of stucked
On Mon, Jul 14, 2008 at 11:49 AM, Narayana S [EMAIL PROTECTED] wrote:
Hi,
I have extended Simple theme (by modifying XHTML theme),
implemented the column span for every control as given below.
s:textfield label=Trucker
In case it helps anyone else, I found a simple solution ... Annotations.
I did exactly what is here:
http://struts.apache.org/2.x/docs/validation-annotation.html
Thanks again for everyone's help!
The contents of this email are confidential and may be subject to legal or
professional privilege
HI
Thanks for reply
but session is appropriate for large size map stored in it?
it can works fine?
please reply
--
View this message in context:
http://www.nabble.com/about-iterating-values-tp18444913p18458485.html
Sent from the Struts - User mailing list archive at Nabble.com.
90 matches
Mail list logo