Andy.de ha scritto:
Hi Antonio,
i do not understand. The action is executed if the form is submitted, this
is
after the jsp has been displayed.
Yeah, you're right I was missing a point. You have to call ANOTHER
action that prepopulates an object and puts it, for example, in request
scope, the
Thanks Wendy. I am trying to validate an array of ints.
The following should be true:
1. The array is not null.
2. The first value in its index should be higher than 0.
3. If the first value is 0 then its length must be greater than 2.
The following validation failed miserably:
On 9/26/06, Chetan Pandey <[EMAIL PROTECTED]> wrote:
In my form I have
Int [] roleIds = null.
This is used as the Underlying Datatype of a multiple-select Drop-down.
Everything works fine but I am not sure how to validate?
The following that I tried did not work:
Hi All:
In my form I have
Int [] roleIds = null.
This is used as the Underlying Datatype of a multiple-select Drop-down.
Everything works fine but I am not sure how to validate?
The following that I tried did not work:
test
(*t
Actually, value of "print" variable is not fixed. It
can be 0 (not printable) or 1 (printable version). So
unless, I could get this value from
request.getParameter, I can't even make it hidden.
Thanks
Vinod
--- Uday Chandra Karrothi <[EMAIL PROTECTED]>
wrote:
> Can you use the formBean?
> Someth
I think I see the problem, it was with my example, it should have been:
var value =
radioValue(document.formName.elements["apprEntry[0].primary_or_adjunct"]);
where "formName" is the value of the name attribute of the form tag.
(*Chris*)
On 9/26/06, Uday Chandra Karrothi <[EMAIL PROTECTED]>
Can you use the formBean?
Something like pgForm.getPrint(); // i am not sure though
or
you can try this.
Declare Print as a hidden variable in the jsp page. That way i think
you will be able to access the variable.
try this. I hope that works.
Uday
On 9/26/06, Vinod Kumar <[EMAIL PROTECTED]>
Take a look at http://struts.apache.org/1.1/faqs/newbie.html#prepopulate (How
can I prepopulate a form?)
I believe that the struts-example.war example application that is shipped
with Struts 1.1 has the code for doing what you want. I believe that you want
to look at the editRegistration ac
<@s.textfield name="user.userName"
label="%{getText('user.userName')}"/>
should work, but, yes, this is an area where the Struts 2 tags are
still strangely verbose.
Feel free to file a feature request for concise alternative syntax.
To lookup mesages resources in the S2 validati
On 9/26/06, Labey Sébastien <[EMAIL PROTECTED]> wrote:
Hi, I'm new to Struts2 and i don't really understand how does Interceptor
technique work.
There's an example of an Interceptor in the MailReader example. It
uses it to provide application-based authentification. It's a
"before-only" interc
Thanks Chris,
The request.getParameter works. I think i am going to go with that.
the javascript was throwing soem errors. I will figure that out later.
Thanks for the help once again.
Later
Uday Chandra
On 9/26/06, Chris Pratt <[EMAIL PROTECTED]> wrote:
Wow, those are some ugly field names,
Thanks Wendy,
I used:
chainConfig
org/apache/struts/chain/chain-config.xml, /WEB-INF/
custom-chain-config..xml
And it worked!
The first loads the "struts" catalog and the second load my own catalog.
Thanks again,
Mark Shifman
Wendy Smoak wrote:
On 9/26/06, Mark Shifman <[EMAIL PROTECTED]>
[Announce] Dear Struts Users -
Stylus Studio 2007 XML Enterprise Suite is now available for free
trial download, featuring all-new tools for XML Pipelining, XML
Publishing, powerful new Data Conversion APIs and so much more at new
reduced prices. Read on for more information, or download it now a
I am not able to get the value of the request
parameter using request.getParameter("Print")
I am trying to get this value in the layout-tiles.jsp
file.
I use this URL to make the call
http://localhost/appname/jsp/login.jsp?print=1
below are the two files. Any help will be appreciated.
**
Hi Antonio,
i do not understand. The action is executed if the form is submitted, this
is
after the jsp has been displayed. I want to fill the form with values from
database
before the jsp is displayed.
I need the typical 'edit' function, not create.
Regards, Andy
apetrelli wrote:
>
> Ilja S. h
Hi Ilja,
i'm using DAO patterns but the question was: how can i init a form inside an
action. I Didn't
find any method to do this and also no example. All struts samples are with
forms to create
new objects and not to edit existing objects.
regards, Andy
Ilja S. wrote:
>
> Hi
> Action class is r
On 9/26/06, Mark Shifman <[EMAIL PROTECTED]> wrote:
HI;
I am starting to play with chains and commands in 1.3.5 and I was
wondering where I initialize the my custom chains ?
I don't want to mess with the request processor, just add a few command
chains of my own.
...
Do I need to extract the c
Wow, those are some ugly field names, but you should be able to access it
from either. In JavaScript I would probably use a helper function something
like:
function radioValue (fld) {
for(var i = 0; i < fld.length;i++) {
if(fld[i].checked) {
return fld[i].value;
}
}
return fld[0].v
Thanks Chris for the response.
But here is the problem.
..
Pri.
Adj.
..
The resultant html code is
...
Pri.
Adj.
...
Pri.
Adj.
...
You are right to say that the all the radio with the same name are
conside
All the radio buttons (or checkboxes) with the same name are in a "button
group". The value of the selected radio button (or list of selected
checkboxes) is returned from request.getParameter() (or
request.getParameterValues()).
(*Chris*)
On 9/26/06, Uday Chandra Karrothi <[EMAIL PROTECTED]> wr
Hi there,
I have a problem. I am using groups of radio buttons.
..
Pri.
Adj.
..
How can get the value of the selected radio buttons in the action
form. Is there something
like a multibox for a radio group?
if it is just one radio button group, i can get it from the property
of the form
HI;
I am starting to play with chains and commands in 1.3.5 and I was
wondering where I initialize the my custom chains ?
I don't want to mess with the request processor, just add a few command
chains of my own.
The cookbook mail reader example from commons.chain uses a context-param
and lis
Hello,
These webwork and xwork doc pages may help:
http://wiki.opensymphony.com/display/XW/Interceptors
http://www.opensymphony.com/webwork/api/com/opensymphony/xwork/ActionInvocation.html
http://www.opensymphony.com/webwork/api/com/opensymphony/xwork/ActionProxy.html
Passed in to your intercepto
Hi
Action class is right place.
Common way is to have some layer working with DB like DAO pattern. Then
You can have some service layer between DAO and Action which you call
from Action class.
Call it, get data transfer object from DB, copy its properties to
ActionForm instance and forward requ
Ilja S. ha scritto:
Hi
Action class is right place.
Common way is to have some layer working with DB like DAO pattern.
Then You can have some service layer between DAO and Action which you
call from Action class.
Call it, get data transfer object from DB, copy its properties to
ActionForm inst
Hi, I've solved the issue this morning. My DTOGroup.java was not correctly
defined. I had
public class DTOGroups extends DynaValidatorForm implements Serialize
and the extends DynaValidatorForm is not correct -obvious I don't
remember to put it there :)
From: "Thomas Joseph" <[EMAIL
Hi,
I agree with all of the above comments. You may like to use them in
different scenarios:
1. DB sort using "order by" but each request will cost your db access
connection
2. Sorting in DAO is good
3. Soring in any case (at JSP/Business layer/DAO) require you to do some
comparison , you can crea
just out of curiosity have you implemented your Ajax Control with RPC or
doc-literal or some other type of transport?
Thanks,
M-
*
This email message and any files transmitted with it contain confidential
information intended only
Hi folks,
i init my form beans at reset(...) of ActionForm from database but i think
this is not correct because
if an error occurs i have no chance to forward to an error page or to save
ActionErrors. I think the
controller must read objects from database and init the form.
All samples are very s
Hi,
- Original Message -
From: "harriquitawn tawn tawn" <[EMAIL PROTECTED]>
To:
Sent: Monday, September 25, 2006 7:31 PM
Subject: Error loading Collection in form
>
> I get the name of the project without problem with the line:
>
> property="name"/>"/>
>
> but when I want to show all ro
oh ... :O ...
I just forgot Post method :( ... thank you for reminding me ... I will try
it.
Again, thanks for ur feedback :)
- Original Message -
From: "Antonio Petrelli" <[EMAIL PROTECTED]>
To: "Struts Users Mailing List"
Sent: Tuesday, September 26, 2006 4:13 PM
Subject: Re: [HE
Hi, I'm new to Struts2 and i don't really understand how does Interceptor
technique work.
I have made my own interceptor that implements Interceptor interface. I place
it in struts.xml with my action. It's OK, before invoking my action, i go
through my interceptor in the intercept() method.
But
Pham Anh Tuan ha scritto:
when I test the submitted url, it gives me the right unicode value for
each
parameter I sent. ex: .do?st1=tốivề&st2=ngàyvề
but when I retrieve it from bean, it was not unicode value :(
st1: "tốivề" ---> "tá»i vá»"
st2: "ngàyvề" ---> "ngà y vá»"
I don't know wh
when I test the submitted url, it gives me the right unicode value for each
parameter I sent. ex: .do?st1=tốivề&st2=ngàyvề
but when I retrieve it from bean, it was not unicode value :(
st1: "tốivề" ---> "tá»i vá»"
st2: "ngàyvề" ---> "ngà y vá»"
I don't know what's wrong?
- Original
ah ha, yeahh, thanks a lot Antonio, I solved my problem!
again, thank u (^-^)
bowlkhin
- Original Message -
From: "Antonio Petrelli" <[EMAIL PROTECTED]>
To: "Struts Users Mailing List"
Sent: Tuesday, September 26, 2006 4:41 PM
Subject: Re: [HELP] Can't not submit unico
Pham Anh Tuan ha scritto:
Antonio, would you mind showing an example how to use POST method with
AJAX ?
Your question is too generic. Maybe you need simply JavaScript, in this
case I suggest to read this piece of tutorial
http://www.w3schools.com/htmldom/dom_obj_form.asp
HTH
Antonio
-
Antonio, would you mind showing an example how to use POST method with AJAX
?
thanks in advace
bowlkhin
- Original Message -
From: "Pham Anh Tuan" <[EMAIL PROTECTED]>
To: "Struts Users Mailing List"
Sent: Tuesday, September 26, 2006 4:16 PM
Subject: Re: [HELP] Can't not submit unicod
Hi all,
I got a trouble when I submit the unicode form by ajax.
when I test the submitted url, it gives me the right unicode value for each
parameter I sent. ex: .do?st1=tốivề&st2=ngàyvề
but when I retrieve it from bean, it was not unicode value :(
this trouble happens only when I submit
You could create your own sort class which implements
java.util.Comparator
e.g.
public class MySort implements Comparator {
compare(o1, o2) {
String name1 = (String) o1.getLastName();
String name2 = (String) o2.getLastName();
return name1.compareTo(name2);
}
}
th
39 matches
Mail list logo