RE: Problem in nested tags- Very Urgent - Please Help

2004-02-29 Thread Martin Sturzenegger
hi shirish,
problem's solved. the strange behaviour was due to an initialisation error in my 
action class. I instantiated the listobject classwide instead of in the 
execute-method.now it seems to work in request and in session scope.
thank you very much for helping!
martin




-- Urspruengliche Nachricht --
Von: <[EMAIL PROTECTED]>
Antworten an: "Struts Users Mailing List" <[EMAIL PROTECTED]>
Datum:  Fri, 27 Feb 2004 16:41:05 +0100

>I have not understood your problem completely.
>
>But this looks like more a problem of resetting the list in form than anything else.
>
>Firstly, if you are using request scoped form, then why going from page 1 to page 2 
>will apend the beans to form?
>
>Are you sure you are using request scoped forms?
>
>If the form is session scoped, make sure you reset the list to empty properly.
>
>HTH.
>regards,
>Shirish
>
>-Original Message-
>From: Martin Sturzenegger [mailto:[EMAIL PROTECTED]
>Sent: Friday, February 27, 2004 3:28 PM
>To: Struts Users Mailing List
>Subject: RE: Problem in nested tags- Very Urgent - Please Help
>
>
>hi,
>i'm trying to use hubert's (and shirish's) approach on request-scope, and as long as 
>the amount of rows are fixed it works well.
>BUT now i have an additional feature on my page and that gives me headaches. 
>actionOne gets the rows from the dto-bean and initializes the jsp. 
>on the jsp-page with the form over the rows, i have an additional form where the user 
>can toggle through different versions of my db.
>this form submits to actionOne where the action is supposed to fetch another set of 
>rows, according to the parameter given. 
>let's say: choose february 12th there are 12 rows to display, choose february 15th 
>there are 15 different rows, choose the next day there are 10 rows.
>with this approach, starting with february 12th i get 12 rows. changing to february 
>15th i get the old 12 rows and the new 15 rows added to, going back to feb 12th i get 
>the old 27 rows and again the 12 rows from feb.12 added to and so on and on
>is there a way to reinitialize the autopopulation method or even to temporarily 
>disable autopopulation on lists with nested properties?
>any adwise or code snippets are warmly welcomed
>take care
>martin
>
>
>
>-- Urspruengliche Nachricht --
>Von: Hubert Rabago <[EMAIL PROTECTED]>
>Antworten an: "Struts Users Mailing List" <[EMAIL PROTECTED]>
>Datum:  Thu, 26 Feb 2004 07:01:54 -0800 (PST)
>
>>IIRC, you also need it in reset():
>>
>>public class LazyListExampleForm extends ActionForm {
>>private List actionList;
>> 
>>public LazyListExampleForm () {
>>initLists();
>>}
>>
>>public void reset(ActionMapping mapping, 
>>  HttpServletRequest request) {
>>super.reset(mapping, request);
>>initLists();
>>}
>> 
>>private void initLists() {
>>Factory factory = new Factory() {
>>public Object create() {
>>return new ActionListBean();
>>}
>>};
>>this.actionList = ListUtils.lazyList(new ArrayList(), factory);
>>}
>>
>>// Getter/setters for list omitted
>>}
>>
>>- Hubert
>>
>>--- "Paul, R. Chip" <[EMAIL PROTECTED]> wrote:
>>> Note: I think this is likely different in current versions of the commons
>>> collections lib, but this works for the version we are dependent on.
>>> 
>>> import java.util.ArrayList;
>>> import java.util.List;
>>> import org.apache.commons.collections.Factory;
>>> import org.apache.commons.collections.ListUtils;
>>> // Nonrelevant imports ommitted
>>> 
>>> public class LazyListExampleForm extends ActionForm {
>>> private List actionList;
>>> 
>>> public LazyListExampleForm ()
>>> {
>>> Factory factory = new Factory() {
>>>  public Object create() {
>>>  return new ActionListBean();
>>>  }
>>>  };
>>>  this.actionList = ListUtils.lazyList(new ArrayList(),
>>> factory);
>>> }
>>> 
>>> // Getter/setters for list omitted
>>> }
>>> 
>>> -Original Message-
>>> From: Mark Lowe [mailto:[EMAIL PROTECTED] 
>>> Sent: Thursday, February 26, 2004 8:49 AM
>>> To: Struts Users Mailing List
>>> Subject: R

RE: Problem in nested tags- Very Urgent - Please Help

2004-02-27 Thread Martin Sturzenegger
hi,
i'm trying to use hubert's (and shirish's) approach on request-scope, and as long as 
the amount of rows are fixed it works well.
BUT now i have an additional feature on my page and that gives me headaches. 
actionOne gets the rows from the dto-bean and initializes the jsp. 
on the jsp-page with the form over the rows, i have an additional form where the user 
can toggle through different versions of my db.
this form submits to actionOne where the action is supposed to fetch another set of 
rows, according to the parameter given. 
let's say: choose february 12th there are 12 rows to display, choose february 15th 
there are 15 different rows, choose the next day there are 10 rows.
with this approach, starting with february 12th i get 12 rows. changing to february 
15th i get the old 12 rows and the new 15 rows added to, going back to feb 12th i get 
the old 27 rows and again the 12 rows from feb.12 added to and so on and on
is there a way to reinitialize the autopopulation method or even to temporarily 
disable autopopulation on lists with nested properties?
any adwise or code snippets are warmly welcomed
take care
martin



-- Urspruengliche Nachricht --
Von: Hubert Rabago <[EMAIL PROTECTED]>
Antworten an: "Struts Users Mailing List" <[EMAIL PROTECTED]>
Datum:  Thu, 26 Feb 2004 07:01:54 -0800 (PST)

>IIRC, you also need it in reset():
>
>public class LazyListExampleForm extends ActionForm {
>private List actionList;
> 
>public LazyListExampleForm () {
>initLists();
>}
>
>public void reset(ActionMapping mapping, 
>  HttpServletRequest request) {
>super.reset(mapping, request);
>initLists();
>}
> 
>private void initLists() {
>Factory factory = new Factory() {
>public Object create() {
>return new ActionListBean();
>}
>};
>this.actionList = ListUtils.lazyList(new ArrayList(), factory);
>}
>
>// Getter/setters for list omitted
>}
>
>- Hubert
>
>--- "Paul, R. Chip" <[EMAIL PROTECTED]> wrote:
>> Note: I think this is likely different in current versions of the commons
>> collections lib, but this works for the version we are dependent on.
>> 
>> import java.util.ArrayList;
>> import java.util.List;
>> import org.apache.commons.collections.Factory;
>> import org.apache.commons.collections.ListUtils;
>> // Nonrelevant imports ommitted
>> 
>> public class LazyListExampleForm extends ActionForm {
>>  private List actionList;
>> 
>>  public LazyListExampleForm ()
>>  {
>>  Factory factory = new Factory() {
>>   public Object create() {
>>   return new ActionListBean();
>>   }
>>   };
>>   this.actionList = ListUtils.lazyList(new ArrayList(),
>> factory);
>>  }
>> 
>>  // Getter/setters for list omitted
>> }
>> 
>> -Original Message-
>> From: Mark Lowe [mailto:[EMAIL PROTECTED] 
>> Sent: Thursday, February 26, 2004 8:49 AM
>> To: Struts Users Mailing List
>> Subject: Re: Problem in nested tags- Very Urgent - Please Help
>> 
>> 
>> wouldn't mind an example of how to use lazy list if you have one.
>> 
>> 
>> On 26 Feb 2004, at 15:33, Paul, R. Chip wrote:
>> 
>> > Or use the Commons Collections LazyList which handles this problem 
>> > automatically.
>> >
>> > -Original Message-
>> > From: Mark Lowe [mailto:[EMAIL PROTECTED]
>> > Sent: Thursday, February 26, 2004 8:09 AM
>> > To: Struts Users Mailing List
>> > Subject: Re: Problem in nested tags- Very Urgent - Please Help
>> >
>> >
>> > shirish posted this a few times.
>> >
>> > if you're scoping to request you'll need a while loop in your 
>> > getFoo(int index)  method
>> >
>> > public class OrgManagementForm extends ActionForm {
>> >
>> > private List addressList = new ArrayList();
>> >
>> > public Address getAddress(int index) {
>> >
>> >while(index >= addressList.size() ) {
>> >this.addressList.add( new Address() );
>> >}
>> >
>> >return (Address) addressList.get(index);
>> > }
>> >
>> > bla bla.
>> >
>> > }
>> >
>> > look like it could be your problem.
>> >
>> >
>> > On 26 Feb 2004, at 14:57, Parthasarathy Kesavaraj wrote:
>> >
>> >> I am having an OrganzationVO inside my form-bean.
>> >>
>> >> The OrganzationVO has a collection of AddressVOs.
>> >>
>> >> I am using nested tags like this.
>> >>
>> >>
>> >> 
>> >>
>> >>   > >> styleClass="inputmand"tabindex="" />
>> >>   
>> >>   
>> >>
>> >>   
>> >> > >> styleClass="inputmand" tabindex="" />
>> >>   
>> >>   
>> >>
>> >> 
>> >>
>> >> while submitting the form I am getting an exception like this.
>> >>
>> >>
>> >> 2004-02-26 18:17:08,133 [ExecuteThread: '12' for queue: 
>> >> 'weblogic.kernel.Default'] DEBUG org.apache. 
>> >> commons.beanutils.BeanUtils - 
>> >> setProperty([EMAIL PROTECTED], orgVO.a 
>> >> ddresses[0].company1, [get populated])
>> >> getAddrVOAL-->[]
>> >

AW: Form is not submited - nothing happens?!?

2004-01-22 Thread Martin Sturzenegger
hi,
the caller for the javascript seems to be missing.
you might try something like

 

[save] 



hope it helps
cheers
martin






-- Urspruengliche Nachricht --
Von: Matthias Winkler <[EMAIL PROTECTED]>
Antworten an: "Struts Users Mailing List" <[EMAIL PROTECTED]>
Datum:  Wed, 21 Jan 2004 16:34:18 -0800 (PST)

>Hi,
>I am trying to submit a form. I have the following
>things:
>struts-config.xml:
>  path="/finishPickActionMulti"
> 
>type="com.sap.cr.mima.warehouse.struts.actions.FinishPickMultiAction"
>  name="warehouseForm"
>  scope="session"
>  validate="true"
>  input="/multi/pick_multi.jsp">
>  
>  
>
>
>
>jsp:
><%@ taglib uri="http://java.sun.com/jstl/core";
>prefix="c"%>
><%@ taglib uri="/WEB-INF/struts-bean.tld"
>prefix="bean" %>
><%@ taglib uri="/WEB-INF/struts-html.tld"
>prefix="html" %>
><%@ taglib uri="/WEB-INF/mima-xv.tld" prefix="xv" %>
>
>onLoadFocus="submit" textPrompt="Picking Process"
>onLoadVoicePrompt="" />
>
>
>
>  function submitFunction(){
>alert("test");
>document.warehouseForm.submit();
>  }
>
>
> focus="submit">
>prompt="Done with box." />
> 
>
>
>>From my xv:message tag the JS-function
>submitFunction() is being called but the submit is not
>being done. I want to submit the 'warehousForm'. This
>is the name of the form that appears in the final html
>page.
>When I call this jsp-page I do not get any error
>messages. What is the best place to start to look for
>the 'error'?
>
>Thanks,
>Matthias
>
>__
>Do you Yahoo!?
>Yahoo! Hotjobs: Enter the "Signing Bonus" Sweepstakes
>http://hotjobs.sweepstakes.yahoo.com/signingbonus
>
>-
>To unsubscribe, e-mail: [EMAIL PROTECTED]
>For additional commands, e-mail: [EMAIL PROTECTED]
>
>
 
 

-
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]



AW: Form is not submited - nothing happens?!?

2004-01-22 Thread Martin Sturzenegger
hi,
in your form you may use something like

 

[save] 



hope it helps
cheers
martin

-- Urspruengliche Nachricht --
Von: Matthias Winkler <[EMAIL PROTECTED]>
Antworten an: "Struts Users Mailing List" <[EMAIL PROTECTED]>
Datum:  Wed, 21 Jan 2004 16:34:18 -0800 (PST)

>Hi,
>I am trying to submit a form. I have the following
>things:
>struts-config.xml:
>  path="/finishPickActionMulti"
> 
>type="com.sap.cr.mima.warehouse.struts.actions.FinishPickMultiAction"
>  name="warehouseForm"
>  scope="session"
>  validate="true"
>  input="/multi/pick_multi.jsp">
>  
>  
>
>
>
>jsp:
><%@ taglib uri="http://java.sun.com/jstl/core";
>prefix="c"%>
><%@ taglib uri="/WEB-INF/struts-bean.tld"
>prefix="bean" %>
><%@ taglib uri="/WEB-INF/struts-html.tld"
>prefix="html" %>
><%@ taglib uri="/WEB-INF/mima-xv.tld" prefix="xv" %>
>
>onLoadFocus="submit" textPrompt="Picking Process"
>onLoadVoicePrompt="" />
>
>
>
>  function submitFunction(){
>alert("test");
>document.warehouseForm.submit();
>  }
>
>
> focus="submit">
>prompt="Done with box." />
> 
>
>
>>From my xv:message tag the JS-function
>submitFunction() is being called but the submit is not
>being done. I want to submit the 'warehousForm'. This
>is the name of the form that appears in the final html
>page.
>When I call this jsp-page I do not get any error
>messages. What is the best place to start to look for
>the 'error'?
>
>Thanks,
>Matthias
>
>__
>Do you Yahoo!?
>Yahoo! Hotjobs: Enter the "Signing Bonus" Sweepstakes
>http://hotjobs.sweepstakes.yahoo.com/signingbonus
>
>-
>To unsubscribe, e-mail: [EMAIL PROTECTED]
>For additional commands, e-mail: [EMAIL PROTECTED]
>
>
 
 

-
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]



AW: sort and iterate

2004-01-21 Thread Martin Sturzenegger
hi,
when you read about HashMap it says in the api-description that "...This class makes 
no guarantees as to the order of the map; in particular, it does not guarantee that 
the order will remain constant over time..."
you might try LinkedHashMap instead.
cheers
martin





-- Urspruengliche Nachricht --
Von: "Sniadach, Tomasz" <[EMAIL PROTECTED]>
Antworten an: "Struts Users Mailing List" <[EMAIL PROTECTED]>
Datum:  Wed, 21 Jan 2004 11:29:34 +0100

>Hi,
>I am new to struts and have a little problem. I iterate a HashMap. When
>i do this with Java, then i have elements that are sorted by date (this
>make an another method), i mean, i have a sorted Map. When i use the
>logic:iterate tag the elements are not sorted. Is there an option to
>sort ?
>
>thx for help
>Tomek
>
>
>
 
 

-
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]



RE: getting data from form with nested beans

2004-01-21 Thread Martin Sturzenegger
hi everybody!
great flamewar ;>)
thanks to everybody involved! i really appreciate your help! 
you enlightened my greyish days!
cheers
martin





-- Urspruengliche Nachricht --
Von: "Arron Bates" <[EMAIL PROTECTED]>
Antworten an: "Struts Users Mailing List" <[EMAIL PROTECTED]>
Datum:  Wed, 21 Jan 2004 04:11:40 +1000

>Never thought I'd see a flamewar on nested beans. :)
>
>Request scope beans in lists are very much possible with the help of "Lazy"
>collections...
>
>http://marc.theaimsgroup.com/?l=struts-user&m=105027737732711&w=2
>
>...it's the entire reason the lazy collections were made. Some people just
>can't live with computer memory filling up with session objects.
>
>The lazy solution keeps Struts happy by allowing an empty list to recieve
>updates on indexes not there yet (which is what happens when the form object
>is created for the first time when the request comes in).
>
>That said, nothing in life comes free. Nested beans in request scope is one
>degree harder to code for than form beans in the session. If a site has
>limited concurrent users (intranetty, etc etc), I vote to put the form in the
>session every time. :)...but the other way is more than possible.
>
>
>Cheers.
>
>Arron.
>
>
>
>> I did not get your question clearly.
>> 
>> When a new form(instance of ActionForm) is created, users input is 
>> not lost.The users input is still in the request Object.(Are you 
>> confusing the Form on screen with the ActionFOrm object on server 
>> side?).So after the instance of ActionForm is created, it is 
>> populated with the parameters from the request using the struts auto-
>> population mechanism.And then you can use the same BeanList to pass 
>> to the Service layer(But after conversion may be as all the 
>> properties in String format.SO create DTO bean from correspondign 
>> stringbeans).
>> 
>> Hope this helps.
>> regards,
>> Shirish
>> 
>> -Original Message-
>> From: Martin Sturzenegger [mailto:[EMAIL PROTECTED]
>> Sent: Tuesday, January 20, 2004 3:11 PM
>> To: [EMAIL PROTECTED]; Struts Users Mailing List
>> Subject: RE: getting data from form with nested beans
>> 
>> hi shirish,
>> great conceipt and many thanks for example and explanation, my fog 
>> seems to thin out slowly. one question remains: as soon as a new 
>> form is created, then, i assume, the user's inputs are lost. so how 
>> do you get hold of the user's input? usually one feeds the input 
>> data back into a database. with simple beans i copy the formdata to 
>> a new instantiated dto-bean within my action class and pass the dto-
>> bean to my business-layer. but dealing with nested beans, where and how?
>> sorry for pestering
>> and thanks a lot in advance
>> martin 
>> 
>> -- Urspruengliche Nachricht --
>> Von: <[EMAIL PROTECTED]>
>> Antworten an: "Struts Users Mailing List" <[EMAIL PROTECTED]>
>> Datum:  Tue, 20 Jan 2004 13:54:30 +0100
>> 
>> >yes:-))
>> >And I am sure most of the people do have the same.I mean tieing the nested
>properties to the session scope does take away a lot of flexibility.
>> >
>> >Anyhow just try my sample code...It should demonstrate the concept.
>> >
>> >regards,
>> >Shirish
>> >
>> >-Original Message-
>> >From: Mark Lowe [mailto:[EMAIL PROTECTED]
>> >Sent: Tuesday, January 20, 2004 1:44 PM
>> >To: Struts Users Mailing List
>> >Subject: Re: getting data from form with nested beans
>> >
>> >
>> >So you've had forms, with indexed properties with dynamic sizes working  
>> >when scoping to request?
>> >
>> >
>> >On 20 Jan 2004, at 11:45, <[EMAIL PROTECTED]> wrote:
>> >
>> >> Hi,
>> >> Is it flaming or what?I thought we were trying to solve each others  
>> >> problems.Still a last try.
>> >> We have a complete application(3 modules/4000 classes/15 companies  
>> >> live as of date) which uses all form beans just in request scope.And  
>> >> all over the place we have used form beans in request scope.And the  
>> >> application is well and running.
>> >>
>> >> If you go t through my mail, you will understand why it will mail.SO  
>> >> please read the mail carefully.
>> >> I will try to explain it again.
>> >>
>> >> When the form

RE: getting data from form with nested beans

2004-01-20 Thread Martin Sturzenegger
>>>>> }
>>>>>
>>>>> public void setEmployee(int index,Employee emp){
>>>>>
>>>>> beanList.set(index,emp);
>>>>>
>>>>> }
>>>>>
>>>>> }
>>>>>
>>>>> ***
>>>>>
>>>>> Bean class
>>>>>
>>>>> public class Employee {
>>>>>
>>>>> private String name;
>>>>>
>>>>> private String salary;
>>>>>
>>>>> /**
>>>>>
>>>>> * Returns the name.
>>>>>
>>>>> * @return String
>>>>>
>>>>> */
>>>>>
>>>>> public String getName() {
>>>>>
>>>>> return name;
>>>>>
>>>>> }
>>>>>
>>>>> /**
>>>>>
>>>>> * Returns the salary.
>>>>>
>>>>> * @return String
>>>>>
>>>>> */
>>>>>
>>>>> public String getSalary() {
>>>>>
>>>>> return salary;
>>>>>
>>>>> }
>>>>>
>>>>> /**
>>>>>
>>>>> * Sets the name.
>>>>>
>>>>> * @param name The name to set
>>>>>
>>>>> */
>>>>>
>>>>> public void setName(String name) {
>>>>>
>>>>> this.name = name;
>>>>>
>>>>> }
>>>>>
>>>>> /**
>>>>>
>>>>> * Sets the salary.
>>>>>
>>>>> * @param salary The salary to set
>>>>>
>>>>> */
>>>>>
>>>>> public void setSalary(String salary) {
>>>>>
>>>>> this.salary = salary;
>>>>>
>>>>> }
>>>>>
>>>>> }
>>>>>
>>>>> 
>>>>>
>>>>> JSP
>>>>>
>>>>> <%@ page language="java"%>
>>>>>
>>>>> <%@ taglib uri="/WEB-INF/struts-html.tld" prefix="html" %>
>>>>>
>>>>> 
>>>>>
>>>>> 
>>>>>
>>>>> >>>> indexId="i"/>
>>>>>
>>>>> >>>> \"].name\"%>">
>>>>>
>>>>> >>>> \"].salary\"%>">
>>>>>
>>>>> 
>>>>>
>>>>> 
>>>>>
>>>>> 
>>>>>
>>>>> Explanation:
>>>>>
>>>>> See how the property is constructed.
>>>>>
>>>>> >>>> \"].name\"%>">
>>>>>
>>>>> So this will result in a parameter name employee[i].name in the http
>>>>> request.So
>>>>> when the jsp is rendered, this will be interpreted as
>>>>>
>>>>> getEmployee[i].getName().And when the jsp is submitted , the same
>>>>> will
>>>>> be
>>>>> interpreted as getEmployee[i].setName().And this will result in auto
>>>>> population
>>>>> of data in the form as u can see.
>>>>>
>>>>> So check the indexed properties on the form as well.(Especially the
>>>>> getEmployee(index i) proeprty with while loop.)
>>>>>
>>>>> Hope this helps.
>>>>>
>>>>>
>>>>>
>>>>> regards,
>>>>>
>>>>> Shirish.
>>>>>
>>>>>
>>>>> -Original Message-
>>>>> From: Mark Lowe [mailto:[EMAIL PROTECTED]
>>>>> Sent: Monday, January 19, 2004 6:18 PM
>>>>> To: Struts Users Mailing List
>>>>> Subject: Re: getting data from form with nested beans
>>>>>
>>>>>
>>>>> Dunno what that thread on lazy lists was but nesting beans should
>>>>> work
>>>>> fine, but you will need to scope any property that you want a  
>>>>> dynamic
>>>>> size to session.
>>>>>
>>>>> Shou

getting data from form with nested beans

2004-01-19 Thread Martin Sturzenegger
hi,
concerning nested properties, i found so many questions, hints etc. in the archive but 
nothing that really helped all the way...i'm still confused (or even more now...)
i still don't understand how struts handles input from a form that holds an iteration 
of nested beans. 
is the following correct?
as soon as the user submits the form, the actionform-bean, holding the nested beans 
with the user's changes, gets transmitted. 
is it so, that before the action-class is called, the form-bean's reset() method is 
called, and all nested beans are set to null by default? 
so do i have to override the reset() method?
what do i iterate over in the reset() method to get the user's inputs? 
how do i limit the iteration?
does the validate() method gets called before the reset method?.

i've seen examples, where a dto-class is instanciated within the reset() method.
is this the way to do it?
do i have to access these dto-beans in the action class?

could somebody give me a little example of a reset()-method, just to show how the 
user's input can be gathered and then stored away?

and.. what are lazy lists? i wasn't able to find a definition

sorry about it but 

regards from an utterly confused martin




-- Urspruengliche Nachricht --
Von: <[EMAIL PROTECTED]>
Datum:  Mon, 19 Jan 2004 10:52:10 +0100

>You ahve a fixed length or Empty list in the form.So when the auto population tries 
>to populate the nested bean for the list which is empty/fixed size,you get this 
>exception. 
>Try to use lazy list or search the archive for nested property usage...There are many 
>examples which will demonatrate how to use it.
>
>HTH.
>regards,
>Shirish
>
>-Original Message-
>From: Martin Sturzenegger [mailto:[EMAIL PROTECTED]
>Sent: Monday, January 19, 2004 10:46 AM
>To: Struts Users Mailing List; [EMAIL PROTECTED]; Struts Users
>Mailing List
>Subject: Re: Including one JSP in another
>
>
>i try to receive user-input from a form using a list of nested beans.
>after hitting submit i get an ArrayIndexOutOfBoundsException
>can somebody give me a hint?
>many thanks
>martin
>
>
>
>
>stacktrace:
>
>java.lang.ArrayIndexOutOfBoundsException
>   java.lang.reflect.Array.get(Native Method)
>   
> org.apache.commons.beanutils.PropertyUtils.getIndexedProperty(PropertyUtils.java:525)
>   
> org.apache.commons.beanutils.PropertyUtils.getIndexedProperty(PropertyUtils.java:428)
>   
> org.apache.commons.beanutils.PropertyUtils.getNestedProperty(PropertyUtils.java:770)
>   org.apache.commons.beanutils.PropertyUtils.getProperty(PropertyUtils.java:801)
>   org.apache.commons.beanutils.BeanUtils.setProperty(BeanUtils.java:881)
>   org.apache.commons.beanutils.BeanUtils.populate(BeanUtils.java:808)
>   org.apache.struts.util.RequestUtils.populate(RequestUtils.java:1252)
>   
> org.apache.struts.action.RequestProcessor.processPopulate(RequestProcessor.java:821)
>   org.apache.struts.action.RequestProcessor.process(RequestProcessor.java:254)
>   org.apache.struts.action.ActionServlet.process(ActionServlet.java:1482)
>   org.apache.struts.action.ActionServlet.doPost(ActionServlet.java:525)
>   javax.servlet.http.HttpServlet.service(HttpServlet.java:763)
>   javax.servlet.http.HttpServlet.service(HttpServlet.java:856)
>
>
>
>
>>> > >
>>> > > Confidentiality Notice
>>> > >
>>> > > The information contained in this electronic message and any
>>attachments
>>> > > to this message are intended
>>> > > for the exclusive use of the addressee(s) and may contain confidential
>>> > > or privileged information. If
>>> > > you are not the intended recipient, please notify the sender at Wipro
>>or
>>> > > [EMAIL PROTECTED] immediately
>>> > > and destroy all copies of this message and any attachments.
>>> > >
>>> > > -
>>> > > To unsubscribe, e-mail: [EMAIL PROTECTED]
>>> > > For additional commands, e-mail: [EMAIL PROTECTED]
>>> > >
>>> > >
>>> > > Confidentiality Notice
>>> > >
>>> > > The information contained in this electronic message and any
>>attachments
>>> > to this message are intended
>>> > > for the exclusive use of the addressee(s) and may contain confidential
>>> or
>>> > privileged information. If
>>> > > you are not the intended recipient, please notify the sender at Wipro
>>or
>>> > [EMAIL PROTECTED]

Re: receiving data from a form using nested beans

2004-01-19 Thread Martin Sturzenegger

yes it is



-
martin sturzenegger
pangea development ag
rosengartenstrasse 1a
8037 zuerich

natel  079 456 24 94
büro01 271 46 42
fax 01 271 46 49






-- Urspruengliche Nachricht --
Von: Mark Lowe <[EMAIL PROTECTED]>
Antworten an: "Struts Users Mailing List" <[EMAIL PROTECTED]>
Datum:  Mon, 19 Jan 2004 10:55:34 +

>is your form scoped to session?
>
>
>On 19 Jan 2004, at 09:59, Martin Sturzenegger wrote:
>
>>
>> i try to receive user-input from a form using a list of nested beans.
>> after hitting submit i get an ArrayIndexOutOfBoundsException
>> can somebody give me a hint?
>> many thanks
>> martin
>>>
>>>
>>> stacktrace:
>>>
>>> java.lang.ArrayIndexOutOfBoundsException
>>> java.lang.reflect.Array.get(Native Method)
>>>
>>> org.apache.commons.beanutils.PropertyUtils.getIndexedProperty(Property 
>>> Utils.java:525)
>>>
>>> org.apache.commons.beanutils.PropertyUtils.getIndexedProperty(Property 
>>> Utils.java:428)
>>>
>>> org.apache.commons.beanutils.PropertyUtils.getNestedProperty(PropertyU 
>>> tils.java:770)
>>>
>>> org.apache.commons.beanutils.PropertyUtils.getProperty(PropertyUtils.j 
>>> ava:801)
>>> org.apache.commons.beanutils.BeanUtils.setProperty(BeanUtils.java:
>>> 881)
>>> org.apache.commons.beanutils.BeanUtils.populate(BeanUtils.java:808)
>>> org.apache.struts.util.RequestUtils.populate(RequestUtils.java:1252)
>>>
>>> org.apache.struts.action.RequestProcessor.processPopulate(RequestProce 
>>> ssor.java:821)
>>>
>>> org.apache.struts.action.RequestProcessor.process(RequestProcessor.jav 
>>> a:254)
>>> org.apache.struts.action.ActionServlet.process(ActionServlet.java:
>>> 1482)
>>> org.apache.struts.action.ActionServlet.doPost(ActionServlet.java:525)
>>> javax.servlet.http.HttpServlet.service(HttpServlet.java:763)
>>> javax.servlet.http.HttpServlet.service(HttpServlet.java:856)
>>>
>>>
>> ps: sorry, forgot to change title line, didn't want to upset the
>> running thread.
>>
>>>
>>>
>>>>>>>
>>>>>>> Confidentiality Notice
>>>>>>>
>>>>>>> The information contained in this electronic message and any
>>>> attachments
>>>>>>> to this message are intended
>>>>>>> for the exclusive use of the addressee(s) and may contain
>>>>>>> confidential
>>>>>>> or privileged information. If
>>>>>>> you are not the intended recipient, please notify the sender at
>>>>>>> Wipro
>>>> or
>>>>>>> [EMAIL PROTECTED] immediately
>>>>>>> and destroy all copies of this message and any attachments.
>>>>>>>
>>>>>>> -- 
>>>>>>> ---
>>>>>>> To unsubscribe, e-mail: [EMAIL PROTECTED]
>>>>>>> For additional commands, e-mail:
>>>>>>> [EMAIL PROTECTED]
>>>>>>>
>>>>>>>
>>>>>>> Confidentiality Notice
>>>>>>>
>>>>>>> The information contained in this electronic message and any
>>>> attachments
>>>>>> to this message are intended
>>>>>>> for the exclusive use of the addressee(s) and may contain
>>>>>>> confidential
>>>>> or
>>>>>> privileged information. If
>>>>>>> you are not the intended recipient, please notify the sender at
>>>>>>> Wipro
>>>> or
>>>>>> [EMAIL PROTECTED] immediately
>>>>>>> and destroy all copies of this message and any attachments.
>>>>>>>
>>>>>>> -- 
>>>>>>> ---
>>>>>>> To unsubscribe, e-mail: [EMAIL PROTECTED]
>>>>>>> For additional commands, e-mail:
>>>>>>> [EMAIL PROTECTED]
>>>>>>>
>>>>>>
>>>>>>
>>>>>> --- 
>>>>>> --
>>>>>> To unsubscribe, e-mail: [EMAIL PROTECTED]
>>>>>> For additional commands, e-mail:
>>>>>> [EMAIL PROTECTED]
>>>>>>
>>>>>
>>>>>
>>>>>  
>>>>> -
>>>>> To unsubscribe, e-mail: [EMAIL PROTECTED]
>>>>> For additional commands, e-mail: [EMAIL PROTECTED]
>>>>>
>>>>
>>>>
>>>> -
>>>> To unsubscribe, e-mail: [EMAIL PROTECTED]
>>>> For additional commands, e-mail: [EMAIL PROTECTED]
>>>>
>>>>
>>>
>>>
>>>
>>> -
>>> To unsubscribe, e-mail: [EMAIL PROTECTED]
>>> For additional commands, e-mail: [EMAIL PROTECTED]
>>>
>>>
>>
>>
>>
>> -
>> To unsubscribe, e-mail: [EMAIL PROTECTED]
>> For additional commands, e-mail: [EMAIL PROTECTED]
>>
>
>
>-
>To unsubscribe, e-mail: [EMAIL PROTECTED]
>For additional commands, e-mail: [EMAIL PROTECTED]
>
>




-
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]



receiving data from a form using nested beans

2004-01-19 Thread Martin Sturzenegger

i try to receive user-input from a form using a list of nested beans.
after hitting submit i get an ArrayIndexOutOfBoundsException
can somebody give me a hint?
many thanks
martin
>
>
>stacktrace:
>
>java.lang.ArrayIndexOutOfBoundsException
>   java.lang.reflect.Array.get(Native Method)
>   
> org.apache.commons.beanutils.PropertyUtils.getIndexedProperty(PropertyUtils.java:525)
>   
> org.apache.commons.beanutils.PropertyUtils.getIndexedProperty(PropertyUtils.java:428)
>   
> org.apache.commons.beanutils.PropertyUtils.getNestedProperty(PropertyUtils.java:770)
>   org.apache.commons.beanutils.PropertyUtils.getProperty(PropertyUtils.java:801)
>   org.apache.commons.beanutils.BeanUtils.setProperty(BeanUtils.java:881)
>   org.apache.commons.beanutils.BeanUtils.populate(BeanUtils.java:808)
>   org.apache.struts.util.RequestUtils.populate(RequestUtils.java:1252)
>   
> org.apache.struts.action.RequestProcessor.processPopulate(RequestProcessor.java:821)
>   org.apache.struts.action.RequestProcessor.process(RequestProcessor.java:254)
>   org.apache.struts.action.ActionServlet.process(ActionServlet.java:1482)
>   org.apache.struts.action.ActionServlet.doPost(ActionServlet.java:525)
>   javax.servlet.http.HttpServlet.service(HttpServlet.java:763)
>   javax.servlet.http.HttpServlet.service(HttpServlet.java:856)
>
>
ps: sorry, forgot to change title line, didn't want to upset the running thread.

>
>
>>> > >
>>> > > Confidentiality Notice
>>> > >
>>> > > The information contained in this electronic message and any
>>attachments
>>> > > to this message are intended
>>> > > for the exclusive use of the addressee(s) and may contain confidential
>>> > > or privileged information. If
>>> > > you are not the intended recipient, please notify the sender at Wipro
>>or
>>> > > [EMAIL PROTECTED] immediately
>>> > > and destroy all copies of this message and any attachments.
>>> > >
>>> > > -
>>> > > To unsubscribe, e-mail: [EMAIL PROTECTED]
>>> > > For additional commands, e-mail: [EMAIL PROTECTED]
>>> > >
>>> > >
>>> > > Confidentiality Notice
>>> > >
>>> > > The information contained in this electronic message and any
>>attachments
>>> > to this message are intended
>>> > > for the exclusive use of the addressee(s) and may contain confidential
>>> or
>>> > privileged information. If
>>> > > you are not the intended recipient, please notify the sender at Wipro
>>or
>>> > [EMAIL PROTECTED] immediately
>>> > > and destroy all copies of this message and any attachments.
>>> > >
>>> > > -
>>> > > To unsubscribe, e-mail: [EMAIL PROTECTED]
>>> > > For additional commands, e-mail: [EMAIL PROTECTED]
>>> > >
>>> >
>>> >
>>> > -
>>> > To unsubscribe, e-mail: [EMAIL PROTECTED]
>>> > For additional commands, e-mail: [EMAIL PROTECTED]
>>> >
>>>
>>>
>>> -
>>> To unsubscribe, e-mail: [EMAIL PROTECTED]
>>> For additional commands, e-mail: [EMAIL PROTECTED]
>>>
>>
>>
>>-
>>To unsubscribe, e-mail: [EMAIL PROTECTED]
>>For additional commands, e-mail: [EMAIL PROTECTED]
>>
>>
> 
> 
>
>-
>To unsubscribe, e-mail: [EMAIL PROTECTED]
>For additional commands, e-mail: [EMAIL PROTECTED]
>
>
 
 

-
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]



