Re: DynaActionForm in session scope

2002-12-13 Thread Gemes Tibor
2002. december 13. 20:00 dátummal Charles ezt írtad:
> Thanks for your help. But I'm still a little confused. How do you extend a
> DynaActionForm? I thought it was created on the fly.

Only the properties are created on the fly, the class itself is 
org.apache.struts.action.DynaActionForm.

So here is the rough overview of what I have done.

public class CondResetDynaActionForm extends DynaActionForm {
/** Reset the property to its initial value conditionally. 
 **/
public void reset(ActionMapping mapping, HttpServletRequest request) {
String name = mapping.getName();
if (name == null) {
return;
}
FormBeanConfig config =
mapping.getApplicationConfig().findFormBeanConfig(name);
if (config == null) {
return;
}
FormPropertyConfig props[] = config.findFormPropertyConfigs();
for (int i = 0; i < props.length; i++) {
// reset only if not CondResetFPC or getReset() returns true
if (!(props[i] instanceof CondResetFormPropertyConfig) || 
(((CondResetFormPropertyConfig)form).getReset())
set(props[i].getName(), props[i].initial());
}
}
}

Extend the FormPropertyConfig with a reset property. (homework :)

> Also you mentioned about using the set-property tags. Please forgive my
> ignorance, but could you provide me with a working example of how this
> set-property tags can be used to present the reset() being called?

If you want to leave the reset() as it was originally, you declare your 
form-bean as DynaActionForm. If you want your own reset to be executed, 
declare it as CondResetDynaActionForm.
The set-property could be used to determine per form-property whether you want 
to reset it or not. But in this case you have to specify, that this is your 
FPC class, not the original one as the original FPC does not have "reset" 
property. 



 



Hth,

Tib

--
To unsubscribe, e-mail:   
For additional commands, e-mail: 




Re: replacement values

2002-12-13 Thread Gemes Tibor
2002. december 13. 08:30 dátummal Mohan Radhakrishnan ezt írtad:
> Hi,
> bean:message accepts only five replacement values.
>
> Is there an alternative ? JSTL ?

Split up the message. I can hardly think of any case in which you have more 
than 3 values... Or extend the taglib.

Tib

--
To unsubscribe, e-mail:   
For additional commands, e-mail: 




RE: org.apache.jasper.JasperException: No getter method for property appauth.aAuthLevel of bean element

2002-12-13 Thread shirishchandra . sakhare
Hi,
The problem has to do with java beans specification 1.01  section 8.8 
The mechanism used by java beans introspection to derive method names from 
property names is like this.
1.Append get/set to peoperty name and capitilise first letter of property.(e.g. 
for a property name, method names derived will be getName and setName)
2.But if second letter of property is also capital, then dont apply the 
capitalisation.(e.g for a property URL,method names derived will be getURL and 
setURL.)

And this is why u are having the problem.


regards,
Shirish

-Original Message-
From: david.karr [mailto:[EMAIL PROTECTED]]
Sent: Thursday, December 12, 2002 10:01 PM
To: struts-user
Subject: RE: org.apache.jasper.JasperException: No getter method for
property appauth.aAuthLevel of bean element


This is the "two starting caps" rule.  I don't know exactly how this 
translates, as I try to avoid this situation.  Change your property name (in 
both places) so that the second character is NOT a capital.  I believe this 
will solve this problem, at least that part.

> -Original Message-
> From: Jyothi Panduranga
> [mailto:[EMAIL PROTECTED]]
> Sent: Thursday, December 12, 2002 12:55 PM
> To: [EMAIL PROTECTED]
> Subject: org.apache.jasper.JasperException: No getter method for
> property appauth.aAuthLevel of bean element
> 
> 
> Hi,
> 
>   I have been getting this error when I try to access a 
> property.  I have
> both getter and setter properties defined in the bean. Both 
> deals with the
> variable of same type.  Eg., I have this defined in my bean.
> 
> /**
>  * Sets the value of field 'aAuthLevel'.
>  *
>  * @param aAuthLevel the value of field 'aAuthLevel'.
> **/
> public void setAAuthLevel(java.lang.String aAuthLevel)
> {
> this._aAuthLevel = aAuthLevel;
> }
> 
>/**
>  * gets the value of field 'aAuthLevel'.
>  *
>  *
> **/
> public String getAAuthLevel()
> {
> return this._aAuthLevel;
> }
> 
> Here is the part of my JSP sniplet which calls the property
> 
> 
>   property="appauth.aAuthLevel" />
> 
> 
> I get this following error.
> 
> org.apache.jasper.JasperException: No getter method for property
> appauth.aAuthLevel of bean element
> 
> However, If I change the name of the getter and setter properties to
> getAuthLevel/setAuthLevel and JSP according do that(appauth.authLevel
> instead of appauth.aAuthLevel), then everything works fine.
> 
> I want to know if this is a bug in JSP or struts.  I use 
> Tomcat 4.1.12.
> Any insight would be helpful.
> 
> Thanks in advance,
> Jyothi
> 
> 
> --
> To unsubscribe, e-mail:   

For additional commands, e-mail: 

--
To unsubscribe, e-mail:   
For additional commands, e-mail: 



--
To unsubscribe, e-mail:   
For additional commands, e-mail: 




Re: Using HTML frames in Struts

2002-12-13 Thread Mark
Alex

I'm not qualified to say what's best practice... So i won't bulshit you by
pretending i am.

If i wanted to have a submit button in a seperate frame for a form in
another frame i'd be looking at the following..

Form 1 exectutes and action that then executes the submit action for your
second form.

In fact now i think about it this would work fine, and without javascript.

Public firstaction Execute(etc) {

forward(mapping.findforward(secondaction);

}

Cheers mark

On 12-12-2002 18:38, "Viggio, Alex" <[EMAIL PROTECTED]> wrote:

> What's the best practice for having a submit button submit a form in a
> separate frame. I'm trying to avoid this, but the user wants two scrolling
> sections on a complex data entry page.
> 
> Thanks,
> - Alex
> 
> -Original Message-
> From: Mark [mailto:[EMAIL PROTECTED]]
> Sent: Thursday, December 12, 2002 10:26 AM
> To: Struts Users Mailing List
> Subject: Re: Using HTML frames in Struts
> 
> 
> David
> 
> I'm developing a webapplication using struts and it has frames..
> 
> Other than 
> 
> " />
> 
> To pass the session through for paranoid people who thing cookies can take
> over your mind. But no other problems..
> 
> Cheers
> 
> mark
> 
> 
> 
> 
> On 12-12-2002 18:18, "David Rothschadl" <[EMAIL PROTECTED]> wrote:
> 
>> 
>> Hello,
>> 
>> Is there anybody who has used frames within the Struts framework? Our
> frame
>> set-up, which worked fine in our non-Struts HTML pages, is not working
> with
>> Struts. Any working examples would be greatly appreciated!
>> 
>> David Rothschadl
>> 
>> 
>> 
> 
> 
> --
> To unsubscribe, e-mail:
> 
> For additional commands, e-mail:
> 
> 


--
To unsubscribe, e-mail:   
For additional commands, e-mail: 




Re: How to access CVS log information

2002-12-13 Thread Mark

Once you project is checked out use ' cvs log '.

This will print the cvs log to your terminal.

Cheers mark


On 13-12-2002 3:44, "David Graham" <[EMAIL PROTECTED]> wrote:

> I use eclipse to open up a particular .java file in the resource history
> view.  This shows all the changes that were made, by whom, and when.  I'm
> not sure how to do it without that tool though.
> 
> David
> 
> 
> 
> 
> 
> 
>> From: [EMAIL PROTECTED]
>> Reply-To: "Struts Users Mailing List" <[EMAIL PROTECTED]>
>> To: [EMAIL PROTECTED]
>> Subject: How to access CVS log information
>> Date: Fri, 13 Dec 2002 13:00:27 +1100
>> 
>> I'm trying to get information from the Struts CVS repository which will
>> tell me what changes have been made since the Struts 1.1b2 release.
>> 
>> Does anyone know a way of getting this information ?
>> 
>> I want to go through this to make sure that any of the problems fixed by
>> these changes will not affect us in our project implementation.
>> 
>> 
>> 
>> Steve Akins
>> Team Leader, Frameworks, J2EE Engineering
>> Development Centre
>> Financial Services Australia Technology
>> 
>> 
>> ( +61 3 8641 2846 2 +61 3 8641 4152 : [EMAIL PROTECTED]
>> 
>> 
>> National Australia Bank Limited
>> 4th Floor/ 500 Bourke St
>> Melbourne, Victoria 3000
>> __
>> The information contained in this email communication may be confidential.
>> You
>> should only read, disclose, re-transmit, copy, distribute, act in reliance
>> on or
>> commercialise the information if you are authorised to do so. If you are
>> not the
>> intended recipient of this email communication, please notify us
>> immediately by
>> email to [EMAIL PROTECTED] or reply by email direct to the sender
>> and then destroy any electronic or paper copy of this message.  Any views
>> expressed in this email communication are those of the individual sender,
>> except
>> where the sender specifically states them to be the views of a member of
>> the
>> National Australia Bank Group of companies.  The National Australia Bank
>> Group
>> of companies does not represent, warrant or guarantee that the integrity of
>> this
>> communication has been maintained nor that the communication is free of
>> errors,
>> virus or interference.
>> 
>> 
>> --
>> To unsubscribe, e-mail:
>> 
>> For additional commands, e-mail:
>> 
> 
> 
> _
> Add photos to your e-mail with MSN 8. Get 2 months FREE*.
> http://join.msn.com/?page=features/featuredemail
> 
> 
> --
> To unsubscribe, e-mail:   
> For additional commands, e-mail: 
> 
> 


--
To unsubscribe, e-mail:   
For additional commands, e-mail: 




Re: Struggling with indexed/repeating input fields in forms

2002-12-13 Thread Michael Olszynski
The same problem with the nested tags occurs. So I´m still trying to figure
out why it doesn´t work.

But thanks for u´r help!

Take care Michael
--
Fehlerfreie Software wirkt weniger komplex und diskreditiert damit den
Entwickler!
- Original Message -
From: "Stephen Ting" <[EMAIL PROTECTED]>
To: "'Struts Users Mailing List'" <[EMAIL PROTECTED]>
Sent: Friday, December 13, 2002 2:06 AM
Subject: RE: Struggling with indexed/repeating input fields in forms


Michael,

May be you can try using Nested iterate tag + Nested text tag to
populate the indexed fields. I Have successfully done this.

If you need further clarification, please email me.

Regards,

Stephen


> -Original Message-
> From: Michael Olszynski [mailto:[EMAIL PROTECTED]]
> Sent: 13 December 2002 04:21
> To: Struts Users Mailing List
> Subject: Re: Struggling with indexed/repeating input fields in forms
>
>
> That didn´t help.But thanks eitherway.
> Does anyone have a clue what could be wrong?
> Any ideas are welcome!
> --
> Fehlerfreie Software wirkt weniger komplex und diskreditiert
> damit den Entwickler!
> - Original Message -
> From: "V. Cekvenich" <[EMAIL PROTECTED]>
> To: <[EMAIL PROTECTED]>
> Sent: Thursday, December 12, 2002 6:56 PM
> Subject: Re: Struggling with indexed/repeating input fields
>
>
> > One (good) way is to have your beans implement collection. Search
> > messages for "cekvenich", I posted like 3 of my last 10 messages
> > related to this.
> >
> > .V
> >
> > Michael Olszynski wrote:
> > > I saw a post in the thread
> > >
> http://www.mail-archive.com/struts-user@jakarta.apache.org/msg49234.
> > > html
> > >
> > > I have the same problem and I can´t get it working.
> Perhaps someone
> > > can
> help me? It´d be very nice.
> > >
> > > I have the problems that the data in my formbean isn´t updated. I
> > > mean,
> I get the data form my formbean in the jsp page. But when I
> edit it and press submit, it is not updated. I get the same
> data as I got before.
> > >
> > > Do you see perhaps an error? (I reviewed it now 7 hours with the
> > > sample
> source attached in the upper thread, and I can´t find any
> error. Thank you)
> > >
> > > It´s kind of urgent, because my thesis should be finished
> at the end
> > > of
> december. Thanks
> > >
> > > Take care Michael
> > >
> > >
> **
> **
> **
> > > This is my projekterfassung.jsp:
> > >
> > >  type="de.proway.zerf.web.bean.TimeProofFormBean">
> > > 
> > >  property="vector">
> > > 
> > > 
> > > maxlength="2" indexed="true"/> :  property="fromMinute" size="2" maxlength="2" indexed="true"/> 
> > > maxlength="2" indexed="true"/>   :  property="toMinute" size="2" maxlength="2" indexed="true"/>   
> > > 
> > > 
> > > 
> > >
> **
> **
> **
> > >
> > > My struts-config.xml:
> > >
> > > 
> > >
> > >  > >   "-//Apache Software Foundation//DTD Struts Configuration
> 1.0//EN"
> > >
> > > "http://jakarta.apache.org/struts/dtds/struts-config_1_0.dtd";>
> > >
> > > 
> > >
> > >
> > >   
> > >
> > >   
> > >   
> > >
> > >  > >name="timeProofForm"
> > >type="de.proway.zerf.web.bean.TimeProofFormBean"/>
> > >
> > > 
> > >
> > >
> > >   
> > >   
> > >
> > >   path="/projekterfassung.jsp"/>
> > >
> > >   
> > >
> > >
> > >   
> > >   
> > >
> > >   > >
> type="de.proway.zerf.web.controller.ShowTimeProofAction"
> > >  name="timeProofForm"
> > >  scope="request"
> > >  input="/projekterfassung.jsp">  
> > >
> > >> >
> type="de.proway.zerf.web.controller.SaveTimeProofAction"
> > >  name="timeProofForm"
> > >  scope="request"
> > >  input="/projekterfassung.jsp">  
> > >
> > >
> > >  > >
> type="org.apache.struts.actions.AddFormBeanAction"/>
> > >  > >type="org.apache.struts.actions.AddForwardAction"/>
> > >  > >type="org.apache.struts.actions.AddMappingAction"/>
> > >  > >type="org.apache.struts.actions.ReloadAction"/>
> > >  > >
> type="org.apache.struts.actions.RemoveFormBeanAction"/>
> > >  > >
> type="org.apache.struts.actions.RemoveForwardAction"/>
> > >  > >
> type="org.apache.struts.actions.RemoveMappingAction"/>
> > >
> > >
> > >   
> > >
> > > 
> > >
> **
> **
> **
> > > SaveTimeProofAction.java
> > >
> > > package de.proway.zerf.web.controller;
> > >
> > > import javax.servlet.http.*;
> > > import org.apache.struts.action.*;
> > > import de.proway.zerf.web.bean.*;
> > > import de.proway.zerf.app.controller.*;
> > > import de.proway.zerf.web.util.*;
> > > import de.proway.zerf.app.bean.*;
> > > import java.util.*;
> > > i

Last Nightly build

2002-12-13 Thread Fabrice BLANQUART
Hi

Is it normal that the contrib part( especialy struts-el) of the binary 
nightly build has disappeared  ?

Rgs

Fabrice BLANQUART

--





--
To unsubscribe, e-mail:   
For additional commands, e-mail: 



Re: Struggling with indexed/repeating input fields

2002-12-13 Thread Michael Olszynski
Hi Brian,

I didn´t really get everything what u wrote. (It´s a problem of my bad
english, I guess). But I made myself some thoughts about what u worte about
"id".
And finally I got my error why I only could read from my formbean but not
submit any changes in the bean. The error was the "id" (I guess).
OK I try to explain (correct me if I´m wrong).


I have a formbean which looks like this:

public class TimeProofFormBean extends ActionForm {


public Vector getTimeProofList() {
return this.timeProofList;
}

public void setTimeProofList( Vector v ) {
this.timeProofList = v;
}

   

private Vector timeProofList = new Vector();

}

**
In my set and get TimeProofList-Vector I save following bean:

public class TimeProofTableBean implements Serializable {
public TimeProofTableBean(){}

public String getFromHour(){
return FromHour;
}

public void setFromHour(String FromHour){
this.FromHour = FromHour;
}



private String FromHour;


}

**+
In my jsp I had following iterate Tag:




   
 


So, I declare an "element" which comes from my timeProofForm with the method
getTimeProofList. (This returnes a vector of TimeProofTableBeans)
So in the html:text struts goes to element.getfromHour and gets the value of
this fromHour Property in the TimeProofTableBean.

But I never could press submit to get the changes fromHour´s

Now I tried to give id the name of the get/set method of timeProofForm. And
now I could read my data back! It´s working. Here´s my change:






 


Somehow I didn´t understand really why it´s not working with any name on id
(because this bean scope is only valid in the actual jsp pagem isn´t it?)

But if u take a look on the generated html input



It´s somehow logic, that it must work like this. Because the timeProofList
is the name of the get/set Method of the Formbean. So I want to have the
element [0] ind this returned vedtor array. And from the element 0 I want to
get/set the fromHour property.


I hope this also helps somebody.

Take care Michael



--
Fehlerfreie Software wirkt weniger komplex und diskreditiert damit den
Entwickler!
- Original Message -
From: "Brian DeLuca" <[EMAIL PROTECTED]>
To: <[EMAIL PROTECTED]>
Sent: Thursday, December 12, 2002 11:53 PM
Subject: RE: Struggling with indexed/repeating input fields


> Michael,
>
> Please Let me know if something doesn't make sense. I have included my
notes in a text file in case the formatting gets nasty.
>
> Enjoy
> b-
>
> I too have been struggling with the same type of scenario.  I have
> figured out a solution and reasoned the problem so here goes. Please bear
with me. I hope others will benefit or invalidate my solution.
>
> Setting up a logic iterate tag for this requires attributes
> 1 name --> In our case the name of the form
> 2 property --> the item that is an ArrayList, [], or map etc...
> 3 id --> This is going to be the key for the item that is set in a
>  request attribute.
>
> Recommend using type attribute as well.
>
> Our html input tag lets say in this a text tag requires
> name --> the bean whose member we want to populate
> property --> the member to store the data.
> indexed --> Set to TRUE since we are iterating.  This value is going
>to be the index value of the converted MAP, ArrayList Etc.
>
> Now lets create an example
>
> Item is a class that only contains a string with appropriate get/set
> String item;
>
> FooBean has a member
> Item [] fooBar;
>
> Our form FooForm has a member of type FooBean.
> FooBean myInputRange;
>
> When one wants to create a JSP that uses FooForm and we need to ask
> the users for values for myInputRange.  To make it work will look like
> this in the JSP.
>
>
> /* This seems ok right?  Why do we need Class Item ? Why not a straight
String [] you ask.  Good question it is answered in how you need to set up
the subsequent Html:text tag */
>
> Text tag:
> " />
>
> This seems to be extreme.  I agree but it works.  Let's go through why all
this madness.
>
> Most doc says that while iterating make name=(Iterate id).  That is fine
in bean write but not here.  Html:text and other use BaseTagField which will
start writing you
> Well that is just not good in the request process the method populatebean
has no concept of anItem, It is not defined in the form so it won't populate
it, in fact you will never know it is not a hard error, the processor just
keeps going and forgets it.
>
> The next interesting piece here is the fact that you need some wrapper
class for String []. Why?  Simple when you hear it, There is *NO*
getter/Setter for a String.  Make Sense?  And you need the property
attribute in HTML:TEXT tag (TLD Rule -- REQUIRED) I tried
> tricking it by using property="" That doesn't help. because the resulting
html will look like this.
>
> NOTICE:  the "." after the index

Re: Last Nightly build

2002-12-13 Thread Gemes Tibor
2002. december 13. 10:34 dátummal Fabrice BLANQUART ezt írtad:

> Is it normal that the contrib part( especialy struts-el) of the binary
> nightly build has disappeared  ?

There is a mail about this issue on the list by every 1-2 days. 

Try to access the cvs.

Tib

--
To unsubscribe, e-mail:   
For additional commands, e-mail: 




Re: Last Nightly build

2002-12-13 Thread V. Cekvenich
As I was peeking on the dev list, it might take them a few days to fix 
so it's in the build.

.V

Fabrice BLANQUART wrote:
Hi

Is it normal that the contrib part( especialy struts-el) of the binary 
nightly build has disappeared  ?

Rgs

Fabrice BLANQUART





--
To unsubscribe, e-mail:   
For additional commands, e-mail: 




ActionErrors = Null

2002-12-13 Thread Jordan Thomas
Hi,

If I call 

ActionErrors errors = languageForm.validate( mapping, request );

How can be errors null?

thanks

Jordan

--
To unsubscribe, e-mail:   
For additional commands, e-mail: 




RE: Why is token checking only available when control has passed to the Action class?

2002-12-13 Thread Edgar P. Dollin
One solution is to make the increment of the array size a separate
request so that your Bean can be expanded, i.e. insert rows, add record.

Edgar

-Original Message-
From: [EMAIL PROTECTED] [mailto:[EMAIL PROTECTED]] 
Sent: Thursday, December 12, 2002 6:21 PM
To: '[EMAIL PROTECTED]'
Subject: Why is token checking only available when control has passed to
the Action class?


Hi all,

I have a fairly involved problem surrounding token checking for request
reload management.

There are various methods available in the Action class such as
saveToken, resetToken and isTokenValid which are all very useful in
helping manage reload requests.

All these methods operate off a token stored in the session, which these
methods access directly from the request object.  There is no dependence
on the form object for these methods.

A problem arises when, during the normal processing of a request, the
form object is modified in such a way that array elements in the form
are removed. For example, an array of transactions in the initial
request has 10 elements in it, during action processing this array is
resized due to some business rule down to 5 transactions.  The array has
only 5 elements in it now. The next screen is displayed. If a reload
request is sent now, the number of transactions in the request is still
10 but the form object only has a transaction array with 5 elements in
it.  When the request processor attempts to populate the form object
with the request data an ArrayIndexOutOfBoundsException occurs which is
understandable but very undesirable.

Should the token functions be moved into the org.apache.struts.util
.RequestUtil class so that they are available to the RequestProcessor?

We can then check for reloads prior to the form object being populated
in the processPreprocess method in the RequestProcessor.


Very interested in anyone's thoughts on this.

It looks like we will have to set something up ourselves to do this but
if Struts itself could change to accommodate this it would be very
useful.

Regards,

Steve Akins
Team Leader, Frameworks, J2EE Engineering
Development Centre
Financial Services Australia Technology


( +61 3 8641 2846 2 +61 3 8641 4152 : [EMAIL PROTECTED]


National Australia Bank Limited
4th Floor/ 500 Bourke St
Melbourne, Victoria 3000

__
The information contained in this email communication may be
confidential. You should only read, disclose, re-transmit, copy,
distribute, act in reliance on or commercialise the information if you
are authorised to do so. If you are not the intended recipient of this
email communication, please notify us immediately by email to
[EMAIL PROTECTED] or reply by email direct to the sender and then
destroy any electronic or paper copy of this message.  Any views
expressed in this email communication are those of the individual
sender, except where the sender specifically states them to be the views
of a member of the National Australia Bank Group of companies.  The
National Australia Bank Group of companies does not represent, warrant
or guarantee that the integrity of this communication has been
maintained nor that the communication is free of errors, virus or
interference.


--
To unsubscribe, e-mail:

For additional commands, e-mail:



--
To unsubscribe, e-mail:   
For additional commands, e-mail: 




Re: ActionErrors = Null

2002-12-13 Thread Gemes Tibor
2002. december 13. 11:12 dátummal Jordan Thomas ezt írtad:
> Hi,
>
> If I call
>
> ActionErrors errors = languageForm.validate( mapping, request );

Because if you receive the execute method of your Action, you will be ensured 
that there was no validating error in the Form. If there were any error, the 
struts framework would have forwarded back to the input page before even the 
Action would have been reached.

Hth,

Tib

--
To unsubscribe, e-mail:   
For additional commands, e-mail: 




OptionsCollection

2002-12-13 Thread Mark
Hello

I've a number of collections already defined that end up being passed to my
jsp's via the request object.

Users in this case is a map defined in my business logic class that does db
queries.
 
users = (ListUsers).getUsers();

request.setAttribute("users",users);


I itertate through this collection using iterate. But now i want to use this
in a select menu. 

Should I be thinking about making my collection available to my FormBean i.e
making a getMyList() method.

Thanks in advance

mark


--
To unsubscribe, e-mail:   
For additional commands, e-mail: 




RE: OptionsCollection

2002-12-13 Thread VEDRE, RANAPRATAP REDDY
You can either use attribute collection="users" for options tag if you store
in request
or you can use   name="formName" property="myList"   if you have
a getMyList() method for the form(You have to fill call formName.setMyList()
in your action class before forwarding to a jsp).


checkout http://jakarta.apache.org/struts/userGuide/struts-html.html#options
if you have not looked at the documentation.

-rana.


-Original Message-
From: Mark [mailto:[EMAIL PROTECTED]]
Sent: Friday, December 13, 2002 5:36 AM
To: Struts Users Mailing List
Subject: OptionsCollection


Hello

I've a number of collections already defined that end up being passed to my
jsp's via the request object.

Users in this case is a map defined in my business logic class that does db
queries.
 
users = (ListUsers).getUsers();

request.setAttribute("users",users);


I itertate through this collection using iterate. But now i want to use this
in a select menu. 

Should I be thinking about making my collection available to my FormBean i.e
making a getMyList() method.

Thanks in advance

mark


--
To unsubscribe, e-mail:

For additional commands, e-mail:


--
To unsubscribe, e-mail:   
For additional commands, e-mail: 




RE: OptionsCollection

2002-12-13 Thread shirishchandra . sakhare
Also i dont understand why u need to access the request directly.I mean why are 
u setting all the collections as request attributes.GEnerally I think the good 
design is when u r FormBEan represents the screen data.So in this case whatever 
u need on screen will become attribute of form.
I know it does not make much difference in implemantation but as a design it 
becomes pretty straight forward.I mean for an action , if u just look at the 
form, u know what is being displayed.So u just populate the form in action.

Any comments... :-))


-Original Message-
From: VEDRE [mailto:[EMAIL PROTECTED]]
Sent: Friday, December 13, 2002 11:44 AM
To: struts-user
Cc: VEDRE
Subject: RE: OptionsCollection


You can either use attribute collection="users" for options tag if you store
in request
or you can use   name="formName" property="myList"   if you have
a getMyList() method for the form(You have to fill call formName.setMyList()
in your action class before forwarding to a jsp).


checkout http://jakarta.apache.org/struts/userGuide/struts-html.html#options
if you have not looked at the documentation.

-rana.


-Original Message-
From: Mark [mailto:[EMAIL PROTECTED]]
Sent: Friday, December 13, 2002 5:36 AM
To: Struts Users Mailing List
Subject: OptionsCollection


Hello

I've a number of collections already defined that end up being passed to my
jsp's via the request object.

Users in this case is a map defined in my business logic class that does db
queries.
 
users = (ListUsers).getUsers();

request.setAttribute("users",users);


I itertate through this collection using iterate. But now i want to use this
in a select menu. 

Should I be thinking about making my collection available to my FormBean i.e
making a getMyList() method.

Thanks in advance

mark


--
To unsubscribe, e-mail:

For additional commands, e-mail:


--
To unsubscribe, e-mail:   
For additional commands, e-mail: 



--
To unsubscribe, e-mail:   
For additional commands, e-mail: 




Re: DynaActionForm in session scope

2002-12-13 Thread Charles
Hi Tibor,
Good examples and explanations. I have a clearer picture of how it works
now. Thanks!


- Original Message -
From: "Gemes Tibor" <[EMAIL PROTECTED]>
To: "Struts Users Mailing List" <[EMAIL PROTECTED]>
Sent: Friday, December 13, 2002 12:15 AM
Subject: Re: DynaActionForm in session scope


2002. december 13. 20:00 dátummal Charles ezt írtad:
> Thanks for your help. But I'm still a little confused. How do you extend a
> DynaActionForm? I thought it was created on the fly.

Only the properties are created on the fly, the class itself is
org.apache.struts.action.DynaActionForm.

So here is the rough overview of what I have done.

public class CondResetDynaActionForm extends DynaActionForm {
/** Reset the property to its initial value conditionally.
 **/
public void reset(ActionMapping mapping, HttpServletRequest request) {
String name = mapping.getName();
if (name == null) {
return;
}
FormBeanConfig config =
mapping.getApplicationConfig().findFormBeanConfig(name);
if (config == null) {
return;
}
FormPropertyConfig props[] = config.findFormPropertyConfigs();
for (int i = 0; i < props.length; i++) {
// reset only if not CondResetFPC or getReset() returns true
if (!(props[i] instanceof CondResetFormPropertyConfig) ||
(((CondResetFormPropertyConfig)form).getReset())
set(props[i].getName(), props[i].initial());
}
}
}

Extend the FormPropertyConfig with a reset property. (homework :)

> Also you mentioned about using the set-property tags. Please forgive my
> ignorance, but could you provide me with a working example of how this
> set-property tags can be used to present the reset() being called?

If you want to leave the reset() as it was originally, you declare your
form-bean as DynaActionForm. If you want your own reset to be executed,
declare it as CondResetDynaActionForm.
The set-property could be used to determine per form-property whether you
want
to reset it or not. But in this case you have to specify, that this is your
FPC class, not the original one as the original FPC does not have "reset"
property.







Hth,

Tib

--
To unsubscribe, e-mail:

For additional commands, e-mail:







--
To unsubscribe, e-mail:   
For additional commands, e-mail: 




Re: OptionsCollection

2002-12-13 Thread Mark
I've read the documentation.. The confusion is how do i access a collection
when the action returns another

Imagine i've a user form and a list of users on the same page.

[list returned via request via action]
Joe Bloggs
Another User
Etc

Add user form
Name 
Company 

I've already passed a list of users via the request object, and I'm not
happy with the concept of having to run an action everytime i want to get a
collection.

I could have a bunch of collections in my session but I'd prefer to use the
request. I know how to do this by instantiating a bean in my jsp, but I
can't do this due to some silly design constraints because this might
involve people having to learn something else.

I can think of a few ways of attempting this but I imagine that there must
be a way of doing this only defining collections once and being able to list
without calling an action. Ideally my collections will be availble on any
page, without having to instantiate anything.

So far I can only see that manipulating forms via FormBean . But then what
happens when i want the collection for something else? I could be confused
but when i read the struts docs i got the impression that this sort of thing
was possible. 

Many thanks mark
 

On 13-12-2002 11:44, "VEDRE, RANAPRATAP REDDY" <[EMAIL PROTECTED]> wrote:

> You can either use attribute collection="users" for options tag if you store
> in request
> or you can use   name="formName" property="myList"   if you have
> a getMyList() method for the form(You have to fill call formName.setMyList()
> in your action class before forwarding to a jsp).
> 
> 
> checkout http://jakarta.apache.org/struts/userGuide/struts-html.html#options
> if you have not looked at the documentation.
> 
> -rana.
> 
> 
> -Original Message-
> From: Mark [mailto:[EMAIL PROTECTED]]
> Sent: Friday, December 13, 2002 5:36 AM
> To: Struts Users Mailing List
> Subject: OptionsCollection
> 
> 
> Hello
> 
> I've a number of collections already defined that end up being passed to my
> jsp's via the request object.
> 
> Users in this case is a map defined in my business logic class that does db
> queries.
> 
> users = (ListUsers).getUsers();
> 
> request.setAttribute("users",users);
> 
> 
> I itertate through this collection using iterate. But now i want to use this
> in a select menu.
> 
> Should I be thinking about making my collection available to my FormBean i.e
> making a getMyList() method.
> 
> Thanks in advance
> 
> mark
> 
> 
> --
> To unsubscribe, e-mail:
> 
> For additional commands, e-mail:
> 
> 
> --
> To unsubscribe, e-mail:   
> For additional commands, e-mail: 
> 
> 


--
To unsubscribe, e-mail:   
For additional commands, e-mail: 




RE: ActionErrors = Null

2002-12-13 Thread Jordan Thomas
OK, thanks for that.

cheers

Jordan

-Original Message-
From: Gemes Tibor [mailto:[EMAIL PROTECTED]]
Sent: Friday, 13 December 2002 11:31 AM
To: Struts Users Mailing List
Subject: Re: ActionErrors = Null


2002. december 13. 11:12 dátummal Jordan Thomas ezt írtad:
> Hi,
>
> If I call
>
> ActionErrors errors = languageForm.validate( mapping, request );

Because if you receive the execute method of your Action, you will be
ensured
that there was no validating error in the Form. If there were any error, the
struts framework would have forwarded back to the input page before even the
Action would have been reached.

Hth,

Tib

--
To unsubscribe, e-mail:

For additional commands, e-mail:



--
To unsubscribe, e-mail:   
For additional commands, e-mail: 




Re: OptionsCollection

2002-12-13 Thread Mark
Okay... But a drop down menu is screen data.

And a list of companies is something that will be used more than once.

So I have a normal class in my model layer

ListCompanies

In my UserAction

(ListCompanies).getCompanies();

But this Action's primary job is to return a list of users (which it does).

As the list is screen data i should be defining this in my form bean? This
is something thats being confusing me for weeks. If i've a bunch of
collections how can i make them available to iterate tags and select menus,
without using useBean (sorry silly design constraint, but beyond my
control).

Hopefully I'm just being silly, i could really do with some pointers as
where i'm missing the point.

Cheers mark


On 13-12-2002 11:49, "[EMAIL PROTECTED]"
<[EMAIL PROTECTED]> wrote:

> Also i dont understand why u need to access the request directly.I mean why
> are 
> u setting all the collections as request attributes.GEnerally I think the good
> design is when u r FormBEan represents the screen data.So in this case
> whatever 
> u need on screen will become attribute of form.
> I know it does not make much difference in implemantation but as a design it
> becomes pretty straight forward.I mean for an action , if u just look at the
> form, u know what is being displayed.So u just populate the form in action.
> 
> Any comments... :-))
> 
> 
> -Original Message-
> From: VEDRE [mailto:[EMAIL PROTECTED]]
> Sent: Friday, December 13, 2002 11:44 AM
> To: struts-user
> Cc: VEDRE
> Subject: RE: OptionsCollection
> 
> 
> You can either use attribute collection="users" for options tag if you store
> in request
> or you can use   name="formName" property="myList"   if you have
> a getMyList() method for the form(You have to fill call formName.setMyList()
> in your action class before forwarding to a jsp).
> 
> 
> checkout http://jakarta.apache.org/struts/userGuide/struts-html.html#options
> if you have not looked at the documentation.
> 
> -rana.
> 
> 
> -Original Message-
> From: Mark [mailto:[EMAIL PROTECTED]]
> Sent: Friday, December 13, 2002 5:36 AM
> To: Struts Users Mailing List
> Subject: OptionsCollection
> 
> 
> Hello
> 
> I've a number of collections already defined that end up being passed to my
> jsp's via the request object.
> 
> Users in this case is a map defined in my business logic class that does db
> queries.
> 
> users = (ListUsers).getUsers();
> 
> request.setAttribute("users",users);
> 
> 
> I itertate through this collection using iterate. But now i want to use this
> in a select menu.
> 
> Should I be thinking about making my collection available to my FormBean i.e
> making a getMyList() method.
> 
> Thanks in advance
> 
> mark
> 
> 
> --
> To unsubscribe, e-mail:
> 
> For additional commands, e-mail:
> 
> 
> --
> To unsubscribe, e-mail:   
> For additional commands, e-mail: 
> 
> 
> 
> --
> To unsubscribe, e-mail:   
> For additional commands, e-mail: 
> 
> 


--
To unsubscribe, e-mail:   
For additional commands, e-mail: 




Re: [Way-OT] Struts and Swing

2002-12-13 Thread hammett
Thanks a lot for your help! :-)



