Hi
This is how we iterate in a jsp page
where addProviderForm is the Struts Form bean and assocSBList is the
ArrayList defined in the form bean.
Hope this helps.
Thanks
>>> [EMAIL PROTECTED] 11/4/2003 6:43:27 AM >>>
Hi All,
I am keeping some table data in a HashMap .
My Table is in t
We are having a problem when using Iterate tag with JDK 1.3.1_09.
Did any body face this problem ?.
Pls help
Thanks
-
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]
Hi
The following code which is used to iterate works fine when using Java
Version 1.3.1_07, but when we started to use 1.3.1_09 , we get an
error.
We are using Struts 1.1 final release libraries.
I am pasting the code we used and also the error message. Are there any
deprecated methods used by S
I am trying to have my Form in session and I have set the scope="session" in my action
mapping.
If I try to access this form in other JSP page it is returing Null.
Am I missing something??
The form data is available in UpdProvDetailInfo.jsp, but not in any other JSP.
Thanks
so how can I set the value in the jsp:param tag which is available in
bean:write.
Please bear with me as I am learning..
Thanks
>>> [EMAIL PROTECTED] 07/25/03 10:43AM >>>
You can't do that. See here for more:
http://marc.theaimsgroup.com/?l=struts-user&m=10577176532
"
/>
I get the following errors
Error(32): Attribute: showvalue" is not a valid attribute name
Error(32): Attribute: property is not a valid attribute name
Error(33): Not expecting text inside this tag
Can I give the tag inside a tag?
Thanks
e ActionServlet to include, rahter
than
forward to the view.
It seems you do it with element instead of element
in
your action mapping configuration.
So your should have a
instead of a to that view.
Hope this does it.
ranko
-Original Message-
From: Sashi Ravipati [mailto:[EMAIL PROTECT
our
tag. I don't know how kosher that is in the Struts
environment though.
Is there a way to tell ActionServlet to use include() instead of
forward()?
ranko
-Original Message-----
From: Sashi Ravipati [mailto:[EMAIL PROTECTED]
Sent: Thursday, July 24, 2003 3:42 PM
To: [EMAIL
It didn't work. It gives me the same error.
>>> [EMAIL PROTECTED] 07/24/03 03:48PM >>>
Try this
-Original Message-----
From: Sashi Ravipati [mailto:[EMAIL PROTECTED]
Sent: Thursday, July 24, 2003 2:42 PM
To: [EMAIL PROTECTED]
Subject: RE: ServletException Re
he rest of the jsp page will try to
write
more stuff to the client and cause the exception. If the ActionServlet
is
not using RequestDispatcher.forward() then I don't know. More
experienced
Struts guys will probably be able to clear this up.
ranko
-Original Message-
From: S
by itself
would
also cause the same servletexception ?
From: "Sashi Ravipati" <[EMAIL PROTECTED]>
Reply-To: "Struts Users Mailing List" <[EMAIL PROTECTED]>
To: <[EMAIL PROTECTED]>
Subject: ServletException Response has already been committed'
Date: Thu, 24 Jul 2
I have a jsp page which I need to include in all my other JSP pages. I created an
action for JSP to be included and used
.
This throws Servlet Exception.
I also tried but the same result.
How can this be achieved.
Thanks
atnements in there. It's easy enough to use
the struts source by putting the
org/apache/struts/action/RequestProcessor.java in your own source
directory and recompiling and deploying. I don't think you need the
whole lot.
Here's my base action class for what its worth
Adam
Sashi Ra
I have a cancel button which works fine in Struts 1.1b2 and when I have replaced the
.jar files with Struts final 1.1 (Downloaded on July 3rd) it does not work.
The part that is not working is isCancelled(request). It is always returning false.
This is frustrating
Thanks
put some logging in there.
As you can tell I'm intrigued.
Adam
Sashi Ravipati wrote:
> request.getAttribute(Globals.CANCEL_KEY) is returning null, so can I
set
> it to not null and where Should I do this..
>
> Can u explain how u solved ur problem..
>
> Thanks
>
>
ameter, check to see
if the request.attribute is set with
request.getAttribute(Globals.CANCEL_KEY);
For some reason in the RequestProcessor it sets this attribute to true
when the request.parameter is present. Check it out. This is the one
that the Action.isCancelled() checks. It has to be not null.
celled()
Actually I've just realised I'm suffering the same problem. I'll try it
myself. Let me know what you find as well!
Adam
Sashi Ravipati wrote:
> HTML is as shown below
>
>value="Cancel" onclick="bCancel=true;">
>
>>>>[EMAIL
HTML is as shown below
>>> [EMAIL PROTECTED] 07/09/03 09:21AM >>>
Sashi, what HTML does the tag produce?
Adam
Sashi Ravipati wrote:
> I am trying this on Struts 1.1 final. Will this make any difference..
>
>
>
>>>>[EMAIL PROTECTED] 07/08/03 05:11
:cancel tag is not contained within an html:form
tag, I can't think of anything else.
m
--- Sashi Ravipati <[EMAIL PROTECTED]> wrote:
> This is how I have my cancel tag.
>
>
>
>
>
> >>> [EMAIL PROTECTED] 07/08/03 02:27PM >>>
> The c
This is how I have my cancel tag.
>>> [EMAIL PROTECTED] 07/08/03 02:27PM >>>
The complete content of your html:cancel tag is
probably key to solving this problem.
m
--- Sashi Ravipati <[EMAIL PROTECTED]> wrote:
>
> isCancelled(request) is alway
isCancelled(request) is always returning false (Even when cancel button
is clicked)
Need some help...
Thanks
>>> [EMAIL PROTECTED] 07/08/03 09:10AM >>>
I have a in my jsp page. and in my action I have
if(isCancelled(request)){
return mapping.findForward("index");
}
But it is not wo
I have a in my jsp page. and in my action I have
if(isCancelled(request)){
return mapping.findForward("index");
}
But it is not working. What am I doing wrong here. I am using Struts 1.1 final
Thanks
Hi
I have a lookup table which has approx(1000 rows) with Code and Description. (Say
1=Office,2=home etc)
The user will input data(Say code=1) in a text field and when he moves to next field
he wants the description (Office) to be displayed.
Did somebody have similar situation or does struts h
Thanks
>>> [EMAIL PROTECTED] 06/25/03 10:19AM >>>
Try this
this.servlet.getServletConfig().getInitParameter()
-Original Message-
From: Sashi Ravipati [mailto:[EMAIL PROTECTED]
Sent: Wednesday, June 25, 2003 9:10 AM
To: [EMAIL PROTECTED]
Subject: How to read <
Hi
I have this entry in my web.xml file
developer-test-id
testmode
How can I get the value (testmode) in my action class.
In a servlet we I could do it like this
public void init(ServletConfig config) throws ServletException
{
super.init(config);
String ssoId
trol when you want
to validate right in the form class.
-Original Message-
From: Sashi Ravipati [mailto:[EMAIL PROTECTED]
Sent: Thursday, June 19, 2003 1:24 PM
To: [EMAIL PROTECTED]
Subject: RE: How to ignore validation when form loads (first time)
Even my code is working with 2 action ma
> //only validate form when a save has been pressed
> try {if (request.getParameter("saveBtn.x").equals(null))
return null;}
> catch (NullPointerException ex) {return null;}
>
> I'm also interested in feed-back on my approach.
>
>
> ---
With the help of user group found solutions to questions like
1. How to repopulate multiple HTML elements with same name
2. Repopulate data where rows are built at the client side.
May not be the best approach but spent lot of time to get here, wanted to share this
with user group , so that it m
Let me rephrase
Do u know the number of text boxes required before u come to ur JSP
page? or
Do u want to add text baxes dynamically in the page?
>>> [EMAIL PROTECTED] 06/18/03 01:22PM >>>
I have a solution for this, but can u tell me if u will now the size of
text fields before u load the page?
I have a solution for this, but can u tell me if u will now the size of
text fields before u load the page?
Thanks
>>> [EMAIL PROTECTED] 06/18/03 01:19PM >>>
Hi ,
How can one create text fields dynamically? For ex: may be one time i
need 20 textfields othertime i would like to show only 10 text
Hi
We have JSP pages which need user input. How can I display the form initially with out
validation and then when user enters data and submits the page, the validation has to
be done.
I tried to accomplish it by giving two in Struts-Config.xml. as shown below
eg:
Not sure if
i.e. something like person[0].firstName, person[1].phoneNo, etc)
-john
-Original Message-
From: Sashi Ravipati [mailto:[EMAIL PROTECTED]
Sent: Friday, June 13, 2003 5:13 AM
To: [EMAIL PROTECTED]
Subject: RE: what setters do i implementinan indexedtag--NewBiequestion
No returning from V
the new row. After you add a row with the button, do a view source on
the resultant page and tell me, is the name of the input fields of the
new row similar in format to the previous indexed fields?
(i.e. something like person[0].firstName, person[1].phoneNo, etc)
-john
-Original Message-
This is an interesting paper which talks abt iteration, look at pages
8,9,10,11
it may give u some idea
http://stealthis.athensgroup.com/presentations/Model_Layer_Framework/Struts_Whitepaper.pdf
>>> [EMAIL PROTECTED] 06/13/03 10:30AM >>>
Hi Sashi,
Thanks very much for your answer.
But my jsp p
Hi
I have the form info in my action and it passes the form's
validation, but if I add an error the displayed page doesn't have the form info.
The error displays properly, but I lose all the form data.?
Will the reset() method be called when a validation error occurs?
Sashi
it involved a round-trip to
the server which may or may not be acceptable in your case).
I'm not sure what your javascript that might throw things off. Does
returning from validation work when you have NOT added a row?
-john
-----Original Message-
From: Sashi Ravipati [mailto:[EMAIL PROTECTED
t?), did you put it in a hidden as I suggested or manually
stick it in the request from the prep? It will need to post like all the
other info you want to still have upon return from validation.
An alternate, of course, is to put the form in session scope, then
everything will still be avail
003 11:28 AM
To: 'Struts Users Mailing List'
Subject: RE: what setters do i implement inan
indexedtag--NewBiequestion
personList is an ArrayList. I thought they increased automagically.
Maybe
only my special Java code makes ArrayList increase for me without
having
to
increase the size.
de makes ArrayList increase for me without
having to
increase the size.
:)
-Original Message-
From: Sashi Ravipati [mailto:[EMAIL PROTECTED]
Sent: Thursday, June 12, 2003 2:33 PM
To: [EMAIL PROTECTED]
Subject: RE: what setters do i implement inan
indexedtag--NewBiequestion
Sorry for the
Sorry for the post, I figured it out and got working.
Only issues is to Increase the size of the personList when rows are
added by user.
Any ideas
Thanks
>>> [EMAIL PROTECTED] 06/12/03 02:25PM >>>
> -Original Message-
> From: Sashi Ravipati [mailto:[EMAIL
I used the following code for two text boxes, u can change it to your
need
I am also learning so bear with my suggestions.
1. Action form code:
private ArrayList personList;
public void reset(ActionMapping mapping, HttpServletRequest request){
this.personList = new ArrayList();
//
ersonBeans in the list to populate.
That's my first idea, there are probably better ones out there.
-john
-Original Message-
From: Sashi Ravipati [mailto:[EMAIL PROTECTED]
Sent: Thursday, June 12, 2003 8:08 AM
To: [EMAIL PROTECTED]
Subject: RE: what setters do i implement in an
functional
overlap?
Generally with JST taglib as well, there seems to be a wide choice of
taglibs to use - is this going to consolidate at some point in struts'
development?
Adam
Sashi Ravipati wrote:
> Can some body help in a
John
Made few changes and code worked fine.
Would like to extend this so that it will work for handling Dynamic
table situation-- Let me explain
If u see in Action form reset method I initialized it to 5 (num="5 "for
testing) so the page loads with five empty rows, But we have a
requirement wh
John
Made few changes and code worked fine.
Would like to extend this so that it will work for handling Dynamic
table situation-- Let me explain
If u see in Action form reset method I initialized it to 5 (num="5 "for
testing) so the page loads with five empty rows, But we have a
requirement wh
John
Thanks for all the code u sent. I have started working on it, and I had
few questions (PLS bear with me if they look stupid).
1. PersonForm (which extends ActionForm) will have get and set methods
for Name and Phone Number? This PersonForm is also initialized in
Struts-Config.xml
2. IS my
Can some body help in as how to define get and set methods when we use indexed tags.
eg:
What will be the get and set methods.
Thanks
>
>
>
> Now when I make some changes and resubmit
>
> I get Null Pointer Exception
>
> java.lang.NullPointerException
>
> void
>
org.apache.commons.beanutils.PropertyUtils.setIndexedProperty(java.lang.Obje
ct,
> java.lang.String, int, java.lang
it is you are trying to do? (in a broader scope)
Have you looked at or used indexed fields before?
--
James Mitchell
Software Developer/Struts Evangelist
http://www.struts-atlanta.org
- Original Message -
From: "Sashi Ravipati" <[EMAIL PROTECTED]>
To: <[EMAIL PROTE
I am reading the values from an array, when I build my table I use
" />
the above tag converts to
Now I also want to build a hidden value along with the text box as shown below
I tried to to this which does not work
How can I achieve this
Thanks
I have a similar problem, Is the form bean session scope u r talking abt
or something else. I tried to set the scope="session" in
Struts-config.xml, it that right (Please bear with me as I am newbie)
thanks
>>> [EMAIL PROTECTED] 06/11/03 10:00AM >>>
Thanks Tib, you've been very helpful (and quick
Thanks , it did the trick for me.
>>> [EMAIL PROTECTED] 06/11/03 09:00AM >>>
try..
"/>
This way you dont need to create strings..
BTW, are u using struts 1.0?
Because with 1.1, you can directly use nested tags..
-Original Message-
From: Sashi Ravipati [mai
>
i didnt check it.pardon me if it doesn't work
Partha
> --
> From: Sashi Ravipati[SMTP:[EMAIL PROTECTED]
> Reply To: Struts Users Mailing List
> Sent: Wednesday, June 11, 2003 5:48 PM
> To: [EMAIL PROTECTED]
> Subject: Error Message: Inval
Hi
I am using logic:iterate tag as shown below
<% int j = ((Integer) pageContext.getAttribute("i")).intValue(); %>
Error Message: Invalid indexed property 'firstName[]'
I did print the vlaues of "j" and they are fine.
What am i doi
Any ideas how to make this to work
>>> [EMAIL PROTECTED] 06/10/03 03:24PM >>>
There is an error in that
getPerson(int index) should return a Person object or
something with name etc.
sandeep
--- Sashi Ravipati <[EMAIL PROTECTED]> wrote:
> I want to accomplish so
There is good example demonstrating this
http://www.scioworks.net/devnews/strutsDistilled/updates/update-030401/indexedAttr.html
It is not very clear on how to declare an Action Form, so if some body
can show an example of how to use ArrayList etc it will be og great
help.
Thanks
>>> [EMAI
you want the resulting "name" of an
HTML component to reference array indexes, so you can move values in and
out of a collection/array in your form bean instead of scalars.
The indexed tags work along with either the "logic:iterate" or
"c:forEach" tags.
> -Original
Can somebody explain how these work, or is there any example of this.
Thanks
a String.
(getIterator()
returns an array of String)
Based on the jsp snippet you've provided, I'm not understanding what you
are
trying to do.
Can you explain further?
--
James Mitchell
Software Developer/Struts Evangelist
http://www.struts-atlanta.org
- Original Message
or you
because what you need doesn't exist (as a freebie).
I feel I wasted so much time sending an example in.
It is practically all the code you could ever get free for something
like
that.
Please, read between the (dashed) lines (above).
-Original Message-
From: Sashi Ravipati [mailt
)
returns an array of String)
Based on the jsp snippet you've provided, I'm not understanding what you
are
trying to do.
Can you explain further?
--
James Mitchell
Software Developer/Struts Evangelist
http://www.struts-atlanta.org
----- Original Message -
From: "Sashi Ravipati
ng what you
are
trying to do.
Can you explain further?
--
James Mitchell
Software Developer/Struts Evangelist
http://www.struts-atlanta.org
----- Original Message -
From: "Sashi Ravipati" <[EMAIL PROTECTED]>
To: <[EMAIL PROTECTED]>
Sent: Tuesday, June 10, 2003 9:33 AM
S
i have the following code in my .jsp
in my action form I have
private String[] FirstName={};
private String[] iterator={"",""}; // For testing i initialised to 2
values
public String[] getFirst
writing the whole thing for you
because what you need doesn't exist (as a freebie).
I feel I wasted so much time sending an example in.
It is practically all the code you could ever get free for something
like
that.
Please, read between the (dashed) lines (above).
-Original Message-
l bean
name that you use within the iterate tag to access the current element
of
the collection.
Let me know if you have any questions about it, or if you want to know
anything else.
Keith Kamholz
Programming and Architecture
Moog Inc.
Phone: (716) 687-7001
-Original Message-
From: Sash
ne: (716) 687-7001
-Original Message-
From: Sashi Ravipati [mailto:[EMAIL PROTECTED]
Sent: Monday, June 09, 2003 11:22 AM
To: [EMAIL PROTECTED]
Subject: Help- logic:iterate tag
Hi
I am trying to understand the logic:iterate tag. I have gone thru the
docs
but could figure out some of t
Hi
I am trying to understand the logic:iterate tag. I have gone thru the docs but could
figure out some of the attributes of this tag.
My confusion is following attributes
1. property=""
so should this have a get and set methods in the ActionForm
2. Collection - when will this be used
3. in
Hi
I am reposting the same question as I did not get any answer.
Some of the options suggested by various users were using indexed tags
etc. But can somebody give me a working exaple of this.
Thanks
Can u post a working example, it will be of great help
Thanks
>>> [EMAIL PROTECTED] 06/06/03 05:01PM >>>
Look at the struts docs regarding the index tag.
Sashi Ravipati wrote:
>How to use multiple HTML form elements with the same name.
>
>In the Help it is g
will be almost useless.
There's
definitely variables to every equation.
-Original Message-
From: Sashi Ravipati [mailto:[EMAIL PROTECTED]
Sent: Friday, June 06, 2003 11:35 AM
To: [EMAIL PROTECTED]
Subject: RE: How to repopulate Form which has html elementswithsamename
This is a small e
Name" in the tag below. The value of i is
incremented by the iterate tag. I am not sure that you can access the
value
of i like you are in the code below. The code should probably look like:
<% int i = ((Integer) pageContext.getAttribute("i")).intValue(); %>
-Origi
%>
-----Original Message-
From: Sashi Ravipati [mailto:[EMAIL PROTECTED]
Sent: Friday, June 06, 2003 1:47 PM
To: [EMAIL PROTECTED]
Subject: RE: Error - [Ljava.lang.String;@d23.
Thanks for the code.. I started to build my code based on your replay as
shown below
I added the get an
r is
limited
to statically declaring validation on a specific named element such as
firstName[1] or firstName[88].
This should also solve the repopulation problems that you were
experiencing.
I hope that this helps.
Larry
-----Original Message-
From: Sashi Ravipati [mailto:[EMAIL PROTECTED]
Sen
just punt?
:-)
-Original Message-
From: Sashi Ravipati [mailto:[EMAIL PROTECTED]
Sent: Friday, June 06, 2003 11:19 AM
To: [EMAIL PROTECTED]
Subject: RE: How to repopulate Form which has html elementswithsamename
Thanks for the code, this will help to start off,
Should I do any thing in th
o get out of it.
Some other posts suggest logic iterate. I guess that would work. You
would
have to do something like:
<% String currSex = sexArray[curr.intValue()]; %>
Male
Female
-Original Message-
From: Sashi Ravipa
your array. It looks like from
the
tag your using you just want to print a simple string, why are you
trying to
pass an array as the property?
-Original Message-
From: Sashi Ravipati [mailto:[EMAIL PROTECTED]
Sent: Friday, June 06, 2003 10:22 AM
To: [EMAIL PROTECTED]
Subject: Error - [L
2" then that wouldn't be truly dynamic.
-Original Message-
From: Sashi Ravipati [mailto:[EMAIL PROTECTED]
Sent: Friday, June 06, 2003 8:26 AM
To: [EMAIL PROTECTED]
Subject: RE: How to repopulate Form which has html elementswithsamename
Thanks for the sample and I have that working.
Hi
I get the following error when the jsp page is displayed after the validation fails
(Validation errros are all working fine)
[Ljava.lang.String;@d23.
This happens when I am passing values to a String Array. eg: .jsp I have
These are my set and get methods in my ActionForm
private String
AIL PROTECTED]> wrote:
> Sashi Ravipati írta:
>
> >Thanks for the sample and I have that working. But
> my issues is slightly
> >different where there are Multiple HTML elements
> with the same name
> >
> >Eg: property="name" />
> > property=&
I am newbie so bear with my questions..
How can I access the set and get methods in the JSP page.
if i use the values are returned as null.
Thanks
or
now).
It would be nice if someone could post what "setup write" IS. so we
can
check
if we have something set up "WRONG".
After all, WSAD 5 came with struts preloaded so how can it be setup
wrong?
"Sashi Ravipati" <[EMAIL PROTECTED]> wrote in messag
I have a javascript wich woks, u can give it a try, replace the html
tags with Struts Html tags, it should work
adding table rows with input elements
var TDCount = 0;
function insertTableRow(id)
{
var table = document.getElementById(id);
// get number of current rows
var rowItems = table.ge
Action class:
package my.package;
class MyAction extends org.apache.struts.action.Action
{
//do stuff in the execute method
}
struts-config:
-Original Message-
From: Sashi Ravipati [mailto:[EMAIL PROTECTED]
Sent: Thursday, June 05, 2003 4:29 PM
To: [EMAIL PR
How to use multiple HTML form elements with the same name.
In the Help it is given as
Yes. Define the element as an array and Struts will autopopulate it like any other.
private String[] id= {};
public String[] getId() { return this.id; }
public void setItem(String id[]) {this.id = id;}
And
Hi
I have array of text boxes with the same name
eg:
When I sbimit the page all the values are stored in an String Array in my Form bean.
private String [] name=null;
public String[] getName(){
return this.name;
}
public void setName(String[] name){
this.name = name;
}
I
lp find a better (for you) online struts tutorial.
What
you are trying to do is a freebie in struts (if everything is setup
right).
-Original Message-
From: Sashi Ravipati [mailto:[EMAIL PROTECTED]
Sent: Thursday, June 05, 2003 10:59 AM
To: [EMAIL PROTECTED]
Subject: How to repopulate Form
to see if the new passwords are the same.
if (!newpassword1.equals(newpassword2)) {
errors.add("newpassword1", new
ActionError("error.passwordmatch"));
}
return errors;
}
On Thursday, June 5, 2003, at 09:59 AM, Sashi Ravipati wrote:
>
Hi
I am a newbie to struts...
I have a dynamic table which has a and a . The user cliks
on a add button and enter values in each row of the table and submits the form.
How can I repopulate the valuse if validation fails.
Can some body give a working exapmle of the Action Form that is requ
88 matches
Mail list logo