Re: Including one JSP in another

2004-01-19 Thread Martin Sturzenegger
i try to receive user-input from a form using a list of nested beans.
after hitting submit i get an ArrayIndexOutOfBoundsException
can somebody give me a hint?
many thanks
martin




stacktrace:

java.lang.ArrayIndexOutOfBoundsException
java.lang.reflect.Array.get(Native Method)

org.apache.commons.beanutils.PropertyUtils.getIndexedProperty(PropertyUtils.java:525)

org.apache.commons.beanutils.PropertyUtils.getIndexedProperty(PropertyUtils.java:428)

org.apache.commons.beanutils.PropertyUtils.getNestedProperty(PropertyUtils.java:770)
org.apache.commons.beanutils.PropertyUtils.getProperty(PropertyUtils.java:801)
org.apache.commons.beanutils.BeanUtils.setProperty(BeanUtils.java:881)
org.apache.commons.beanutils.BeanUtils.populate(BeanUtils.java:808)
org.apache.struts.util.RequestUtils.populate(RequestUtils.java:1252)

org.apache.struts.action.RequestProcessor.processPopulate(RequestProcessor.java:821)
org.apache.struts.action.RequestProcessor.process(RequestProcessor.java:254)
org.apache.struts.action.ActionServlet.process(ActionServlet.java:1482)
org.apache.struts.action.ActionServlet.doPost(ActionServlet.java:525)
javax.servlet.http.HttpServlet.service(HttpServlet.java:763)
javax.servlet.http.HttpServlet.service(HttpServlet.java:856)