--
To unsubscribe, e-mail:   
For additional commands, e-mail: 




format messages

2002-12-13 Thread Mohan Radhakrishnan
Hi,
   
We are trying to format messages with the resource bundle. Our messages
depend on the user selection stored in the form bean.


Is it a good practice to directly access the form bean from the scope
and look for the values in the JSP page using tags ?

The only way to access a particular form bean is to iterate over the
collection of form beans ?

If I were to use the java messageformat class then it is duplication of
effort because struts is already doing this.

 What is recommended ? How do you access the form bean using the
bean:define tag ?

   Something like this 

Validate - Struts-Config.xml - input attribute

2002-12-13 Thread Edgar P. Dollin
Has anyone ever asked for the ability to control the input attribute,
i.e. for validation in a multipage form?

Edgar

To unsubscribe, e-mail:

For additional commands, e-mail:



--
To unsubscribe, e-mail:   
For additional commands, e-mail: 




multiple file upload

2002-12-13 Thread Amit Badheka
My requirement is to upload some files, the no of files are not known as the user can 
add no of files to be attched/uploaded.

So, I have two options for doing that -

1. I create the file button dynamically with different name, but in this case how can 
I add that parameter in form bean.

2. I can create file button in loop so it can be added as per requirement. But, in 
this case the name of file button will be same.

I would like to go for 2nd, as it looks easy to implement. But the problem is that I 
am not sure if struts can handle such situation where there are multiple file button 
with same name.

Any help will be appreciable.

Amit.



Could not parse taglib

2002-12-13 Thread Shabbir Khadir Mohammed
Hi Friends
Iam getting the follwoing Error.
What could be the Reason?
Iam using weblogic5.10 as app server.

*
Parsing of JSP File '/Sample Hello.jsp' failed:

 /Sample Hello.jsp(1): Could not parse deployment descriptor: 
org.xml.sax.SAXParseException: Could not parse taglib, starting at line 2
probably occurred due to an error in /Sample Hello.jsp line 1:
<%@ taglib uri="/oreillySample.tld" prefix="sample" %> 

Fri Dec 13 17:18:54 GMT+05:30 2002 

***



thanks & Regards
Shabbir

**Disclaimer** 
   
 
 Information contained in this E-MAIL being proprietary to Wipro Limited is 
'privileged' 
and 'confidential' and intended for use only by the individual or entity to which it 
is 
addressed. You are notified that any use, copying or dissemination of the information 
contained in the E-MAIL in any manner whatsoever is strictly prohibited.







--
To unsubscribe, e-mail:   
For additional commands, e-mail: 


Use of Struts 1.0.2 template tag doesn't display jsp errors in included files

2002-12-13 Thread Michael Echerer
Hi all,

I'm using Tomcat 4.1.15 with Struts 1.0.2 and set up a framework to use templates with 
the -Tags.

I already set  but I still don't get any exceptions dumps 
if a part of jsp code is incorrect in any of the included files. 

The template part causing that error is either empty or the template is not processed 
any further which is quite difficult to debug.

Testing each inserted file separately also doesn't help me in every case, because some 
included files require beans that had been stored into the request scope by an earlier 
included file for example. So the bean cannot be found if I don't include everything 
in the correct order.

Is there any better solution for debugging jsp pages that are template generated?
What is the closest I can get to have a jsp page using any kind of includes to only 
one page which contains all the content?
Is that  + no error display problem solved if I use the  tags instead 
or will I have the same difficulties for jsp debugging?

I would like to separate design from content without considering for debugging so much 
that I don't have "just one large page". What is a better practice for that?

Thanks a lot.
Michael





--
To unsubscribe, e-mail:   
For additional commands, e-mail: 




Re: OptionsCollection

2002-12-13 Thread V. Cekvenich
Put it in application scope.

Mark wrote:

I've read the documentation.. The confusion is how do i access a collection
when the action returns another

Imagine i've a user form and a list of users on the same page.

[list returned via request via action]
Joe Bloggs
Another User
Etc

Add user form
Name 
Company 

I've already passed a list of users via the request object, and I'm not
happy with the concept of having to run an action everytime i want to get a
collection.

I could have a bunch of collections in my session but I'd prefer to use the
request. I know how to do this by instantiating a bean in my jsp, but I
can't do this due to some silly design constraints because this might
involve people having to learn something else.

I can think of a few ways of attempting this but I imagine that there must
be a way of doing this only defining collections once and being able to list
without calling an action. Ideally my collections will be availble on any
page, without having to instantiate anything.

So far I can only see that manipulating forms via FormBean . But then what
happens when i want the collection for something else? I could be confused
but when i read the struts docs i got the impression that this sort of thing
was possible. 

Many thanks mark
 

On 13-12-2002 11:44, "VEDRE, RANAPRATAP REDDY" <[EMAIL PROTECTED]> wrote:


You can either use attribute collection="users" for options tag if you store
in request
or you can use   name="formName" property="myList"   if you have
a getMyList() method for the form(You have to fill call formName.setMyList()
in your action class before forwarding to a jsp).


checkout http://jakarta.apache.org/struts/userGuide/struts-html.html#options
if you have not looked at the documentation.

-rana.


-Original Message-
From: Mark [mailto:[EMAIL PROTECTED]]
Sent: Friday, December 13, 2002 5:36 AM
To: Struts Users Mailing List
Subject: OptionsCollection


Hello

I've a number of collections already defined that end up being passed to my
jsp's via the request object.

Users in this case is a map defined in my business logic class that does db
queries.

users = (ListUsers).getUsers();

request.setAttribute("users",users);


I itertate through this collection using iterate. But now i want to use this
in a select menu.

Should I be thinking about making my collection available to my FormBean i.e
making a getMyList() method.

Thanks in advance

mark


--
To unsubscribe, e-mail:

For additional commands, e-mail:


--
To unsubscribe, e-mail:   
For additional commands, e-mail: 







--
To unsubscribe, e-mail:   
For additional commands, e-mail: 




Re: OptionsCollection

2002-12-13 Thread V. Cekvenich
Use Struts-menu from sf.net.

Mark wrote:

Hello

I've a number of collections already defined that end up being passed to my
jsp's via the request object.

Users in this case is a map defined in my business logic class that does db
queries.
 
users = (ListUsers).getUsers();

request.setAttribute("users",users);


I itertate through this collection using iterate. But now i want to use this
in a select menu. 

Should I be thinking about making my collection available to my FormBean i.e
making a getMyList() method.

Thanks in advance

mark




--
To unsubscribe, e-mail:   
For additional commands, e-mail: 




Re: OptionsCollection

2002-12-13 Thread V. Cekvenich
Confused as to what your confusion is.

Are you confused that you see one thing and display another (which I get 
a lot from my students?).

There are 2 things going on, a client/browser side join not a db/server 
side join.
Example, you have a formBean with dept "101" a numeric field. You unit 
test this and CRUD. This is your Form Bean!!
Once you get that, then:
Now you want to display "Marketing" as a drop down instead of 101. So 
101-Marketing, 102-Sales, etc. You care a collection, yet another thing 
you put in scope.
The client side, using select and optionCollection tag displays current 
dept., and a choice of other depts.
So a user sees "Marketing" drop down, which comes from the name part of 
collection. But the current value is in the formbean.

