Hi everybody,
New day, new problem :). I have a html:form in my page, with hidden fields
(don't ask why, long explanation). When you submit that form, an action is
triggered, which forwards the user to a page. The problem is, the forward is
the only thing that the action does (no additional
Hi,
Set the action field of the html:form to say /xyz.do
And put the following action mapping in struts-config.xml :
action-mappings
action path=/xyz
parameter=/NameOfTarget.jsp
type=org.apache.struts.actions.ForwardAction/
/action-mappings
RewriteTag - see http://tinyurl.com/yueget
FormTag - used in a post - why you would need to append query parameters?
LinkTag - should encode the ampersand - can you confirm this and if
its not being encoded please post a snip of your JSP showing you
usage.
Niall
On 2/7/07, Liam Brady [EMAIL
Specify the property in your form which returns the list of addresses
using the indexedListProperty element in your validation.xml -
property is then the property of a bean in that list. Something
like:
form name=Customer
field property=city indexedListProperty=addressList depends=required
Hello,
Mr. Chandrasoma I've be trying to use displaytag but I'm getting a
generic error that doesn't allow me to simple do displaytag:table
name=list/.
Can you provide a working s2/tiles/displaytag example?
Best Regards,
Gonçalo Luiz.
On 09/02/07, Nuwan Chandrasoma [EMAIL PROTECTED] wrote:
Hi Dave/All,
It worked fine even tough I had to put the fully qualified name of the field.
What is not working is when I post back to my JSP, the select field is
not automatically selected, as a workaround, I had to specify in the
value of the field a method in my action which tells what item
--- Laurie Harper [EMAIL PROTECTED] wrote:
Doh! That was the problem. I could have sworn the
examples I looked at had it at the method level.
I had done the exact same thing the first time I used
annotations (hence the @Result page :) I added more on
the topic as a result of your issues and
--- Dave Newton [EMAIL PROTECTED] wrote:
--- Laurie Harper [EMAIL PROTECTED] wrote:
Doh! That was the problem. I could have sworn the
examples I looked at had it at the method level.
I added more on the topic [...]
And no, I didn't sneak in and change the examples ;)
d.
Hi,
I have two fields in a form. I believe the validwhen rule executes a
specific rule (e.g. required) on field a based upon the value of field
b. The situation I have is that I need to execute different validations
on field a determined by the value of field b.
Is this possible client
On 2/9/07, Nathan Coast [EMAIL PROTECTED] wrote:
Hi,
I have two fields in a form. I believe the validwhen rule executes a
specific rule (e.g. required) on field a based upon the value of field
b. The situation I have is that I need to execute different validations
on field a determined by the
Hi all,
I am still facing problems with JS validation.
I'll post my code here, if somebody could help me, I'd appreciate.
struts-config.xml
form-beans
form-bean name=testForm
type=org.apache.struts.validator.DynaValidatorForm
form-property name=test
Read the bottom of this email: To unsubscribe
On 2/8/07, Ray Madigan [EMAIL PROTECTED] wrote:
unsubscribe
-
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]
can someone help me with this please. thanks.
From: fea jabi [EMAIL PROTECTED]
Reply-To: Struts Users Mailing List user@struts.apache.org
To: user@struts.apache.org
Subject: validation help
Date: Thu, 08 Feb 2007 10:01:01 -0500
Have 2 radio buttons of ID and Name and an input field to enter
If you want a good example, go to Matt Raibles AppFuse site, and
download either the AppFuse or Equinox. The example (equinox for sure)
uses the displaytag and would be a great example to understand its
workings.
The easiest is Equinox, just hit the readme, and deploy to your
webserver then go
It appears you are probably using the ValidatorForm or
ValidatorActionForm in 1.x?
Just a thought ... could you just implement the validate method in the
Action form and handle it with logic? I did some looking, and see that
you can validate two fields against each other, but I couldn't find
Hi all,
I am working in a webapplication where we have Spring JDBC in DAO
layer. Everything is fine till recent time as I am getting this
exception though I didn't make any changes in the code base.The only
change is migration of data base from 9i to 10g and JDK from 1.4.2.8 to
1.4.2.11.This
As you can see it's an SQL Exception. I suggest to print out the insert
statement and then try to execute the SQL insert in a SQL client. I think
yuu'll get the problem.
Just to show an example it does'nt work no more : do you have any stored
procedure that calculate a field id before insert ?
Thanks for the tip. I will try this out now. Another question though, is
it also possible to attach error messages for each property depending
on which property it is. An example would be:
form name=Customer
field property=city indexedListProperty=addressList
depends=required
arg0
Just tried it out and it does not work.
My code look like this:
I am using indexted='true' in my JSP file so an element looks like:
html:text name=element property=addressLine1 size=20 value=
maxlength=35 indexed=true/
The rendered JSP looks like:
input type=text
thanks Niall,
I've had a look at the examples and I'm not sure they demonstrate what I
need. The examples all seem to be simple boolean expressions e.g.
field property=address1 depends=validwhen
arg key=validWhenForm.address1 /
var
var-nametest/var-name
On 2/9/07, Chaudhary, Harsh [EMAIL PROTECTED] wrote:
Just tried it out and it does not work.
My code look like this:
I am using indexted='true' in my JSP file so an element looks like:
html:text name=element property=addressLine1 size=20 value=
maxlength=35 indexed=true/
The rendered JSP
On 2/9/07, Chaudhary, Harsh [EMAIL PROTECTED] wrote:
Thanks for the tip. I will try this out now. Another question though, is
it also possible to attach error messages for each property depending
on which property it is. An example would be:
form name=Customer
field property=city
On 2/9/07, Nathan Coast [EMAIL PROTECTED] wrote:
thanks Niall,
I've had a look at the examples and I'm not sure they demonstrate what I
need. The examples all seem to be simple boolean expressions e.g.
field property=address1 depends=validwhen
arg key=validWhenForm.address1 /
I don't think you can do this without either a custom validator or as
Jim suggests, implementing it in the validate method of your form.
Niall
On 2/9/07, Jim Reynolds [EMAIL PROTECTED] wrote:
It appears you are probably using the ValidatorForm or
ValidatorActionForm in 1.x?
Just a thought ...
Thanks for all the tips Niall. Its working to the point that is possible
using Struts. Unfortunately, that does not solve my problem. And I
cannot use your extension as we have this thing about registered jars
here at work.
I guess a custom validator it is then.
Harsh.
-Original
On 2/9/07, Chaudhary, Harsh [EMAIL PROTECTED] wrote:
Thanks for all the tips Niall. Its working to the point that is possible
using Struts. Unfortunately, that does not solve my problem. And I
cannot use your extension as we have this thing about registered jars
here at work.
I understand -
Hmmm.cool. I will check it out.
Harsh.
-Original Message-
From: Niall Pemberton [mailto:[EMAIL PROTECTED]
Sent: Friday, February 09, 2007 10:05 AM
To: Struts Users Mailing List
Subject: Re: Validating list backed struts form
On 2/9/07, Chaudhary, Harsh [EMAIL PROTECTED] wrote:
Hi I am trying to nested:iterate fro looping through am hashMap of
Hashmap of ArratListUserDefinedObject
But I get property cnt cannot be found error. When looping through the
object of arrayList, I was able to loop through the forst two hashmaps
print out their keys, but printing out the
Hello,
Well, the subject says it all, uses of taglibs are outputted as-is by
the container. My JSPs are like:
jsp:root version=2.0 xmlns:bean=http://struts.apache.org/tags-bean;
xmlns:jsp=http://java.sun.com/JSP/Page;
My web.xml's version is 2.4 so i don't declare the taglibs, shouldn't
they
Hi Niall,
thanks again for the quick response.
I've been looking at the struts and validator source and have a couple
of ideas for a solution to my problem.
1) just create an appropriate validator and execute it. Simpler but
doesn't 'feel' as good.
IntegerValidator validator =
Hm...if it doesn't work on the method level, file a ticket as it
should work that way. If nothing else we should document it better.
Don
On 2/9/07, Dave Newton [EMAIL PROTECTED] wrote:
--- Dave Newton [EMAIL PROTECTED] wrote:
--- Laurie Harper [EMAIL PROTECTED] wrote:
Doh! That was the
On 2/9/07, Nathan Coast [EMAIL PROTECTED] wrote:
Hi Niall,
thanks again for the quick response.
I've been looking at the struts and validator source and have a couple
of ideas for a solution to my problem.
1) just create an appropriate validator and execute it. Simpler but
doesn't 'feel' as
Hi all,
I've already asked for this problem, but I did not have any answer, I think
my explanation was not very clear...
I have an interceptor that makes some controls and in the case these
controls are not OK, the interceptor redirects to a special action. I would
like to forward some values
Hi,
Current snapshot for Struts 2.1.0 in the repository seams to be
broken. In struts2-core.jar, struts-tags.tld is missing from META-INF.
Also, plugins are not up-to date (they appear to be older than in
2.0.5 version).
Whan can the new snapshot be expected? The version built from CVS
seams to
excellent stuff,
It would probably have taken me a couple of weeks to get here :)
I'll let you know how I got on.
cheers
Nathan
Niall Pemberton wrote:
On 2/9/07, Nathan Coast [EMAIL PROTECTED] wrote:
Hi Niall,
thanks again for the quick response.
I've been looking at the struts and
I just noticed an error in the Subject - I meant to say ... for
2.1.0..., not 2.0.1.
Sorry.
Dj.
On 2/9/07, Djordje Trifunovic [EMAIL PROTECTED] wrote:
Hi,
Current snapshot for Struts 2.1.0 in the repository seams to be
broken. In struts2-core.jar, struts-tags.tld is missing from META-INF.
apologies if this is a dumb question, but how come there is no
validateBoolean?
Niall Pemberton wrote:
On 2/9/07, Nathan Coast [EMAIL PROTECTED] wrote:
Hi Niall,
thanks again for the quick response.
I've been looking at the struts and validator source and have a couple
of ideas for a
-BEGIN PGP SIGNED MESSAGE-
Hash: SHA1
Nathan,
Nathan Coast wrote:
this feels better as the existing framework is responsible for executing
all validations, assembling cumulative errors and creating localised
messages. I'm just not sure it's possible to add validations.
Whenever I
I am browsing through the struts2 showcase and have the need to
reproduce the type of Tree Example that exists under the tags-ui
tags example - tree example dynamic.
All makes good sense, but I am confused on how it works. How does dojo
fit into the picture, and how could I put logic on the
I am hoping someone who is working with the restful2 action mapper could tell
me if there is a way to exclude certain extensions from being mapped to
actions. Specifically, I have configured my action like so:
action name=catalog/* class=productAction
param name=productName{0}/param
The tree has been on my todo list for a while. Looking at the template
tree-node.ftl, it doesn't seem to have any way to hook events. Log
tickets for anything you think it should have.
regards
musachy
Jim Reynolds wrote:
I am browsing through the struts2 showcase and have the need to
Good Afternoon All-
In a StrutsApplication is it best to use delcare variables with volatile OR
ThreadLocal to ensure variables are referenced in a ThreadSafe manner?
Thx,
Martin Gainty
__
Disclaimer and confidentiality note
Everything in this
Thanks for the response,
Where is the proper place to log tickets at in regards to S2 issues?
Regards
On 2/9/07, Musachy Barroso [EMAIL PROTECTED] wrote:
The tree has been on my todo list for a while. Looking at the template
tree-node.ftl, it doesn't seem to have any way to hook events. Log
https://issues.apache.org/struts/browse/WW
After you register and login, you will see a Create Issue on the top.
musachy
Jim Reynolds wrote:
Thanks for the response,
Where is the proper place to log tickets at in regards to S2 issues?
Regards
On 2/9/07, Musachy Barroso [EMAIL PROTECTED]
Hi all!
Well, I've been using, along with my development team, Struts2 since version
2.0.1, and
recently moved to 2.0.5.
Everything seems allright with Struts2 performance, however, we've been doing
tests
just before shipping into production (in just a week) and have found the
following:
1)
Happy to provide an opportunity for self-promotion :-)!
I think you're right about dropping the params somewhere. I've been
trying today to set up a new approach, which seems simpler to me, but
which is still fighting me. The basic idea is to use the form to hold
the array of values I need rather
You should try debugging it. If you have Firebug installed (if you
don't, you should :) ), click on scripts, and under Options select
Break on All Errors. Or just set breakpoints inside the js code.
regards
musachy
Christopher Loschen wrote:
Happy to provide an opportunity for self-promotion
Yeah, as musachy suggests, Firebug is your friend :) I personally tend
to code my JS to always go after specific IDs rather than using any of
the common collections... that usually works just fine as long as you
don't have multiple dynamic forms.
Frank
Christopher Loschen wrote:
Happy to
OK, I've installed Firebug and also Firefox (a good thing since we
support it anyway, so it's good to have it on my system). It did find
some stuff I missed right away including the JS error on page load
(which turned out to be in a method I hadn't showed you -- oops!).
But I'm still not getting
I want to create instance of a class using object.getClass().new
Instance() but this object constructor needs another object so how can I do
this ?
Suppose I have a class
DefaultMetaInfoHandler default=new DefaultMetaInfo(test);
On 2/9/07, temp temp [EMAIL PROTECTED] wrote:
I want to create instance of a class using object.getClass().new
Instance() but this object constructor needs another object so how can I do
this ?
Suppose I have a class
DefaultMetaInfoHandler default=new
--- Don Brown [EMAIL PROTECTED] wrote:
Hm...if it doesn't work on the method level, file a
ticket as it should work that way. If nothing else
we should document it better.
I first annotated my methods, which failed, and I was
confused, but... results are defined in the XML file
for the the
--- Sébastien LABEY [EMAIL PROTECTED] wrote:
I would like to forward some values from the
interceptor
to the action it redirects to [...]
Well, you could put something in session/request etc.
if the Action implemented the proper interface, or,
perhaps a better idea, create a new interface that
True...hmm...well, at the least, we should warn people or configure
the annotation to not be able to be set at the method level.
Don
On 2/9/07, Dave Newton [EMAIL PROTECTED] wrote:
--- Don Brown [EMAIL PROTECTED] wrote:
Hm...if it doesn't work on the method level, file a
ticket as it should
--- Martin Gainty [EMAIL PROTECTED] wrote:
In a StrutsApplication is it best to use delcare
variables with volatile OR ThreadLocal to ensure
variables are referenced in a ThreadSafe manner?
Which variables, and what types?! (Note mild alarm.)
Are you attempting to share data, or ensure that
--- Don Brown [EMAIL PROTECTED] wrote:
True...hmm...well, at the least, we should warn
people or configure the annotation to not be able to
be set at the method level.
I had updated the @Result anno wiki docs based on the
OP's woes, but yeah, making it a class-level
annotation would help
after discussing a few scenarios I came upon the idea of
volatile is to be used as a default declarator (if only for speed..)
ThreadLocal is to be used for complex DataObjects whose size may 'grow' over
time
in this way ThreadLocal guarantees proper initialisation of the entire
object
Lighter
Am Donnerstag, 8. Februar 2007 schrieb Ian Roughley:
You probably don't need to send it to an action, you just need to render
the HTML form for authentication. So, login.jsp would suffice. As far
as s2 is concerned, authentication is completely external. The role
interceptor just uses the
-BEGIN PGP SIGNED MESSAGE-
Hash: SHA1
All,
I've been using struts for several years at this point, and the right
way to do error processing has always eluded me. I have web.xml
configured to display nice error pages instead of barfing everywhere
with a stack trace. I have it pointing to
I was not advocating volatile as a means of ensuring Thread safety
but more to the side effect of gaining performance
I am a strong personal advocate of synchronized but some of the leads dont
want to go that route
as it would be too intrusive to re-factor the existing base for the may
method
Sorry Martin,
but using volatile will not make your code any thread-safer.
Volatile (if implemented at all by your VM) will ensure that all
threads sees the central copy instead of their own copy. It won't
prevent you from concurrent modification.
Example:
public MyThread{
private boolean
-BEGIN PGP SIGNED MESSAGE-
Hash: SHA1
Martin,
Martin Gainty wrote:
after discussing a few scenarios I came upon the idea of
volatile is to be used as a default declarator (if only for speed..)
Volatile can do nothing but /decrease/ the speed of variable access.
Actually, most JVMs do
Hi All,
Suppose I have an action called a.A with some methods for updating
records and other for querying or just redirecting.
If I set up the validation file, it works for update but also for the
querying and redirection methods, which is not what I want.
My question is: is there a way to
From the exception stacktrace, I see that the following sql might have
problem.
INSERT INTO GWS_USERS(USR_LOGIN_N_BY, USR_PROF_UPDATE_DATE, USR_SYS_NO,
USR_DISPLAY_FUND_WATCHLIST,USR_REESTABLISH, USR_EMAIL_SUPPRESSION_FLAG,
USR_PEGA_SHARE_ID,USR_USER_TYPE, USR_EMAIL_lumn type; nested
--- Daniel Amadei wrote:
My question is: is there a way to configure the
validation for an action to work just for some
methods and not for others?
This is off the top of my head; typical grain-of-salt
warnings apply.
In addition to tweaking the list of methods that are
skipped for the
The Apache Struts project is pleased to announce the release of Struts
2.0.5 BETA
Struts 2.0.5 is available in a full distribution, or as separate
library, source, example and documentation distributions.
* http://struts.apache.org/download.cgi?struts205
It is also available in the central
Hi Dave,
It did not work for the method but worked for the action alias this way:
A-alias-validation.xml
Thanks a lot for your help again.
Daniel
2007/2/10, Dave Newton [EMAIL PROTECTED]:
--- Daniel Amadei wrote:
My question is: is there a way to configure the
validation for an action to
Yeah, JSP error reporting can be... sucky :-( A quick, dirty hack I use
in situations like this is to simply wrap the included JSP with a try/catch:
% try { %
JSP CODE HERE
% } catch (Exception e) { e.printStackTrace(); } %
Hokey, but helpful :-)
L.
Gonçalo Luiz wrote:
Hello,
I'm using
That's a known limitation of the s:select tag, which only works with
string-valued properties. The most straight-forward workaround is to set
value, as in:
s:select name=property1 value=property1.toString()/
L.
Daniel Amadei wrote:
Hi Dave/All,
It worked fine even tough I had to put the
I am trying to integrate a web application to an external service, and
need to be able to take an incoming sessionId from the external
service server, and to return details from the session to which that
sessionId applies.
I understand that there was a getSession(String sessionid) method, in
Hi,
I don't believe there is a container-neutral way to do this, I think any
solution would have to be dependent on what app server your running on
and something specific to it.
Frank
(P.S. - I could be wrong! LOL)
Mon Cab wrote:
I am trying to integrate a web application to an external
Im guessing that this might require my storing the sessionId's in the
db when the users log on. Such a shame.
--- Frank W. Zammetti [EMAIL PROTECTED] wrote:
Hi,
I don't believe there is a container-neutral way to do this, I think
any
solution would have to be dependent on what app
Mon Cab wrote:
Im guessing that this might require my storing the sessionId's in the
db when the users log on. Such a shame.
I think even doing that it wouldn't be possible to get the session
object itself... I seem to recall there being some security restrictions
around that (which makes
I have a text area and a text link in a jsp page,when I click this text
link,I will call struts2 action by using ajax,like follows:
/*-jsp page-*/
html
script type=text/javascript
var http = getHttpObject();
function getHttpObject(){
var xmlhttp = false;
if(window.XMLHttpRequest){
74 matches
Mail list logo