>> > >
>> > > Confidentiality Notice
>> > >
>> > > The information contained in this electronic message and any
>attachments
>> > > to this message are intended
>> > > for the exclusive use of the addressee(s) and may contain confidential
>> > > or privileged information. If
>> > > you are not the intended recipient, please notify the sender at Wipro
>or
>> > > [EMAIL PROTECTED] immediately
>> > > and destroy all copies of this message and any attachments.
>> > >
>> > > -
>> > > To unsubscribe, e-mail: [EMAIL PROTECTED]
>> > > For additional commands, e-mail: [EMAIL PROTECTED]
>> > >
>> > >
>> > > Confidentiality Notice
>> > >
>> > > The information contained in this electronic message and any
>attachments
>> > to this message are intended
>> > > for the exclusive use of the addressee(s) and may contain confidential
>> or
>> > privileged information. If
>> > > you are not the intended recipient, please notify the sender at Wipro
>or
>> > [EMAIL PROTECTED] immediately
>> > > and destroy all copies of this message and any attachments.
>> > >
>> > > -
>> > > To unsubscribe, e-mail: [EMAIL PROTECTED]
>> > > For additional commands, e-mail: [EMAIL PROTECTED]
>> > >
>> >
>> >
>> > -
>> > To unsubscribe, e-mail: [EMAIL PROTECTED]
>> > For additional commands, e-mail: [EMAIL PROTECTED]
>> >
>>
>>
>> -
>> To unsubscribe, e-mail: [EMAIL PROTECTED]
>> For additional commands, e-mail: [EMAIL PROTECTED]
>>
>
>
>-
>To unsubscribe, e-mail: [EMAIL PROTECTED]
>For additional commands, e-mail: [EMAIL PROTECTED]
>
>
 
 