.V

Mark wrote:
Okay... But a drop down menu is screen data.

And a list of companies is something that will be used more than once.

So I have a normal class in my model layer

ListCompanies

In my UserAction

(ListCompanies).getCompanies();

But this Action's primary job is to return a list of users (which it does).

As the list is screen data i should be defining this in my form bean? This
is something thats being confusing me for weeks. If i've a bunch of
collections how can i make them available to iterate tags and select menus,
without using useBean (sorry silly design constraint, but beyond my
control).

Hopefully I'm just being silly, i could really do with some pointers as
where i'm missing the point.

Cheers mark


On 13-12-2002 11:49, "[EMAIL PROTECTED]"
<[EMAIL PROTECTED]> wrote:



Also i dont understand why u need to access the request directly.I mean why
are 
u setting all the collections as request attributes.GEnerally I think the good
design is when u r FormBEan represents the screen data.So in this case
whatever 
u need on screen will become attribute of form.
I know it does not make much difference in implemantation but as a design it
becomes pretty straight forward.I mean for an action , if u just look at the
form, u know what is being displayed.So u just populate the form in action.

Any comments... :-))


-Original Message-
From: VEDRE [mailto:[EMAIL PROTECTED]]
Sent: Friday, December 13, 2002 11:44 AM
To: struts-user
Cc: VEDRE
Subject: RE: OptionsCollection


You can either use attribute collection="users" for options tag if you store
in request
or you can use   name="formName" property="myList"   if you have
a getMyList() method for the form(You have to fill call formName.setMyList()
in your action class before forwarding to a jsp).


checkout http://jakarta.apache.org/struts/userGuide/struts-html.html#options
if you have not looked at the documentation.

-rana.


-Original Message-
From: Mark [mailto:[EMAIL PROTECTED]]
Sent: Friday, December 13, 2002 5:36 AM
To: Struts Users Mailing List
Subject: OptionsCollection


Hello

I've a number of collections already defined that end up being passed to my
jsp's via the request object.

Users in this case is a map defined in my business logic class that does db
queries.

users = (ListUsers).getUsers();

request.setAttribute("users",users);


I itertate through this collection using iterate. But now i want to use this
in a select menu.

Should I be thinking about making my collection available to my FormBean i.e
making a getMyList() method.

Thanks in advance

mark


--
To unsubscribe, e-mail:

For additional commands, e-mail:


--
To unsubscribe, e-mail:   
For additional commands, e-mail: 



--
To unsubscribe, e-mail:   
For additional commands, e-mail: 






--
To unsubscribe, e-mail:   
For additional commands, e-mail: 




Struts Console

2002-12-13 Thread Edgar P. Dollin
Is there a way to copy entries as the normal cut and paste windoze
operations don't seem to function.

Thanks

Edgar
--
To unsubscribe, e-mail:

For additional commands, e-mail:



--
To unsubscribe, e-mail:   
For additional commands, e-mail: 




Re: Struts Console

2002-12-13 Thread James Holmes
The normal Ctrl-C, Ctrl-V stuff should work.  If you
have a specific example that isn't let me know.

-james

--- "Edgar P. Dollin" <[EMAIL PROTECTED]> wrote:
> Is there a way to copy entries as the normal cut and
> paste windoze
> operations don't seem to function.
> 
> Thanks
> 
> Edgar
> --
> To unsubscribe, e-mail:
> 
> For additional commands, e-mail:
> 
> 
> 
> --
> To unsubscribe, e-mail:  
> 
> For additional commands, e-mail:
> 
> 


__
Do you Yahoo!?
Yahoo! Mail Plus - Powerful. Affordable. Sign up now.
http://mailplus.yahoo.com

--
To unsubscribe, e-mail:   
For additional commands, e-mail: 




RE: Re: OptionsCollection

2002-12-13 Thread shirishchandra . sakhare
Hi,
There are many ways of doing this.So first is as the collection is being 
displayed on screen,make it an attribute of form and popolate it in action on 
form.So in jsp u will access like a form attribute.

But the problem with this approach is If u get an error and forward back the 
user to same jsp, u loose the collection data as u are directly going to the 
screen.So the solution could be have a generic action which will be called in 
case of errors and the action will populate form with list before forwarding it 
to same jsp.

Else U can have lazy in itialising forms.i.e forms getList emthod itself will 
call service to get data if list is null.And then in this case ,u can just use 
an epty action class which does nothing but forwarsd to "success" which is the 
origicnal jsp.But this action will be mapped with the Original actions form so 
that the form will use its auto population mechanism to get the list..But i 
dont like this approach ..just not a good design i think.But very conveninent.


Hope this helps,
Regards,
Shirish

-Original Message-
From: marklowe [mailto:[EMAIL PROTECTED]]
Sent: Friday, December 13, 2002 12:12 PM
To: struts-user
Cc: marklowe
Subject: Re: OptionsCollection


Okay... But a drop down menu is screen data.

And a list of companies is something that will be used more than once.

So I have a normal class in my model layer

ListCompanies

In my UserAction

(ListCompanies).getCompanies();

But this Action's primary job is to return a list of users (which it does).

As the list is screen data i should be defining this in my form bean? This
is something thats being confusing me for weeks. If i've a bunch of
collections how can i make them available to iterate tags and select menus,
without using useBean (sorry silly design constraint, but beyond my
control).

Hopefully I'm just being silly, i could really do with some pointers as
where i'm missing the point.

Cheers mark


On 13-12-2002 11:49, "[EMAIL PROTECTED]"
<[EMAIL PROTECTED]> wrote:

> Also i dont understand why u need to access the request directly.I mean why
> are 
> u setting all the collections as request attributes.GEnerally I think the good
> design is when u r FormBEan represents the screen data.So in this case
> whatever 
> u need on screen will become attribute of form.
> I know it does not make much difference in implemantation but as a design it
> becomes pretty straight forward.I mean for an action , if u just look at the
> form, u know what is being displayed.So u just populate the form in action.
> 
> Any comments... :-))
> 
> 
> -Original Message-
> From: VEDRE [mailto:[EMAIL PROTECTED]]
> Sent: Friday, December 13, 2002 11:44 AM
> To: struts-user
> Cc: VEDRE
> Subject: RE: OptionsCollection
> 
> 
> You can either use attribute collection="users" for options tag if you store
> in request
> or you can use   name="formName" property="myList"   if you have
> a getMyList() method for the form(You have to fill call formName.setMyList()
> in your action class before forwarding to a jsp).
> 
> 
> checkout http://jakarta.apache.org/struts/userGuide/struts-html.html#options
> if you have not looked at the documentation.
> 
> -rana.
> 
> 
> -Original Message-
> From: Mark [mailto:[EMAIL PROTECTED]]
> Sent: Friday, December 13, 2002 5:36 AM
> To: Struts Users Mailing List
> Subject: OptionsCollection
> 
> 
> Hello
> 
> I've a number of collections already defined that end up being passed to my
> jsp's via the request object.
> 
> Users in this case is a map defined in my business logic class that does db
> queries.
> 
> users = (ListUsers).getUsers();
> 
> request.setAttribute("users",users);
> 
> 
> I itertate through this collection using iterate. But now i want to use this
> in a select menu.
> 
> Should I be thinking about making my collection available to my FormBean i.e
> making a getMyList() method.
> 
> Thanks in advance
> 
> mark
> 
> 
> --
> To unsubscribe, e-mail:
> 
> For additional commands, e-mail:
> 
> 
> --
> To unsubscribe, e-mail:   
> For additional commands, e-mail: 
> 
> 
> 
> --
> To unsubscribe, e-mail:   
> For additional commands, e-mail: 
> 
> 


--
To unsubscribe, e-mail:   
For additional commands, e-mail: 



--
To unsubscribe, e-mail:   
For additional commands, e-mail: 




Struts validating with beta2 not working

2002-12-13 Thread Kwabla, Bens
Hi All!

I had the client-side validation working under struts version before the
beta 2. Now my application has been migrated to the beta 2 of struts. Since
then, my client-side validation is no longer working. I understand the
validating logic has been adopted into commons. Can some tell me what is
happening?

Bens Kwabla

-Ursprüngliche Nachricht-
Von: [EMAIL PROTECTED]
[mailto:[EMAIL PROTECTED]]
Gesendet: Freitag, 13. Dezember 2002 14:35
An: [EMAIL PROTECTED]; [EMAIL PROTECTED]
Betreff: RE: Re: OptionsCollection


Hi,
There are many ways of doing this.So first is as the collection is being 
displayed on screen,make it an attribute of form and popolate it in action
on 
form.So in jsp u will access like a form attribute.

But the problem with this approach is If u get an error and forward back the

user to same jsp, u loose the collection data as u are directly going to the

screen.So the solution could be have a generic action which will be called
in 
case of errors and the action will populate form with list before forwarding
it 
to same jsp.

Else U can have lazy in itialising forms.i.e forms getList emthod itself
will 
call service to get data if list is null.And then in this case ,u can just
use 
an epty action class which does nothing but forwarsd to "success" which is
the 
origicnal jsp.But this action will be mapped with the Original actions form
so 
that the form will use its auto population mechanism to get the list..But i 
dont like this approach ..just not a good design i think.But very
conveninent.


Hope this helps,
Regards,
Shirish

-Original Message-
From: marklowe [mailto:[EMAIL PROTECTED]]
Sent: Friday, December 13, 2002 12:12 PM
To: struts-user
Cc: marklowe
Subject: Re: OptionsCollection


Okay... But a drop down menu is screen data.

And a list of companies is something that will be used more than once.

So I have a normal class in my model layer

ListCompanies

In my UserAction

(ListCompanies).getCompanies();

But this Action's primary job is to return a list of users (which it does).

As the list is screen data i should be defining this in my form bean? This
is something thats being confusing me for weeks. If i've a bunch of
collections how can i make them available to iterate tags and select menus,
without using useBean (sorry silly design constraint, but beyond my
control).

Hopefully I'm just being silly, i could really do with some pointers as
where i'm missing the point.

Cheers mark


On 13-12-2002 11:49, "[EMAIL PROTECTED]"
<[EMAIL PROTECTED]> wrote:

> Also i dont understand why u need to access the request directly.I mean
why
> are 
> u setting all the collections as request attributes.GEnerally I think the
good
> design is when u r FormBEan represents the screen data.So in this case
> whatever 
> u need on screen will become attribute of form.
> I know it does not make much difference in implemantation but as a design
it
> becomes pretty straight forward.I mean for an action , if u just look at
the
> form, u know what is being displayed.So u just populate the form in
action.
> 
> Any comments... :-))
> 
> 
> -Original Message-
> From: VEDRE [mailto:[EMAIL PROTECTED]]
> Sent: Friday, December 13, 2002 11:44 AM
> To: struts-user
> Cc: VEDRE
> Subject: RE: OptionsCollection
> 
> 
> You can either use attribute collection="users" for options tag if you
store
> in request
> or you can use   name="formName" property="myList"   if you
have
> a getMyList() method for the form(You have to fill call
formName.setMyList()
> in your action class before forwarding to a jsp).
> 
> 
> checkout
http://jakarta.apache.org/struts/userGuide/struts-html.html#options
> if you have not looked at the documentation.
> 
> -rana.
> 
> 
> -Original Message-
> From: Mark [mailto:[EMAIL PROTECTED]]
> Sent: Friday, December 13, 2002 5:36 AM
> To: Struts Users Mailing List
> Subject: OptionsCollection
> 
> 
> Hello
> 
> I've a number of collections already defined that end up being passed to
my
> jsp's via the request object.
> 
> Users in this case is a map defined in my business logic class that does
db
> queries.
> 
> users = (ListUsers).getUsers();
> 
> request.setAttribute("users",users);
> 
> 
> I itertate through this collection using iterate. But now i want to use
this
> in a select menu.
> 
> Should I be thinking about making my collection available to my FormBean
i.e
> making a getMyList() method.
> 
> Thanks in advance
> 
> mark
> 
> 
> --
> To unsubscribe, e-mail:
> 
> For additional commands, e-mail:
> 
> 
> --
> To unsubscribe, e-mail:

> For additional commands, e-mail:

> 
> 
> 
> --
> To unsubscribe, e-mail:

> For additional commands, e-mail:

> 
> 


--
To unsubscribe, e-mail:

For additional commands, e-mail:




--
To unsubscribe, e-mai

Regarding implementation of struts using iPlanet4.1

2002-12-13 Thread Shiva Kumar T
Hi,
Is it possible to use struts framework in iPlanet4.1 server.
iPlanet 4.1 does n't support taglibraries etc.
Please let me know if anybody implemented any project on iPlanet4.1 using struts 
framework.

Thanx
Shiva





--
To unsubscribe, e-mail:   
For additional commands, e-mail: 




RE: Use of Struts 1.0.2 template tag doesn't display jsp errors in included files

2002-12-13 Thread mech
Solved the problem myself by migrating to Struts 1.1b2 and using the
 instead. Now I get an jsp error message in each tile and can
debug more easily.

Also solved some other difficulties with pathes to resources that can
now be context relative instead of template relative...

> -Original Message-
> From: Michael Echerer [mailto:[EMAIL PROTECTED]] 
> Sent: Freitag, 13. Dezember 2002 14:02
> To: [EMAIL PROTECTED]
> Subject: Use of Struts 1.0.2 template tag doesn't display jsp 
> errors in included files
> 
> 
> Hi all,
> 
> I'm using Tomcat 4.1.15 with Struts 1.0.2 and set up a 
> framework to use templates with the -Tags.
> 
> I already set  but I still don't 
> get any exceptions dumps if a part of jsp code is incorrect 
> in any of the included files. 
> 
> The template part causing that error is either empty or the 
> template is not processed any further which is quite 
> difficult to debug.
> 
> Testing each inserted file separately also doesn't help me in 
> every case, because some included files require beans that 
> had been stored into the request scope by an earlier included 
> file for example. So the bean cannot be found if I don't 
> include everything in the correct order.
> 
> Is there any better solution for debugging jsp pages that are 
> template generated? What is the closest I can get to have a 
> jsp page using any kind of includes to only one page which 
> contains all the content? Is that  + no error 
> display problem solved if I use the  tags instead or 
> will I have the same difficulties for jsp debugging?
> 
> I would like to separate design from content without 
> considering for debugging so much that I don't have "just one 
> large page". What is a better practice for that?
> 
> Thanks a lot.
> Michael
> 
> 
> 
> 
> 
> --
> To unsubscribe, e-mail:   
>  [EMAIL PROTECTED]>
> For 
> additional commands, 
> e-mail: 
> 


--
To unsubscribe, e-mail:   
For additional commands, e-mail: 




RE: Submitting to the same JSP

2002-12-13 Thread Sri Sankaran
Can you please elaborate?  Are you saying that the following works

 JSP-1 -> Action-1 -> JSP-2

but 

 JSP-1 -> Action-1 -> JSP-1

doesn't.  Make sure that you are referring to the bean with the same id under which 
you have saved it (to request/session).  Can you post the relevant JSP (both JSP-1 and 
JSP-2), the action class (how the bean being persisted, how the user is 
forwarded/re-directed to next view) and the struts-config (the action mapping).

Please post only  the relevant portions.

Sri

-Original Message-
From: Harshal D [mailto:[EMAIL PROTECTED]] 
Sent: Thursday, December 12, 2002 11:07 PM
To: [EMAIL PROTECTED]
Subject: Submitting to the same JSP 



In my app when I create a bean in action class and display it in the next JSP 
(forwarded) it works.

But if I try to display in the same JSP (at the bottom of original form) - it does not 
work,

I am using  tags to make sure bean is created (submit has happened) 
before displaying its properties. But that part never gets displayed.

 

Any thoughts ?

 

- Harshal.



-
Do you Yahoo!?
Yahoo! Mail Plus - Powerful. Affordable. Sign up now

--
To unsubscribe, e-mail:   
For additional commands, e-mail: 




a question about transaction tokens

2002-12-13 Thread Andy Kriger
I'm wondering how these are used. They're not mentioned in the O'Reilly book
or in the docs. After calling generateToken, do I need to wrap my action's
execute code in an isTokenValid block to check for an existing token?

For example...

execute(...) {
generateToken(request);
if(!isTokenValid(request)) {
// do action stuff
}
else
return ???what???
}

thx
andy



--
To unsubscribe, e-mail:   
For additional commands, e-mail: 




RE: a question about transaction tokens

2002-12-13 Thread shirishchandra . sakhare
search the mailing list archive for "Token mechanism in Struts:"

U will find teh answers...a few very good mails...

-Original Message-
From: akriger [mailto:[EMAIL PROTECTED]]
Sent: Friday, December 13, 2002 4:09 PM
To: struts-user
Cc: akriger
Subject: a question about transaction tokens


I'm wondering how these are used. They're not mentioned in the O'Reilly book
or in the docs. After calling generateToken, do I need to wrap my action's
execute code in an isTokenValid block to check for an existing token?

For example...

execute(...) {
generateToken(request);
if(!isTokenValid(request)) {
// do action stuff
}
else
return ???what???
}

thx
andy



--
To unsubscribe, e-mail:   
For additional commands, e-mail: 



--
To unsubscribe, e-mail:   
For additional commands, e-mail: 




RE: [ANNOUNCE] Shameless Plug: Struts Kick Start now available for shipping at Amazon

2002-12-13 Thread Dudley . Butt
looks like a good buy, but 
how do u feel your book is different or offers something advantageous in
comparison to Chuck Cavaness' or Craig's book?

-Original Message-
From: James Turner [mailto:[EMAIL PROTECTED]]
Sent: Friday, December 13, 2002 8:05 AM
To: [EMAIL PROTECTED]
Cc: [EMAIL PROTECTED]
Subject: [ANNOUNCE] Shameless Plug: Struts Kick Start now available for
shipping at Amazon


Well, I may not have gotten my copies yet from the publisher, but you
can order "Struts Kick Start" now from Amazon for immediate delivery:

http://www.amazon.com/exec/obidos/tg/detail/-/0672324725

Buy one, buy two.  They make great stocking stuffers.  Use them as door
stops.  Learn to use the enclosed CD as a lethal thrown weapon. Fun for
the whole family.

_
James 
ICQ#: 8239923
More ways to contact me: http://wwp.icq.com/8239923
See more about me: http://web.icq.com/whitepages/about_me?Uin=8239923
_



--
To unsubscribe, e-mail:

For additional commands, e-mail:



This message contains information intended solely for the addressee, which is 
confidential or private in nature and subject to legal privilege.
If you are not the intended recipient, you may not peruse, use, disseminate, 
distribute or copy this message or any file attached to this message.
Any such unauthorised use, is prohibited and may be unlawful. If you have received 
this message in error, please notify the sender immediately by e-mail,
facsimile or telephone and thereafter delete the original message from your machine. 
 
Furthermore, the information contained in this message, and any attachments thereto, 
is for information purposes only and may contain the personal views and opinions of 
the author,
which are not necessarily the views and opinions of Dimension Data (South Africa) 
(Proprietary) Limited or its subsidiaries and associated companies ("Dimension Data").
Dimension Data therefore does not accept liability for any claims, loss or damages of 
whatsoever nature, arising as a result of the reliance on such information by anyone. 
 
Whilst all reasonable steps are taken to ensure the accuracy and integrity of 
information transmitted electronically and to preserve the confidentiality thereof,
Dimension Data accepts no liability or responsibility whatsoever if information or 
data is, for whatsoever reason, incorrect, corrupted or does not reach its intended 
destination.  



--
To unsubscribe, e-mail:   
For additional commands, e-mail: 




validation problem with JVM of j2sdk1.4.1_01

2002-12-13 Thread Iris
Hello,

I've spend hours to find why my validation suddenly doesn't work.
When I remembered that I've change my JVM j2sdk1.4.0 to j2sdk1.4.1_01,
effectivly if when I put back the JVM j2sdk1.4, the validation works again.

I doesn't find any bug report on this.
Is anybody else had a validation problem with the j2sdk1.4.1_01 ?

Iris


--
To unsubscribe, e-mail:   
For additional commands, e-mail: 




Chaining actions

2002-12-13 Thread mailinglists

Hopefully someone can advise me how to get round this.

Essentially I have an action that prepares a page, then forwards to a jsp.  The 
jsp submits back to the same action, the action carries out certain operations 
dependant upon a hidden flag, then if necessary forwards on to another action, 
or reshows the same jsp with information updated.

I want my code to work as follows (the system is designed so every action has 
an associated jsp and form):

1.  LibraryAction (extracts info from the database), and fills a LibraryForm
2.  forwards to libraryAction.jsp
3.  user selects "addArea", and submits form
4.  LibraryAction receives the LibraryForm, and finds that the user wishes to 
add an area
5.  so LibraryAction forwards to LibraryAreaAction.
6.  LibraryAreaAction receives a *blank* LibraryAreaForm, fills it as necessary
7.  forwards to libraryAreaAction.jsp
8.  user fills in details and submits the LibraryAreaForm.
9.  LibraryAreaAction carries out operations on the LibraryAreaForm.
10. LibraryAreaAction forwards to...
11. etc...

However, these steps happen instead:

5.  LibraryAreaAction forwards to LibraryAreaAction.
6.  A new LibraryAreaForm is created, and populated with values submit at step 
3.
7.  The values are meaningless to this form, so validate finds errors.
8.  Control is forwarded to the jsp related to LibraryAreaForm - 
libraryAreaForm.
9.  Many values haven't been added to the request yet as LibraryAreaAction 
hasn't been run yet.
10. The jsp fails with runtime errors (Struts can't find beans...).

I've tried changing scope from session to request and page, and have ensured 
that the reset() resets all values on the form (however the form is populated 
after the reset() is run).

I hope that makes sense!  If it does, do you know a way out of this?

Thanks

Ian



--
To unsubscribe, e-mail:   
For additional commands, e-mail: 




RE: a question about transaction tokens

2002-12-13 Thread Andy Kriger
i'd love to do that however whenever i text search i get an error 'Text
search not available for this list'. i reported this on the mailing list a
few days ago but got no response.

so, can someone answer my question here?

-Original Message-
From: [EMAIL PROTECTED]
[mailto:[EMAIL PROTECTED]]
Sent: Friday, December 13, 2002 10:05
To: [EMAIL PROTECTED]
Subject: RE: a question about transaction tokens


search the mailing list archive for "Token mechanism in Struts:"

U will find teh answers...a few very good mails...

-Original Message-
From: akriger [mailto:[EMAIL PROTECTED]]
Sent: Friday, December 13, 2002 4:09 PM
To: struts-user
Cc: akriger
Subject: a question about transaction tokens


I'm wondering how these are used. They're not mentioned in the O'Reilly book
or in the docs. After calling generateToken, do I need to wrap my action's
execute code in an isTokenValid block to check for an existing token?

For example...

execute(...) {
generateToken(request);
if(!isTokenValid(request)) {
// do action stuff
}
else
return ???what???
}

thx
andy



--
To unsubscribe, e-mail:

For additional commands, e-mail:




--
To unsubscribe, e-mail:

For additional commands, e-mail:




--
To unsubscribe, e-mail:   
For additional commands, e-mail: 




Re: Struggling with indexed/repeating input fields

2002-12-13 Thread Brian DeLuca
 
Yes Micheal you've got it.  

Let me warn you though.  In the scenario 
I was giving you there was a level of nesting that you don't have.  If you ever come 
across the scenario where you need to have

foo.something[0].property 

You will find that putting 

logic:iterate id="foo.something"

will give you an error on the parsing of ID which was my problem. And you will have to 
follow the syntax I have given you earlier.  Just a 
Heads up. 

Good Luck in the future.

b-


 --- On Fri 12/13, Michael Olszynski  wrote:From: Michael Olszynski [mailto: 
[EMAIL PROTECTED]]To: [EMAIL PROTECTED], [EMAIL PROTECTED]: Fri, 
13 Dec 2002 10:37:41 +0100Subject: Re: Struggling with indexed/repeating input 
fieldsHi Brian,I didn´t really get everything what u wrote. (It´s a problem of my 
badenglish, I guess). But I made myself some thoughts about what u worte about"id".And 
finally I got my error why I only could read from my formbean but notsubmit any 
changes in the bean. The error was the "id" (I guess).OK I try to explain (correct me 
if I´m wrong).I have a formbean which looks like this:public class TimeProofFormBean 
extends ActionForm {public Vector getTimeProofList() {return 
this.timeProofList;}public void setTimeProofList( Vector v ) {
this.timeProofList = v;}   private Vector timeProofList = new 
Vector();}**In my set and get 
TimeProofList-Vector I save following bean:public class TimeProofTableBean implements 
Serializable {public TimeProofTableBean(){}public String getFromHour(){return 
FromHour;}public void setFromHour(String FromHour){this.FromHour = 
FromHour;}private String 
FromHour;}**+In
 my jsp I had following iterate Tag:property="timeProofList">   indexed="true"/> 
So, I declare an "element" which comes from my timeProofForm with the 
methodgetTimeProofList. (This returnes a vector of TimeProofTableBeans)So in the 
html:text struts goes to element.getfromHour and gets the value ofthis fromHour 
Property in the TimeProofTableBean.But I never could press submit to get the changes 
fromHour´sNow I tried to give id the name of the get/set method of timeProofForm. 
Andnow I could read my data back! It´s working. Here´s my 
change:property="timeProofList">   maxlength="2" indexed="true"/>  Somehow I 
didn´t understand really why it´s not working with any name on id(because this bean 
scope is only valid in the actual jsp pagem isn´t it?)But if u take a look on the 
generated html inputvalue="11">It´s somehow logic, that it must work like this. 
Because the timeProofListis the name of the get/set Method of the Formbean. So I want 
to have theelement [0] ind this returned vedtor array. And from the element 0 I want 
toget/set the fromHour property.I hope this also helps somebody.Take care 
Michael--Fehlerfreie Software wirkt weniger komplex und diskreditiert damit 
denEntwickler!- Original Message -From: "Brian DeLuca" To: Sent: Thursday, 
December 12, 2002 11:53 PMSubject: RE: Struggling with indexed/repeating input fields> 
Michael,>> Please Let me know if something doesn't make sense. I have included mynotes 
in a text file in case the formatting gets nasty.>> Enjoy> b->> I too have been 
struggling with the same type of scenario.  I have> figured out a solution and 
reasoned the problem so here goes. Please bearwith me. I hope others will benefit or 
invalidate my solution.>> Setting up a logic iterate tag for this requires attributes> 
1 name --> In our case the name of the form> 2 property --> the item that is an 
ArrayList, [], or map etc...> 3 id --> This is going to be the key for the item that 
is set in a>  request attribute.>> Recommend using type attribute as well.>> 
Our html input tag lets say in this a text tag requires> name --> the bean whose 
member we want to populate> property --> the member to store the data.> indexed --> 
Set to TRUE since we are iterating.  This value is going>to be the index 
value of the converted MAP, ArrayList Etc.>> Now lets create an example>> Item is a 
class that only contains a string with appropriate get/set> String item;>> FooBean has 
a member> Item [] fooBar;>> Our form FooForm has a member of type FooBean.> FooBean 
myInputRange;>> When one wants to create a JSP that uses FooForm and we need to ask> 
the users for values for myInputRange.  To make it work will look like> this in the 
JSP.>>> /* This seems ok right?  Why do we need Class Item ? Why not a straightString 
[] you ask.  Good question it is answered in how you need to set upthe subsequent 
Html:text tag */>> Text tag:> " />>> This seems to be extreme.  I agree but it works.  
Let's go through why allthis madness.>> Most doc says that while iterating make 
name=(Iterate id).  That is finein bean write but not here.  Html:text and other use 
BaseTagField 

catch MaxLengthExceededException

2002-12-13 Thread Bernhard Oberndorfer
Hello

I want to set a limit for uploaded files. So my struts-config.xml looks like
this:




But howto do I recognize, that a file larger than 1M was uploaded.
Can I catch the MaxLengthExceededException or
can I overload CommonsMultipartRequestHandler to add some information to the
request!
Or is there already any information in the request.
Whats the best way to handle this?

Thanks

Bernhard Oberndorfer
xpecto AG
[EMAIL PROTECTED]


--
To unsubscribe, e-mail:   
For additional commands, e-mail: 




RE: a question about transaction tokens

2002-12-13 Thread Sri Sankaran
I've found The Mail Archive's (Marc) search to be most useful.  Try 
http://marc.theaimsgroup.com/?l=struts-user

Sri

-Original Message-
From: Andy Kriger [mailto:[EMAIL PROTECTED]] 
Sent: Friday, December 13, 2002 10:21 AM
To: Struts Users Mailing List
Subject: RE: a question about transaction tokens


i'd love to do that however whenever i text search i get an error 'Text search not 
available for this list'. i reported this on the mailing list a few days ago but got 
no response.

so, can someone answer my question here?

-Original Message-
From: [EMAIL PROTECTED] [mailto:[EMAIL PROTECTED]]
Sent: Friday, December 13, 2002 10:05
To: [EMAIL PROTECTED]
Subject: RE: a question about transaction tokens


search the mailing list archive for "Token mechanism in Struts:"

U will find teh answers...a few very good mails...

-Original Message-
From: akriger [mailto:[EMAIL PROTECTED]]
Sent: Friday, December 13, 2002 4:09 PM
To: struts-user
Cc: akriger
Subject: a question about transaction tokens


I'm wondering how these are used. They're not mentioned in the O'Reilly book or in the 
docs. After calling generateToken, do I need to wrap my action's execute code in an 
isTokenValid block to check for an existing token?

For example...

execute(...) {
generateToken(request);
if(!isTokenValid(request)) {
// do action stuff
}
else
return ???what???
}

thx
andy



--
To unsubscribe, e-mail: 
For additional commands, e-mail: 



--
To unsubscribe, e-mail: 
For additional commands, e-mail: 



--
To unsubscribe, e-mail:   
For additional commands, e-mail: 


--
To unsubscribe, e-mail:   
For additional commands, e-mail: 




RE: a question about transaction tokens

2002-12-13 Thread Brian DeLuca
 To implement is pretty straight forward

Action A  --> generate token route to JSP A

JSP A routes to Action B --> In action B call isTokenValid 
   if you want to continue Token validation call saveToken then
   route to JSP C.

JSP C then routes to Action C --> call isTokenValid then call saveToken route to JSP D 
  

If you want to stop validation at anytime call resetToken.

HTH
b-





 --- On Fri 12/13, Andy Kriger  wrote:From: Andy Kriger [mailto: 
[EMAIL PROTECTED]]To: [EMAIL PROTECTED]: Fri, 13 Dec 2002 
10:09:27 -0500Subject: a question about transaction tokensI'm wondering how these are 
used. They're not mentioned in the O'Reilly bookor in the docs. After calling 
generateToken, do I need to wrap my action'sexecute code in an isTokenValid block to 
check for an existing token?For example...execute(...) 
{ generateToken(request); if(!isTokenValid(request)) {  // do action 
stuff } else  return ???what???}thxandy--To unsubscribe, e-mail:   For 
additional commands, e-mail: 

___
Can a Web portal forever change your life?
Win up to $25 Million on iWon - click here!



RE: [ANNOUNCE] Shameless Plug: Struts Kick Start now available for shippingat Amazon

2002-12-13 Thread Kevin . Bedell


As James co-author, let me speak to this.

To begin with - I'd like to say that all authors that have put together
books on Struts have put a lot of work into it and have all done well. I've
read most all the books that are currently available and have to honest -
they're all good! No bad words about any of them.

Certainly, as well, I'd feel better if someone on the list who has seen the
book stepped in to answer this. Better probably for everyone to get an
unbiased answer. Kind of hard for me, really, to be unbiased! :->

That being said, we did take specific steps to differentiate:

 - We include a CD-ROM with Struts, JDK 1.4, mysql, strutstestcase, the
struts console, Junit, ant, cactus, Axis, JBoss, etc so all code is
included for windows and Linux.
 - We have working sample code for almost every struts tag. It's designed
for cutting and pasting.
 - We provided working sample apps including code, build scripts and step
by step instructions for integration with JBoss for EJB's and Axis for Web
Services
 - We provided coverage of Ant build scripts, JUnit and Cactus testing with
struts test case.

That's enough I guess to just say that we worked hard to create a good,
usable book. We're currently working with a couple of developer sites to
arrange publication of more sample chapters.The people at SAMS are doing a
great job with the promotions.

And again, I've read Chuck's book and really liked it. While I haven't read
Ted, et al's book it looks great as well  - and Ted has made such a unique
contribution to Struts that he's certainly earned a special place. (Ted's
publisher Manning has put out some great titles recently including Erik
Hatcher's Ant book).

If anyone has more specific questions I'd prefer to take them off list
unless the person believes their discussion is of value to the wider
audience of Struts users.

Thanks for asking!
Kevin

http://www.strutskickstart.com





[EMAIL PROTECTED] on 12/13/2002 10:10:59 AM

Please respond to "Struts Users Mailing List"
   <[EMAIL PROTECTED]>

To:[EMAIL PROTECTED]
cc: (bcc: Kevin Bedell/Systems/USHO/SunLife)
Subject:RE: [ANNOUNCE] Shameless Plug: Struts Kick Start now available
   fo   r shipping at Amazon


looks like a good buy, but 
how do u feel your book is different or offers something advantageous in
comparison to Chuck Cavaness' or Craig's book?

-Original Message-
From: James Turner [mailto:[EMAIL PROTECTED]]
Sent: Friday, December 13, 2002 8:05 AM
To: [EMAIL PROTECTED]
Cc: [EMAIL PROTECTED]
Subject: [ANNOUNCE] Shameless Plug: Struts Kick Start now available for
shipping at Amazon


Well, I may not have gotten my copies yet from the publisher, but you
can order "Struts Kick Start" now from Amazon for immediate delivery:

http://www.amazon.com/exec/obidos/tg/detail/-/0672324725

Buy one, buy two.  They make great stocking stuffers.  Use them as door
stops.  Learn to use the enclosed CD as a lethal thrown weapon. Fun for
the whole family.

_
James
ICQ#: 8239923
More ways to contact me: http://wwp.icq.com/8239923
See more about me: http://web.icq.com/whitepages/about_me?Uin=8239923
_



--
To unsubscribe, e-mail:

For additional commands, e-mail:



This message contains information intended solely for the addressee, which
is confidential or private in nature and subject to legal privilege.
If you are not the intended recipient, you may not peruse, use,
disseminate, distribute or copy this message or any file attached to this
message.
Any such unauthorised use, is prohibited and may be unlawful. If you have
received this message in error, please notify the sender immediately by
e-mail,
facsimile or telephone and thereafter delete the original message from your
machine.

Furthermore, the information contained in this message, and any attachments
thereto, is for information purposes only and may contain the personal
views and opinions of the author,
which are not necessarily the views and opinions of Dimension Data (South
Africa) (Proprietary) Limited or its subsidiaries and associated companies
("Dimension Data").
Dimension Data therefore does not accept liability for any claims, loss or
damages of whatsoever nature, arising as a result of the reliance on such
information by anyone.

Whilst all reasonable steps are taken to ensure the accuracy and integrity
of information transmitted electronically and to preserve the
confidentiality thereof,
Dimension Data accepts no liability or responsibility whatsoever if
information or data is, for whatsoever reason, incorrect, corrupted or does
not reach its intended destination.



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







---
This e-mail message (including attachments, if any) is intended for

Page scope bean and nested:iterate

2002-12-13 Thread Jim Krygowski
Hi-

I'm using nested:iterate and have not been successful in using the id
attribute of the iterate tag.  The documentation for nested:iterate is just
the documentation for logic:iterate so I would imagine that nested:iterate
should support id.

I have some code like where theBean is the source of the objects I'm
iterating over:


   
<%=element.hashCode()%>
 
   
   <%=currentIndex.intValue()%>



The following code runs and outputs just the value of the name and the
current index number.  If I removed the logic:present, I get a runtime error
because element is null.  I think this should work, but it doesn't.  Why?


--
To unsubscribe, e-mail:   
For additional commands, e-mail: 




nested tag error

2002-12-13 Thread Brian Buckley
Here's a snippet of JSP which is not working:


  
 
  


It is giving a compile error "org.apache.jasper.JasperException: Options tag
must be nested in a Select tag".

I tried changing nested:select,nested:options to html:select,html:options
but then the tag doesn't find the nested property.

How can I fix the above snippet?

Brian (using struts1.1 beta1, Tomcat 4.1.12)






--
To unsubscribe, e-mail:   
For additional commands, e-mail: 




RE: [ANNOUNCE] Shameless Plug: Struts Kick Start now available for shipping at Amazon

2002-12-13 Thread Ron Day
I'd like to second what Kevin has said.

I have bought and read every book on Struts, in the order that they were
published. I got Kick Start this Wednesday. (Sams sent it overnight for
$8.). My three favorite books are Chuck's, Ted's and Kick Start. All three
are different, have the personalities and interests of the authors, and
offer three perspectives on Struts development and best practices. I would
be very hard-pressed to choose just one, but since I love tech books that
isn't an issue for me. All three are intermediate to advanced texts (for
more intro material, look at "Mastering Struts" ). If I had to give one
reason for buying Kick Start, I would say "for the excellent chapters on
Struts Tags". The other books do not dwell on the Tags, while KickStart has
a detailed chapter on each library.

Ron

-Original Message-
From: [EMAIL PROTECTED] [mailto:[EMAIL PROTECTED]]
Sent: Friday, December 13, 2002 9:37 AM
To: Struts Users Mailing List
Subject: RE: [ANNOUNCE] Shameless Plug: Struts Kick Start now available
for shipping at Amazon




As James co-author, let me speak to this.

To begin with - I'd like to say that all authors that have put together
books on Struts have put a lot of work into it and have all done well. I've
read most all the books that are currently available and have to honest -
they're all good! No bad words about any of them.

Certainly, as well, I'd feel better if someone on the list who has seen the
book stepped in to answer this. Better probably for everyone to get an
unbiased answer. Kind of hard for me, really, to be unbiased! :->

That being said, we did take specific steps to differentiate:

 - We include a CD-ROM with Struts, JDK 1.4, mysql, strutstestcase, the
struts console, Junit, ant, cactus, Axis, JBoss, etc so all code is
included for windows and Linux.
 - We have working sample code for almost every struts tag. It's designed
for cutting and pasting.
 - We provided working sample apps including code, build scripts and step
by step instructions for integration with JBoss for EJB's and Axis for Web
Services
 - We provided coverage of Ant build scripts, JUnit and Cactus testing with
struts test case.

That's enough I guess to just say that we worked hard to create a good,
usable book. We're currently working with a couple of developer sites to
arrange publication of more sample chapters.The people at SAMS are doing a
great job with the promotions.

And again, I've read Chuck's book and really liked it. While I haven't read
Ted, et al's book it looks great as well  - and Ted has made such a unique
contribution to Struts that he's certainly earned a special place. (Ted's
publisher Manning has put out some great titles recently including Erik
Hatcher's Ant book).

If anyone has more specific questions I'd prefer to take them off list
unless the person believes their discussion is of value to the wider
audience of Struts users.

Thanks for asking!
Kevin

http://www.strutskickstart.com





[EMAIL PROTECTED] on 12/13/2002 10:10:59 AM

Please respond to "Struts Users Mailing List"
   <[EMAIL PROTECTED]>

To:[EMAIL PROTECTED]
cc: (bcc: Kevin Bedell/Systems/USHO/SunLife)
Subject:RE: [ANNOUNCE] Shameless Plug: Struts Kick Start now available
   fo   r shipping at Amazon


looks like a good buy, but 
how do u feel your book is different or offers something advantageous in
comparison to Chuck Cavaness' or Craig's book?

-Original Message-
From: James Turner [mailto:[EMAIL PROTECTED]]
Sent: Friday, December 13, 2002 8:05 AM
To: [EMAIL PROTECTED]
Cc: [EMAIL PROTECTED]
Subject: [ANNOUNCE] Shameless Plug: Struts Kick Start now available for
shipping at Amazon


Well, I may not have gotten my copies yet from the publisher, but you
can order "Struts Kick Start" now from Amazon for immediate delivery:

http://www.amazon.com/exec/obidos/tg/detail/-/0672324725

Buy one, buy two.  They make great stocking stuffers.  Use them as door
stops.  Learn to use the enclosed CD as a lethal thrown weapon. Fun for
the whole family.

_
James
ICQ#: 8239923
More ways to contact me: http://wwp.icq.com/8239923
See more about me: http://web.icq.com/whitepages/about_me?Uin=8239923
_



--
To unsubscribe, e-mail:

For additional commands, e-mail:



This message contains information intended solely for the addressee, which
is confidential or private in nature and subject to legal privilege.
If you are not the intended recipient, you may not peruse, use,
disseminate, distribute or copy this message or any file attached to this
message.
Any such unauthorised use, is prohibited and may be unlawful. If you have
received this message in error, please notify the sender immediately by
e-mail,
facsimile or telephone and thereafter delete the original message from your
machine.

Furthermore, the information contained in this message, and any attachmen

Re: nested tag error

2002-12-13 Thread Justin Ashworth
Your  is closing itself off.  Remove the / at the end of the
tag and it should work.

Justin

- Original Message -
From: "Brian Buckley" <[EMAIL PROTECTED]>
To: "Struts Users" <[EMAIL PROTECTED]>
Sent: Friday, December 13, 2002 10:54 AM
Subject: nested tag error


> Here's a snippet of JSP which is not working:
>
> 
>   
>   labelProperty="value" />
>   
> 
>
> It is giving a compile error "org.apache.jasper.JasperException: Options
tag
> must be nested in a Select tag".
>
> I tried changing nested:select,nested:options to html:select,html:options
> but then the tag doesn't find the nested property.
>
> How can I fix the above snippet?
>
> Brian (using struts1.1 beta1, Tomcat 4.1.12)
>
>
>
>
>
>
> --
> To unsubscribe, e-mail:

> For additional commands, e-mail:

>


--
To unsubscribe, e-mail:   
For additional commands, e-mail: 




Re: Using HTML frames in Struts

2002-12-13 Thread Brian DeLuca
 
check your frame SRC in your frameset.  

Secondly are you running it through a servlet container.  Because merely clicking on 
it as a file will not work because the JSP needs to be compiled?  --> silly but we use 
it and it is not a problem.