-
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]



AW: Form submission

2004-01-15 Thread Martin Sturzenegger
 instead of   
this might help
martin



-- Urspruengliche Nachricht --
Von: "Raman" <[EMAIL PROTECTED]>
Antworten an: "Struts Users Mailing List" <[EMAIL PROTECTED]>
Datum:  Thu, 15 Jan 2004 19:38:55 +0530

>I want to implement something like this:
>
>Conditional checks: for form submission to different Actions
>
>
>
>
>
>
>
>
>
>But this is giving me error [ServletException  "Unterminated tag'"
>if i remove the logic tags it works fine.
>
>Can anybody help me in this or give me some idea...
>
>Thanks
>-- Raman
>
 
 

-
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]



RE: ActionForm is not automatically popluated.

2004-01-15 Thread Martin Sturzenegger


if you have getAmount() and setAmount() methods, you address the according property in 
you jsp as amount and not as Amount !!!
silly, but these are the rules...
hope this helps
martin


-- Urspruengliche Nachricht --
Von: "Andre Risnes" <[EMAIL PROTECTED]>
Antworten an: "Struts Users Mailing List" <[EMAIL PROTECTED]>
Datum:  Thu, 15 Jan 2004 09:34:02 +0100

>>
>> Without seeing any of your code, one possibility is that the
>> case of your property names isn't properly matching your Form.
>> For instance, the property "lastname" isn't going to match
>> setLastName() in your form, but "lastName" will.
>
>I believe i've tried every possible case combination. Currently
>the properties in the form are called e.g. Amount and the methods
>in the ActionForm are called e.g. getAmount() and setAmount().
>
>
>--
>Regards
>André Risnes
>
>-
>To unsubscribe, e-mail: [EMAIL PROTECTED]
>For additional commands, e-mail: [EMAIL PROTECTED]
>
>




-
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]