hth
b-

 --- On Thu 12/12, David Rothschadl  wrote:From: David Rothschadl [mailto: 
[EMAIL PROTECTED]]To: [EMAIL PROTECTED], [EMAIL PROTECTED]: 
Thu, 12 Dec 2002 10:02:37 -0800 (PST)Subject: Re: Using HTML frames in StrutsHere is 
the code in one of my frames that is not showing up when I check it in a browser. I 
can't even make the word Menu appear...Any ideas as to why it is not working? Menu 
Menu David Rothschadl  wrote:Hello,Is there anybody who has used frames within the 
Struts framework? Our frame set-up, which worked fine in our non-Struts HTML pages, is 
not working with Struts. Any working examples would be greatly appreciated!David 
Rothschadl

___
Can a Web portal forever change your life?
Win up to $25 Million on iWon - click here!



Integer Validation - Not catching invalid input.

2002-12-13 Thread Walk, Christopher
I'm experiencing a problem with the integer validator.  The validator is not
catching invalid integer input at the client (in the javascript).

I've traced through the execution path and the validateInteger() function
exits out on the "oInteger = " line below (IOW, never makes it to
alert("2")):

function validateInteger(form) {
   var bValid = true;
   var focusField = null;
   var i = 0;
   var fields = new Array();
   alert("1");
   oInteger = new IntegerValidations();
   alert("2");

Has anyone experienced a similar problem?

Regards,
-Chris

--
To unsubscribe, e-mail:   
For additional commands, e-mail: 




RE: How to access CVS log information

2002-12-13 Thread James Higginbotham
Try:

cvs log 

James

> -Original Message-
> From: David Graham [mailto:[EMAIL PROTECTED]] 
> Sent: Thursday, December 12, 2002 8:44 PM
> To: [EMAIL PROTECTED]
> Subject: Re: How to access CVS log information
> 
> 
> I use eclipse to open up a particular .java file in the 
> resource history 
> view.  This shows all the changes that were made, by whom, 
> and when.  I'm 
> not sure how to do it without that tool though.
> 
> David
> 
> 
> 
> 
> 
> 
> >From: [EMAIL PROTECTED]
> >Reply-To: "Struts Users Mailing List" 
> <[EMAIL PROTECTED]>
> >To: [EMAIL PROTECTED]
> >Subject: How to access CVS log information
> >Date: Fri, 13 Dec 2002 13:00:27 +1100
> >
> >I'm trying to get information from the Struts CVS repository 
> which will 
> >tell me what changes have been made since the Struts 1.1b2 release.
> >
> >Does anyone know a way of getting this information ?
> >
> >I want to go through this to make sure that any of the 
> problems fixed 
> >by these changes will not affect us in our project implementation.
> >
> >
> >
> >Steve Akins
> >Team Leader, Frameworks, J2EE Engineering
> >Development Centre
> >Financial Services Australia Technology
> >
> >
> >( +61 3 8641 2846 2 +61 3 8641 4152 : [EMAIL PROTECTED]
> >
> >
> >National Australia Bank Limited
> >4th Floor/ 500 Bourke St
> >Melbourne, Victoria 3000 
> >_
> __
> >___
> >The information contained in this email communication may be 
> confidential.
> >You
> >should only read, disclose, re-transmit, copy, distribute, 
> act in reliance
> >on or
> >commercialise the information if you are authorised to do 
> so. If you are
> >not the
> >intended recipient of this email communication, please notify us
> >immediately by
> >email to [EMAIL PROTECTED] or reply by email direct to 
> the sender
> >and then destroy any electronic or paper copy of this 
> message.  Any views
> >expressed in this email communication are those of the 
> individual sender,
> >except
> >where the sender specifically states them to be the views of 
> a member of
> >the
> >National Australia Bank Group of companies.  The National 
> Australia Bank
> >Group
> >of companies does not represent, warrant or guarantee that 
> the integrity of
> >this
> >communication has been maintained nor that the communication 
> is free of
> >errors,
> >virus or interference.
> >
> >
> >--
> >To unsubscribe, e-mail:   
> >
> >For additional commands, e-mail:
> >
> 
> 
> _
> Add photos to your e-mail with MSN 8. Get 2 months FREE*. 
> http://join.msn.com/?page=features/featuredemail
> 
> 
> --
> To unsubscribe, e-mail:   
>  [EMAIL PROTECTED]>
> For 
> additional commands, 
> e-mail: 
> 
> 

--
To unsubscribe, e-mail:   
For additional commands, e-mail: 




RE: [ANNOUNCE] Shameless Plug: Struts Kick Start now available for shipping at Amazon

2002-12-13 Thread Dudley . Butt
thanx for the info guys, i think everyones done a damn nice job of it all,
i've decided that I'm just going to have to buy all 3, i just can't seem to
decide which one or two to buyexcellent job!!

-Original Message-
From: [EMAIL PROTECTED] [mailto:[EMAIL PROTECTED]]
Sent: Friday, December 13, 2002 5:37 PM
To: Struts Users Mailing List
Subject: RE: [ANNOUNCE] Shameless Plug: Struts Kick Start now available
for shipping at Amazon




As James co-author, let me speak to this.

To begin with - I'd like to say that all authors that have put together
books on Struts have put a lot of work into it and have all done well. I've
read most all the books that are currently available and have to honest -
they're all good! No bad words about any of them.

Certainly, as well, I'd feel better if someone on the list who has seen the
book stepped in to answer this. Better probably for everyone to get an
unbiased answer. Kind of hard for me, really, to be unbiased! :->

That being said, we did take specific steps to differentiate:

 - We include a CD-ROM with Struts, JDK 1.4, mysql, strutstestcase, the
struts console, Junit, ant, cactus, Axis, JBoss, etc so all code is
included for windows and Linux.
 - We have working sample code for almost every struts tag. It's designed
for cutting and pasting.
 - We provided working sample apps including code, build scripts and step
by step instructions for integration with JBoss for EJB's and Axis for Web
Services
 - We provided coverage of Ant build scripts, JUnit and Cactus testing with
struts test case.

That's enough I guess to just say that we worked hard to create a good,
usable book. We're currently working with a couple of developer sites to
arrange publication of more sample chapters.The people at SAMS are doing a
great job with the promotions.

And again, I've read Chuck's book and really liked it. While I haven't read
Ted, et al's book it looks great as well  - and Ted has made such a unique
contribution to Struts that he's certainly earned a special place. (Ted's
publisher Manning has put out some great titles recently including Erik
Hatcher's Ant book).

If anyone has more specific questions I'd prefer to take them off list
unless the person believes their discussion is of value to the wider
audience of Struts users.

Thanks for asking!
Kevin

http://www.strutskickstart.com





[EMAIL PROTECTED] on 12/13/2002 10:10:59 AM

Please respond to "Struts Users Mailing List"
   <[EMAIL PROTECTED]>

To:[EMAIL PROTECTED]
cc: (bcc: Kevin Bedell/Systems/USHO/SunLife)
Subject:RE: [ANNOUNCE] Shameless Plug: Struts Kick Start now available
   fo   r shipping at Amazon


looks like a good buy, but 
how do u feel your book is different or offers something advantageous in
comparison to Chuck Cavaness' or Craig's book?

-Original Message-
From: James Turner [mailto:[EMAIL PROTECTED]]
Sent: Friday, December 13, 2002 8:05 AM
To: [EMAIL PROTECTED]
Cc: [EMAIL PROTECTED]
Subject: [ANNOUNCE] Shameless Plug: Struts Kick Start now available for
shipping at Amazon


Well, I may not have gotten my copies yet from the publisher, but you
can order "Struts Kick Start" now from Amazon for immediate delivery:

http://www.amazon.com/exec/obidos/tg/detail/-/0672324725

Buy one, buy two.  They make great stocking stuffers.  Use them as door
stops.  Learn to use the enclosed CD as a lethal thrown weapon. Fun for
the whole family.

_
James
ICQ#: 8239923
More ways to contact me: http://wwp.icq.com/8239923
See more about me: http://web.icq.com/whitepages/about_me?Uin=8239923
_



--
To unsubscribe, e-mail:

For additional commands, e-mail:



This message contains information intended solely for the addressee, which
is confidential or private in nature and subject to legal privilege.
If you are not the intended recipient, you may not peruse, use,
disseminate, distribute or copy this message or any file attached to this
message.
Any such unauthorised use, is prohibited and may be unlawful. If you have
received this message in error, please notify the sender immediately by
e-mail,
facsimile or telephone and thereafter delete the original message from your
machine.

Furthermore, the information contained in this message, and any attachments
thereto, is for information purposes only and may contain the personal
views and opinions of the author,
which are not necessarily the views and opinions of Dimension Data (South
Africa) (Proprietary) Limited or its subsidiaries and associated companies
("Dimension Data").
Dimension Data therefore does not accept liability for any claims, loss or
damages of whatsoever nature, arising as a result of the reliance on such
information by anyone.

Whilst all reasonable steps are taken to ensure the accuracy and integrity
of information transmitted electronically and to preserve the
confidentiality thereof,
Dime

Re: nested tag error

2002-12-13 Thread Brian Buckley
!!! That fixed it indeed.



--
To unsubscribe, e-mail:   
For additional commands, e-mail: 




Re: nested tag error

2002-12-13 Thread Cory Newey
Your problem is that your opening  tag is closed (see the '/' at the 
end?).  Change the tag to: 
 and everything should work.

>>> [EMAIL PROTECTED] 12/13/02 08:54AM >>>
Here's a snippet of JSP which is not working:


  
 
  


It is giving a compile error "org.apache.jasper.JasperException: Options tag
must be nested in a Select tag".

I tried changing nested:select,nested:options to html:select,html:options
but then the tag doesn't find the nested property.

How can I fix the above snippet?

Brian (using struts1.1 beta1, Tomcat 4.1.12)






--
To unsubscribe, e-mail:   
For additional commands, e-mail: 



--
To unsubscribe, e-mail:   
For additional commands, e-mail: 




RE: How to access CVS log information

2002-12-13 Thread James Higginbotham
Sorry, I forgot to add the help.. It allows you to specify the date
range as well, and you can do just one file or a whole tree.. I think
Ant offers a tag for this in 1.5.1 that can assist with additional
options as well. 

HTH,
James


Usage: cvs log [-lRhtNb] [-r[revisions]] [-d dates] [-s states]
[-w[logins]] [files...]
-l  Local directory only, no recursion.
-R  Only print name of RCS file.
-h  Only print header.
-t  Only print header and descriptive text.
-N  Do not list tags.
-b  Only list revisions on the default branch.
-r[revisions]   Specify revision(s)s to list.
-d datesSpecify dates (D1 -Original Message-
> From: David Graham [mailto:[EMAIL PROTECTED]] 
> Sent: Thursday, December 12, 2002 8:44 PM
> To: [EMAIL PROTECTED]
> Subject: Re: How to access CVS log information
> 
> 
> I use eclipse to open up a particular .java file in the 
> resource history 
> view.  This shows all the changes that were made, by whom, 
> and when.  I'm 
> not sure how to do it without that tool though.
> 
> David
> 
> 
> 
> 
> 
> 
> >From: [EMAIL PROTECTED]
> >Reply-To: "Struts Users Mailing List" 
> <[EMAIL PROTECTED]>
> >To: [EMAIL PROTECTED]
> >Subject: How to access CVS log information
> >Date: Fri, 13 Dec 2002 13:00:27 +1100
> >
> >I'm trying to get information from the Struts CVS repository 
> which will 
> >tell me what changes have been made since the Struts 1.1b2 release.
> >
> >Does anyone know a way of getting this information ?
> >
> >I want to go through this to make sure that any of the 
> problems fixed 
> >by these changes will not affect us in our project implementation.
> >
> >
> >
> >Steve Akins
> >Team Leader, Frameworks, J2EE Engineering
> >Development Centre
> >Financial Services Australia Technology
> >
> >
> >( +61 3 8641 2846 2 +61 3 8641 4152 : [EMAIL PROTECTED]
> >
> >
> >National Australia Bank Limited
> >4th Floor/ 500 Bourke St
> >Melbourne, Victoria 3000 
> >_
> __
> >___
> >The information contained in this email communication may be 
> confidential.
> >You
> >should only read, disclose, re-transmit, copy, distribute, 
> act in reliance
> >on or
> >commercialise the information if you are authorised to do 
> so. If you are
> >not the
> >intended recipient of this email communication, please notify us
> >immediately by
> >email to [EMAIL PROTECTED] or reply by email direct to 
> the sender
> >and then destroy any electronic or paper copy of this 
> message.  Any views
> >expressed in this email communication are those of the 
> individual sender,
> >except
> >where the sender specifically states them to be the views of 
> a member of
> >the
> >National Australia Bank Group of companies.  The National 
> Australia Bank
> >Group
> >of companies does not represent, warrant or guarantee that 
> the integrity of
> >this
> >communication has been maintained nor that the communication 
> is free of
> >errors,
> >virus or interference.
> >
> >
> >--
> >To unsubscribe, e-mail:   
> >
> >For additional commands, e-mail:
> >
> 
> 
> _
> Add photos to your e-mail with MSN 8. Get 2 months FREE*. 
> http://join.msn.com/?page=features/featuredemail
> 
> 
> --
> To unsubscribe, e-mail:   
>  [EMAIL PROTECTED]>
> For 
> additional commands, 
> e-mail: 
> 
> 

--
To unsubscribe, e-mail:   
For additional commands, e-mail: 




RE: Page scope bean and nested:iterate

2002-12-13 Thread Sri Sankaran
The id attribute of the  is a handle to the current element in the 
iteration.  So, by definition, the reference cannot be null -- 'cos if it were, you'd 
be out of the iteration.  Make sense?  So, methinks you *shouldn't* need to test if it 
is present. 

I know all this doesn't explain your NPE.

Just for grins can you try changing the 



to

<%=element.getName()%>

If 'element' is null, *that* should blow up too.  I am puzzled as to how the bean at 
element can be null.

Sorry if this didn't help any bit.

Sri

-Original Message-
From: Jim Krygowski [mailto:[EMAIL PROTECTED]] 
Sent: Friday, December 13, 2002 10:51 AM
To: Struts Users Mailing List
Subject: Page scope bean and nested:iterate


Hi-

I'm using nested:iterate and have not been successful in using the id attribute of the 
iterate tag.  The documentation for nested:iterate is just the documentation for 
logic:iterate so I would imagine that nested:iterate should support id.

I have some code like where theBean is the source of the objects I'm iterating over:


   
<%=element.hashCode()%>
 
   
   <%=currentIndex.intValue()%>



The following code runs and outputs just the value of the name and the current index 
number.  If I removed the logic:present, I get a runtime error because element is 
null.  I think this should work, but it doesn't.  Why?


--
To unsubscribe, e-mail:   
For additional commands, e-mail: 


--
To unsubscribe, e-mail:   
For additional commands, e-mail: 




RE: Page scope bean and nested:iterate

2002-12-13 Thread Jim Krygowski
Hi Sri-

Thanks for trying.  If I don't nest the element.getName() in the logic tag
it completely blows up with a big fat NullPointerException.  The element is
definitely not there.  I stepped through the code and it looks like id is
always getting removed from the page context!

This is the code that does the work:

if (iterator.hasNext()) {
Object element = iterator.next();
if (element == null)
pageContext.removeAttribute(id);
else
pageContext.setAttribute(id, element);
lengthCount++;
started = true;
if (indexId != null)
pageContext.setAttribute(indexId, new Integer(getIndex()));
return (EVAL_BODY_TAG);
} else
return (SKIP_BODY);

element is always null (even though stuff is rendering on my JSP) so the id
is always getting pulled out of the pageContext.  But index id keeps getting
set.  This is pretty confusing,  I don't know if I should trust my debugger
or not, but it definitely looks like something strange is going on.

All this makes me wonder if the Nested code is doing an end run around the
id and just passing references to the containing object to its nested tags?

jk


> -Original Message-
> From: Sri Sankaran [mailto:[EMAIL PROTECTED]]
> Sent: Friday, December 13, 2002 11:24 AM
> To: Struts Users Mailing List
> Subject: RE: Page scope bean and nested:iterate
>
>
> The id attribute of the  is a handle to the
> current element in the iteration.  So, by definition, the
> reference cannot be null -- 'cos if it were, you'd be out of the
> iteration.  Make sense?  So, methinks you *shouldn't* need to
> test if it is present.
>
> I know all this doesn't explain your NPE.
>
> Just for grins can you try changing the
>
> 
>
> to
>
> <%=element.getName()%>
>
> If 'element' is null, *that* should blow up too.  I am puzzled as
> to how the bean at element can be null.
>
> Sorry if this didn't help any bit.
>
> Sri
>
> -Original Message-
> From: Jim Krygowski [mailto:[EMAIL PROTECTED]]
> Sent: Friday, December 13, 2002 10:51 AM
> To: Struts Users Mailing List
> Subject: Page scope bean and nested:iterate
>
>
> Hi-
>
> I'm using nested:iterate and have not been successful in using
> the id attribute of the iterate tag.  The documentation for
> nested:iterate is just the documentation for logic:iterate so I
> would imagine that nested:iterate should support id.
>
> I have some code like where theBean is the source of the objects
> I'm iterating over:
>
>property="theBean">
>  
> <%=element.hashCode()%>
>  
>  
>  <%=currentIndex.intValue()%>
>
>   
>
> The following code runs and outputs just the value of the name
> and the current index number.  If I removed the logic:present, I
> get a runtime error because element is null.  I think this should
> work, but it doesn't.  Why?
>
>
> --
> To unsubscribe, e-mail:

For additional commands, e-mail:



--
To unsubscribe, e-mail:

For additional commands, e-mail:




--
To unsubscribe, e-mail:   
For additional commands, e-mail: 




Null pointer exception with

2002-12-13 Thread Declan O'Shanahan

Hi there,

Has anybody seen the following error before. I am using Jdk1.4.1, Tomcat
4.0.3 and Struts 1.1b2. I was previously using Jdk1.3.1_04 with no problems
and the problem has only surfaced since moving to Jdk1.4.1. Any hints on
this would be appreciated.

java.lang.ExceptionInInitializerError
at sun.reflect.NativeConstructorAccessorImpl.newInstance0(Native Method)
at
sun.reflect.NativeConstructorAccessorImpl.newInstance(NativeConstructorAcces
sorImpl.java:39)
at
sun.reflect.DelegatingConstructorAccessorImpl.newInstance(DelegatingConstruc
torAccessorImpl.java:27)
at java.lang.reflect.Constructor.newInstance(Constructor.java:274)
at java.lang.Class.newInstance0(Class.java:306)
at java.lang.Class.newInstance(Class.java:259)
at
org.apache.catalina.core.StandardWrapper.loadServlet(StandardWrapper.java:88
4)
at org.apache.catalina.core.StandardWrapper.load(StandardWrapper.java:808)
at
org.apache.catalina.core.StandardContext.loadOnStartup(StandardContext.java:
3266)
at
org.apache.catalina.core.StandardContext.start(StandardContext.java:3395)
at org.apache.catalina.core.ContainerBase.start(ContainerBase.java:1123)
at org.apache.catalina.core.StandardHost.start(StandardHost.java:614)
at org.apache.catalina.core.ContainerBase.start(ContainerBase.java:1123)
at org.apache.catalina.core.StandardEngine.start(StandardEngine.java:343)
at org.apache.catalina.core.StandardService.start(StandardService.java:388)
at org.apache.catalina.core.StandardServer.start(StandardServer.java:506)
at org.apache.catalina.startup.Catalina.start(Catalina.java:781)
at org.apache.catalina.startup.Catalina.execute(Catalina.java:681)
at org.apache.catalina.startup.Catalina.process(Catalina.java:179)
at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method)
at
sun.reflect.NativeMethodAccessorImpl.invoke(NativeMethodAccessorImpl.java:39
)
at
sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl
.java:25)
at java.lang.reflect.Method.invoke(Method.java:324)
at org.apache.catalina.startup.Bootstrap.main(Bootstrap.java:243)
Caused by: java.lang.NullPointerException
at java.util.Hashtable.get(Hashtable.java:329)
at
org.apache.commons.logging.LogFactory.getCachedFactory(LogFactory.java:495)
at org.apache.commons.logging.LogFactory.getFactory(LogFactory.java:264)
at org.apache.commons.logging.LogFactory.getLog(LogFactory.java:375)
at org.apache.struts.action.ActionServlet.(ActionServlet.java:375)
... 24 more

Regards,

Declan



--
To unsubscribe, e-mail:   
For additional commands, e-mail: 




no getter method exception ?

2002-12-13 Thread Sash Sash

I have a form bean that has getter methods that return a string and setter methods 
that take a string.  That all works great.  I decided to add some setter methods (used 
in my action class) that accept an int as a parameter.  As soon as I overloaded the 
original setter methods, i get the following exception: 

"No getter method for property rounds of bean org.apache.struts.taglib.html.BEAN"


So before the change, there were two methods for this field in my form

  public void setRounds(String rounds) {...}

  public String getRounds() {...}

Then I added:

   public void setRounds(int rounds) {...}

and got the exception listed above.

 

Why can't I do this?  The reason I really want this is to be able to use 
PropertyUtils.copyProperties() to copy from my business beans to my display beans.  
Any suggestions?  Thanks in advance!!!

 



-
Post your free ad now! Yahoo! Canada Personals



Re: ActionErrors = Null

2002-12-13 Thread David Graham
null is a valid return from the validate method.  It indicates there were no 
errors.  An empty ActionErrors object also indicates that.  See the javadoc 
for details.

David






From: "Jordan Thomas" <[EMAIL PROTECTED]>
Reply-To: "Struts Users Mailing List" <[EMAIL PROTECTED]>
To: "Struts-User" <[EMAIL PROTECTED]>
Subject: ActionErrors = Null
Date: Fri, 13 Dec 2002 11:12:08 +0100

Hi,

If I call

ActionErrors errors = languageForm.validate( mapping, request );

How can be errors null?

thanks

Jordan

--
To unsubscribe, e-mail:   

For additional commands, e-mail: 



_
MSN 8 helps eliminate e-mail viruses. Get 2 months FREE*. 
http://join.msn.com/?page=features/virus


--
To unsubscribe, e-mail:   
For additional commands, e-mail: 



[FRIDAY] Best error message ever

2002-12-13 Thread Nelson, Laird
Just ran across this error message in an old legacy system (I couldn't make
this up if I tried):

Unspecified security problem. Please investigate yourself, but call [name
changed to protect the innocent] team if you get stuck.

Cheers,
Laird

--
To unsubscribe, e-mail:   
For additional commands, e-mail: 




Re: Struts validating with beta2 not working

2002-12-13 Thread David Graham
You need to tell us exactly what "not working" means.  Did you replace all 
the jars in WEB_INF/lib with the new ones for beta 2?

David






From: "Kwabla, Bens" <[EMAIL PROTECTED]>
Reply-To: "Struts Users Mailing List" <[EMAIL PROTECTED]>
To: "'Struts Users Mailing List'" <[EMAIL PROTECTED]>
Subject: Struts validating with beta2 not working
Date: Fri, 13 Dec 2002 14:40:30 +0100

Hi All!

I had the client-side validation working under struts version before the
beta 2. Now my application has been migrated to the beta 2 of struts. Since
then, my client-side validation is no longer working. I understand the
validating logic has been adopted into commons. Can some tell me what is
happening?

Bens Kwabla

-Ursprüngliche Nachricht-
Von: [EMAIL PROTECTED]
[mailto:[EMAIL PROTECTED]]
Gesendet: Freitag, 13. Dezember 2002 14:35
An: [EMAIL PROTECTED]; [EMAIL PROTECTED]
Betreff: RE: Re: OptionsCollection


Hi,
There are many ways of doing this.So first is as the collection is being
displayed on screen,make it an attribute of form and popolate it in action
on
form.So in jsp u will access like a form attribute.

But the problem with this approach is If u get an error and forward back 
the

user to same jsp, u loose the collection data as u are directly going to 
the

screen.So the solution could be have a generic action which will be called
in
case of errors and the action will populate form with list before 
forwarding
it
to same jsp.

Else U can have lazy in itialising forms.i.e forms getList emthod itself
will
call service to get data if list is null.And then in this case ,u can just
use
an epty action class which does nothing but forwarsd to "success" which is
the
origicnal jsp.But this action will be mapped with the Original actions form
so
that the form will use its auto population mechanism to get the list..But i
dont like this approach ..just not a good design i think.But very
conveninent.


Hope this helps,
Regards,
Shirish

-Original Message-
From: marklowe [mailto:[EMAIL PROTECTED]]
Sent: Friday, December 13, 2002 12:12 PM
To: struts-user
Cc: marklowe
Subject: Re: OptionsCollection


Okay... But a drop down menu is screen data.

And a list of companies is something that will be used more than once.

So I have a normal class in my model layer

ListCompanies

In my UserAction

(ListCompanies).getCompanies();

But this Action's primary job is to return a list of users (which it does).

As the list is screen data i should be defining this in my form bean? This
is something thats being confusing me for weeks. If i've a bunch of
collections how can i make them available to iterate tags and select menus,
without using useBean (sorry silly design constraint, but beyond my
control).

Hopefully I'm just being silly, i could really do with some pointers as
where i'm missing the point.

Cheers mark


On 13-12-2002 11:49, "[EMAIL PROTECTED]"
<[EMAIL PROTECTED]> wrote:

> Also i dont understand why u need to access the request directly.I mean
why
> are
> u setting all the collections as request attributes.GEnerally I think 
the
good
> design is when u r FormBEan represents the screen data.So in this case
> whatever
> u need on screen will become attribute of form.
> I know it does not make much difference in implemantation but as a 
design
it
> becomes pretty straight forward.I mean for an action , if u just look at
the
> form, u know what is being displayed.So u just populate the form in
action.
>
> Any comments... :-))
>
>
> -Original Message-
> From: VEDRE [mailto:[EMAIL PROTECTED]]
> Sent: Friday, December 13, 2002 11:44 AM
> To: struts-user
> Cc: VEDRE
> Subject: RE: OptionsCollection
>
>
> You can either use attribute collection="users" for options tag if you
store
> in request
> or you can use   name="formName" property="myList"   if you
have
> a getMyList() method for the form(You have to fill call
formName.setMyList()
> in your action class before forwarding to a jsp).
>
>
> checkout
http://jakarta.apache.org/struts/userGuide/struts-html.html#options
> if you have not looked at the documentation.
>
> -rana.
>
>
> -Original Message-
> From: Mark [mailto:[EMAIL PROTECTED]]
> Sent: Friday, December 13, 2002 5:36 AM
> To: Struts Users Mailing List
> Subject: OptionsCollection
>
>
> Hello
>
> I've a number of collections already defined that end up being passed to
my
> jsp's via the request object.
>
> Users in this case is a map defined in my business logic class that does
db
> queries.
>
> users = (ListUsers).getUsers();
>
> request.setAttribute("users",users);
>
>
> I itertate through this collection using iterate. But now i want to use
this
> in a select menu.
>
> Should I be thinking about making my collection available to my FormBean
i.e
> making a getMyList() method.
>
> Thanks in advance
>
> mark
>
>
> --
> To unsubscribe, e-mail:
> 
> For additional commands, e-mail:
> 
>
> --
> To unsubscribe, e-mail:


RE: Move to TilesRequestProcessor results in forwarding exception.

2002-12-13 Thread Jerome Jacobsen
Cedric,

My webapp makes no use of Tiles yet.  The first step in my refactoring was
to add the tiles plug-in.  That is where I'm stuck.  I have no tiles
definitions yet.  So do I still need a tiles definitions file?

For some reason I can't get Tiles logging to work.  I see that it uses the
servlet.log but I can't get that to work either.  Tried setting debug to 99
in web.xml but it has no effect.  I'll keep trying to get logging to work
and let you know what I see.

> -Original Message-
> From: Cedric Dumoulin [mailto:[EMAIL PROTECTED]]
> Sent: Thursday, December 12, 2002 5:21 PM
> To: Struts Users Mailing List
> Subject: Re: Move to TilesRequestProcessor results in forwarding
> exception.
>
>
>
>   Well, let start on good basis: to use Tiles, you should declare the
> tiles plugin and specify a tiles config file. You don't need to specify
> the TilesRequestProcessor yourself.
>   The debug s properties of  TilesRequestProcessor  don't work anymore:
> they are replaced by a common logging mechanism.
>   You should see some messages from the TilesPlugin, indicating what
> happens.
>
>   Cedric
>
> Jerome Jacobsen wrote:
>
> >OK.  I added the following to my struts-config:
> >
> > processorClass="org.apache.struts.tiles.TilesRequestProcessor"
> >debug="9"/>
> >
> > 
> > 
> >
> >
> >
> >And the following to my log4j.properties (in case Tiles uses Commons
> >Logging):
> >
> >log4j.category.org.apache.struts.tiles=DEBUG
> >
> >
> >The logging output shows no Tiles logs.  It is:
> >
> >Target URL --
> >http://localhost:8080/Sandbox-FPRSAcceptanceClient-context-root/index.jsp
> >2002-12-12 16:38:08,073 [HttpRequestHandler-532] DEBUG
> >com.metalsa.orator.fprs.ui.web.struts.actions.FprsBaseAction  - BEGIN
> >execute(ActionMapping,...) 2002-12-12 16:38:08,103
> [HttpRequestHandler-532]
> >DEBUG com.metalsa.orator.fprs.ui.web.struts.actions.InitializingAction  -
> >BEGIN initialize(ActionMapping, ...) 2002-12-12 16:38:08,103
> >[HttpRequestHandler-532] INFO
> >com.metalsa.orator.fprs.ui.web.struts.actions.InitializingAction
>  - Unable
> >to find localeForm in the session. 2002-12-12 16:38:08,203
> >[HttpRequestHandler-532] WARN
> >com.metalsa.orator.fprs.ui.web.struts.ModelFacade  - Get Locales from
> >database. 2002-12-12 16:38:08,223 [HttpRequestHandler-532] INFO
> >com.metalsa.orator.fprs.ui.web.struts.actions.InitializingAction  - Added
> >localeForm to the session. 2002-12-12 16:38:08,223
> [HttpRequestHandler-532]
> >DEBUG com.metalsa.orator.fprs.ui.web.struts.actions.InitializingAction  -
> >END initialize(ActionMapping, ...) 2002-12-12 16:38:08,433
> >[HttpRequestHandler-532] DEBUG
> >com.metalsa.orator.fprs.ui.web.struts.actions.FprsBaseAction  - END
> >execute(ActionMapping,...) processActionForward(/getErrorSeverityLocs.do,
> >false)
> >
> >I get the exception in the web browser, not in the logs.  It is:
> >
> >500 Internal Server Error
> >javax.servlet.jsp.JspException: Exception forwarding for name
> >displayErrorMaintSearch: javax.servlet.ServletException: Error in servlet
> > int org.apache.struts.taglib.logic.ForwardTag.doEndTag()
> > ForwardTag.java:180
> > void _index._jspService(javax.servlet.http.HttpServletRequest,
> >javax.servlet.http.HttpServletResponse)
> > [/index.jsp]
> > index.jsp:8
> > void
> oracle.jsp.runtime.HttpJsp.service(javax.servlet.ServletRequest,
> >javax.servlet.ServletResponse)
> > HttpJsp.java:139
> > void
> >oracle.jsp.runtimev2.JspPageTable.service(javax.servlet.http.Http
> ServletRequ
> >est, javax.servlet.http.HttpServletResponse, java.lang.String)
> > JspPageTable.java:317
> > void
> >oracle.jsp.runtimev2.JspServlet.internalService(javax.servlet.htt
> p.HttpServl
> >etRequest, javax.servlet.http.HttpServletResponse)
> > JspServlet.java:465
> > void
> >oracle.jsp.runtimev2.JspServlet.service(javax.servlet.http.HttpSe
> rvletReques
> >t, javax.servlet.http.HttpServletResponse)
> > JspServlet.java:379
> > void
> javax.servlet.http.HttpServlet.service(javax.servlet.ServletRequest,
> >javax.servlet.ServletResponse)
> > HttpServlet.java:853
> > void com.evermind[Oracle9iAS (9.0.3.0.0) Containers for
> >J2EE].server.http.ServletRequestDispatcher.invoke(javax.servlet.S
> ervletReque
> >st, javax.servlet.ServletResponse)
> > ServletRequestDispatcher.java:721
> > void com.evermind[Oracle9iAS (9.0.3.0.0) Containers for
> >J2EE].server.http.ServletRequestDispatcher.forwardInternal(javax.
> servlet.Ser
> >vletRequest, javax.servlet.http.HttpServletResponse)
> > ServletRequestDispatcher.java:306
> > boolean com.evermind[Oracle9iAS (9.0.3.0.0) Containers for
> >J2EE].server.http.HttpRequestHandler.processRequest(com.evermind[
> Oracle9iAS
> >(9.0.3.0.0) Containers for J2EE].server.ApplicationServerThread,
> >com.evermind[Oracle9iAS (9.0.3.0.0) Containers for
> >J2EE].server.http.EvermindHttpServletRequest, com.evermind[Oracle9

Context Based Rollbacks from Action

2002-12-13 Thread Hookom, Jacob John
I'm looking for best practices for context based rollbacks.  An example would be:

department.do?dptId=4559
-->submit on addEmployeeForm.do
-->error occurred, rollback to department.do?dptId=4559

Of course the departmentId would be passed in the employee form, so it could be passed 
back in the forward, but, is there a better way to rollback to the page that submitted 
it other than doing mapping.getInputPage() and then appending the param and actual 
departmentId on the forward?

This issue seems to come up a lot and I'm wondering if there are any 'best'-solutions?

Regards,
Jacob Hookom




RE: Page scope bean and nested:iterate

2002-12-13 Thread Sri Sankaran
Where did you derive the code snippet you sent?  Is it possible there is some name 
collision ('element')?

AFAIK, the nested tags simply set the stage (set the bean name and property) and 
delegate the actual iteration to their  counterpart.

Sri

-Original Message-
From: Jim Krygowski [mailto:[EMAIL PROTECTED]] 
Sent: Friday, December 13, 2002 11:39 AM
To: Struts Users Mailing List
Subject: RE: Page scope bean and nested:iterate


Hi Sri-

Thanks for trying.  If I don't nest the element.getName() in the logic tag it 
completely blows up with a big fat NullPointerException.  The element is definitely 
not there.  I stepped through the code and it looks like id is always getting removed 
from the page context!

This is the code that does the work:

if (iterator.hasNext()) {
Object element = iterator.next();
if (element == null)
pageContext.removeAttribute(id);
else
pageContext.setAttribute(id, element);
lengthCount++;
started = true;
if (indexId != null)
pageContext.setAttribute(indexId, new Integer(getIndex()));
return (EVAL_BODY_TAG);
} else
return (SKIP_BODY);

element is always null (even though stuff is rendering on my JSP) so the id is always 
getting pulled out of the pageContext.  But index id keeps getting set.  This is 
pretty confusing,  I don't know if I should trust my debugger or not, but it 
definitely looks like something strange is going on.

All this makes me wonder if the Nested code is doing an end run around the id and just 
passing references to the containing object to its nested tags?

jk


> -Original Message-
> From: Sri Sankaran [mailto:[EMAIL PROTECTED]]
> Sent: Friday, December 13, 2002 11:24 AM
> To: Struts Users Mailing List
> Subject: RE: Page scope bean and nested:iterate
>
>
> The id attribute of the  is a handle to the current 
> element in the iteration.  So, by definition, the reference cannot be 
> null -- 'cos if it were, you'd be out of the iteration.  Make sense?  
> So, methinks you *shouldn't* need to test if it is present.
>
> I know all this doesn't explain your NPE.
>
> Just for grins can you try changing the
>
> 
>
> to
>
> <%=element.getName()%>
>
> If 'element' is null, *that* should blow up too.  I am puzzled as to 
> how the bean at element can be null.
>
> Sorry if this didn't help any bit.
>
> Sri
>
> -Original Message-
> From: Jim Krygowski [mailto:[EMAIL PROTECTED]]
> Sent: Friday, December 13, 2002 10:51 AM
> To: Struts Users Mailing List
> Subject: Page scope bean and nested:iterate
>
>
> Hi-
>
> I'm using nested:iterate and have not been successful in using the id 
> attribute of the iterate tag.  The documentation for nested:iterate is 
> just the documentation for logic:iterate so I would imagine that 
> nested:iterate should support id.
>
> I have some code like where theBean is the source of the objects I'm 
> iterating over:
>
>property="theBean">
>  
> <%=element.hashCode()%>
>  
>  
>  <%=currentIndex.intValue()%>
>
>   
>
> The following code runs and outputs just the value of the name and the 
> current index number.  If I removed the logic:present, I get a runtime 
> error because element is null.  I think this should work, but it 
> doesn't.  Why?
>
>
> --
> To unsubscribe, e-mail:

For additional commands, e-mail: 


--
To unsubscribe, e-mail: 
For additional commands, e-mail: 



--
To unsubscribe, e-mail:   
For additional commands, e-mail: 


--
To unsubscribe, e-mail:   
For additional commands, e-mail: 




RE: no getter method exception ?

2002-12-13 Thread Karr, David
Sorry.  Read the JavaBeans specification.  A JavaBeans property has only
one type.  It's unfortunate that it's not easy to diagnose mistakes in
following the JavaBeans specification.  You often get unintelligible
errors like you got.

> -Original Message-
> From: Sash Sash [mailto:[EMAIL PROTECTED]]
> 
> I have a form bean that has getter methods that return a 
> string and setter methods that take a string.  That all works 
> great.  I decided to add some setter methods (used in my 
> action class) that accept an int as a parameter.  As soon as 
> I overloaded the original setter methods, i get the following 
> exception: 
> 
> "No getter method for property rounds of bean 
> org.apache.struts.taglib.html.BEAN"
> 
> So before the change, there were two methods for this field in my form
> 
>   public void setRounds(String rounds) {...}
> 
>   public String getRounds() {...}
> 
> Then I added:
> 
>public void setRounds(int rounds) {...}
> 
> and got the exception listed above.
> 
>  
> 
> Why can't I do this?  The reason I really want this is to be 
> able to use PropertyUtils.copyProperties() to copy from my 
> business beans to my display beans.  Any suggestions?  Thanks 
> in advance!!!
> 
>  
> 
> 
> 
> -
> Post your free ad now! Yahoo! Canada Personals
> 

--
To unsubscribe, e-mail:   
For additional commands, e-mail: 




RE: Using HTML frames in Struts

2002-12-13 Thread Viggio, Alex
Thanks Mark,

Any other suggestions for having a submit button in one frame submit a form
in a separate frame? Our web dev policy is to avoid Javascript, so any ideas
along those lines are appreciated.

- Alex

-Original Message-
From: Mark [mailto:[EMAIL PROTECTED]]
Sent: Friday, December 13, 2002 1:38 AM
To: Viggio, Alex; Struts Users Mailing List
Subject: Re: Using HTML frames in Struts


Alex

I'm not qualified to say what's best practice... So i won't bulshit you by
pretending i am.

If i wanted to have a submit button in a seperate frame for a form in
another frame i'd be looking at the following..

Form 1 exectutes and action that then executes the submit action for your
second form.

In fact now i think about it this would work fine, and without javascript.

Public firstaction Execute(etc) {

forward(mapping.findforward(secondaction);

}

Cheers mark

On 12-12-2002 18:38, "Viggio, Alex" <[EMAIL PROTECTED]> wrote:

> What's the best practice for having a submit button submit a form in a
> separate frame. I'm trying to avoid this, but the user wants two scrolling
> sections on a complex data entry page.
> 
> Thanks,
> - Alex
> 
> -Original Message-
> From: Mark [mailto:[EMAIL PROTECTED]]
> Sent: Thursday, December 12, 2002 10:26 AM
> To: Struts Users Mailing List
> Subject: Re: Using HTML frames in Struts
> 
> 
> David
> 
> I'm developing a webapplication using struts and it has frames..
> 
> Other than 
> 
> " />
> 
> To pass the session through for paranoid people who thing cookies can take
> over your mind. But no other problems..
> 
> Cheers
> 
> mark
> 
> 
> 
> 
> On 12-12-2002 18:18, "David Rothschadl" <[EMAIL PROTECTED]> wrote:
> 
>> 
>> Hello,
>> 
>> Is there anybody who has used frames within the Struts framework? Our
> frame
>> set-up, which worked fine in our non-Struts HTML pages, is not working
> with
>> Struts. Any working examples would be greatly appreciated!
>> 
>> David Rothschadl
>> 
>> 
>> 
> 
> 
> --
> To unsubscribe, e-mail:
> 
> For additional commands, e-mail:
> 
> 

--
To unsubscribe, e-mail:   
For additional commands, e-mail: 




RE: Using HTML frames in Struts

2002-12-13 Thread Brian DeLuca

My guess is that you will need Javascript. Working in a frames environment and making 
things happen in an other frame other than the one you are working in is tricky stuff 
and the only way I have been able to do it is through the use of Javascript.  


The only flaw i see below is that you will not receive the form data in the request so 
even if you try to forward to the other action, it won't have the data your looking 
for.

b-


 --- On Fri 12/13, Viggio, Alex  wrote:From: Viggio, Alex [mailto: 
[EMAIL PROTECTED]]To: [EMAIL PROTECTED]: Fri, 13 Dec 
2002 11:29:29 -0700Subject: RE: Using HTML frames in StrutsThanks Mark,Any other 
suggestions for having a submit button in one frame submit a formin a separate frame? 
Our web dev policy is to avoid Javascript, so any ideasalong those lines are 
appreciated.- Alex-Original Message-From: Mark 
[mailto:[EMAIL PROTECTED]]Sent: Friday, December 13, 2002 1:38 AMTo: Viggio, Alex; 
Struts Users Mailing ListSubject: Re: Using HTML frames in StrutsAlexI'm not qualified 
to say what's best practice... So i won't bulshit you bypretending i am.If i wanted to 
have a submit button in a seperate frame for a form inanother frame i'd be looking at 
the following..Form 1 exectutes and action that then executes the submit action for 
yoursecond form.In fact now i think about it this would work fine, and without 
javascript.Public firstaction Execute(etc) {
forward(mapping.findforward(secondaction);}Cheers markOn 12-12-2002 18:38, "Viggio, 
Alex"  wrote:> What's the best practice for having a submit button submit a form in a> 
separate frame. I'm trying to avoid this, but the user wants two scrolling> sections 
on a complex data entry page.> > Thanks,> - Alex> > -Original Message-> From: 
Mark [mailto:[EMAIL PROTECTED]]> Sent: Thursday, December 12, 2002 10:26 AM> To: 
Struts Users Mailing List> Subject: Re: Using HTML frames in Struts> > > David> > I'm 
developing a webapplication using struts and it has frames..> > Other than > > " />> > 
To pass the session through for paranoid people who thing cookies can take> over your 
mind. But no other problems..> > Cheers> > mark> > > > > On 12-12-2002 18:18, "David 
Rothschadl"  wrote:> >> >> Hello,>> >> Is there anybody who has used frames within the 
Struts framework? Our> frame>> set-up, which worked fine in our non-Struts HTML pages, 
is not working> with>> Struts. Any working examples would be greatly appreciated!>> >> 
David Rothschadl>> >> >> > > > --> To unsubscribe, e-mail:> > For additional commands, 
e-mail:> > --To unsubscribe, e-mail:   For additional commands, e-mail: 

___
Can a Web portal forever change your life?
Win up to $25 Million on iWon - click here!

--
To unsubscribe, e-mail:   
For additional commands, e-mail: 




RE: Move to TilesRequestProcessor results in forwarding exception.

2002-12-13 Thread Jerome Jacobsen
With just the  I get the
following error.

2002-12-13 17:07:57 action: Error - TilesRequestProcessor : Definition
Factory not found for subapp ''. Do you have declared appropriate plugin in
struts-config.xml ?

If instead I use the plug-in element in struts-config I get the following
log.
2002-12-13 17:19:05 action: Tiles definition factory loaded for processor
''.

When accessing the webapp I get a runtime exception.
2002-12-13 17:20:26 ApplicationDispatcher[/StrutsLogTest] Servlet.service()
for servlet action threw exception
java.lang.NullPointerException
at
org.apache.struts.tiles.xmlDefinition.FactorySet.getDefinition(FactorySet.ja
va:156)

It appears that a definitions file is required.  But from reading both the
package documentation, Husted's Tiles chapter, and  Caverness' Tiles chapter
they all indicate that the definitions file is optional.  I wanted to
refactor toward the use of a definitions file (following Husted's
instructions in his Tiles chapter).  I guess I can add a dummy definition
and see if that appeases tiles.  Any thoughts on this?


> -Original Message-
> From: Jerome Jacobsen [mailto:[EMAIL PROTECTED]]
> Sent: Friday, December 13, 2002 12:46 PM
> To: Struts Users Mailing List
> Subject: RE: Move to TilesRequestProcessor results in forwarding
> exception.
>
>
> Cedric,
>
> My webapp makes no use of Tiles yet.  The first step in my refactoring was
> to add the tiles plug-in.  That is where I'm stuck.  I have no tiles
> definitions yet.  So do I still need a tiles definitions file?
>
> For some reason I can't get Tiles logging to work.  I see that it uses the
> servlet.log but I can't get that to work either.  Tried setting
> debug to 99
> in web.xml but it has no effect.  I'll keep trying to get logging to work
> and let you know what I see.
>
> > -Original Message-
> > From: Cedric Dumoulin [mailto:[EMAIL PROTECTED]]
> > Sent: Thursday, December 12, 2002 5:21 PM
> > To: Struts Users Mailing List
> > Subject: Re: Move to TilesRequestProcessor results in forwarding
> > exception.
> >
> >
> >
> >   Well, let start on good basis: to use Tiles, you should declare the
> > tiles plugin and specify a tiles config file. You don't need to specify
> > the TilesRequestProcessor yourself.
> >   The debug s properties of  TilesRequestProcessor  don't work anymore:
> > they are replaced by a common logging mechanism.
> >   You should see some messages from the TilesPlugin, indicating what
> > happens.
> >
> >   Cedric
> >
> > Jerome Jacobsen wrote:
> >
> > >OK.  I added the following to my struts-config:
> > >
> > > > processorClass="org.apache.struts.tiles.TilesRequestProcessor"
> > >debug="9"/>
> > >
> > > 
> > > 
> > >
> > >
> > >
> > >And the following to my log4j.properties (in case Tiles uses Commons
> > >Logging):
> > >
> > >log4j.category.org.apache.struts.tiles=DEBUG
> > >
> > >
> > >The logging output shows no Tiles logs.  It is:
> > >
> > >Target URL --
> >
> >http://localhost:8080/Sandbox-FPRSAcceptanceClient-context-root/index.jsp
> > >2002-12-12 16:38:08,073 [HttpRequestHandler-532] DEBUG
> > >com.metalsa.orator.fprs.ui.web.struts.actions.FprsBaseAction  - BEGIN
> > >execute(ActionMapping,...) 2002-12-12 16:38:08,103
> > [HttpRequestHandler-532]
> > >DEBUG
> com.metalsa.orator.fprs.ui.web.struts.actions.InitializingAction  -
> > >BEGIN initialize(ActionMapping, ...) 2002-12-12 16:38:08,103
> > >[HttpRequestHandler-532] INFO
> > >com.metalsa.orator.fprs.ui.web.struts.actions.InitializingAction
> >  - Unable
> > >to find localeForm in the session. 2002-12-12 16:38:08,203
> > >[HttpRequestHandler-532] WARN
> > >com.metalsa.orator.fprs.ui.web.struts.ModelFacade  - Get Locales from
> > >database. 2002-12-12 16:38:08,223 [HttpRequestHandler-532] INFO
> >
> >com.metalsa.orator.fprs.ui.web.struts.actions.InitializingAction  - Added
> > >localeForm to the session. 2002-12-12 16:38:08,223
> > [HttpRequestHandler-532]
> > >DEBUG
> com.metalsa.orator.fprs.ui.web.struts.actions.InitializingAction  -
> > >END initialize(ActionMapping, ...) 2002-12-12 16:38:08,433
> > >[HttpRequestHandler-532] DEBUG
> > >com.metalsa.orator.fprs.ui.web.struts.actions.FprsBaseAction  - END
> > >execute(ActionMapping,...)
> processActionForward(/getErrorSeverityLocs.do,
> > >false)
> > >
> > >I get the exception in the web browser, not in the logs.  It is:
> > >
> > >500 Internal Server Error
> > >javax.servlet.jsp.JspException: Exception forwarding for name
> > >displayErrorMaintSearch: javax.servlet.ServletException: Error
> in servlet
> > >   int org.apache.struts.taglib.logic.ForwardTag.doEndTag()
> > >   ForwardTag.java:180
> > >   void _index._jspService(javax.servlet.http.HttpServletRequest,
> > >javax.servlet.http.HttpServletResponse)
> > >   [/index.jsp]
> > >   index.jsp:8
> > >   void
> > oracle.jsp.runtime.HttpJsp.service(javax.servlet.ServletRequest,
> > >javax.servlet.ServletResponse)
> > >   HttpJsp.java:139
> > >   void
> > >oracle.jsp.runtimev2.JspPageTab

Re: [FRIDAY] Best error message ever

2002-12-13 Thread Peter S. Hamlen
LOL!

Please investigate yourself?  Do you need to hire a private investigator
to run a background search on yourself?  :)

-Peter


On Fri, 2002-12-13 at 12:42, Nelson, Laird wrote:
> Just ran across this error message in an old legacy system (I couldn't make
> this up if I tried):
> 
> Unspecified security problem. Please investigate yourself, but call [name
> changed to protect the innocent] team if you get stuck.
> 
> Cheers,
> Laird
> 
> --
> To unsubscribe, e-mail:   
> For additional commands, e-mail: 
> 



--
To unsubscribe, e-mail:   
For additional commands, e-mail: 




News server

2002-12-13 Thread John Zoetebier
Hi,

Does anybody know where the news server of this mailing list can be found ?
Link http://www.proj.com/subscribe.jsp is broken.

-- 
John Zoetebier


--
To unsubscribe, e-mail:   
For additional commands, e-mail: 




Re: [FRIDAY] Best error message ever

2002-12-13 Thread James Turner
Laird Nelson wrote:
>Just ran across this error message in an old legacy system (I couldn't
make
>this up if I tried):

>Unspecified security problem. Please investigate yourself, but call
[name
>changed to protect the innocent] team if you get stuck.

>Cheers,
>Laird

Not even close:

Back when I worked for LISP Machine, Inc., we had a very important demo
of some AI software for a bunch of multi-star Generals at DOD.  Imagine
our chagrin when the following error message popped up:

FILE SYSTEM FUKT: Call RMS

(RMS, of course, being Richard M. Stallman)

_
James 
ICQ#: 8239923
More ways to contact me: http://wwp.icq.com/8239923
See more about me: http://web.icq.com/whitepages/about_me?Uin=8239923
_



--
To unsubscribe, e-mail:   
For additional commands, e-mail: 




RE: Page scope bean and nested:iterate

2002-12-13 Thread Edgar P. Dollin
If you look at the tag, I believe it is keeping a reference to the
original property of the bean, and basing everything from that.

Edgar

-Original Message-
From: Jim Krygowski [mailto:[EMAIL PROTECTED]] 
Sent: Friday, December 13, 2002 11:39 AM
To: 'Struts Users Mailing List'
Subject: RE: Page scope bean and nested:iterate


Hi Sri-

Thanks for trying.  If I don't nest the element.getName() in the logic
tag it completely blows up with a big fat NullPointerException.  The
element is definitely not there.  I stepped through the code and it
looks like id is always getting removed from the page context!

This is the code that does the work:

if (iterator.hasNext()) {
Object element = iterator.next();
if (element == null)
pageContext.removeAttribute(id);
else
pageContext.setAttribute(id, element);
lengthCount++;
started = true;
if (indexId != null)
pageContext.setAttribute(indexId, new
Integer(getIndex()));
return (EVAL_BODY_TAG);
} else
return (SKIP_BODY);

element is always null (even though stuff is rendering on my JSP) so the
id is always getting pulled out of the pageContext.  But index id keeps
getting set.  This is pretty confusing,  I don't know if I should trust
my debugger or not, but it definitely looks like something strange is
going on.

All this makes me wonder if the Nested code is doing an end run around
the id and just passing references to the containing object to its
nested tags?

jk


> -Original Message-
> From: Sri Sankaran [mailto:[EMAIL PROTECTED]]
> Sent: Friday, December 13, 2002 11:24 AM
> To: Struts Users Mailing List
> Subject: RE: Page scope bean and nested:iterate
>
>
> The id attribute of the  is a handle to the current 
> element in the iteration.  So, by definition, the reference cannot be 
> null -- 'cos if it were, you'd be out of the iteration.  Make sense?  
> So, methinks you *shouldn't* need to test if it is present.
>
> I know all this doesn't explain your NPE.
>
> Just for grins can you try changing the
>
> 
>
> to
>
> <%=element.getName()%>
>
> If 'element' is null, *that* should blow up too.  I am puzzled as to 
> how the bean at element can be null.
>
> Sorry if this didn't help any bit.
>
> Sri
>
> -Original Message-
> From: Jim Krygowski [mailto:[EMAIL PROTECTED]]
> Sent: Friday, December 13, 2002 10:51 AM
> To: Struts Users Mailing List
> Subject: Page scope bean and nested:iterate
>
>
> Hi-
>
> I'm using nested:iterate and have not been successful in using the id 
> attribute of the iterate tag.  The documentation for nested:iterate is

> just the documentation for logic:iterate so I would imagine that 
> nested:iterate should support id.
>
> I have some code like where theBean is the source of the objects I'm 
> iterating over:
>
>property="theBean">
>  
> <%=element.hashCode()%>
>  
>  
>  <%=currentIndex.intValue()%>
>
>   
>
> The following code runs and outputs just the value of the name and the

> current index number.  If I removed the logic:present, I get a runtime

> error because element is null.  I think this should work, but it 
> doesn't.  Why?
>
>
> --
> To unsubscribe, e-mail:

For additional commands, e-mail:



--
To unsubscribe, e-mail:

For additional commands, e-mail:




--
To unsubscribe, e-mail:

For additional commands, e-mail:



--
To unsubscribe, e-mail:   
For additional commands, e-mail: 




how do i set the HTML name attribute of an input element?

2002-12-13 Thread Andy Kriger
I would like to set the HTML name attribute of an input element (e.g.
). The name attribute in Struts html-tag land refers to the form bean
backing the HTML form. Is there a different attribute that handles the HTML
name attribute?

thx
andy



--
To unsubscribe, e-mail:   
For additional commands, e-mail: 




Re: [FRIDAY] Best error message ever

2002-12-13 Thread Eddie Bush
LMAO - that's too funny!  (I guess the server is back up now!)

James Turner wrote:


Laird Nelson wrote:
 

Just ran across this error message in an old legacy system (I couldn't
   

make
 

this up if I tried):
   


 

Unspecified security problem. Please investigate yourself, but call
   

[name
 

changed to protect the innocent] team if you get stuck.
   


 

Cheers,
Laird
   


Not even close:

Back when I worked for LISP Machine, Inc., we had a very important demo
of some AI software for a bunch of multi-star Generals at DOD.  Imagine
our chagrin when the following error message popped up:

FILE SYSTEM FUKT: Call RMS

(RMS, of course, being Richard M. Stallman)



--
Eddie Bush





--
To unsubscribe, e-mail:   
For additional commands, e-mail: 




Re: Move to TilesRequestProcessor results in forwarding exception.

2002-12-13 Thread Cedric Dumoulin

 It is true that the tiles config file is optional. But if you don't 
have a tiles config file, this means that you don't use tiles 
definitions. So, you don't need  the TilesRequestProcessor and the 
TilesPlugin ...

 The TilesRequestProcessor is used to catch definition names. It 
queries the factory to check if a definition exist.  If there is no 
config file, no factory is loaded, and the first attent to access to the 
factory throw an exception.
 It appears that the TilesRequestProcessor try to access the tiles 
factory to check if your path is a definition ... I think that this can 
be reported as a bug.
 A workaround is to have a tiles config file with a fake definition.

  Cedric

Jerome Jacobsen wrote:

With just the 
processorClass="org.apache.struts.tiles.TilesRequestProcessor"/> I get the
following error.

2002-12-13 17:07:57 action: Error - TilesRequestProcessor : Definition
Factory not found for subapp ''. Do you have declared appropriate plugin in
struts-config.xml ?

If instead I use the plug-in element in struts-config I get the following
log.
2002-12-13 17:19:05 action: Tiles definition factory loaded for processor
''.

When accessing the webapp I get a runtime exception.
2002-12-13 17:20:26 ApplicationDispatcher[/StrutsLogTest] Servlet.service()
for servlet action threw exception
java.lang.NullPointerException
	at
org.apache.struts.tiles.xmlDefinition.FactorySet.getDefinition(FactorySet.ja
va:156)

It appears that a definitions file is required.  But from reading both the
package documentation, Husted's Tiles chapter, and  Caverness' Tiles chapter
they all indicate that the definitions file is optional.  I wanted to
refactor toward the use of a definitions file (following Husted's
instructions in his Tiles chapter).  I guess I can add a dummy definition
and see if that appeases tiles.  Any thoughts on this?


 

-Original Message-
From: Jerome Jacobsen [mailto:[EMAIL PROTECTED]]
Sent: Friday, December 13, 2002 12:46 PM
To: Struts Users Mailing List
Subject: RE: Move to TilesRequestProcessor results in forwarding
exception.


Cedric,

My webapp makes no use of Tiles yet.  The first step in my refactoring was
to add the tiles plug-in.  That is where I'm stuck.  I have no tiles
definitions yet.  So do I still need a tiles definitions file?

For some reason I can't get Tiles logging to work.  I see that it uses the
servlet.log but I can't get that to work either.  Tried setting
debug to 99
in web.xml but it has no effect.  I'll keep trying to get logging to work
and let you know what I see.

   

-Original Message-
From: Cedric Dumoulin [mailto:[EMAIL PROTECTED]]
Sent: Thursday, December 12, 2002 5:21 PM
To: Struts Users Mailing List
Subject: Re: Move to TilesRequestProcessor results in forwarding
exception.



 Well, let start on good basis: to use Tiles, you should declare the
tiles plugin and specify a tiles config file. You don't need to specify
the TilesRequestProcessor yourself.
 The debug s properties of  TilesRequestProcessor  don't work anymore:
they are replaced by a common logging mechanism.
 You should see some messages from the TilesPlugin, indicating what
happens.

 Cedric

Jerome Jacobsen wrote:

 

OK.  I added the following to my struts-config:


   

processorClass="org.apache.struts.tiles.TilesRequestProcessor"
 

debug="9"/>






And the following to my log4j.properties (in case Tiles uses Commons
Logging):

log4j.category.org.apache.struts.tiles=DEBUG


The logging output shows no Tiles logs.  It is:

Target URL --
   

http://localhost:8080/Sandbox-FPRSAcceptanceClient-context-root/index.jsp
 

2002-12-12 16:38:08,073 [HttpRequestHandler-532] DEBUG
com.metalsa.orator.fprs.ui.web.struts.actions.FprsBaseAction  - BEGIN
execute(ActionMapping,...) 2002-12-12 16:38:08,103
   

[HttpRequestHandler-532]
 

DEBUG
   

com.metalsa.orator.fprs.ui.web.struts.actions.InitializingAction  -
   

BEGIN initialize(ActionMapping, ...) 2002-12-12 16:38:08,103
[HttpRequestHandler-532] INFO
com.metalsa.orator.fprs.ui.web.struts.actions.InitializingAction
   

- Unable
 

to find localeForm in the session. 2002-12-12 16:38:08,203
[HttpRequestHandler-532] WARN
com.metalsa.orator.fprs.ui.web.struts.ModelFacade  - Get Locales from
database. 2002-12-12 16:38:08,223 [HttpRequestHandler-532] INFO
   

com.metalsa.orator.fprs.ui.web.struts.actions.InitializingAction  - Added
 

localeForm to the session. 2002-12-12 16:38:08,223
   

[HttpRequestHandler-532]
 

DEBUG
   

com.metalsa.orator.fprs.ui.web.struts.actions.InitializingAction  -
   

END initialize(ActionMapping, ...) 2002-12-12 16:38:08,433
[HttpRequestHandler-532] DEBUG
com.metalsa.orator.fprs.ui.web.struts.actions.FprsBaseAction  - END
execute(ActionMapping,...)
   

processActionForward(/getErrorSeverityLocs.do,
   

false)

I get the exception in the web browser, not in the logs.  It is:

500 Internal Server Error
javax.servlet.jsp.JspException: Excepti

RE: how do i set the HTML name attribute of an input element?

2002-12-13 Thread Karr, David
In Struts tags, the "property" attribute maps to the HTML "name" attribute.

> -Original Message-
> From: Andy Kriger [mailto:[EMAIL PROTECTED]]
> 
> I would like to set the HTML name attribute of an input element (e.g.
> ). The name attribute in Struts html-tag land refers 
> to the form bean
> backing the HTML form. Is there a different attribute that 
> handles the HTML
> name attribute?

--
To unsubscribe, e-mail:   
For additional commands, e-mail: 




html:errors location

2002-12-13 Thread Joao Araujo


Hi,

According to the TIP " Don't settle for  " at 
http://husted.com/struts/tips/index.html,
from Ted Husted I can add  an error  by the side of the property 
that caused it.

something like this:
To specify that this message is for the "username" 
property, we would code this instead:

errors.add(
  "username", new ActionError("error.username.required"));

If we specify a property, we can use the  
tag (or any of the alternatives) like this:

Username: 
Password: 

I Did exactly this. Unfortunately, the error does not appear by 
the side of the input. But,
It appears at page top when I use the   tag.

What should I do to put it by the side of an input ()?


Thanks in advance.
Joao,


--
To unsubscribe, e-mail:   
For additional commands, e-mail: 




Test

2002-12-13 Thread Eddie Bush
testing ... testing ... please ignore me.

--
Eddie Bush




--
To unsubscribe, e-mail:   
For additional commands, e-mail: 




Re: html:errors location

2002-12-13 Thread Scott Reisdorf
To place the error beside the text field, you explicitly call it next to 
each field.
In your case, simply do this:

 

 

Hope this helps,

-scott


At 06:52 PM 12/13/2002 -0500, you wrote:

Hi,

According to the TIP " Don't settle for  " at 
http://husted.com/struts/tips/index.html,
from Ted Husted I can add  an error  by the side of the property 
that caused it.

something like this:
To specify that this message is for the "username" 
property, we would code this instead:

errors.add(
  "username", new ActionError("error.username.required"));

If we specify a property, we can use the  
tag (or any of the alternatives) like this:

Username: 
Password: 

I Did exactly this. Unfortunately, the error does not appear by 
the side of the input. But,
It appears at page top when I use the   tag.

What should I do to put it by the side of an input ()?


Thanks in advance.
Joao,


--
To unsubscribe, e-mail:   
For additional commands, e-mail: 




--
To unsubscribe, e-mail:   
For additional commands, e-mail: 




RE: nested tag error

2002-12-13 Thread Edgar P. Dollin
As an aside on this issue, I have found that using XML syntax for jsp
helpful as it would have given you a message about unmatched tags.  Not
just jsp but also html and other tags (handy for really large tables,
etc).

Edgar

-Original Message-
From: Cory Newey [mailto:[EMAIL PROTECTED]] 
Sent: Friday, December 13, 2002 11:10 AM
To: '[EMAIL PROTECTED]'; '[EMAIL PROTECTED]'
Subject: Re: nested tag error


Your problem is that your opening  tag is closed (see the
'/' at the end?).  Change the tag to: 
 and everything should work.

>>> [EMAIL PROTECTED] 12/13/02 08:54AM >>>
Here's a snippet of JSP which is not working:


  
 
  


It is giving a compile error "org.apache.jasper.JasperException: Options
tag must be nested in a Select tag".

I tried changing nested:select,nested:options to
html:select,html:options but then the tag doesn't find the nested
property.

How can I fix the above snippet?

Brian (using struts1.1 beta1, Tomcat 4.1.12)






--
To unsubscribe, e-mail:

For additional commands, e-mail:




--
To unsubscribe, e-mail:

For additional commands, e-mail:



--
To unsubscribe, e-mail:   
For additional commands, e-mail: 




[OT] Re: Test

2002-12-13 Thread micael
You okay Eddie?  Why is this such a slow Friday?  Ignore me too?

At 05:13 PM 12/13/2002 -0600, you wrote:

testing ... testing ... please ignore me.

--
Eddie Bush




--
To unsubscribe, e-mail:   
For additional commands, e-mail: 



Micael

---

This electronic mail  transmission and any accompanying documents contain 
information belonging to the sender which may be confidential and legally 
privileged.  This information is intended only for the use of the 
individual or entity to whom this electronic mail transmission was sent as 
indicated above. If you are not the intended recipient, any disclosure, 
copying, distribution, or action taken in reliance on the contents of the 
information contained in this transmission is strictly prohibited.  If you 
have received this transmission in error, please delete the message.  Thank 
you  



--
To unsubscribe, e-mail:   
For additional commands, e-mail: 



logic:iterate, length, offset

2002-12-13 Thread Cathy Osekizoglu

 Hi: 
I have 12 items in a collection. I want to display the first 10 items on the first 
page, and the rest 2 items in the next page. How can I control it using logic:iterate 
tag. I used length="10" and offset="<%= pagerOffset%>" as the attribute of 
logic:iterate. But it only show the first page(first 10 items)---I mean it only 
iterate over the first 10 items. After that, it stops iterate. What's wrong? Could you 
help me out? Thank you for your help. 
Regards, 
Cathy



-
Post your free ad now! Yahoo! Canada Personals



RE: a question about transaction tokens

2002-12-13 Thread Andy Kriger
When you say 'In action B' call isTokenValid, do mean wrap action B's code
with an if block. And if you do that, what do you do for else (since you
have to return some kind of ActionForward from the execute method. In this
case, I just want to ignore subsequent clicks to submit the form.

-a

-Original Message-
From: Brian DeLuca [mailto:[EMAIL PROTECTED]]
Sent: Friday, December 13, 2002 10:33
To: [EMAIL PROTECTED]
Subject: RE: a question about transaction tokens


 To implement is pretty straight forward

Action A  --> generate token route to JSP A

JSP A routes to Action B --> In action B call isTokenValid
   if you want to continue Token validation call saveToken then
   route to JSP C.

JSP C then routes to Action C --> call isTokenValid then call saveToken
route to JSP D

If you want to stop validation at anytime call resetToken.

HTH
b-





 --- On Fri 12/13, Andy Kriger  wrote:From: Andy Kriger [mailto:
[EMAIL PROTECTED]]To: [EMAIL PROTECTED]: Fri, 13
Dec 2002 10:09:27 -0500Subject: a question about transaction tokensI'm
wondering how these are used. They're not mentioned in the O'Reilly bookor
in the docs. After calling generateToken, do I need to wrap my
action'sexecute code in an isTokenValid block to check for an existing
token?For example...execute(...) { generateToken(request);
if(!isTokenValid(request)) {  // do action stuff } else
return ???what???}thxandy--To unsubscribe, e-mail:   For additional
commands, e-mail:

___
Can a Web portal forever change your life?
Win up to $25 Million on iWon - click here!



--
To unsubscribe, e-mail:   
For additional commands, e-mail: 




html:errors location

2002-12-13 Thread Joao Araujo
Hi,

	According to the TIP " Don't settle for  " at 
http://husted.com/struts/tips/index.html,
	from Ted Husted I can add  an error  by the side of the property that 
caused it.

	something like this:
		To specify that this message is for the "username" property, we would 
code this instead:

		errors.add(
		  "username", new ActionError("error.username.required"));

		If we specify a property, we can use the  tag (or any of 
the alternatives) like this:

		Username: 
		Password: 

	I Did exactly this. Unfortunately, the error does not appear by the side 
of the input. But,
	It appears at page top when I use the   tag.

	What should I do to put it by the side of an input ()?


	Thanks in advance.
Joao,


--
To unsubscribe, e-mail:   
For additional commands, e-mail: 



RE: html:errors location

2002-12-13 Thread Yee, Richard K,,DMDCWEST
Joao,
Did you do this?
Username: 
Password:  -Original Message-
> From: Joao Araujo [SMTP:[EMAIL PROTECTED]]
> Sent: Friday, December 13, 2002 10:45 AM
> To:   [EMAIL PROTECTED]
> Subject:  html:errors location
> 
> Hi,
> 
>   According to the TIP " Don't settle for  " at 
> http://husted.com/struts/tips/index.html,
>   from Ted Husted I can add  an error  by the side of the property
> that 
> caused it.
> 
>   something like this:
>   To specify that this message is for the "username" property,
> we would 
> code this instead:
> 
>   errors.add(
> "username", new ActionError("error.username.required"));
> 
>   If we specify a property, we can use the  tag
> (or any of 
> the alternatives) like this:
> 
>   Username: 
>   Password: 
> 
>   I Did exactly this. Unfortunately, the error does not appear by the
> side 
> of the input. But,
>   It appears at page top when I use the   tag.
> 
>   What should I do to put it by the side of an input ( property/>)?
> 
> 
>   Thanks in advance.
> Joao,
> 
> 
> --
> To unsubscribe, e-mail:
> 
> For additional commands, e-mail:
> 

--
To unsubscribe, e-mail:   
For additional commands, e-mail: 




RE: [ANNOUNCE] Shameless Plug: Struts Kick Start now available for shipping at Amazon

2002-12-13 Thread Chappell, Simon P
I just received my copy, so I'll post a review sometime next week. The initial look is 
very good and it looks well researched.

Simon



>-Original Message-
>From: [EMAIL PROTECTED] [mailto:[EMAIL PROTECTED]]
>Sent: Friday, December 13, 2002 10:16 AM
>To: [EMAIL PROTECTED]
>Subject: RE: [ANNOUNCE] Shameless Plug: Struts Kick Start now available
>for shipping at Amazon
>
>
>thanx for the info guys, i think everyones done a damn nice 
>job of it all,
>i've decided that I'm just going to have to buy all 3, i just 
>can't seem to
>decide which one or two to buyexcellent job!!
>
>-Original Message-
>From: [EMAIL PROTECTED] [mailto:[EMAIL PROTECTED]]
>Sent: Friday, December 13, 2002 5:37 PM
>To: Struts Users Mailing List
>Subject: RE: [ANNOUNCE] Shameless Plug: Struts Kick Start now available
>for shipping at Amazon
>
>
>
>
>As James co-author, let me speak to this.
>
>To begin with - I'd like to say that all authors that have put together
>books on Struts have put a lot of work into it and have all 
>done well. I've
>read most all the books that are currently available and have 
>to honest -
>they're all good! No bad words about any of them.
>
>Certainly, as well, I'd feel better if someone on the list who 
>has seen the
>book stepped in to answer this. Better probably for everyone to get an
>unbiased answer. Kind of hard for me, really, to be unbiased! :->
>
>That being said, we did take specific steps to differentiate:
>
> - We include a CD-ROM with Struts, JDK 1.4, mysql, strutstestcase, the
>struts console, Junit, ant, cactus, Axis, JBoss, etc so all code is
>included for windows and Linux.
> - We have working sample code for almost every struts tag. 
>It's designed
>for cutting and pasting.
> - We provided working sample apps including code, build 
>scripts and step
>by step instructions for integration with JBoss for EJB's and 
>Axis for Web
>Services
> - We provided coverage of Ant build scripts, JUnit and Cactus 
>testing with
>struts test case.
>
>That's enough I guess to just say that we worked hard to create a good,
>usable book. We're currently working with a couple of 
>developer sites to
>arrange publication of more sample chapters.The people at SAMS 
>are doing a
>great job with the promotions.
>
>And again, I've read Chuck's book and really liked it. While I 
>haven't read
>Ted, et al's book it looks great as well  - and Ted has made 
>such a unique
>contribution to Struts that he's certainly earned a special 
>place. (Ted's
>publisher Manning has put out some great titles recently including Erik
>Hatcher's Ant book).
>
>If anyone has more specific questions I'd prefer to take them off list
>unless the person believes their discussion is of value to the wider
>audience of Struts users.
>
>Thanks for asking!
>Kevin
>
>http://www.strutskickstart.com
>
>
>
>
>
>[EMAIL PROTECTED] on 12/13/2002 10:10:59 AM
>
>Please respond to "Struts Users Mailing List"
>   <[EMAIL PROTECTED]>
>
>To:[EMAIL PROTECTED]
>cc: (bcc: Kevin Bedell/Systems/USHO/SunLife)
>Subject:RE: [ANNOUNCE] Shameless Plug: Struts Kick Start 
>now available
>   fo   r shipping at Amazon
>
>
>looks like a good buy, but 
>how do u feel your book is different or offers something 
>advantageous in
>comparison to Chuck Cavaness' or Craig's book?
>
>-Original Message-
>From: James Turner [mailto:[EMAIL PROTECTED]]
>Sent: Friday, December 13, 2002 8:05 AM
>To: [EMAIL PROTECTED]
>Cc: [EMAIL PROTECTED]
>Subject: [ANNOUNCE] Shameless Plug: Struts Kick Start now available for
>shipping at Amazon
>
>
>Well, I may not have gotten my copies yet from the publisher, but you
>can order "Struts Kick Start" now from Amazon for immediate delivery:
>
>http://www.amazon.com/exec/obidos/tg/detail/-/0672324725
>
>Buy one, buy two.  They make great stocking stuffers.  Use them as door
>stops.  Learn to use the enclosed CD as a lethal thrown weapon. Fun for
>the whole family.
>
>_
>James
>ICQ#: 8239923
>More ways to contact me: http://wwp.icq.com/8239923
>See more about me: http://web.icq.com/whitepages/about_me?Uin=8239923
>_
>
>
>
>--
>To unsubscribe, e-mail:
>
>For additional commands, e-mail:
>
>
>
>This message contains information intended solely for the 
>addressee, which
>is confidential or private in nature and subject to legal privilege.
>If you are not the intended recipient, you may not peruse, use,
>disseminate, distribute or copy this message or any file 
>attached to this
>message.
>Any such unauthorised use, is prohibited and may be unlawful. 
>If you have
>received this message in error, please notify the sender immediately by
>e-mail,
>facsimile or telephone and thereafter delete the original 
>message from your
>machine.
>
>Furthermore, the information contained in this message, and 
>any attachments
>thereto, is for information purposes only and may contain the p

[OT] Overloaded setters in JavaBeans

2002-12-13 Thread Sri Sankaran
It is now a well-known fact on this list that if you are trying to access a property 
using a tag you had better not have an overloaded setter for this property.  In other 
words don't do

  private String foo;
  public String getFoo() { return foo; }
  public void setFoo(String x) { foo = x; }
  public void setFoo(int i) { foo = "" + x; }

Equally well-known is the reason -- "'tis the JavaBeans specification".  So, I went 
looking.  Section 7.1 (Accessor methods) reads

Begin quote ---

Properties are always accessed via method calls on their owning object. For readable 
properties there will be a getter method to read the property value. For writable 
properties there will be a setter method to allow the property value to be updated. 

--- End quote

Section 8.3 ("Design Patterns for Properties") reads

Begin quote ---

By default, we use design patterns to locate properties by looking for methods of the 
form:

public  get();
public void set( a);

If we discover a matching pair of "get" and "set" methods 
that take and return the same type, then we regard these methods as defining a 
read-write property whose name will be "".
...

If we find only one of these methods, then we regard it as defining either a read-only 
or a writeonly property called ""

--- End quote

It doesn't say anything about not overloading the accessors.  So, why then do we get 
the error?


Sri


--
To unsubscribe, e-mail:   
For additional commands, e-mail: 




logic:iterate

2002-12-13 Thread Cathy Osekizoglu

Hi:
I have 12 items in a collection. I want to display the first 10 items on the first 
page, and the rest 2 items in the next page. How can I control it using logic:iterate 
tag. Thank you for your help.
Regards,
Cathy



-
Post your free ad now! Yahoo! Canada Personals



RE: Submitting to the same JSP

2002-12-13 Thread Harshal D

Yes I am doing:
JSP-1 -> Action-1 -> JSP-1
Action handler class:

ProductVO pv = new com.openstack.struts.testapp.ProductVO();

pv.setProductID("AH");



request.setAttribute("pv", pv);

In JSP:







 

 

And then 

 

 











 

 

The action forwards to the same page but the ProductVO  is NOT defined as a form bean.

 

Where am I going wrong ?

 Sri Sankaran <[EMAIL PROTECTED]> wrote:Can you please elaborate? Are you saying 
that the following works

JSP-1 -> Action-1 -> JSP-2

but 

JSP-1 -> Action-1 -> JSP-1

doesn't. Make sure that you are referring to the bean with the same id under which you 
have saved it (to request/session). Can you post the relevant JSP (both JSP-1 and 
JSP-2), the action class (how the bean being persisted, how the user is 
forwarded/re-directed to next view) and the struts-config (the action mapping).

Please post only the relevant portions.

Sri

-Original Message-
From: Harshal D [mailto:[EMAIL PROTECTED]] 
Sent: Thursday, December 12, 2002 11:07 PM
To: [EMAIL PROTECTED]
Subject: Submitting to the same JSP 



In my app when I create a bean in action class and display it in the next JSP 
(forwarded) it works.

But if I try to display in the same JSP (at the bottom of original form) - it does not 
work,

I am using tags to make sure bean is created (submit has happened) before displaying 
its properties. But that part never gets displayed.



Any thoughts ?



- Harshal.



-
Do you Yahoo!?
Yahoo! Mail Plus - Powerful. Affordable. Sign up now

--
To unsubscribe, e-mail: 
For additional commands, e-mail: 



-
Do you Yahoo!?
Yahoo! Mail Plus - Powerful. Affordable. Sign up now


RE: no getter method exception ?

2002-12-13 Thread Brian DeLuca
 That is the JavaBean specification, but depending on what you are doing you can 
always create a method named 

getIntRounds()

setIntRounds( int i )  

etc.. get the idea don't name the extra getters/setters the same name of the member.  

Then in bean write you can always call
  and it works nicely. I did something with this for amounts/currencys/ and 
formatting, all in one class without having to use utilities. Makes it very convient 
when its all in one object.

b-



 --- On Fri 12/13, Karr, David  wrote:From: Karr, David [mailto: 
[EMAIL PROTECTED]]To: [EMAIL PROTECTED]: Fri, 13 Dec 2002 10:25:37 
-0800Subject: RE: no getter method exception ?Sorry.  Read the JavaBeans 
specification.  A JavaBeans property has onlyone type.  It's unfortunate that it's not 
easy to diagnose mistakes infollowing the JavaBeans specification.  You often get 
unintelligibleerrors like you got.> -Original Message-> From: Sash Sash 
[mailto:[EMAIL PROTECTED]]> > I have a form bean that has getter methods that return 
a > string and setter methods that take a string.  That all works > great.  I decided 
to add some setter methods (used in my > action class) that accept an int as a 
parameter.  As soon as > I overloaded the original setter methods, i get the following 
> exception: > > "No getter method for property rounds of bean > 
org.apache.struts.taglib.html.BEAN"> > So before the change, there were two methods 
for this field in my form> >   public void setRounds(String rounds) {...}> >   public 
String getRounds() {...}> > Then I added:> >public void setRounds(int rounds) 
{...}> > and got the exception listed above.> >  > > Why can't I do this?  The reason 
I really want this is to be > able to use PropertyUtils.copyProperties() to copy from 
my > business beans to my display beans.  Any suggestions?  Thanks > in advance!!!> >  
> > > > -> Post your free ad now! Yahoo! Canada 
Personals> --To unsubscribe, e-mail:   For additional commands, e-mail: 

___
Can a Web portal forever change your life?
Win up to $25 Million on iWon - click here!



Re: [OT] Re: Test

2002-12-13 Thread Eddie Bush
Best I can tell nagoya got hosed up somehow.  issues.apache.org was 
down, which is the same server the lists run on.  If you're ever in 
doubt on whether the list is probably down, just try to hit bugzilla. 
If you can't connect, it's likely down.

micael wrote:

You okay Eddie?  Why is this such a slow Friday?  Ignore me too?

At 05:13 PM 12/13/2002 -0600, you wrote:


testing ... testing ... please ignore me.

--
Eddie Bush 



--
Eddie Bush





--
To unsubscribe, e-mail:   
For additional commands, e-mail: 




Re: logic:iterate, length, offset

2002-12-13 Thread Dan Tran
Please look up key word "paging" in this mail archive.
There are plenty of discussions about what you'd like to do.

-D
- Original Message -
From: "Cathy Osekizoglu" <[EMAIL PROTECTED]>
To: "Struts Users Mailing List" <[EMAIL PROTECTED]>
Sent: Friday, December 13, 2002 12:09 PM
Subject: logic:iterate, length, offset


>
>  Hi:
> I have 12 items in a collection. I want to display the first 10 items on
the first page, and the rest 2 items in the next page. How can I control it
using logic:iterate tag. I used length="10" and offset="<%= pagerOffset%>"
as the attribute of logic:iterate. But it only show the first page(first 10
items)---I mean it only iterate over the first 10 items. After that, it
stops iterate. What's wrong? Could you help me out? Thank you for your help.
> Regards,
> Cathy
>
>
>
> -
> Post your free ad now! Yahoo! Canada Personals
>

--
To unsubscribe, e-mail:   
For additional commands, e-mail: 




Re: News server

2002-12-13 Thread V. Cekvenich
It will be fixed in Jan. I am moving to larger servers do to volume.
2 CPU 2.8 Ghz Xeons, with RAID 15K RPM drives.

John Zoetebier wrote:

Hi,

Does anybody know where the news server of this mailing list can be found ?
Link http://www.proj.com/subscribe.jsp is broken.






--
To unsubscribe, e-mail:   
For additional commands, e-mail: 




RE: how do i set the HTML name attribute of an input element?

2002-12-13 Thread Brian DeLuca
 http://jakarta.apache.org/struts/userGuide/struts-html.html#image


 --- On Fri 12/13, Andy Kriger  wrote:From: Andy Kriger [mailto: 
[EMAIL PROTECTED]]To: [EMAIL PROTECTED]: Fri, 13 Dec 2002 
16:02:21 -0500Subject: how do i set the HTML name attribute of an input element?I 
would like to set the HTML name attribute of an input element (e.g.). The name 
attribute in Struts html-tag land refers to the form beanbacking the HTML form. Is 
there a different attribute that handles the HTMLname attribute?thxandy--To 
unsubscribe, e-mail:   For additional commands, e-mail: 

___
Can a Web portal forever change your life?
Win up to $25 Million on iWon - click here!



RE: logic:iterate, length, offset

2002-12-13 Thread Mohan Radhakrishnan
Hi,



So you are doing it two times like this. Isn't it ?


Mohan
-Original Message-
From: Cathy Osekizoglu [mailto:[EMAIL PROTECTED]]
Sent: Saturday, December 14, 2002 1:40 AM
To: Struts Users Mailing List
Subject: logic:iterate, length, offset



 Hi: 
I have 12 items in a collection. I want to display the first 10 items on the
first page, and the rest 2 items in the next page. How can I control it
using logic:iterate tag. I used length="10" and offset="<%= pagerOffset%>"
as the attribute of logic:iterate. But it only show the first page(first 10
items)---I mean it only iterate over the first 10 items. After that, it
stops iterate. What's wrong? Could you help me out? Thank you for your help.

Regards, 
Cathy



-
Post your free ad now! Yahoo! Canada Personals

--
To unsubscribe, e-mail:   
For additional commands, e-mail: 




RE: html:errors location

2002-12-13 Thread Joao Araujo
thank you guys.

Joao,

Joao,
Did you do this?
Username: 
Password:  -Original Message-
> From: Joao Araujo [SMTP:[EMAIL PROTECTED]]
> Sent: Friday, December 13, 2002 10:45 AM
> To:   [EMAIL PROTECTED]
> Subject:  html:errors location
>
> Hi,
>
>   According to the TIP " Don't settle for  " at
> http://husted.com/struts/tips/index.html,
>   from Ted Husted I can add  an error  by the side of the property
> that
> caused it.
>
>   something like this:
>   To specify that this message is for the "username" property,
> we would
> code this instead:
>
>   errors.add(
> "username", new ActionError("error.username.required"));
>
>   If we specify a property, we can use the  tag
> (or any of
> the alternatives) like this:
>
>   Username: 
>   Password: 
>
>   I Did exactly this. Unfortunately, the error does not appear by the
> side
> of the input. But,
>   It appears at page top when I use the   tag.
>
>   What should I do to put it by the side of an input ( property/>)?
>
>
>   Thanks in advance.
> Joao,
>
>
> --
> To unsubscribe, e-mail:
> 
> For additional commands, e-mail:
> 

--
To unsubscribe, e-mail:   
For additional commands, e-mail: 



--
To unsubscribe, e-mail:   
For additional commands, e-mail: 




  1   2   >