Re: how to call method with struts tag?

2001-10-23 Thread John Yu

Ken,
Oops, I overlooked the fact that you were iterating over a Map. For Map,
your row bean will be of the type Map.Entry which has two
properties, key and value. Your MyBean instance
is stored in the value property.
To retrieve it, you can do something like:
 logic:iterate id=row name=result
scope=request
 bean:define id=myBean
name=row property=value
type=MyBean/
 bean:write name=myBean
property=comp_name/

/logic:iterate
This may also work (but I'm not sure):
 logic:iterate id=row name=result
scope=request
 bean:write name=row
property=value.comp_name/

/logic:iterate
--
John

At 09:54 pm 22-10-2001 -0700, Ken'ichi Unnai wrote:
Dear John,
Thanks for your suggestion.
I still have the same problem. My beans is fairly simple, so there
should
be no problem, but...? can you please try to take a look at
this?
--MyBean.java
 private String comp_code;
 private String comp_name;
 public MyBean() {
// Default
javabean constructor
 }
 public MyBean(String comp_code, String comp_name)
{
this.comp_code
= comp_code;
this.comp_name
= comp_name;
 }
 public String getComp_code(){
return
comp_code;
 }
 public void setComp_code(String comp_code) {
this.comp_code
= comp_code;
 }
 public String getComp_name() {
return
comp_name;
 }
 public void setComp_name(String comp_name) {
this.comp_name
= comp_name;
 }
 
 public String toString() {
return
(MyBean[comp_code= + comp_code + , comp_name= +
comp_name +]);
 }
--MyAction.java---
 myHashMap.put(new Integer(1), new MyBean(0001,
First company));
 myHashMap.put(new Integer(2), new MyBean(0002,
Second company));
 req.setAttribute(result, myHashMap);
--result.jsp---
 logic:iterate id=row name=result
scope=request
 bean:write name=row
property=comp_name/

/logic:iterate

...but JSP claims with exceptions:
javax.servlet.ServletException: No getter method for property comp_name
of bean
row
Possible reason is that as you pointed out, MyBean.java is wrong, but as
long
as I investigate I can't find any problem...
Can you please try to look at this?

All the best,
Ken


-- 
John
Yu
Scioworks Technologies 
e: [EMAIL PROTECTED] w:
+(65) 873 5989
w:
http://www.scioworks.com
m: +(65) 9782 9610 
Scioworks Camino - Rapid WebApp Assembly for
Struts


AW: Auto-generating ActionForms

2001-10-23 Thread storck

Robert Parker: Is it possible that you could send me a (complete) example ?

Thanks!

-Ursprüngliche Nachricht-
Von: Robert Parker [mailto:[EMAIL PROTECTED]]
Gesendet: Dienstag, 23. Oktober 2001 01:17
An: [EMAIL PROTECTED]
Betreff: Re: Auto-generating ActionForms


I've used something similar...A lot of the apps I build are very similar
table driven forms, ie many insert/updates of tables. Hence My development
approach at the moment is based on a generic architecture based around
struts. I design the table schemas in xml, then use xslt to generate data
access beans, value objects, struts forms, formbeans and struts actions etc.
I can then customize the generated code...

regards

Rob

- Original Message -
From: Stephen Hood [EMAIL PROTECTED]
To: [EMAIL PROTECTED]
Sent: Tuesday, October 23, 2001 5:14 AM
Subject: Auto-generating ActionForms


 My last message didn't get any hits, so I'll try again with a
low-verbosity
 filter.  :)

 1.  Has anyone had any success using JAXB, Castor, or any other XML data
 binding technology to auto-generate their Struts ActionForm beans from
DTDs
 or XML Schemas (not from XML instance data or JSPs, like CodeMaker, etc.
 does) ?

 2.  Has anyone had any experience dealing with complex ActionForms, such
as
 those derived from a XML Schema?  It seems like the Struts taglibs are
more
 about handling relatively flat documents; can anyone suggest other
 approaches for doing things like generating and handling forms with
optional
 repeating groups, etc.?

 I can elaborate if anyone is interested in further discussion...

 many thanks,
 --Steve







[ANNOUNCE] Fast Track to MVC / JSP Framework Public Workshop

2001-10-23 Thread Vic Cekvenich
Title: 




!- - commercial 

Master
Struts in three Days! 

The date is fast approaching.
  
  
 Join our workshop and discover how the MVC/J2EE platform provides a number
of benefits for organizations developing intranet and Internet applications.
MVC designs require that you separate the presentation tier from the data
access tier and your application be the 3rd tier.
  
For more on MVC click on:
  http://java.sun.com/j2ee/blueprints/introduction/summary/index.html


This is the first MVC and JSP public training class. The framework we will
be learning is open standard Struts. For more on Struts and related technologies,
click on:
http://jakarta.apache.org
  
  
 You will master Struts in three days in Dallas (http://www.wyndham.com/Anatole),
starting Dec. 2nd. This class is for trainers who will teach this class in
the future, but a limited number of students are also permitted.
  
 Trainers will be able to establish themselves as leaders in the upcoming
technology. Students will upgrade their skills and become more marketable
as well as learn proper development techniques.
  
For more information, including a list of topics and details on registration,
please click on:
  http://www.basebean.com



What Will be Covered:

* DB Connection
/Warm-up with JDBC and RowSet
   
  * Test Framework and
RDBMS, Install Struts
   
  * Retrieving Data from
SQL to Struts
   
  * OO Based Development
and Extension
  
  * Drill Down from Screen-to-Screen
   
  * Data Entry Crud, Update,
Insert and Delete
   
  * Master Detail Processing
   
  * Security Based on
DB Roles
   
  * Portal Tiles (build
real portal applications w/ layout for headers and footers)
   
  * Menu - Build a Struts
Menu for Navigation
   
  * Deployment
  
  
 You will discover why flexibility is enhanced by using MVC/J2EE architecture
in conjunction with a SQL database. This is the first and only public MVC/JSP
class of its kind. We will learn to utilize applied technology toward solving
business problems.
  
  
  Open
standards are an alternative to MS .NET.








ActionFormBean

2001-10-23 Thread David A. D. Konrad

Hi,
I have used ActionForm's so far, but will also look at ActionFormBean's. Can anyone 
point out

* what is the difference between an ActionForm and an ActionFormBean?

* when to use a ActionFormBean?

I really hope anyone can answer this, since its obviously (at least to me) that one 
appearently shall _know_ what a bean is, since its not described in the documentation 
(javadoc) - not even slightly. 

best regards,




RE: ActionFormBean

2001-10-23 Thread Geddes, Mark (ANTS)

No difference.
An ActionForm bean is a class that extends the ActionForm class, and happens
to be a bean.

-Original Message-
From: David A. D. Konrad [mailto:[EMAIL PROTECTED]]
Sent: 23 October 2001 09:04
To: [EMAIL PROTECTED]
Subject: ActionFormBean


Hi,
I have used ActionForm's so far, but will also look at ActionFormBean's. Can
anyone point out

* what is the difference between an ActionForm and an ActionFormBean?

* when to use a ActionFormBean?

I really hope anyone can answer this, since its obviously (at least to me)
that one appearently shall _know_ what a bean is, since its not described in
the documentation (javadoc) - not even slightly. 

best regards,


***
This email message contains confidential information for the above addressee only.  If 
you are not the intended addressee you must not disclose or use the information in any 
manner whatsoever.

Any opinion or views contained in this email message are those of the sender, do not 
represent those of the Company in any way and reliance should not be placed upon its 
contents.

Unless otherwise stated this email message is not intended to be contractually 
binding.  Where an Agreement exists between our respective companies and there is 
conflict between the contents of this email message and the Agreement then the terms 
of that Agreement shall prevail.

Abbey National Treasury Services plc. Registered in England. Registered Office:  Abbey 
House, Baker Street, London NW1 6XL.  Company Registration No: 2338548.  Regulated by 
the SFA
***



Re: ActionFormBean

2001-10-23 Thread David A. D. Konrad

Hi Mark Geddes,

 No difference.
 An ActionForm bean is a class that extends the ActionForm class, and happens
 to be a bean.

Thank you, but what is a bean in this context? I'll guess you not talk about 
EntityBeans? ;-) As I see it, an ActionFormBean is an ordinary class with a name and 
type associated with it - why this difference?

best regards,







RE: ActionFormBean

2001-10-23 Thread Geddes, Mark (ANTS)

Not EJBs just regular beans. Check out this tutorial:

http://developer.java.sun.com/developer/onlineTraining/Beans/JBeansAPI/short
course.html

Mark

-Original Message-
From: David A. D. Konrad [mailto:[EMAIL PROTECTED]]
Sent: 23 October 2001 09:28
To: [EMAIL PROTECTED]
Subject: Re: ActionFormBean


Hi Mark Geddes,

 No difference.
 An ActionForm bean is a class that extends the ActionForm class, and
happens
 to be a bean.

Thank you, but what is a bean in this context? I'll guess you not talk
about EntityBeans? ;-) As I see it, an ActionFormBean is an ordinary class
with a name and type associated with it - why this difference?

best regards,





***
This email message contains confidential information for the above addressee only.  If 
you are not the intended addressee you must not disclose or use the information in any 
manner whatsoever.

Any opinion or views contained in this email message are those of the sender, do not 
represent those of the Company in any way and reliance should not be placed upon its 
contents.

Unless otherwise stated this email message is not intended to be contractually 
binding.  Where an Agreement exists between our respective companies and there is 
conflict between the contents of this email message and the Agreement then the terms 
of that Agreement shall prevail.

Abbey National Treasury Services plc. Registered in England. Registered Office:  Abbey 
House, Baker Street, London NW1 6XL.  Company Registration No: 2338548.  Regulated by 
the SFA
***



RE: Form properties reset ?

2001-10-23 Thread Tom Klaasen (TeleRelay)

 -Original Message-
 From: [EMAIL PROTECTED] 
 [mailto:[EMAIL PROTECTED]] 
 Sent: maandag 22 oktober 2001 19:03
 To: [EMAIL PROTECTED]
 Subject: Re: Form properties reset ?
 
 
 Yes, I would expect this. Any properties you set in the form 
 bean from the 
 first action will be cleared when the form bean is reset prior to 
 populating it for the second action.

OK, I see what happens now. The question remains whether this is good
behaviour (on a design level): if one changes the form in a first
action, I think these changes should remain in the form. I really don't
see a reason why the changes should disappear.

 If you need to add additional parameters to the request, 
 you'll need to do 
 it by adding them to the URL used to invoke the second action. 
 Alternatively, you could avoid the use of parameters, and 
 pass them as 
 request attributes instead.

...or get the parameters again from the same request (what I do now).
But this does seem clumsy.


Anyway, thanks a lot for the insight you've given me! I'll think about
it a little more...

tomK



 
 --
 Martin Cooper
 
 
 At 08:56 AM 10/19/01, Tom Klaasen (TeleRelay) wrote:
 Hi all,
 
 I noticed the following:
 
 I have a jsp with a corresponding form. When I press 
 submit, it gets
 forwarded to an Action which sets some additional properties on the
 form. Then I forward to another Action. When I read the additional
 properties of the form, they have disappeared. Is this 
 normal behaviour?
 And if so, why?
 
 thanks,
 tomK
 
 
 



automatically calling validate() of ActionForm

2001-10-23 Thread struts

Hi!

my application doesn't automatically call the validate() function in my
ActionForm-extending class. I added the form to the struts-config file in
the right manner, but it won't work. The form is filled and passed to the
Action-class, but it won't execute validate().

If I try to call form.validate(mapping, request) manually from within the
perform method of my Action class, it gives me a 500 internal server error
because it can't get a request dispatcher for path null.

Anyone knows what I'm doing wrong here?

Thanx!
Michel





RE: automatically calling validate() of ActionForm

2001-10-23 Thread Geddes, Mark (ANTS)

Does you action element in struts-config include the attribute
validate=true ?

Mark

-Original Message-
From: [EMAIL PROTECTED]
[mailto:[EMAIL PROTECTED]]
Sent: 23 October 2001 10:57
To: [EMAIL PROTECTED]
Subject: automatically calling validate() of ActionForm


Hi!

my application doesn't automatically call the validate() function in my
ActionForm-extending class. I added the form to the struts-config file in
the right manner, but it won't work. The form is filled and passed to the
Action-class, but it won't execute validate().

If I try to call form.validate(mapping, request) manually from within the
perform method of my Action class, it gives me a 500 internal server error
because it can't get a request dispatcher for path null.

Anyone knows what I'm doing wrong here?

Thanx!
Michel



***
This email message contains confidential information for the above addressee only.  If 
you are not the intended addressee you must not disclose or use the information in any 
manner whatsoever.

Any opinion or views contained in this email message are those of the sender, do not 
represent those of the Company in any way and reliance should not be placed upon its 
contents.

Unless otherwise stated this email message is not intended to be contractually 
binding.  Where an Agreement exists between our respective companies and there is 
conflict between the contents of this email message and the Agreement then the terms 
of that Agreement shall prevail.

Abbey National Treasury Services plc. Registered in England. Registered Office:  Abbey 
House, Baker Street, London NW1 6XL.  Company Registration No: 2338548.  Regulated by 
the SFA
***



Re: Form properties reset ?

2001-10-23 Thread Ted Husted

If you specify an ActionForm in the mapping for an Action, the contract
is that the ActionServlet will autopopulate the form (see
BeanUtils.populate()). Since there can only be one ActionForm under a
given name in a given request, to fulfill its contract, the
ActionServlet will use whatever form is there, or create a new one. 

Before populating the form, the ActionServlet will call reset, mostly
for the benefit of checkboxes. The default reset does nothing; it's up
to the developer to decide whether a property should be cleared for a
given mapping and a given request. 

When the ActionSerlvet populates the form, it uses the public mutators
(setters) that you defined. If you want to keep a field from being reset
or autopopulated in some circumstances, you could setup a block in the
bean's reset method and the property's mutator. (Ahh -- the miracle of
JavaBeans!) 

-- Ted Husted, Husted dot Com, Fairport NY USA.
-- Custom Software ~ Technical Services.
-- Tel +1 716 737-3463
-- http://www.husted.com/struts/


Tom Klaasen (TeleRelay) wrote:
 OK, I see what happens now. The question remains whether this is good
 behaviour (on a design level): if one changes the form in a first
 action, I think these changes should remain in the form. I really don't
 see a reason why the changes should disappear.
 
  If you need to add additional parameters to the request,
  you'll need to do
  it by adding them to the URL used to invoke the second action.
  Alternatively, you could avoid the use of parameters, and
  pass them as
  request attributes instead.
 
 ...or get the parameters again from the same request (what I do now).
 But this does seem clumsy.
 
 Anyway, thanks a lot for the insight you've given me! I'll think about
 it a little more...
 
 tomK
 
 
  --
  Martin Cooper
 
 
  At 08:56 AM 10/19/01, Tom Klaasen (TeleRelay) wrote:
  Hi all,
  
  I noticed the following:
  
  I have a jsp with a corresponding form. When I press
  submit, it gets
  forwarded to an Action which sets some additional properties on the
  form. Then I forward to another Action. When I read the additional
  properties of the form, they have disappeared. Is this
  normal behaviour?
  And if so, why?
  
  thanks,
  tomK
 
 
 



RE: automatically calling validate() of ActionForm

2001-10-23 Thread struts

Whoops, that seems to be it :).

Thank you!

On Tue, 23 Oct 2001, Geddes, Mark (ANTS) wrote:

 Does you action element in struts-config include the attribute
 validate=true ?
 
 Mark
 
 -Original Message-
 From: [EMAIL PROTECTED]
 [mailto:[EMAIL PROTECTED]]
 Sent: 23 October 2001 10:57
 To: [EMAIL PROTECTED]
 Subject: automatically calling validate() of ActionForm
 
 
 Hi!
 
 my application doesn't automatically call the validate() function in my
 ActionForm-extending class. I added the form to the struts-config file in
 the right manner, but it won't work. The form is filled and passed to the
 Action-class, but it won't execute validate().
 
 If I try to call form.validate(mapping, request) manually from within the
 perform method of my Action class, it gives me a 500 internal server error
 because it can't get a request dispatcher for path null.
 
 Anyone knows what I'm doing wrong here?
 
 Thanx!
 Michel
 
 
 
 ***
 This email message contains confidential information for the above addressee only.  
If you are not the intended addressee you must not disclose or use the information in 
any manner whatsoever.
 
 Any opinion or views contained in this email message are those of the sender, do not 
represent those of the Company in any way and reliance should not be placed upon its 
contents.
 
 Unless otherwise stated this email message is not intended to be contractually 
binding.  Where an Agreement exists between our respective companies and there is 
conflict between the contents of this email message and the Agreement then the terms 
of that Agreement shall prevail.
 
 Abbey National Treasury Services plc. Registered in England. Registered Office:  
Abbey House, Baker Street, London NW1 6XL.  Company Registration No: 2338548.  
Regulated by the SFA
 ***
 





problem with html:errors tag

2001-10-23 Thread Scriven, Marcos

When I get errors with my form validation, I cannot seem to place them where
I want them.

I have tried html:errors / and html:errors property=firstName/

1) In both cases (and even when there is no errors tag at all), I get all of
the errors at the top of my page... any ideas why?

2) Once I get errors, I then have a page with no javascript on it - in which
case the user can then just type garbage, which I want to check on the
client side. How do I get around this one?

I've seen posts that use the errors.header/footer to include some clever
javascript - is this the only way?

Thanks

Marcos



PROB:Double Submit upon Reload/Refresh Button Clicked

2001-10-23 Thread L. Yeung

An action is performed and forwards succesfully to the
same page and whenever Reload/Refresh is clicked, the 
previous action is used instead of clearing out. I've
tried resetToken but still didnt work. 

Any workarounds?

__
Do You Yahoo!?
Make a great connection at Yahoo! Personals.
http://personals.yahoo.com



Re: problem with html:errors tag

2001-10-23 Thread Rob Breeds

1. You need to put the html:errors property=whatever/ where you want
them to appear. If you have several input fields, put a html:errors
property=whatever/ next to each input field.

The header and footer are for formatting but they are optional.

Rob Breeds





   
   
Scriven,  
   
Marcos  To: '[EMAIL PROTECTED]' 
[EMAIL PROTECTED]  
Marcos.Scrive   cc:   
   
[EMAIL PROTECTED]Subject: problem with html:errors tag   
   
   
   
23/10/2001 
   
11:48  
   
Please respond 
   
to struts-user 
   
   
   
   
   




When I get errors with my form validation, I cannot seem to place them
where
I want them.

I have tried html:errors / and html:errors property=firstName/

1) In both cases (and even when there is no errors tag at all), I get all
of
the errors at the top of my page... any ideas why?

2) Once I get errors, I then have a page with no javascript on it - in
which
case the user can then just type garbage, which I want to check on the
client side. How do I get around this one?

I've seen posts that use the errors.header/footer to include some clever
javascript - is this the only way?

Thanks

Marcos






RE: problem with html:errors tag

2001-10-23 Thread Scriven, Marcos

Thanks - but that's exactly what I did!

I have two text boxes, firstName and lastName

I triple checked the property names and capitalisation, and I still get all
the errors.

Also, I would have thought that not including any error tag would mean no
errors would be displayed.

Marcos

 -Original Message-
 From: Rob Breeds [mailto:[EMAIL PROTECTED]]
 Sent: 23 October 2001 12:07
 To: [EMAIL PROTECTED]
 Subject: Re: problem with html:errors tag
 
 
 1. You need to put the html:errors property=whatever/ 
 where you want
 them to appear. If you have several input fields, put a html:errors
 property=whatever/ next to each input field.
 
 The header and footer are for formatting but they are optional.
 
 Rob Breeds
 
 
 
 
 
   
   
   
 Scriven, 
   
   
 Marcos  To: 
 '[EMAIL PROTECTED]' 
 [EMAIL PROTECTED]  
 Marcos.Scrive   cc:  
   
   
 [EMAIL PROTECTED]Subject: problem 
 with html:errors tag
   
   
   
   
 23/10/2001
   
   
 11:48 
   
   
 Please respond
   
   
 to struts-user
   
   
   
   
   
   
   
   
 
 
 
 
 When I get errors with my form validation, I cannot seem to place them
 where
 I want them.
 
 I have tried html:errors / and html:errors property=firstName/
 
 1) In both cases (and even when there is no errors tag at 
 all), I get all
 of
 the errors at the top of my page... any ideas why?
 
 2) Once I get errors, I then have a page with no javascript on it - in
 which
 case the user can then just type garbage, which I want to check on the
 client side. How do I get around this one?
 
 I've seen posts that use the errors.header/footer to include 
 some clever
 javascript - is this the only way?
 
 Thanks
 
 Marcos
 
 
 



populate checkbox back to frombean

2001-10-23 Thread Roland Berger

Hi all

I have searched the mailinglist for the following problem but did not find
the answer:

How is it possible to populate the state of a checkbox (checked or
unchecked) back to the corresponding property in the formbean when the user
clicks the submit button. The formbeans are stored in an ArrayList.

I have several formbeans  (same bean type) stored in an array  called
Mitglieder. One property of the formbean is called: selected
In the JSP page I have the following:

table
  logic:iterate id=ListMitgliederSelektionForm name=Mitglieder
tr
  tdbean:write name=ListMitgliederSelektionForm
property=fanum//td
  tdbean:write name=ListMitgliederSelektionForm
property=mitnum//td
  tdbean:write name=ListMitgliederSelektionForm
property=titel//td
  tdbean:write name=ListMitgliederSelektionForm property=name//td
  tdbean:write name=ListMitgliederSelektionForm
property=vorname//td
  tdbean:write name=ListMitgliederSelektionForm property=plz//td
  tdbean:write name=ListMitgliederSelektionForm property=ort//td
  tdbean:write name=ListMitgliederSelektionForm property=land//td
  td
html:checkbox property=selected
name=ListMitgliederSelektionForm value=true/
  /td
/tr
  /logic:iterate

Can struts handle this. If not how can I do that in an elegant way?


Roland Berger




RE: problem with html:errors tag

2001-10-23 Thread Rob Breeds

you still get error messages even without the html:errors/ tag? Sounds
like a restart web app required?

in the ActionForm validation() method, how do you populate Errors?

Rob





   
   
Scriven,  
   
Marcos  To: '[EMAIL PROTECTED]' 
[EMAIL PROTECTED]  
Marcos.Scrive   cc:   
   
[EMAIL PROTECTED]Subject: RE: problem with html:errors 
tag  
   
   
23/10/2001 
   
12:18  
   
Please respond 
   
to struts-user 
   
   
   
   
   




Thanks - but that's exactly what I did!

I have two text boxes, firstName and lastName

I triple checked the property names and capitalisation, and I still get all
the errors.

Also, I would have thought that not including any error tag would mean no
errors would be displayed.

Marcos

 -Original Message-
 From: Rob Breeds [mailto:[EMAIL PROTECTED]]
 Sent: 23 October 2001 12:07
 To: [EMAIL PROTECTED]
 Subject: Re: problem with html:errors tag


 1. You need to put the html:errors property=whatever/
 where you want
 them to appear. If you have several input fields, put a html:errors
 property=whatever/ next to each input field.

 The header and footer are for formatting but they are optional.

 Rob Breeds








 Scriven,


 Marcos  To:
 '[EMAIL PROTECTED]'
 [EMAIL PROTECTED]
 Marcos.Scrive   cc:


 [EMAIL PROTECTED]Subject: problem
 with html:errors tag




 23/10/2001


 11:48


 Please respond


 to struts-user












 When I get errors with my form validation, I cannot seem to place them
 where
 I want them.

 I have tried html:errors / and html:errors property=firstName/

 1) In both cases (and even when there is no errors tag at
 all), I get all
 of
 the errors at the top of my page... any ideas why?

 2) Once I get errors, I then have a page with no javascript on it - in
 which
 case the user can then just type garbage, which I want to check on the
 client side. How do I get around this one?

 I've seen posts that use the errors.header/footer to include
 some clever
 javascript - is this the only way?

 Thanks

 Marcos









RE: problem with html:errors tag

2001-10-23 Thread Scriven, Marcos

Hi Rob

Here is my validate method (from the ActionForm bean):

public ActionErrors validate(ActionMapping mapping, HttpServletRequest
request) {
log.debug(Validating form);
ActionErrors errors = new ActionErrors();
if ((_firstName == null) || (_firstName.length()  1)) {
errors.add(firstName, new
ActionError(error.firstname.required));
}
if ((_lastName == null) || (_lastName.length()  1)) {
errors.add(lastName, new
ActionError(error.lastname.required));
}

return errors;
}

The problem occurs regardless of whether or not I restart the web server.
Here is my entire JSP:

%@ page language=java %
%@ taglib uri=/WEB-INF/struts-bean.tld prefix=bean %
%@ taglib uri=/WEB-INF/struts-html.tld prefix=html %

script src=date.js/script
script src=strings.js/script
script src=validation.js/script

html:html locale=true
head
titleAdd Sales Person/title
html:base/
link rel=stylesheet href=/stylesheets/gs1.css type=text/css
/head
body bgcolor=#003399 text=#FF



html:form action=/sourcefiles/dealinfo/addSalesPerson focus=firstName

table border=0 width=100%

  tr
td align=right class=text8lilac
First Name
/td
td align=left
html:text styleClass=form2 property=firstName size=16
maxlength=16 onBlur=javascript:validateName(this);/
html:errors property=firstName/

/td
  /tr

  tr
td align=right class=text8lilac
  Last Name
/td
td align=left
  html:text styleClass=form2 property=lastName size=16
maxlength=16 onBlur=javascript:validateName(this);/
  html:errors property=lastName/
/td
  /tr

  tr
td align=right
  html:submit styleClass=form1 property=submit value=Submit/
/td
td align=left
  html:reset styleClass=form1/
/td
  /tr

/table

/html:form
/body
/html:html

Any help gratefully received!

Marcos

 -Original Message-
 From: Rob Breeds [mailto:[EMAIL PROTECTED]]
 Sent: 23 October 2001 12:46
 To: [EMAIL PROTECTED]
 Subject: RE: problem with html:errors tag
 
 
 you still get error messages even without the html:errors/ 
 tag? Sounds
 like a restart web app required?
 
 in the ActionForm validation() method, how do you populate Errors?
 
 Rob
 
 
 
 
 
   
   
   
 Scriven, 
   
   
 Marcos  To: 
 '[EMAIL PROTECTED]' 
 [EMAIL PROTECTED]  
 Marcos.Scrive   cc:  
   
   
 [EMAIL PROTECTED]Subject: RE: 
 problem with html:errors tag
   
   
   
   
 23/10/2001
   
   
 12:18 
   
   
 Please respond
   
   
 to struts-user
   
   
   
   
   
   
   
   
 
 
 
 
 Thanks - but that's exactly what I did!
 
 I have two text boxes, firstName and lastName
 
 I triple checked the property names and capitalisation, and I 
 still get all
 the errors.
 
 Also, I would have thought that not including any error tag 
 would mean no
 errors would be displayed.
 
 Marcos
 
  -Original Message-
  From: Rob Breeds [mailto:[EMAIL PROTECTED]]
  Sent: 23 October 2001 12:07
  To: [EMAIL PROTECTED]
  Subject: Re: problem with html:errors tag
 
 
  1. You need to put the html:errors property=whatever/
  where you want
  them to appear. If you have several input fields, put a html:errors
  property=whatever/ next to each input field.
 
  The header and footer are for formatting but they are optional.
 
  Rob Breeds
 
 
 
 
 
 
 
 
  Scriven,
 
 
  Marcos  To:
  '[EMAIL PROTECTED]'
  [EMAIL PROTECTED]
  

Re: Using static ints as values in html:submit

2001-10-23 Thread Jonathan M Crater

try this:

html:submit property=submit value=%=
Integer.toString(ButtonNames.SEARCH) %

it's expecting a string as the value.

Tony Li wrote:

 In my jsp, I have this line:

 html:submit property=submit value=search/

 Instead of the string search, I would like to use something like:

 html:submit property=submit value=%= ButtonNames.SEARCH
 %

 Where ButtonNames is an interface and SEARCH is a public static final
 int.

 When I try to compile this jsp, I get:

 method setValue(int) not found in class
 org.apache.struts.taglib.html.SubmitTag at ...

 Am I only allowed to use bean variables that have get and set methods?

 Thanks,

 Tony





Encapsulate EJB-Session-Beans in normal Java Beans!

2001-10-23 Thread storck

Would it be a good design to encapsulate my EJB-Session-Beans in normal Java
Beans and to use those Java Beans inside a Struts-Action-Class so that I
would have a more simple API to use my application-layer for other clients ?

Any comments are welcome!




Testing within Struts Framework

2001-10-23 Thread Barry Nauta

I am currently looking at how to test my EJBs within Struts. 
I have been reading about JUnit, Cactus (
http://jakarta.apache.org/cactus/ ), MockObjects etc.

I would like to go as far as implementing mouseclicks within the webpage
to simulate user-interaction.

Any suggestions/comments/known pitfalls?

Barry
-- 
Whatever you do will be insignificant, but it is very important that you
do it -- Mahatma Ghandi

begin:vcard 
n:Nauta;Barry
x-mozilla-html:FALSE
org:swITch ns/sa
adr:;;
version:2.1
email;internet:[EMAIL PROTECTED]
x-mozilla-cpt:;0
fn:Barry Nauta
end:vcard



Antigen found =*.vcf file

2001-10-23 Thread ANTIGEN_MG01

Antigen for Exchange found barry.nauta.vcf matching =*.vcf file filter.
The file is currently Deleted.  The message, Testing within Struts
Framework, was
sent from Barry Nauta  and was discovered in IMC Queues\Inbound
located at IBC/PA1/MG01.

CONFIDENTIALITY NOTICE: This E-Mail is intended only for the use of the
individual or entity to which it is addressed and may contain information
that is privileged, confidential and exempt from disclosure under applicable
law. 

If you have received this communication in error, please do not distribute
it.  Please notify the sender by E-Mail at the address shown and delete the
original message.  Thank you for your compliance.



RE: HOW TO span a FormBean over several JSP's

2001-10-23 Thread Marcel Andres

Instead of having the parameter scope (in struts-conf.xml) set to request you should 
change it to session. 
Example:

action path=/yourpath
type=yourAction
name=yourForm
scope=session
input=yourJSP1.jsp
forward name=success path=/yourJSP2.jsp/
/action

This should work.

Marcel


-Original Message-
From: [EMAIL PROTECTED] [mailto:[EMAIL PROTECTED]]
Sent: Tuesday, October 23, 2001 2:27 PM
To: [EMAIL PROTECTED]
Subject: HOW TO span a FormBean over several JSP's


Hi,

I am looking for an example how to span a formbean over more than one JSP. I
read that it is possible but I dont know exactly how to set up the
struts-conf.xml
Can anyone help?

Thanks



RE: Getting the value of object in the iterate....

2001-10-23 Thread Strichartz, Beth



I have 
the same question...
Does 
anyone out there know???


  -Original Message-From: michael duggan 
  [mailto:[EMAIL PROTECTED]]Sent: Monday, October 22, 2001 9:19 
  PMTo: [EMAIL PROTECTED]Subject: Getting the 
  value of onject in the iterate
  If I am iterating over a 
  collection.. logic:iterate id="Patients" name="MyForm" 
  property="Patients" 
  indexId="index" 
  bean:write name="Patients" property="account.ssn" 
  filter="true"//td
  /logic:iterate
  Where Patients has an account Object that has an 
  SSN property.
  is it possible to add the following inside the 
  iterate tag
  
  
  %=Patients.getAccount().getSsn()%The 
  reason I ask, is I want to pass the SSN to Javascript in an Onclick 
  event.
  
  Thanks.
  



This message contains information which may be confidential and privileged.  Unless you are the addressee  (or authorized to receive for the addressee), you may not use, copy or disclose to anyone the message or any information contained in the message.  If you have received the message in error, please advise the sender by reply e-mail, and delete or destroy the message. 


Thank you.



Q about A tags with Struts!

2001-10-23 Thread O'Neill, John H

Hi all,

hope someone can help me with this!
I want to send a request to an action using the following code

A href= /LaunchPad2Action.doBFiscal Analytic/B/A

The problem is that I want to send up parameters aswell as you would do
normally like :

A href=/LaunchPad2Action?fundId=7legalName=canada_fund etc...

Could someone point out the best way to do this with Struts - is there a tag
to do this?

Cheers,
John

John O' Neill
Fidelity Investments Systems Company (FISC) Ireland Ltd.
Tel (work) : 00 353 1 6141258
mailto:johnh.o'[EMAIL PROTECTED]






Re: HOW TO span a FormBean over several JSP's

2001-10-23 Thread Ted Husted

I just posted a new version of Struts-Simple that includes a
conventional wizard, and an early example of using the new workflow
gimzo with Struts.

-- Ted Husted, Husted dot Com, Fairport NY USA.
-- Custom Software ~ Technical Services.
-- Tel +1 716 737-3463
-- http://www.husted.com/struts/


storck wrote:
 
 Hi,
 
 I am looking for an example how to span a formbean over more than one JSP. I
 read that it is possible but I dont know exactly how to set up the
 struts-conf.xml
 Can anyone help?
 
 Thanks



RE: Testing within Struts Framework

2001-10-23 Thread David Boardman

We have been using ant (http://jakarta.apache.org/ant/) to do a nightly
build of all of our classes and ejbs and then deploy them to an instance of
Orion application server.

For each bean we write we write a corresponding JUnit test class that is
named by prefixing the name of the bean with Test (so the Customer bean
would have a corresponding TestCustomer class).

The final step was to write a Perl script that performs the following steps.
1)Shuts down the test instance of Orion
2)Checks the latest version of the application out of CVS
3)Runs our ANT script to build and deploy the classes and Beans to Orion.
4)Starts Orion
5)Runs all of the junit Test classes (see above).
6)Emails a log of all compile and test failures to the development team.

We run this script (called the Nun) on a nightly basis.  This automated
build-deploy-test process (very XP in conception) has led to much better
code, immediate notification of both compile time and integration errors,
and has made our team development environment possible.

We are doing our front end testing using a product called E-Tester developed
by Empirix
(http://www.empirix.com/Empirix/web+test+monitoring/products/functional+test
ing.html).  We looked into open source options but the only one we found was
HTTPUnit http://httpunit.sourceforge.net/.  We found this to be more
complicated to use as you have to write code for the tests.  Since we have a
non-coder developing the front end test suites, this approach would not have
worked for us.  We have had great success with E-Tester.

Dave Boardman
Integral7

-Original Message-
From: [EMAIL PROTECTED] [mailto:[EMAIL PROTECTED]]On Behalf Of
Barry Nauta
Sent: Tuesday, October 23, 2001 8:00 AM
To: [EMAIL PROTECTED]
Subject: Testing within Struts Framework


I am currently looking at how to test my EJBs within Struts.
I have been reading about JUnit, Cactus (
http://jakarta.apache.org/cactus/ ), MockObjects etc.

I would like to go as far as implementing mouseclicks within the webpage
to simulate user-interaction.

Any suggestions/comments/known pitfalls?

Barry
--
Whatever you do will be insignificant, but it is very important that you
do it -- Mahatma Ghandi




Re: Q about A tags with Struts!

2001-10-23 Thread Gregor Rayman

O'Neill, John H JohnH.O'[EMAIL PROTECTED] asks:



 Hi all,

 hope someone can help me with this!
 I want to send a request to an action using the following code

 A href= /LaunchPad2Action.doBFiscal Analytic/B/A

 The problem is that I want to send up parameters aswell as you would do
 normally like :

 A href=/LaunchPad2Action?fundId=7legalName=canada_fund etc...

 Could someone point out the best way to do this with Struts - is there a
tag
 to do this?

Have a look at the html:link tag.

--
gR




RE: Validation Return Page

2001-10-23 Thread Stephen Owens

Much cleaner! Many thanks.

-Original Message-
From: Ted Husted [mailto:[EMAIL PROTECTED]]
Sent: Monday, October 22, 2001 4:51 PM
To: [EMAIL PROTECTED]
Subject: Re: Validation Return Page


The input property is a URI -- not necessarily a page. So, in the case
of a Wizard workflow, you could specify a mapping to an Action (with
validate=false) that would in turn dispatch to the appropriate input
page, perhaps by keying on the infamous page property.



Problem: Tomcat 4.0 b7

2001-10-23 Thread Roumen Ganeff

Hi.
I haven't found this described anywhere in the list archives, so I decided
to ask here

I instaled tomcat 4.0-b7 on windows 2000 SP2

I added this to server.xml
Context path=/my-app docBase=my-web /

and in the log file it produces the folllowing error:
javax.servlet.ServletException: Class org.apache.struts.action.ActionServlet
is not a Servlet

I have the usual web.xml, which works under Resin and Jrun 3.1
Am I missing something in the configuration?

Thanx,
Ganeff




RE: Getting the value of object in the iterate....

2001-10-23 Thread Stephen Owens

You should be able to do this using the bean:define tag, like so,

  logic:iterate id=Patients name=MyForm property=Patients
indexId=index
 bean:write name=Patients property=account.ssn
filter=true//td
bean:define id=Patients name=Patients
type=com.domain.Patients/
%= Patients.getAccount().getSsn()%
  /logic:iterate
-Original Message-
From: Strichartz, Beth [mailto:[EMAIL PROTECTED]]
Sent: Tuesday, October 23, 2001 9:21 AM
To: [EMAIL PROTECTED]
Subject: RE: Getting the value of object in the iterate


I have the same question...
Does anyone out there know???
 
-Original Message-
From: michael duggan [mailto:[EMAIL PROTECTED]]
Sent: Monday, October 22, 2001 9:19 PM
To: [EMAIL PROTECTED]
Subject: Getting the value of onject in the iterate


If I am iterating over a collection..
  logic:iterate id=Patients name=MyForm property=Patients
indexId=index
 bean:write name=Patients property=account.ssn
filter=true//td
   
/logic:iterate
Where Patients has an account Object that has an SSN property.
is it possible to add the following inside the iterate tag
 
 
%=Patients.getAccount().getSsn()%The reason I ask, is I want to
pass the SSN to Javascript in an Onclick event.
 
Thanks.
 



This message contains information which may be confidential and
privileged. Unless you are the addressee (or authorized to receive for
the addressee), you may not use, copy or disclose to anyone the message
or any information contained in the message. If you have received the
message in error, please advise the sender by reply e-mail, and delete
or destroy the message. 


Thank you.



Re: Getting the value of object in the iterate....

2001-10-23 Thread Ted Husted

First could you guys turn off the HTML mail. It makes it much harder for
the rest of us to respond. HTML mail is not permitted on Jakarta mailing
lists. 

http://jakarta.apache.org/site/mail.html


For

  logic:iterate id=Patients name=MyForm property=Patients 
indexId=index
  bean:write name=Patients property=account.ssn
filter=true//td

 /logic:iterate

try

  logic:iterate id=Patients name=MyForm property=patients 
indexId=index
  bean:write name=Patients.account property=ssn
filter=true//td

 /logic:iterate


-- Ted Husted, Husted dot Com, Fairport NY USA.
-- Custom Software ~ Technical Services.
-- Tel +1 716 737-3463
-- http://www.husted.com/struts/



RE: Q about A tags with Struts!

2001-10-23 Thread Stephen Owens

You can do this with the html:link tag. For a single parameter using
a bean property as a value you woud do:
html:link href=/LaunchPad2Action.do paramID=fundId paramName=fund
paramProperty=id

which would create
a href=/LaunchPad2Action.do?fundId=7...

For multiple parameters you have to use a Map stored as a bean:
html:link href=/LaunchPad2Action.do name=params

This form uses the keys of the Map as the names of the parameters, with
the String value associated with the key as the value for that
parameter. For more detail see
http://jakarta.apache.org/struts/struts-html.html#link.

regards,

Stephen Owens
Corner Software


-Original Message-
From: O'Neill, John H [mailto:JohnH.O'[EMAIL PROTECTED]]
Sent: Tuesday, October 23, 2001 9:22 AM
To: '[EMAIL PROTECTED]'
Subject: Q about A tags with Struts!


Hi all,

hope someone can help me with this!
I want to send a request to an action using the following code

A href= /LaunchPad2Action.doBFiscal Analytic/B/A

The problem is that I want to send up parameters aswell as you would do
normally like :

A href=/LaunchPad2Action?fundId=7legalName=canada_fund etc...

Could someone point out the best way to do this with Struts - is there a
tag
to do this?




Problem with iterate tag

2001-10-23 Thread Bauer, John


I have a collection (an ArrayList) that I stored in the request scope in an
action class:

request.setAttribute(trans, transactions);

In my JSP, I am attempting to use the iterate tag to access this collection
and iterate over the contents (the collection contains
com.juniper.app.site.databean.TransactionBean instances).

No matter what technique or options I use for the iterate tag, I get no
iteration on this collection.  Can someone enlighten me on how to get this
tag to work properly with a collection stored in the request scope?   Can
the tag be used in this manner, or does the collection need to be a property
of another bean?

FYI: When using plain scriptlet code, the iteration works fine, the iterate
tag usage is the problem.

Thanks for the assistance.

John




___ 

Juniper Bank 
Rated #1 in Customer Confidence 
Gomez Inc., Summer 2001 Internet Credit Card Scorecard 
www.juniper.com 
___ 

This e-mail and any files transmitted with it may contain confidential
and/or proprietary information. It is intended solely for the use of the
individual or entity who is the intended recipient. Unauthorized use of this
information is prohibited. If you have received this in error, please
contact the sender by replying to this message and delete this material from
any system it may be on.



RE: Problem: Tomcat 4.0 b7

2001-10-23 Thread Esbrook, Scott

I ran into the ActionServlet is not a Servlet problem a while back. Solved
when I updated servlet.jar from my jakarta-tomcat-4.0\common\lib dir to the
dir where my struts compile was getting it.

Hope this helps.

Scott

-Original Message-
From: Roumen Ganeff [mailto:[EMAIL PROTECTED]]
Sent: Tuesday, October 23, 2001 9:46 AM
To: [EMAIL PROTECTED]
Subject: Problem: Tomcat 4.0 b7


Hi.
I haven't found this described anywhere in the list archives, so I decided
to ask here

I instaled tomcat 4.0-b7 on windows 2000 SP2

I added this to server.xml
Context path=/my-app docBase=my-web /

and in the log file it produces the folllowing error:
javax.servlet.ServletException: Class org.apache.struts.action.ActionServlet
is not a Servlet

I have the usual web.xml, which works under Resin and Jrun 3.1
Am I missing something in the configuration?

Thanx,
Ganeff



AW: HOW TO span a FormBean over several JSP's

2001-10-23 Thread storck

Sorry, but I cant find the right link :(

-Ursprungliche Nachricht-
Von: Ted Husted [mailto:[EMAIL PROTECTED]]
Gesendet: Dienstag, 23. Oktober 2001 15:24
An: [EMAIL PROTECTED]
Betreff: Re: HOW TO span a FormBean over several JSP's


I just posted a new version of Struts-Simple that includes a
conventional wizard, and an early example of using the new workflow
gimzo with Struts.

-- Ted Husted, Husted dot Com, Fairport NY USA.
-- Custom Software ~ Technical Services.
-- Tel +1 716 737-3463
-- http://www.husted.com/struts/


storck wrote:

 Hi,

 I am looking for an example how to span a formbean over more than one JSP.
I
 read that it is possible but I dont know exactly how to set up the
 struts-conf.xml
 Can anyone help?

 Thanks




Re: [ANNOUNCE] Fast Track to MVC / JSP Framework Public Workshop

2001-10-23 Thread Alex Lin


Based on my research, there're more Struts courses available in the states
- FYI
http://bravepoint.com/scripts/wsisa.dll/WService=training/training_course.html?courseid=354
http://www.avantsoft.com/jsp.html
Vic Cekvenich wrote:
!-
- commercial
Master
Struts in three Days!

The date is fast
approaching.

 Join
our workshop and discover how the MVC/J2EE platform provides a number of
benefits for organizations developing intranet and Internet applications.
MVC designs require that you separate the presentation tier from the data
access tier and your application be the 3rd tier.
For more on MVC click on:
http://java.sun.com/j2ee/blueprints/introduction/summary/index.html

This is the first MVC
and JSP public training class. The framework we will be learning is open
standard Struts. For more on Struts and related technologies, click on:
http://jakarta.apache.org

 You
will master Struts in three days in Dallas (http://www.wyndham.com/Anatole),
starting Dec. 2nd. This class is for trainers who will teach this class
in the future, but a limited number of students are also permitted.
 Trainers
will be able to establish themselves as leaders in the upcoming technology.
Students will upgrade their skills and become more marketable as well as
learn proper development techniques.
For more information, including
a list of topics and details on registration, please click on:
http://www.basebean.com

What Will be Covered:
* DB Connection
/Warm-up with JDBC and RowSet
* Test Framework and
RDBMS, Install Struts
* Retrieving Data from
SQL to Struts
* OO Based Development
and Extension
* Drill Down from Screen-to-Screen
* Data Entry Crud, Update,
Insert and Delete
* Master Detail Processing
* Security Based on
DB Roles
* Portal Tiles (build
real portal applications w/ layout for headers and footers)
* Menu - Build a Struts
Menu for Navigation
* Deployment

 You
will discover why flexibility is enhanced by using MVC/J2EE architecture
in conjunction with a SQL database. This is the first and only public MVC/JSP
class of its kind. We will learn to utilize applied technology toward solving
business problems.

Open standards
are an alternative to MS .NET.






Form to a database

2001-10-23 Thread rg
Title: 




Hello.
I have a question about database. 
I want to use a Oracle database and I configured it to use built-in as connection
pool.
Is it possible that I can write content from a form directly in the database?
In the struts-example I saw, that it's possible, that you can write the from
in a hashtable.
thx, rg








RE: Problem with iterate tag

2001-10-23 Thread Marcel Andres

John, can you give some more informations? For example:

Your iterate-tag in the jsp.
Did you define the iterate-tag on top of the page %@ taglib 
uri=/WEB-INF/struts-logic.tld prefix=logic %.
Do you get any errors?

Marcel

-Original Message-
From: [EMAIL PROTECTED] [mailto:[EMAIL PROTECTED]]
Sent: Tuesday, October 23, 2001 3:55 PM
To: [EMAIL PROTECTED]
Subject: Problem with iterate tag



I have a collection (an ArrayList) that I stored in the request scope in an
action class:

request.setAttribute(trans, transactions);

In my JSP, I am attempting to use the iterate tag to access this collection
and iterate over the contents (the collection contains
com.juniper.app.site.databean.TransactionBean instances).

No matter what technique or options I use for the iterate tag, I get no
iteration on this collection.  Can someone enlighten me on how to get this
tag to work properly with a collection stored in the request scope?   Can
the tag be used in this manner, or does the collection need to be a property
of another bean?

FYI: When using plain scriptlet code, the iteration works fine, the iterate
tag usage is the problem.

Thanks for the assistance.

John




___ 

Juniper Bank 
Rated #1 in Customer Confidence 
Gomez Inc., Summer 2001 Internet Credit Card Scorecard 
www.juniper.com 
___ 

This e-mail and any files transmitted with it may contain confidential
and/or proprietary information. It is intended solely for the use of the
individual or entity who is the intended recipient. Unauthorized use of this
information is prohibited. If you have received this in error, please
contact the sender by replying to this message and delete this material from
any system it may be on.



RE: problem with html:errors tag

2001-10-23 Thread Rob Breeds


looks OK to me. Do the variables _firstName and _lastName get populated by
setFirstName() and setLastName()?

Other than that I'm afraid I've no idea - I'm still writing my first struts
app!

Rob


   
   
Scriven,  
   
Marcos  To: '[EMAIL PROTECTED]' 
[EMAIL PROTECTED]  
Marcos.Scrive   cc:   
   
[EMAIL PROTECTED]Subject: RE: problem with html:errors 
tag  
   
   
23/10/2001 
   
13:26  
   
Please respond 
   
to struts-user 
   
   
   
   
   




Hi Rob

Here is my validate method (from the ActionForm bean):

public ActionErrors validate(ActionMapping mapping, HttpServletRequest
request) {
log.debug(Validating form);
ActionErrors errors = new ActionErrors();
if ((_firstName == null) || (_firstName.length()  1)) {
errors.add(firstName, new
ActionError(error.firstname.required));
}
if ((_lastName == null) || (_lastName.length()  1)) {
errors.add(lastName, new
ActionError(error.lastname.required));
}

return errors;
}

The problem occurs regardless of whether or not I restart the web server.
Here is my entire JSP:

%@ page language=java %
%@ taglib uri=/WEB-INF/struts-bean.tld prefix=bean %
%@ taglib uri=/WEB-INF/struts-html.tld prefix=html %

script src=date.js/script
script src=strings.js/script
script src=validation.js/script

html:html locale=true
head
titleAdd Sales Person/title
html:base/
link rel=stylesheet href=/stylesheets/gs1.css type=text/css
/head
body bgcolor=#003399 text=#FF



html:form action=/sourcefiles/dealinfo/addSalesPerson focus=firstName

table border=0 width=100%

  tr
td align=right class=text8lilac
First Name
/td
td align=left
html:text styleClass=form2 property=firstName size=16
maxlength=16 onBlur=javascript:validateName(this);/
html:errors property=firstName/

/td
  /tr

  tr
td align=right class=text8lilac
  Last Name
/td
td align=left
  html:text styleClass=form2 property=lastName size=16
maxlength=16 onBlur=javascript:validateName(this);/
  html:errors property=lastName/
/td
  /tr

  tr
td align=right
  html:submit styleClass=form1 property=submit value=Submit/
/td
td align=left
  html:reset styleClass=form1/
/td
  /tr

/table

/html:form
/body
/html:html

Any help gratefully received!

Marcos

 -Original Message-
 From: Rob Breeds [mailto:[EMAIL PROTECTED]]
 Sent: 23 October 2001 12:46
 To: [EMAIL PROTECTED]
 Subject: RE: problem with html:errors tag


 you still get error messages even without the html:errors/
 tag? Sounds
 like a restart web app required?

 in the ActionForm validation() method, how do you populate Errors?

 Rob








 Scriven,


 Marcos  To:
 '[EMAIL PROTECTED]'
 [EMAIL PROTECTED]
 Marcos.Scrive   cc:


 [EMAIL PROTECTED]Subject: RE:
 problem with html:errors tag




 23/10/2001


 12:18


 Please respond


 to struts-user












 Thanks - but that's exactly what I did!

 I have two text boxes, firstName and lastName

 I triple checked the property names and capitalisation, and I
 still get all
 the errors.

 Also, I would have thought that not including any error tag
 would mean no
 errors would be displayed.

 Marcos

  -Original Message-
  From: Rob Breeds [mailto:[EMAIL PROTECTED]]
  

RE: How to: Workflow-management with struts

2001-10-23 Thread Marcel Andres

There exist a simple workflow-extension for struts. See 
http://www.husted.com/struts/resources/workflow.htm. Perhaps, this can help you.

Marcel

-Original Message-
From: [EMAIL PROTECTED] [mailto:[EMAIL PROTECTED]]
Sent: Tuesday, October 23, 2001 4:17 PM
To: [EMAIL PROTECTED]
Subject: How to: Workflow-management with struts


Hi,

does a possibility exists for workflow-management with struts?

Thanks!



Re: Dynamic XML extended defintions

2001-10-23 Thread Sandeep Takhar

I may have missed a reply on this one, but it seems to
me that you only need to replace the one definition
and not both of them:

 
 definition name=menu.license
 extends=menu.main
 putList name=flags
 add value=linknormal /
 add value=linkbold /
 add value=nolinkbold /
 /definition

And add the flags putList to the menu.main?

Does this not work?

-sandeep

--- iT meDic [EMAIL PROTECTED] wrote:
 Hi Cedric,
 
 I understand what you mean however, i would like to
 use the mainLayout as 
 the definition and alter the submenu components (by
 adding flags)
 in my jsp page.
 
 I want to be able to do this:
 
 %@ taglib uri=/WEB-INF/tiles.tld prefix=comp
 %
 comp:insert definition=mainLayout flush=true 
 
 comp:put definition=menu.link(something like this)
comp:putList name=flags 
  comp:add value=linkbold /
  comp:add value=sep /
/comp:putList
 
 /comp:insert
 
 Currently i am doing this to overcome the above
 problem:
 
 in my defintions.xml
 
 definition name=mainLayout
 path=/tutorial/layout/classicLayout.jsp
 put name=title value=World Financial Online /
 put name=header
 value=/tutorial/common/header.jsp /
 put name=footer
 value=/tutorial/common/footer.jsp /
 put name=menu value=menu.main /
 /definition
 
 definition name=menu.main
 path=/layout/vboxLayout.jsp
 putList name=componentsList
 add value=menu.links /
 /putList
 /definition
 
 definition name=menu.links
 path=/common/submenu.jsp
 put name=title value=Tutorial /
 putList name=items
 add value=Home /
 add value=Basic Page /
 add value=Licensing /
 /putList
 putList name=links
 add value=/tutorial/index.jsp /
 add value=/tutorial/basicPage.jsp /
 add value=/tutorial/licensing.jsp /
 /putList
 /definition
 
 definition name=menu.licenselayout
 extends=menu.main 
 putList name=componentsList
 add value=menu.license /
 /putList
 /definition
 
 definition name=menu.license
 extends=menu.links
 putList name=flags
 add value=linknormal /
 add value=linkbold /
 add value=nolinkbold /
 /definition
 
 So in the jsp page , i call the mainLayout just
 overload the name=menu 
 with the value=menu.licenselayout.
 That way i am getting the right values bolded etc.,
 however, the problem is 
 i am building a framework for a site which has 10
 main menu items, with two 
 submenus(10 or more links per submenu) per menu
 item, as you can see that a 
 lot of redundant code i would have to include in my
 defintions file. Is 
 there a easier way to do this or am i on the right
 track on doing how i am 
 doing it?
 
 Thank you in advance.
 it_medic
 
 From: Cedric Dumoulin [EMAIL PROTECTED]
 Reply-To: [EMAIL PROTECTED]
 To: [EMAIL PROTECTED]
 Subject: Re: Dynamic XML extended defintions
 Date: Mon, 22 Oct 2001 14:56:31 +0200
 
Hello,
 
Yes you can.
 
In your jsp page, insert the definition you
 want, and pass it new or
 overloaded parameters. These later will supersede
 the one defined in 
 definition.
 
 i.e., write something like :
 %@ taglib uri=/WEB-INF/tiles.tld prefix=comp
 %
 comp:insert definition=menu.links flush=true 
 
 !-- i would like to add the below flags to the
 menu.links definition --
comp:putList name=flags 
  comp:add value=linkbold /
  comp:add value=sep /
/comp:putList
 
 /comp:insert
 
The problem in your case is that you need to
 create a list with the 
 exact size
 as the others one.
On my todo list there is a reload action that
 will allow to reload xml 
 config
 files without restarting web server. I need to find
 time to implement it.
Also, you can change component context in an
 action, as proposed in 
 another
 mail reply.
 
  Cedric
 
 iT meDic wrote:
 
   Hi,
  
   I was wondering if it would be possible to
 overwrite the values(2 or 3
   levels down) defined in the definitions.xml file
 from a calling page. 
 better
   explained with this example from the tutorial.
  
   definition name=mainLayout
 path=/tutorial/layout/classicLayout.jsp
 put name=title value=World Financial
 Online /
 put name=header
 value=/tutorial/common/header.jsp /
 put name=footer
 value=/tutorial/common/footer.jsp /
 put name=menu value=menu.main /
 /definition
  
   definition name=menu.main
 path=/layout/vboxLayout.jsp
   putList name=componentsList
 add value=menu.links /
 /putList
 /definition
  
   definition name=menu.links
 path=/common/submenu.jsp
 put name=title value=Tutorial /
   putList name=items
 add value=Home /
 add value=Basic Page /
 /putList
   putList name=links
 add value=/tutorial/index.jsp /
 add value=/tutorial/basicPage.jsp /
 /putList
 /definition
  
   Using the above as a reference is it possible to
 create a page and add
   flags for menu.links.
   eg :
  
   %@ taglib uri=/WEB-INF/tiles.tld
 prefix=comp %
   comp:insert definition=mainLayout
 flush=true 
  
   !-- i would like to add the below flags to the
 menu.links definition 
 --
  
   comp:putList name=flags 
   comp:add value=linkbold /
   comp:add 

RE: Form to a database

2001-10-23 Thread Marcel Andres

In my opinion, it is not a proper way, if you write from a form directly into a 
database. Better practice would be, that you write a seperate data access class, which 
handles the interaction with the database.
 
Marcel
 
-Original Message-
From: [EMAIL PROTECTED] [mailto:[EMAIL PROTECTED]]
Sent: Tuesday, October 23, 2001 4:12 PM
To: [EMAIL PROTECTED]
Subject: Form to a database


Hello.
I have a question about database. 
I want to use a Oracle database and I configured it to use built-in as connection pool.
Is it possible that I can write content from a form directly in the database?
In the struts-example I saw, that it's possible, that you can write the from in a 
hashtable.
thx, rg







RE: Getting the value of object in the iterate....

2001-10-23 Thread Strichartz, Beth

Thanks! I got that working..
Now I am having a problem sending to the JavaScript:
 html:submit property=buttonSelected value=Get onclick=return
doSubmit(%= Patients.getAccount().getSsn()%); /

Any ideas???

Error is :
probably occurred due to an error in /ChangeEdit.jsp line 303:
html:submit property=buttonSelected value=Get onclick=return
doSubmit('%=Patients.getAccount().getSsn()%'); /

C:\bea\wlserver6.0\config\mydomain\applications\.wl_temp_do_not_delete\WEB-I
NF\_tmp_war_myserver_myserver_middleware\jsp_servlet\_changeaddressedit.java
:1451: ')' expected
(No more information available, probably caused by another error)




Full compiler error(s):
C:\bea\wlserver6.0\config\mydomain\applications\.wl_temp_do_not_delete\WEB-I
NF\_tmp_war_myserver_myserver_middleware\jsp_servlet\_changeaddressedit.java
:1449: unclosed string literal
 
_html_submit0.setOnclick(weblogic.utils.StringUtils.valueOf(return
doSubmit('%= =Patients.getAccount().getSsn()) //[ /ChangeAddressEdit.jsp;
Line: 303]
 


-Original Message-
From: Stephen Owens [mailto:[EMAIL PROTECTED]]
Sent: Tuesday, October 23, 2001 9:53 AM
To: [EMAIL PROTECTED]
Subject: RE: Getting the value of object in the iterate


You should be able to do this using the bean:define tag, like so,

  logic:iterate id=Patients name=MyForm property=Patients
indexId=index
 bean:write name=Patients property=account.ssn
filter=true//td
bean:define id=Patients name=Patients
type=com.domain.Patients/
%= Patients.getAccount().getSsn()%
  /logic:iterate
-Original Message-
From: Strichartz, Beth [mailto:[EMAIL PROTECTED]]
Sent: Tuesday, October 23, 2001 9:21 AM
To: [EMAIL PROTECTED]
Subject: RE: Getting the value of object in the iterate


I have the same question...
Does anyone out there know???
 
-Original Message-
From: michael duggan [mailto:[EMAIL PROTECTED]]
Sent: Monday, October 22, 2001 9:19 PM
To: [EMAIL PROTECTED]
Subject: Getting the value of onject in the iterate


If I am iterating over a collection..
  logic:iterate id=Patients name=MyForm property=Patients
indexId=index
 bean:write name=Patients property=account.ssn
filter=true//td
   
/logic:iterate
Where Patients has an account Object that has an SSN property.
is it possible to add the following inside the iterate tag
 
 
%=Patients.getAccount().getSsn()%The reason I ask, is I want to
pass the SSN to Javascript in an Onclick event.
 
Thanks.
 



This message contains information which may be confidential and
privileged. Unless you are the addressee (or authorized to receive for
the addressee), you may not use, copy or disclose to anyone the message
or any information contained in the message. If you have received the
message in error, please advise the sender by reply e-mail, and delete
or destroy the message. 


Thank you.


This message contains information which may be confidential and privileged.
Unless you are the addressee  (or authorized to receive for the addressee),
you may not use, copy or disclose to anyone the message or any information
contained in the message.  If you have received the message in error, please
advise the sender by reply e-mail, and delete or destroy the message. 

Thank you.




Re: AW: HOW TO span a FormBean over several JSP's

2001-10-23 Thread Sandeep Takhar

http://www.husted.com/struts/resources/struts-simple.zip

--- storck [EMAIL PROTECTED] wrote:
 Sorry, but I cant find the right link :(
 
 -Ursprungliche Nachricht-
 Von: Ted Husted [mailto:[EMAIL PROTECTED]]
 Gesendet: Dienstag, 23. Oktober 2001 15:24
 An: [EMAIL PROTECTED]
 Betreff: Re: HOW TO span a FormBean over several
 JSP's
 
 
 I just posted a new version of Struts-Simple that
 includes a
 conventional wizard, and an early example of using
 the new workflow
 gimzo with Struts.
 
 -- Ted Husted, Husted dot Com, Fairport NY USA.
 -- Custom Software ~ Technical Services.
 -- Tel +1 716 737-3463
 -- http://www.husted.com/struts/
 
 
 storck wrote:
 
  Hi,
 
  I am looking for an example how to span a formbean
 over more than one JSP.
 I
  read that it is possible but I dont know exactly
 how to set up the
  struts-conf.xml
  Can anyone help?
 
  Thanks
 


__
Do You Yahoo!?
Make a great connection at Yahoo! Personals.
http://personals.yahoo.com



Initializing ArrayList used by options tag

2001-10-23 Thread lisa ward

Hi,

I have an ArrayList which I use to populate the options on one of my JSP 
pages.  Where is the best place to initialize this ArrayList?  At the moment 
I am making database calls from within my form bean, so that when the form 
is initialized the values will be present.  Should I be doing this from 
within my Action class?  I guess my question is whether or not there are any 
complications doing it the way I am doing it.

Thanks alot for your speedy response.

Lisa


_
Get your FREE download of MSN Explorer at http://explorer.msn.com/intl.asp




Re: AW: HOW TO span a FormBean over several JSP's

2001-10-23 Thread Ted Husted

http://www.husted.com/struts/resources.htm#new

storck wrote:
 
 Sorry, but I cant find the right link :(
 
 -Ursprungliche Nachricht-
 Von: Ted Husted [mailto:[EMAIL PROTECTED]]
 Gesendet: Dienstag, 23. Oktober 2001 15:24
 An: [EMAIL PROTECTED]
 Betreff: Re: HOW TO span a FormBean over several JSP's
 
 I just posted a new version of Struts-Simple that includes a
 conventional wizard, and an early example of using the new workflow
 gimzo with Struts.
 
 -- Ted Husted, Husted dot Com, Fairport NY USA.
 -- Custom Software ~ Technical Services.
 -- Tel +1 716 737-3463
 -- http://www.husted.com/struts/
 
 storck wrote:
 
  Hi,
 
  I am looking for an example how to span a formbean over more than one JSP.
 I
  read that it is possible but I dont know exactly how to set up the
  struts-conf.xml
  Can anyone help?
 
  Thanks

-- Ted Husted, Husted dot Com, Fairport NY USA.
-- Custom Software ~ Technical Services.
-- Tel +1 716 737-3463
-- http://www.husted.com/struts/



html:link forward question

2001-10-23 Thread lisa ward

Hi,

Can anyone please tell me how to achieve forwarding of one page to another 
as well as have the information in the form submitted to the form bean in 
the process.  Is this this possible or do I just have the wrong idea.

Please help.

Thank you for your speedy response.

Lisa

_
Get your FREE download of MSN Explorer at http://explorer.msn.com/intl.asp




Re: Getting the value of object in the iterate....

2001-10-23 Thread Ted Husted

How about 

input type=submit name=buttonSelected value=Get onclick=return
doSubmit('bean:write ... /'); /

instead. 

Or, you might have to expose the bean as a scripting variable before
using it in a scriptlet.

Strichartz, Beth wrote:
 
 Thanks! I got that working..
 Now I am having a problem sending to the JavaScript:
  html:submit property=buttonSelected value=Get onclick=return
 doSubmit(%= Patients.getAccount().getSsn()%); /
 
 Any ideas???
 
 Error is :
 probably occurred due to an error in /ChangeEdit.jsp line 303:
 html:submit property=buttonSelected value=Get onclick=return
 doSubmit('%=Patients.getAccount().getSsn()%'); /
 
 C:\bea\wlserver6.0\config\mydomain\applications\.wl_temp_do_not_delete\WEB-I
 NF\_tmp_war_myserver_myserver_middleware\jsp_servlet\_changeaddressedit.java
 :1451: ')' expected
 (No more information available, probably caused by another error)
 
 
 
 Full compiler error(s):
 C:\bea\wlserver6.0\config\mydomain\applications\.wl_temp_do_not_delete\WEB-I
 NF\_tmp_war_myserver_myserver_middleware\jsp_servlet\_changeaddressedit.java
 :1449: unclosed string literal
 
 _html_submit0.setOnclick(weblogic.utils.StringUtils.valueOf(return
 doSubmit('%= =Patients.getAccount().getSsn()) //[ /ChangeAddressEdit.jsp;
 Line: 303]
 
 
 -Original Message-
 From: Stephen Owens [mailto:[EMAIL PROTECTED]]
 Sent: Tuesday, October 23, 2001 9:53 AM
 To: [EMAIL PROTECTED]
 Subject: RE: Getting the value of object in the iterate
 
 You should be able to do this using the bean:define tag, like so,
 
   logic:iterate id=Patients name=MyForm property=Patients
 indexId=index
  bean:write name=Patients property=account.ssn
 filter=true//td
 bean:define id=Patients name=Patients
 type=com.domain.Patients/
 %= Patients.getAccount().getSsn()%
   /logic:iterate
 -Original Message-
 From: Strichartz, Beth [mailto:[EMAIL PROTECTED]]
 Sent: Tuesday, October 23, 2001 9:21 AM
 To: [EMAIL PROTECTED]
 Subject: RE: Getting the value of object in the iterate
 
 I have the same question...
 Does anyone out there know???
 
 -Original Message-
 From: michael duggan [mailto:[EMAIL PROTECTED]]
 Sent: Monday, October 22, 2001 9:19 PM
 To: [EMAIL PROTECTED]
 Subject: Getting the value of onject in the iterate
 
 If I am iterating over a collection..
   logic:iterate id=Patients name=MyForm property=Patients
 indexId=index
  bean:write name=Patients property=account.ssn
 filter=true//td
 
 /logic:iterate
 Where Patients has an account Object that has an SSN property.
 is it possible to add the following inside the iterate tag
 
 
 %=Patients.getAccount().getSsn()%The reason I ask, is I want to
 pass the SSN to Javascript in an Onclick event.
 
 Thanks.
 
 
 This message contains information which may be confidential and
 privileged. Unless you are the addressee (or authorized to receive for
 the addressee), you may not use, copy or disclose to anyone the message
 or any information contained in the message. If you have received the
 message in error, please advise the sender by reply e-mail, and delete
 or destroy the message.
 
 Thank you.
 
 This message contains information which may be confidential and privileged.
 Unless you are the addressee  (or authorized to receive for the addressee),
 you may not use, copy or disclose to anyone the message or any information
 contained in the message.  If you have received the message in error, please
 advise the sender by reply e-mail, and delete or destroy the message.
 
 Thank you.

-- Ted Husted, Husted dot Com, Fairport NY USA.
-- Custom Software ~ Technical Services.
-- Tel +1 716 737-3463
-- http://www.husted.com/struts/



using bean-include in a servlet

2001-10-23 Thread Ralf Krakowski

I want to use a servlet as a cache by using the bean-include
tag in the struts taglib. 


How do I do it in a servlet? 
I have tested it in jsp files and it works really good but I want to use it
in a servlet.
I have looked at the java code when compiling the jsp but I can figure out
how to use it.
Thanks

Ralf




Re: Initializing ArrayList used by options tag

2001-10-23 Thread Ted Husted

You should initialize the array list in the Action. Any accesses to the
model should be handled from the Action, so that the view is just handed
static data, ready to display. 

Hard won experience by legions of developers have shown that mixing the
model with the view in a Web application causes untold complications.
See the material about MVC at 

http://husted.com/struts/links.htm#mvc

-- Ted Husted, Husted dot Com, Fairport NY USA.
-- Custom Software ~ Technical Services.
-- Tel +1 716 737-3463
-- http://www.husted.com/struts/

lisa ward wrote:
 
 Hi,
 
 I have an ArrayList which I use to populate the options on one of my JSP
 pages.  Where is the best place to initialize this ArrayList?  At the moment
 I am making database calls from within my form bean, so that when the form
 is initialized the values will be present.  Should I be doing this from
 within my Action class?  I guess my question is whether or not there are any
 complications doing it the way I am doing it.
 
 Thanks alot for your speedy response.
 
 Lisa
 
 _
 Get your FREE download of MSN Explorer at http://explorer.msn.com/intl.asp



Re: AW: HOW TO span a FormBean over several JSP's

2001-10-23 Thread Will Spies/Towers Perrin




I deployed this into WebLogic 6.1 and received this error:

Parsing of JSP File '/index.jsp' failed:

 /index.jsp(2): Could not parse deployment descriptor: java.io.IOException:
cannot resolve '/WEB-INF/struts-bean.tld' into a valid tag library
probably occurred due to an error in /index.jsp line 2:
%@ taglib uri=/WEB-INF/struts-bean.tld prefix=bean %

Tue Oct 23 11:11:34 EDT 2001


Looks like the index.jsp has a bug. Should this:

%@ taglib uri=/WEB-INF/struts-bean.tld prefix=bean %
%@ taglib uri=/WEB-INF/struts-html.tld prefix=html %
%@ taglib uri=/WEB-INF/struts-logic.tld prefix=logic %

be this:

%@ taglib uri=/WEB-INF/taglibs/struts-bean.tld prefix=bean %
%@ taglib uri=/WEB-INF/taglibs/struts-html.tld prefix=html %
%@ taglib uri=/WEB-INF/taglibs/struts-logic.tld prefix=logic %


?

Will




   

   

 To: [EMAIL PROTECTED]

Ted Husted   cc: (bcc: Will Spies/Towers Perrin)   

husted@apache   Subject: Re: AW: HOW TO span a FormBean 
over several JSP's
.org  

   

10/23/01 10:53 

AM 

Please respond 

to struts-user 

   

   





http://www.husted.com/struts/resources.htm#new

storck wrote:

 Sorry, but I cant find the right link :(

 -Ursprungliche Nachricht-
 Von: Ted Husted [mailto:[EMAIL PROTECTED]]
 Gesendet: Dienstag, 23. Oktober 2001 15:24
 An: [EMAIL PROTECTED]
 Betreff: Re: HOW TO span a FormBean over several JSP's

 I just posted a new version of Struts-Simple that includes a
 conventional wizard, and an early example of using the new workflow
 gimzo with Struts.

 -- Ted Husted, Husted dot Com, Fairport NY USA.
 -- Custom Software ~ Technical Services.
 -- Tel +1 716 737-3463
 -- http://www.husted.com/struts/

 storck wrote:
 
  Hi,
 
  I am looking for an example how to span a formbean over more than one
JSP.
 I
  read that it is possible but I dont know exactly how to set up the
  struts-conf.xml
  Can anyone help?
 
  Thanks

-- Ted Husted, Husted dot Com, Fairport NY USA.
-- Custom Software ~ Technical Services.
-- Tel +1 716 737-3463
-- http://www.husted.com/struts/







RE: Initializing ArrayList used by options tag

2001-10-23 Thread Marcel Andres

Hi Lisa,

Best practice for a database access is, to hide these things in a seperate business 
object. This object can be invoked from the action class, from which you can set all 
the properties in the form bean (something like form.setProperty(...);. With this 
approach, you get a proper MVC application, and it is easier to reuse your components.

Marcel



-Original Message-
From: [EMAIL PROTECTED] [mailto:[EMAIL PROTECTED]]
Sent: Tuesday, October 23, 2001 4:47 PM
To: [EMAIL PROTECTED]
Subject: Initializing ArrayList used by options tag


Hi,

I have an ArrayList which I use to populate the options on one of my JSP 
pages.  Where is the best place to initialize this ArrayList?  At the moment 
I am making database calls from within my form bean, so that when the form 
is initialized the values will be present.  Should I be doing this from 
within my Action class?  I guess my question is whether or not there are any 
complications doing it the way I am doing it.

Thanks alot for your speedy response.

Lisa


_
Get your FREE download of MSN Explorer at http://explorer.msn.com/intl.asp



AW: AW: HOW TO span a FormBean over several JSP's

2001-10-23 Thread storck

Has someone used the workflow and wizard ?

-Ursprungliche Nachricht-
Von: Ted Husted [mailto:[EMAIL PROTECTED]]
Gesendet: Dienstag, 23. Oktober 2001 16:54
An: [EMAIL PROTECTED]
Betreff: Re: AW: HOW TO span a FormBean over several JSP's


http://www.husted.com/struts/resources.htm#new

storck wrote:

 Sorry, but I cant find the right link :(

 -Ursprungliche Nachricht-
 Von: Ted Husted [mailto:[EMAIL PROTECTED]]
 Gesendet: Dienstag, 23. Oktober 2001 15:24
 An: [EMAIL PROTECTED]
 Betreff: Re: HOW TO span a FormBean over several JSP's

 I just posted a new version of Struts-Simple that includes a
 conventional wizard, and an early example of using the new workflow
 gimzo with Struts.

 -- Ted Husted, Husted dot Com, Fairport NY USA.
 -- Custom Software ~ Technical Services.
 -- Tel +1 716 737-3463
 -- http://www.husted.com/struts/

 storck wrote:
 
  Hi,
 
  I am looking for an example how to span a formbean over more than one
JSP.
 I
  read that it is possible but I dont know exactly how to set up the
  struts-conf.xml
  Can anyone help?
 
  Thanks

-- Ted Husted, Husted dot Com, Fairport NY USA.
-- Custom Software ~ Technical Services.
-- Tel +1 716 737-3463
-- http://www.husted.com/struts/




RE: Getting the value of object in the iterate....

2001-10-23 Thread Strichartz, Beth

Ted,
Is that an html:input or straight html input.
I ask because the end tag is /
I will try this...
Beth.

-Original Message-
From: Ted Husted [mailto:[EMAIL PROTECTED]]
Sent: Tuesday, October 23, 2001 11:08 AM
To: [EMAIL PROTECTED]
Subject: Re: Getting the value of object in the iterate


How about 

input type=submit name=buttonSelected value=Get onclick=return
doSubmit('bean:write ... /'); /

instead. 

Or, you might have to expose the bean as a scripting variable before
using it in a scriptlet.

Strichartz, Beth wrote:
 
 Thanks! I got that working..
 Now I am having a problem sending to the JavaScript:
  html:submit property=buttonSelected value=Get onclick=return
 doSubmit(%= Patients.getAccount().getSsn()%); /
 
 Any ideas???
 
 Error is :
 probably occurred due to an error in /ChangeEdit.jsp line 303:
 html:submit property=buttonSelected value=Get onclick=return
 doSubmit('%=Patients.getAccount().getSsn()%'); /
 

C:\bea\wlserver6.0\config\mydomain\applications\.wl_temp_do_not_delete\WEB-I

NF\_tmp_war_myserver_myserver_middleware\jsp_servlet\_changeaddressedit.java
 :1451: ')' expected
 (No more information available, probably caused by another error)
 


 
 Full compiler error(s):

C:\bea\wlserver6.0\config\mydomain\applications\.wl_temp_do_not_delete\WEB-I

NF\_tmp_war_myserver_myserver_middleware\jsp_servlet\_changeaddressedit.java
 :1449: unclosed string literal
 
 _html_submit0.setOnclick(weblogic.utils.StringUtils.valueOf(return
 doSubmit('%= =Patients.getAccount().getSsn()) //[ /ChangeAddressEdit.jsp;
 Line: 303]
 
 
 -Original Message-
 From: Stephen Owens [mailto:[EMAIL PROTECTED]]
 Sent: Tuesday, October 23, 2001 9:53 AM
 To: [EMAIL PROTECTED]
 Subject: RE: Getting the value of object in the iterate
 
 You should be able to do this using the bean:define tag, like so,
 
   logic:iterate id=Patients name=MyForm property=Patients
 indexId=index
  bean:write name=Patients property=account.ssn
 filter=true//td
 bean:define id=Patients name=Patients
 type=com.domain.Patients/
 %= Patients.getAccount().getSsn()%
   /logic:iterate
 -Original Message-
 From: Strichartz, Beth [mailto:[EMAIL PROTECTED]]
 Sent: Tuesday, October 23, 2001 9:21 AM
 To: [EMAIL PROTECTED]
 Subject: RE: Getting the value of object in the iterate
 
 I have the same question...
 Does anyone out there know???
 
 -Original Message-
 From: michael duggan [mailto:[EMAIL PROTECTED]]
 Sent: Monday, October 22, 2001 9:19 PM
 To: [EMAIL PROTECTED]
 Subject: Getting the value of onject in the iterate
 
 If I am iterating over a collection..
   logic:iterate id=Patients name=MyForm property=Patients
 indexId=index
  bean:write name=Patients property=account.ssn
 filter=true//td
 
 /logic:iterate
 Where Patients has an account Object that has an SSN property.
 is it possible to add the following inside the iterate tag
 
 
 %=Patients.getAccount().getSsn()%The reason I ask, is I want to
 pass the SSN to Javascript in an Onclick event.
 
 Thanks.
 
 
 This message contains information which may be confidential and
 privileged. Unless you are the addressee (or authorized to receive for
 the addressee), you may not use, copy or disclose to anyone the message
 or any information contained in the message. If you have received the
 message in error, please advise the sender by reply e-mail, and delete
 or destroy the message.
 
 Thank you.
 
 This message contains information which may be confidential and
privileged.
 Unless you are the addressee  (or authorized to receive for the
addressee),
 you may not use, copy or disclose to anyone the message or any information
 contained in the message.  If you have received the message in error,
please
 advise the sender by reply e-mail, and delete or destroy the message.
 
 Thank you.

-- Ted Husted, Husted dot Com, Fairport NY USA.
-- Custom Software ~ Technical Services.
-- Tel +1 716 737-3463
-- http://www.husted.com/struts/


This message contains information which may be confidential and privileged.
Unless you are the addressee  (or authorized to receive for the addressee),
you may not use, copy or disclose to anyone the message or any information
contained in the message.  If you have received the message in error, please
advise the sender by reply e-mail, and delete or destroy the message. 

Thank you.




Re: AW: HOW TO span a FormBean over several JSP's

2001-10-23 Thread Will Spies/Towers Perrin



Correction: I deployed the scaffold.war not the Struts-Simple

( but I still have this problem )




- Forwarded by Will Spies/Towers Perrin on 10/23/01 11:16 AM -
   

   

 To: [EMAIL PROTECTED]

Will Spies   cc: [EMAIL PROTECTED]

 Subject: Re: AW: HOW TO span a FormBean 
over several JSP's(Document   
10/23/01 11:16   link: Will Spies) 

AM 

   

   






I deployed this into WebLogic 6.1 and received this error:

Parsing of JSP File '/index.jsp' failed:

 /index.jsp(2): Could not parse deployment descriptor: java.io.IOException:
cannot resolve '/WEB-INF/struts-bean.tld' into a valid tag library
probably occurred due to an error in /index.jsp line 2:
%@ taglib uri=/WEB-INF/struts-bean.tld prefix=bean %

Tue Oct 23 11:11:34 EDT 2001


Looks like the index.jsp has a bug. Should this:

%@ taglib uri=/WEB-INF/struts-bean.tld prefix=bean %
%@ taglib uri=/WEB-INF/struts-html.tld prefix=html %
%@ taglib uri=/WEB-INF/struts-logic.tld prefix=logic %

be this:

%@ taglib uri=/WEB-INF/taglibs/struts-bean.tld prefix=bean %
%@ taglib uri=/WEB-INF/taglibs/struts-html.tld prefix=html %
%@ taglib uri=/WEB-INF/taglibs/struts-logic.tld prefix=logic %


?

Will




   

   

 To: [EMAIL PROTECTED]

Ted Husted   cc: (bcc: Will Spies/Towers Perrin)   

husted@apache   Subject: Re: AW: HOW TO span a FormBean 
over several JSP's
.org  

   

10/23/01 10:53 

AM 

Please respond 

to struts-user 

   

   





http://www.husted.com/struts/resources.htm#new

storck wrote:

 Sorry, but I cant find the right link :(

 -Ursprungliche Nachricht-
 Von: Ted Husted [mailto:[EMAIL PROTECTED]]
 Gesendet: Dienstag, 23. Oktober 2001 15:24
 An: [EMAIL PROTECTED]
 Betreff: Re: HOW TO span a FormBean over several JSP's

 I just posted a new version of Struts-Simple that includes a
 conventional wizard, and an early example of using the new workflow
 gimzo with Struts.

 -- Ted Husted, Husted dot Com, Fairport NY USA.
 -- Custom Software ~ Technical Services.
 -- Tel +1 716 737-3463
 -- http://www.husted.com/struts/

 storck wrote:
 
  Hi,
 
  I am looking for an example how to span a formbean over more than one
JSP.
 I
  read that it is possible but I dont know exactly how to set up the
  struts-conf.xml
  Can anyone help?
 
  Thanks

-- Ted Husted, Husted dot Com, Fairport NY USA.
-- Custom Software ~ Technical Services.
-- Tel +1 716 737-3463
-- http://www.husted.com/struts/








Re: html:link forward question

2001-10-23 Thread Ted Husted

A page submits to an Action. If there is an ActionForm associated with
the Action, it is automatically populated and handed to the perform
method. The perform method returns an ActionForward, that could be
another Action, a  JavaServer page, or any other destination. So long as
you continue to forward, rather than redirect, everything stays in the
request.

In a model 2 / MVC framework, links are generally made to servlet
actions, and not directly to pages. The servlet actions (controller)
then select which page comes next.

lisa ward wrote:
 
 Hi,
 
 Can anyone please tell me how to achieve forwarding of one page to another
 as well as have the information in the form submitted to the form bean in
 the process.  Is this this possible or do I just have the wrong idea.
 
 Please help.
 
 Thank you for your speedy response.
 
 Lisa
 
 _
 Get your FREE download of MSN Explorer at http://explorer.msn.com/intl.asp



RE: html:link forward question

2001-10-23 Thread Marcel Andres

If I understand you right, you would like to have access to the same information on 
the next form as well. If this is what you want to do, you should define the action in 
the struts-config.xml file with the attribute scope=session. This gives you the 
chance to have access to a bean during the entire lifetime of a session.

for example:

action path=/yourpath
type=yourAction
name=yourForm
scope=session
input=yourJSP1.jsp
forward name=success path=/yourJSP2.jsp/
/action

Cheers, Marcel
 

-Original Message-
From: [EMAIL PROTECTED] [mailto:[EMAIL PROTECTED]]
Sent: Tuesday, October 23, 2001 4:57 PM
To: [EMAIL PROTECTED]
Subject: html:link forward question


Hi,

Can anyone please tell me how to achieve forwarding of one page to another 
as well as have the information in the form submitted to the form bean in 
the process.  Is this this possible or do I just have the wrong idea.

Please help.

Thank you for your speedy response.

Lisa

_
Get your FREE download of MSN Explorer at http://explorer.msn.com/intl.asp



RE: How to handle a PopUp Form from another Form?

2001-10-23 Thread Martin, Margaret

Nimmi -
In doing something similar to what you want to do I did the following:
1) Create javascript function to open a new modal window (I am only
concerned with supporting IE5.5, so using #showModalDialog works for me
2) create the link using plain ol' html, with an onClick handler that points
to my javascript function. Build the url to pass to the function using
html:rewrite which allows you to specify your forward, etc as you are
currently doing with the html:link tag
3) For the action that I open in the popup, I define both success and
failure pages. The success page contains javascript that looks for the
opener window and refreshes it, then closes the popup window.
4) using the #showModalDialog is the most effective way that I have found to
prevent the user from going back to the opener window. 

Hope this helps - 

Margaret
-Original Message-
From: Shamdasani Nimmi-ANS004 [mailto:[EMAIL PROTECTED]]
Sent: Monday, October 22, 2001 4:53 PM
To: '[EMAIL PROTECTED]'
Subject: RE: How to handle a PopUp Form from another Form?


This is what my current html:link tag looks in my originator
form(SubmitQuotes.jsp):

html:link forward=partDetails 
paramId=partNumber paramName=submitQuotesForm 
paramProperty='%= rfqList[ + i +].PartNumber %' 

where partDetails is an action class that retrieves the details for the part
from the database into an ActionForm PartForm.
The mapping for partUpdate.do will have a forward defined to part.jsp which
displays data in partForm.

1. How do I specify in above html:link that part.jsp should open up in a new
window with no location bar, tool bar,etc (The forward in mappings only
allow TARGET parameter)?

2. The form action in part.jsp would be savePartInfo.do action class which
saves part changes to database. If the partForm passes all validations I
have to save the data and close this popup window and put control back to
SubmitQuotes.jsp. How would I close the popup window in action class
savePartInfo?
 
3. If I specified inputForm=part.jsp in savePartInfo mapping, would it
correct to assume that if the partForm validations failed  the control would
return back to the popup window(part.jsp) and NOT to the SubmitQuotes.jsp? 

3. How do I make sure that while part.jsp is open the user cannot go back to
SubmitQuotes.jsp?


Hope this makes clear what I am trying to achieve.

-Nimmi

-Original Message-
From: [EMAIL PROTECTED] [mailto:[EMAIL PROTECTED]]
Sent: Monday, October 22, 2001 4:09 PM
To: [EMAIL PROTECTED]
Subject: RE: How to handle a PopUp Form from another Form?




I haven't done this before, but am not sure what the problem is.  You say
you
have an indexed link to partInfo.do, which you can bring up in a new window
using target=.  Submit etc from this window should return you to this window
if
error etc..

Where exactly is your difficulty?

Dave





Shamdasani Nimmi-ANS004 [EMAIL PROTECTED] on
10/22/2001 04:47:25 PM

Please respond to [EMAIL PROTECTED]

To:   '[EMAIL PROTECTED]'
  [EMAIL PROTECTED]
cc:(bcc: David Hay/Lex/Lexmark)
Subject:  RE: How to handle a PopUp Form from another Form?



It is an indexed link. I already know how to get the indexed link to include
the
part number.

What I want to do is:

This link should point to an action class, say partInfo.do, which
retrieves
the complete information about that part and puts it into an ActionForm and
then
forwards to a JSP in a NEW window(with no location bar,no tool bar,etc.)on
top
of the originator window.

User submits to this ActionForm have to follow the normal ActionForm
features,
i.e., bring back the part form screen in case of actionerrors. And If the
update
is successful then the part changes are to be saved to the database and the
popup window closed and user allowed to continue work on the originator
window

Until the user has successfully updated the data and the popup window is
closed,
he/she should not be able to get to the originator form.

I hope someone has handle this situation and can help me.

-Nimmi

-Original Message-
From: [EMAIL PROTECTED] [mailto:[EMAIL PROTECTED]]
Sent: Monday, October 22, 2001 3:27 PM
To: [EMAIL PROTECTED]
Subject: Re: How to handle a PopUp Form from another Form?




Perhaps you can use a indexed link which brings up the data in the popup
form.

As for the second part, could you use javascript onload function in the
original
page, which checks to see if popup exists, and if it does puts focus back on
it?

Cheers,

Dave





Shamdasani Nimmi-ANS004 [EMAIL PROTECTED] on
10/22/2001 02:50:51 PM

Please respond to [EMAIL PROTECTED]

To:   struts-user@jakarta. apache. org (E-mail)
  [EMAIL PROTECTED]
cc:(bcc: David Hay/Lex/Lexmark)
Subject:  How to handle a PopUp Form from another Form?



Hi,

I am looking for suggestions on how to handle this situation:

I have a grid form (i.e., a form with tabular data). One of the columns of
this
tabular data is PartNumber which when clicked on a row should popup a form
in
a new window bringing up 

RE: AW: HOW TO span a FormBean over several JSP's

2001-10-23 Thread Ravindran Ramaiah

Hi,

I had successfuly implemented a similar workflow organizer.
Through this architecture,
1. All the button clicks are dynamically routed. 
2. Section-ing the fields in the xml, allows to control over each field.
(change the background color/hide/enable)
3. Same JSPs can be reused for a different workflow (even if there are some
changes in the UI.  XML defines the changes).



The overview can be as in the following diagram.  

 ...OLE_Obj... 


Attached a portion of the wizard.xml I had used here.

 wizard.xml 

Is this you are referring to?

Ravi





-Original Message-
From: storck [mailto:[EMAIL PROTECTED]]
Sent: Tuesday, October 23, 2001 11:25 AM
To: [EMAIL PROTECTED]
Subject: AW: AW: HOW TO span a FormBean over several JSP's


Has someone used the workflow and wizard ?

-Ursprungliche Nachricht-
Von: Ted Husted [mailto:[EMAIL PROTECTED]]
Gesendet: Dienstag, 23. Oktober 2001 16:54
An: [EMAIL PROTECTED]
Betreff: Re: AW: HOW TO span a FormBean over several JSP's


http://www.husted.com/struts/resources.htm#new

storck wrote:

 Sorry, but I cant find the right link :(

 -Ursprungliche Nachricht-
 Von: Ted Husted [mailto:[EMAIL PROTECTED]]
 Gesendet: Dienstag, 23. Oktober 2001 15:24
 An: [EMAIL PROTECTED]
 Betreff: Re: HOW TO span a FormBean over several JSP's

 I just posted a new version of Struts-Simple that includes a
 conventional wizard, and an early example of using the new workflow
 gimzo with Struts.

 -- Ted Husted, Husted dot Com, Fairport NY USA.
 -- Custom Software ~ Technical Services.
 -- Tel +1 716 737-3463
 -- http://www.husted.com/struts/

 storck wrote:
 
  Hi,
 
  I am looking for an example how to span a formbean over more than one
JSP.
 I
  read that it is possible but I dont know exactly how to set up the
  struts-conf.xml
  Can anyone help?
 
  Thanks

-- Ted Husted, Husted dot Com, Fairport NY USA.
-- Custom Software ~ Technical Services.
-- Tel +1 716 737-3463
-- http://www.husted.com/struts/

 wizard.xml


Re: html:link forward question

2001-10-23 Thread lisa ward

Hi again,

This is my present scenario.  I have a page that contains a number of 
checkboxes, which have been rendered using the struts multibox tag.  The 
user needs to select at least one or more checkboxes before they can 
proceed.  Once at least one check box has been selected I then proceed to an 
action.  However when I do this, I notice that the checkbox values which the 
form bean have not been populated yet.  On the other hand if I do a submit 
first the values are populated just fine.  Are you saying that if I forward 
to an action that has a bean associated to it that the values within the 
form bean will be populated as a result of this.

How does this really work?

Thanks for your speedy response.

Lisa

From: Ted Husted [EMAIL PROTECTED]
Reply-To: [EMAIL PROTECTED]
To: [EMAIL PROTECTED]
Subject: Re: html:link forward question
Date: Tue, 23 Oct 2001 11:18:08 -0400

A page submits to an Action. If there is an ActionForm associated with
the Action, it is automatically populated and handed to the perform
method. The perform method returns an ActionForward, that could be
another Action, a  JavaServer page, or any other destination. So long as
you continue to forward, rather than redirect, everything stays in the
request.

In a model 2 / MVC framework, links are generally made to servlet
actions, and not directly to pages. The servlet actions (controller)
then select which page comes next.

lisa ward wrote:
 
  Hi,
 
  Can anyone please tell me how to achieve forwarding of one page to 
another
  as well as have the information in the form submitted to the form bean 
in
  the process.  Is this this possible or do I just have the wrong idea.
 
  Please help.
 
  Thank you for your speedy response.
 
  Lisa
 
  _
  Get your FREE download of MSN Explorer at 
http://explorer.msn.com/intl.asp


_
Get your FREE download of MSN Explorer at http://explorer.msn.com/intl.asp




RE: How To: Radio Buttons and Regular buttons

2001-10-23 Thread dhay



not sure why tomcat would crash on you using nightly build.  What version are
you using?  I'm using 3.3 and works fine...

Dave





L. Yeung [EMAIL PROTECTED] on 10/22/2001 09:27:57
PM

Please respond to [EMAIL PROTECTED]

To:   [EMAIL PROTECTED]
cc:(bcc: David Hay/Lex/Lexmark)
Subject:  RE: How To: Radio Buttons and Regular buttons



I ended up writing this way:

%
 Collection col =
(Collection)request.getAttribute(AttributeKeys.SuppliersLookupListKey);
 Iterator iter = col.iterator();
 while (iter.hasNext()) {
  SupplierModel model = (SupplierModel)iter.next();
  %
...
input type=radio name=selectedSupplierNo
value=%= model.getSupplierNo() %
   font face=arial
size=2%=model.getSupplierNo() %/font

%
 }

  %

Too bad that I have to resort into scriptlets. =(
I've checked out the nightly builds and it does
support the index property. But after installing,
Tomcat keeps crashing, possibly its because of the
DTDs and TLDs mixed up with the release build?

Regards,
L. Yeung


--- [EMAIL PROTECTED] wrote:


 Can't you look that up from the iteration index?

 If you want the address Id on the button, I think
 you'll have to revert to
 scriptlets (uck!).

 Dave





 Strichartz, Beth
 [EMAIL PROTECTED]
 on
 10/22/2001 05:36:45 PM

 Please respond to
 [EMAIL PROTECTED]

 To:
 [EMAIL PROTECTED]
 cc:(bcc: David Hay/Lex/Lexmark)
 Subject:  RE: How To: Radio Buttons and Regular
 buttons



 What if I am looking for more than the iterator?
 I really need the address Id...

 -Original Message-
 From: [EMAIL PROTECTED] [mailto:[EMAIL PROTECTED]]
 Sent: Monday, October 22, 2001 5:25 PM
 To: [EMAIL PROTECTED]
 Subject: RE: How To: Radio Buttons and Regular
 buttons




 The indexed property will work if you use the
 nightly build.  The name of
 the
 submit button will be suffixed with [x] where x is
 the interation index.
 You
 can then check that in your action.

 Cheers,

 Dave





 Strichartz, Beth
 [EMAIL PROTECTED]
 on
 10/22/2001 05:10:45 PM

 Please respond to
 [EMAIL PROTECTED]

 To:
 [EMAIL PROTECTED]
 cc:(bcc: David Hay/Lex/Lexmark)
 Subject:  RE: How To: Radio Buttons and Regular
 buttons




 Hi all,
 I have a similar questions.

 In my iterate I have a regular Button and I need to
 know which one was
 clicked. Therefore, I have to have a dynamic value
 generated in the iterate.
 I have tried defaulting the value to be part of the
 bean that I am iterating
 over ,
 but this has not worked for me.
 The following does not work for me...
 Any ideas on what will work??
 will the indexed property work?

   logic:iterate id=addressAccount
 name=ChangeAddressForm
 property=mapAddressAccount indexId=index
  bean:write name=addressAccount
 property=account.accountNumber
 filter=true//td
  bean:write name=addressAccount
 property=account.status
 filter=true//td
 
table width=100% border=0 height=45
 cellpadding=0
 tr
   td width=26% valign=top

 html:submit
 property=buttonSelected value='bean:write
 name=addressAccount property=address.addressId
 filter=true/' /

   /td
 /tr
   /table


   /logic:iterate
  Thanks Beth.
 -Original Message-
 From: L. Yeung [mailto:[EMAIL PROTECTED]]
 Sent: Monday, October 22, 2001 3:27 AM
 To: [EMAIL PROTECTED]
 Subject: How To: Radio Buttons


 Hi All! I need to iterate a collection of supplier
 info with radio buttons. I want the value property
 to
 have dynamic values extractd from the collection.

 logic:iterate name=user id=suppliersLookupList
 property=suppliersLookupListCollection
 ..
 html:radio name=suppliersLookupList
 property=selectedSupplierNo value=supplierNo

 bean:write name=suppliersLookupList
 property=supplierNo filter=true/
   /html:radio


 Thanks in advance.
 L.Yeung

 __
 Do You Yahoo!?
 Make a great connection at Yahoo! Personals.
 http://personals.yahoo.com


 This message contains information which may be
 confidential and privileged.
 Unless you are the addressee  (or authorized to
 receive for the addressee),
 you may not use, copy or disclose to anyone the
 message or any information
 contained in the message.  If you have received the
 message in error, please
 advise the sender by reply e-mail, and delete or
 destroy the message.

 Thank you.








 This message contains information which may be
 confidential and privileged.
 Unless you are the addressee  (or authorized to
 receive for the addressee),
 you may not use, copy or disclose to anyone the
 message or any information
 contained in the message.  If you have received the
 message in error, please
 advise the sender by reply e-mail, and delete or
 destroy the message.

 Thank you.









__
Do You Yahoo!?
Make a great connection at Yahoo! Personals.
http://personals.yahoo.com









RE: Iterate with 3 array lists (urgent)

2001-10-23 Thread dhay



To get struts to auto-populate the changes on submit, you have to use indexed
tags (either nightly build, or via scriplets) and add to your form bean a getter
to get a single object from the collection.

Cheers,

Dave





Andrew van der Voort [EMAIL PROTECTED] on 10/23/2001
12:22:22 AM

Please respond to [EMAIL PROTECTED]

To:   '[EMAIL PROTECTED]'
  [EMAIL PROTECTED]
cc:(bcc: David Hay/Lex/Lexmark)
Subject:  RE: Iterate with 3 array lists (urgent)



What I have done (and seems to work) is:

My ActionForm (I've taken out a lot of erroneous stuff for this
conversation):
public class ViewOutputClassListForm extends ActionForm implements
java.io.Serializable
{
private Collection outputClassList;
private String[]pctAllocations;

public ViewOutputClassListForm()
{
}

public void setPctAllocation( String[] allocations )
{
this.pctAllocations = allocations;
}

public Collection getOutputClassList()
{
return this.outputClassList;
}

public void setOutputClassList( Collection outputClassList )
{
this.outputClassList = outputClassList;
}
}
The outputClassList contains a bunch of OutputClassDto objects. One of
the attributes is pctAllocation, with matching get and set methods.

My jsp page:
logic:iterate id=element name=ViewOutputClassListForm
property=outputClassList indexId=index scope=session
type=myPackageName.OutputClassDto
  TR
TDbean:write name=element property=name//TD
TDformat:format name=element property=budget purpose=View
type=Currency//TD
TDformat:text name=element property=pctAllocation
purpose=Edit type=Numeric //TD
  /TR
/logic:iterate

Note that the purpose and type properties are extensions that we added
so that numbers can be formatted how we want. Ignore those.

In the validate() method of the form, after it has been submitted,
attribute pctAllocations is populated with an array of the values for
property pctAllocation.

It would have been better for the individual objects in outputClassList
to have had their set methods called to update the data but it wasn't,
and this seems to work.

Andrew









Generic selection forms

2001-10-23 Thread David Morris

Group,

I have been trying to come up with a list of options related to a 
Struts-based application. I would appreciate your ideas and 
comments.  At this point I have prototyped a few ideas and have 
not come up with a structure I am satisfied with.

I am trying to build a report/inquiry framework. I would like to be 
able to define a JSP page that takes some entry criteria and 
returns a result. I am reasonably satisfied with the flow of this 
application although I think the workflow support I have been 
reading about will really help. 

The main area I am struggling with is in building generic selection 
objects and output format descriptions. I tried a generic selection 
where every value on the screen has the same name and the type 
is passed as a parameter. This makes it difficult to validate  (entered, 
numeric, date, etc) values without a trip to the server.

The data relations and output format is described in a resource bundle. 
I take a result set and put it into a set of hash tables that allows the 
application to format the data fairly flexibly. The hash tables are set up 
as a 4d cube for report/result set/rows/columns. The main drawback has 
been that this can eat up memory and is not necessary if the user has 
not customized their view.

Finally, when I have run into some printing challenges. Most of these 
are related to the use of HTML and CSS. I cannot get page headings 
to work as I think the CSS specification says it should with IE 5.5.
I experimented with JDOM and FOP and could not get this to 
perform acceptably due to the massive memory requirements. I do 
believe that I could improve the performance if I could get FOP to 
process the input document using SAX events rather than building 
the full DOM tree. Anyone else successful doing this for a report that 
spans more than a few pages?

Thanks,

David Morris




Re: populate checkbox back to frombean

2001-10-23 Thread dhay



You have to use an indexed tag (available in nightly build, or you can do same
thing via scriptlets) so that the index of the collection is added to the name
of the checkbox - eg ListMitgliederSelektionForm[0].selected.  You also need to
add a
getListMitgliederSelektionForm(int i) in the array, which returns the bean at
index i.

Hope that helps,

Dave





Roland Berger [EMAIL PROTECTED] on
10/23/2001 08:06:59 AM

Please respond to [EMAIL PROTECTED]

To:   Struts Mailinglist
  [EMAIL PROTECTED]
cc:(bcc: David Hay/Lex/Lexmark)
Subject:  populate checkbox back to frombean



Hi all

I have searched the mailinglist for the following problem but did not find
the answer:

How is it possible to populate the state of a checkbox (checked or
unchecked) back to the corresponding property in the formbean when the user
clicks the submit button. The formbeans are stored in an ArrayList.

I have several formbeans  (same bean type) stored in an array  called
Mitglieder. One property of the formbean is called: selected
In the JSP page I have the following:

table
  logic:iterate id=ListMitgliederSelektionForm name=Mitglieder
tr
   tdbean:write name=ListMitgliederSelektionForm
property=fanum//td
   tdbean:write name=ListMitgliederSelektionForm
property=mitnum//td
   tdbean:write name=ListMitgliederSelektionForm
property=titel//td
   tdbean:write name=ListMitgliederSelektionForm property=name//td
   tdbean:write name=ListMitgliederSelektionForm
property=vorname//td
   tdbean:write name=ListMitgliederSelektionForm property=plz//td
   tdbean:write name=ListMitgliederSelektionForm property=ort//td
   tdbean:write name=ListMitgliederSelektionForm property=land//td
   td
html:checkbox property=selected
name=ListMitgliederSelektionForm value=true/
   /td
/tr
  /logic:iterate

Can struts handle this. If not how can I do that in an elegant way?


Roland Berger










Validator and Backwards Compatibility

2001-10-23 Thread Sandeep Takhar

Outside of what is defined as differences in the
revisions.html file -- what are the backwards
compatibility issues.  This is really an effort to
understand what will be required when Struts1-1 goes
final and what changes will be required.

so...

What are the backwards compatibility issues between
the nightly builds of the validator and the 7/2/2001
build for struts1-0?

From a glance at the sample applications there seems
to be a javascript difference.  In the 7/2/2001
version the javascript requires a certain variable to
be set bCancel, whereas the latest build allows you
to code this, but a simple function is necessary:

script language=javascript
!--
function submitForm(form) {
  if (form.validate.value == 0) {
return true;
  }
  if (validateSimpleForm(form)) {
form.submit.value= ...; 
return true;
  } 
  else return false;
};
// --
/script

What are the new validators that have been added?  Can
these be used in the strut1-0 compliant version or
will it not work?  What javascript additional
functionality has been added for the old validators as
well?  Basically what is a list of all changes to the
validation.xml validators and which of these can I
copy and paste into the struts1-0 compliant version?

When defining a msg parameter does the name attribute
have to be defined?

The alternative format for variables i.e.

var name= value=

does not work for struts1-0 compliant version?


- sandeep


__
Do You Yahoo!?
Make a great connection at Yahoo! Personals.
http://personals.yahoo.com



RE: Getting the value of object in the iterate....

2001-10-23 Thread Strichartz, Beth

Thanks Ted!! :)

-Original Message-
From: Strichartz, Beth [mailto:[EMAIL PROTECTED]]
Sent: Tuesday, October 23, 2001 11:17 AM
To: [EMAIL PROTECTED]
Subject: RE: Getting the value of object in the iterate


Ted,
Is that an html:input or straight html input.
I ask because the end tag is /
I will try this...
Beth.

-Original Message-
From: Ted Husted [mailto:[EMAIL PROTECTED]]
Sent: Tuesday, October 23, 2001 11:08 AM
To: [EMAIL PROTECTED]
Subject: Re: Getting the value of object in the iterate


How about 

input type=submit name=buttonSelected value=Get onclick=return
doSubmit('bean:write ... /'); /

instead. 

Or, you might have to expose the bean as a scripting variable before
using it in a scriptlet.

Strichartz, Beth wrote:
 
 Thanks! I got that working..
 Now I am having a problem sending to the JavaScript:
  html:submit property=buttonSelected value=Get onclick=return
 doSubmit(%= Patients.getAccount().getSsn()%); /
 
 Any ideas???
 
 Error is :
 probably occurred due to an error in /ChangeEdit.jsp line 303:
 html:submit property=buttonSelected value=Get onclick=return
 doSubmit('%=Patients.getAccount().getSsn()%'); /
 

C:\bea\wlserver6.0\config\mydomain\applications\.wl_temp_do_not_delete\WEB-I

NF\_tmp_war_myserver_myserver_middleware\jsp_servlet\_changeaddressedit.java
 :1451: ')' expected
 (No more information available, probably caused by another error)
 


 
 Full compiler error(s):

C:\bea\wlserver6.0\config\mydomain\applications\.wl_temp_do_not_delete\WEB-I

NF\_tmp_war_myserver_myserver_middleware\jsp_servlet\_changeaddressedit.java
 :1449: unclosed string literal
 
 _html_submit0.setOnclick(weblogic.utils.StringUtils.valueOf(return
 doSubmit('%= =Patients.getAccount().getSsn()) //[ /ChangeAddressEdit.jsp;
 Line: 303]
 
 
 -Original Message-
 From: Stephen Owens [mailto:[EMAIL PROTECTED]]
 Sent: Tuesday, October 23, 2001 9:53 AM
 To: [EMAIL PROTECTED]
 Subject: RE: Getting the value of object in the iterate
 
 You should be able to do this using the bean:define tag, like so,
 
   logic:iterate id=Patients name=MyForm property=Patients
 indexId=index
  bean:write name=Patients property=account.ssn
 filter=true//td
 bean:define id=Patients name=Patients
 type=com.domain.Patients/
 %= Patients.getAccount().getSsn()%
   /logic:iterate
 -Original Message-
 From: Strichartz, Beth [mailto:[EMAIL PROTECTED]]
 Sent: Tuesday, October 23, 2001 9:21 AM
 To: [EMAIL PROTECTED]
 Subject: RE: Getting the value of object in the iterate
 
 I have the same question...
 Does anyone out there know???
 
 -Original Message-
 From: michael duggan [mailto:[EMAIL PROTECTED]]
 Sent: Monday, October 22, 2001 9:19 PM
 To: [EMAIL PROTECTED]
 Subject: Getting the value of onject in the iterate
 
 If I am iterating over a collection..
   logic:iterate id=Patients name=MyForm property=Patients
 indexId=index
  bean:write name=Patients property=account.ssn
 filter=true//td
 
 /logic:iterate
 Where Patients has an account Object that has an SSN property.
 is it possible to add the following inside the iterate tag
 
 
 %=Patients.getAccount().getSsn()%The reason I ask, is I want to
 pass the SSN to Javascript in an Onclick event.
 
 Thanks.
 
 
 This message contains information which may be confidential and
 privileged. Unless you are the addressee (or authorized to receive for
 the addressee), you may not use, copy or disclose to anyone the message
 or any information contained in the message. If you have received the
 message in error, please advise the sender by reply e-mail, and delete
 or destroy the message.
 
 Thank you.
 
 This message contains information which may be confidential and
privileged.
 Unless you are the addressee  (or authorized to receive for the
addressee),
 you may not use, copy or disclose to anyone the message or any information
 contained in the message.  If you have received the message in error,
please
 advise the sender by reply e-mail, and delete or destroy the message.
 
 Thank you.

-- Ted Husted, Husted dot Com, Fairport NY USA.
-- Custom Software ~ Technical Services.
-- Tel +1 716 737-3463
-- http://www.husted.com/struts/


This message contains information which may be confidential and privileged.
Unless you are the addressee  (or authorized to receive for the addressee),
you may not use, copy or disclose to anyone the message or any information
contained in the message.  If you have received the message in error, please
advise the sender by reply e-mail, and delete or destroy the message. 

Thank you.


This message contains information which may be confidential and privileged.
Unless you are the addressee  (or authorized to receive for the addressee),
you may not use, copy or disclose to anyone the message or any information
contained in the message.  If you have received the message in error, 

RE: How to handle a PopUp Form from another Form?

2001-10-23 Thread Shamdasani Nimmi-ANS004

Margaret,

I appreciate your suggestion. I do have to support this functionality on all browsers. 
If it is possible, can you send me the sample code. I do have some questions but 
looking at the code would help clear some.

Thanks.

-Nimmi

-Original Message-
From: Martin, Margaret [mailto:[EMAIL PROTECTED]]
Sent: Tuesday, October 23, 2001 10:46 AM
To: '[EMAIL PROTECTED]'
Subject: RE: How to handle a PopUp Form from another Form?


Nimmi -
In doing something similar to what you want to do I did the following:
1) Create javascript function to open a new modal window (I am only
concerned with supporting IE5.5, so using #showModalDialog works for me
2) create the link using plain ol' html, with an onClick handler that points
to my javascript function. Build the url to pass to the function using
html:rewrite which allows you to specify your forward, etc as you are
currently doing with the html:link tag
3) For the action that I open in the popup, I define both success and
failure pages. The success page contains javascript that looks for the
opener window and refreshes it, then closes the popup window.
4) using the #showModalDialog is the most effective way that I have found to
prevent the user from going back to the opener window. 

Hope this helps - 

Margaret
-Original Message-
From: Shamdasani Nimmi-ANS004 [mailto:[EMAIL PROTECTED]]
Sent: Monday, October 22, 2001 4:53 PM
To: '[EMAIL PROTECTED]'
Subject: RE: How to handle a PopUp Form from another Form?


This is what my current html:link tag looks in my originator
form(SubmitQuotes.jsp):

html:link forward=partDetails 
paramId=partNumber paramName=submitQuotesForm 
paramProperty='%= rfqList[ + i +].PartNumber %' 

where partDetails is an action class that retrieves the details for the part
from the database into an ActionForm PartForm.
The mapping for partUpdate.do will have a forward defined to part.jsp which
displays data in partForm.

1. How do I specify in above html:link that part.jsp should open up in a new
window with no location bar, tool bar,etc (The forward in mappings only
allow TARGET parameter)?

2. The form action in part.jsp would be savePartInfo.do action class which
saves part changes to database. If the partForm passes all validations I
have to save the data and close this popup window and put control back to
SubmitQuotes.jsp. How would I close the popup window in action class
savePartInfo?
 
3. If I specified inputForm=part.jsp in savePartInfo mapping, would it
correct to assume that if the partForm validations failed  the control would
return back to the popup window(part.jsp) and NOT to the SubmitQuotes.jsp? 

3. How do I make sure that while part.jsp is open the user cannot go back to
SubmitQuotes.jsp?


Hope this makes clear what I am trying to achieve.

-Nimmi

-Original Message-
From: [EMAIL PROTECTED] [mailto:[EMAIL PROTECTED]]
Sent: Monday, October 22, 2001 4:09 PM
To: [EMAIL PROTECTED]
Subject: RE: How to handle a PopUp Form from another Form?




I haven't done this before, but am not sure what the problem is.  You say
you
have an indexed link to partInfo.do, which you can bring up in a new window
using target=.  Submit etc from this window should return you to this window
if
error etc..

Where exactly is your difficulty?

Dave





Shamdasani Nimmi-ANS004 [EMAIL PROTECTED] on
10/22/2001 04:47:25 PM

Please respond to [EMAIL PROTECTED]

To:   '[EMAIL PROTECTED]'
  [EMAIL PROTECTED]
cc:(bcc: David Hay/Lex/Lexmark)
Subject:  RE: How to handle a PopUp Form from another Form?



It is an indexed link. I already know how to get the indexed link to include
the
part number.

What I want to do is:

This link should point to an action class, say partInfo.do, which
retrieves
the complete information about that part and puts it into an ActionForm and
then
forwards to a JSP in a NEW window(with no location bar,no tool bar,etc.)on
top
of the originator window.

User submits to this ActionForm have to follow the normal ActionForm
features,
i.e., bring back the part form screen in case of actionerrors. And If the
update
is successful then the part changes are to be saved to the database and the
popup window closed and user allowed to continue work on the originator
window

Until the user has successfully updated the data and the popup window is
closed,
he/she should not be able to get to the originator form.

I hope someone has handle this situation and can help me.

-Nimmi

-Original Message-
From: [EMAIL PROTECTED] [mailto:[EMAIL PROTECTED]]
Sent: Monday, October 22, 2001 3:27 PM
To: [EMAIL PROTECTED]
Subject: Re: How to handle a PopUp Form from another Form?




Perhaps you can use a indexed link which brings up the data in the popup
form.

As for the second part, could you use javascript onload function in the
original
page, which checks to see if popup exists, and if it does puts focus back on
it?

Cheers,

Dave





Shamdasani Nimmi-ANS004 [EMAIL PROTECTED] on
10/22/2001 02:50:51 PM

Please 

Multiple web.xml's?

2001-10-23 Thread dhay



Does anyone know if it is possible to use multiple modularized web.xml files
(similar to multiple struts-config.xml files) ie Tomcat will read all web.xml
files and merge them together?

Cheers,

Dave






RE: PrePopulating a form

2001-10-23 Thread Dave Remy

I am doing this (doing the GET to the action class to prepopulate the form)
and it works well but there was one interesting thing that happened
(assuming I have everything set up right).  The validate() method in the
related form bean was called as well.  Consequently, I am having to start
all of my validate() methods with:
if (request.getParamater(submit) == null) 
so that I don't do edit checking on a GET ...  No big deal, but am I missing
something?

-Original Message-
From: Ted Husted [mailto:[EMAIL PROTECTED]]
Sent: Tuesday, October 09, 2001 9:01 PM
To: [EMAIL PROTECTED]
Subject: Re: PrePopulating a form


The trick is to route control through an Action before display any JSP.
The Action does all the real work, like populating the form. The JSP
just displays the result.

http://jakarta.apache.org/struts/userGuide/building_controller.html

-- Ted Husted, Husted dot Com, Fairport NY USA.
-- Custom Software ~ Technical Services.
-- Tel +1 716 737-3463
-- http://www.husted.com/struts/

Minh Tran wrote:
 
 Could somebody let me know what the correct design pattern under struts is
 for prepopulating a form with data.. let say.. for example after someone
 logs on.. so a form is automattically filled out with their appropriate
data
 for certain fields.. while some fields still need to be filled out..  I've
 got the validation and error handling part down..
 
 Of course the obvious way to do this.. to my limited knowledge of struts
is
 to some how create the form bean and populate it before is is displayed
 through the JSP... which I think will automatically retreive whatever data
 that's in the form bean..  but i'm still not sure how to make struts creat
 the form bean before the form gets display.. it seems that the form beans
 gets created after the form is submitted so that it can be validated..
 
 Thanks,
 Minh Tran



Knowing where you came from

2001-10-23 Thread Eric Rizzo

In an Action, is there a way to determine if the request is coming from a 
forward from another Action or from an external request?  I've thought about 
storing in the session the last known request object and then comparing against 
it every time any of my actions perform() get called to see if the current 
request is the same as the last known request.  But this feels clunky.
Are there any other ways to know where the request is coming from?

Eric
-- 
Eric Rizzo, Software Engineer
OpenNetwork Technologies
http://www.opennetwork.com
-
I embrace my personality flaws, for without them
I might have no personality at all.




24/7 availability

2001-10-23 Thread David Morris

Group,

Another question, which is not entirely Struts related. We recently implemented a 
system that relies heavily on Struts in a 24/7 environment. Right now we have some 
opportunities to cycle Tomcat 3.2.3, which is what we are running Struts on.  In the 
future those opportunities will get further apart. At that point, we will only be able 
to stop and restart individual applications. Struts seems to have some problems with 
objects disappearing, especially forms. 

Has anyone implemented a mechanism that facilitates reloading of individual 
applications? If not does anyone have any suggestions on where I might begin 
implementing this type of support?

Thanks,

David Morris




Re: Knowing where you came from

2001-10-23 Thread martin . cooper

If you only want to know when an action is reached from another action, you 
can have the first action set an arbitrary request attribute before 
forwarding, and have the second action check for the existence of that 
attribute. Request attributes will live across forwards, but not across 
separate external requests.

--
Martin Cooper


At 10:20 AM 10/23/01, [EMAIL PROTECTED] wrote:
In an Action, is there a way to determine if the request is coming from a 
forward from another Action or from an external request?  I've thought 
about storing in the session the last known request object and then 
comparing against it every time any of my actions perform() get called to 
see if the current request is the same as the last known request.  But 
this feels clunky.
Are there any other ways to know where the request is coming from?

 Eric
--
Eric Rizzo, Software Engineer
OpenNetwork Technologies
http://www.opennetwork.com
-
I embrace my personality flaws, for without them
I might have no personality at all.





Re: Testing within Struts Framework

2001-10-23 Thread Vincent Massol



- Original Message -
From: David Boardman [EMAIL PROTECTED]
To: [EMAIL PROTECTED]
Sent: Tuesday, October 23, 2001 2:38 PM
Subject: RE: Testing within Struts Framework


 We have been using ant (http://jakarta.apache.org/ant/) to do a nightly
 build of all of our classes and ejbs and then deploy them to an instance
of
 Orion application server.

 For each bean we write we write a corresponding JUnit test class that is
 named by prefixing the name of the bean with Test (so the Customer bean
 would have a corresponding TestCustomer class).


how do you test code that uses the Servlet API  for example (or Struts) ?

 The final step was to write a Perl script that performs the following
steps.
 1)Shuts down the test instance of Orion
 2)Checks the latest version of the application out of CVS
 3)Runs our ANT script to build and deploy the classes and Beans to Orion.
 4)Starts Orion
 5)Runs all of the junit Test classes (see above).
 6)Emails a log of all compile and test failures to the development team.

you don't need perl for that ... :) All of this can be done within Ant (this
is actually how it is done in Cactus - http://jakarta.apache.org/cactus)


 We run this script (called the Nun) on a nightly basis.  This automated
 build-deploy-test process (very XP in conception) has led to much better
 code, immediate notification of both compile time and integration errors,
 and has made our team development environment possible.

I agree 100%. I also do that for all the projects I work on !


 We are doing our front end testing using a product called E-Tester
developed
 by Empirix

(http://www.empirix.com/Empirix/web+test+monitoring/products/functional+test
 ing.html).  We looked into open source options but the only one we found
was
 HTTPUnit http://httpunit.sourceforge.net/.  We found this to be more
 complicated to use as you have to write code for the tests.  Since we have
a
 non-coder developing the front end test suites, this approach would not
have
 worked for us.  We have had great success with E-Tester.

 Dave Boardman
 Integral7

 -Original Message-
 From: [EMAIL PROTECTED] [mailto:[EMAIL PROTECTED]]On Behalf Of
 Barry Nauta
 Sent: Tuesday, October 23, 2001 8:00 AM
 To: [EMAIL PROTECTED]
 Subject: Testing within Struts Framework


 I am currently looking at how to test my EJBs within Struts.
 I have been reading about JUnit, Cactus (
 http://jakarta.apache.org/cactus/ ), MockObjects etc.

 I would like to go as far as implementing mouseclicks within the webpage
 to simulate user-interaction.

 Any suggestions/comments/known pitfalls?

 Barry
 --
 Whatever you do will be insignificant, but it is very important that you
 do it -- Mahatma Ghandi






Re: Validator and Backwards Compatibility

2001-10-23 Thread Sandeep Takhar

thanks for the reply,

I just tried the 9/25/2001 release and used the
validator.war file as a starting point.  All I did
after that was delete the struts.jar and replace with
struts1-0.jar.  This does not work.  Maybe I am doing
something wrong?  The error is about ActionMessages
which is in the nightly build but not the struts1-0
release.

- sandeep
--- David Winterfeldt [EMAIL PROTECTED] wrote:
 
 --- Sandeep Takhar [EMAIL PROTECTED] wrote:
  Outside of what is defined as differences in the
  revisions.html file -- what are the backwards
  compatibility issues.  This is really an effort to
  understand what will be required when Struts1-1
 goes
  final and what changes will be required.
 I don't know when Struts 1.1 will go final so it is
 hard to say what features will be added between now
 and then.
 
  
  so...
  
  What are the backwards compatibility issues
 between
  the nightly builds of the validator and the
 7/2/2001
  build for struts1-0?
 The revision notes cover most things.  I'm aware of
 at
 least one person running a nightly build release of
 the Validator with Struts 1.0.  The commons packages
 (beans, collections, digester) are being used so
 they
 would need to be added.  Otherwise a nightly build
 of
 the Validator should work OK with Struts 1.0, but I
 haven't tested this.
 
  
  From a glance at the sample applications there
 seems
  to be a javascript difference.  In the 7/2/2001
  version the javascript requires a certain variable
  to
  be set bCancel, whereas the latest build allows
  you
  to code this, but a simple function is necessary:
 This shouldn't be required.  You don't need to add
 this javascript.  It just gives you a way to turn
 off
 the javascript validations for the cancel button (or
 any other button you don't want validation run on).
 
  
  script language=javascript
  !--
  function submitForm(form) {
if (form.validate.value == 0) {
  return true;
}
if (validateSimpleForm(form)) {
  form.submit.value= ...; 
  return true;
} 
else return false;
  };
  // --
  /script
  
  What are the new validators that have been added? 
  Can
  these be used in the strut1-0 compliant version or
  will it not work?  What javascript additional
  functionality has been added for the old
 validators
  as
  well?  Basically what is a list of all changes to
  the
  validation.xml validators and which of these can I
  copy and paste into the struts1-0 compliant
 version?
 The revision list covers most changes.  The new min
 and max length validators could be cut and paste
 into
 the 7/2/2001 release.  I'm thinking about making a
 few
 updates (min/max and any bug fixes) to the 7/2/2001
 release and making it a version 1.0 release.
 
  
  When defining a msg parameter does the name
  attribute
  have to be defined?
 Yes.
 
  
  The alternative format for variables i.e.
  
  var name= value=
  
  does not work for struts1-0 compliant version?
 I don't remember if you can still use this format or
 not, but you should really use the nested element
 structure.  This was changed so you could use cdata
 tags around a regular expression and not have to
 escape anything out.
 
 David
 
  
  
  - sandeep
  
  
  __
  Do You Yahoo!?
  Make a great connection at Yahoo! Personals.
  http://personals.yahoo.com
 
 
 __
 Do You Yahoo!?
 Make a great connection at Yahoo! Personals.
 http://personals.yahoo.com


__
Do You Yahoo!?
Make a great connection at Yahoo! Personals.
http://personals.yahoo.com



Re: PrePopulating a form

2001-10-23 Thread Ted Husted

Checking for a submit control in the request is very clever. Another
approach would be to setup an alternate ActionMapping with
validate=false. This could either lead to a separate Action that
prepopulated the form, or a task in the same Action, queued by a hidden
property or the parameter property from the mappig. (I tend to do the
latter.)

Even when a form does not need to be prepopulated, I would queuing it
through a mapping, even it just forwards to a JSP. 

action 
path=/Input
forward=/pages/Input.jsp
/action

This gives you the opportunity to interpose an action later, should one
be needed, and keeps the entry points documented in the struts-config.


-- Ted Husted, Husted dot Com, Fairport NY USA.
-- Custom Software ~ Technical Services.
-- Tel +1 716 737-3463
-- http://www.husted.com/struts/


Dave Remy wrote:
 
 I am doing this (doing the GET to the action class to prepopulate the form)
 and it works well but there was one interesting thing that happened
 (assuming I have everything set up right).  The validate() method in the
 related form bean was called as well.  Consequently, I am having to start
 all of my validate() methods with:
 if (request.getParamater(submit) == null)
 so that I don't do edit checking on a GET ...  No big deal, but am I missing
 something?
 
 -Original Message-
 From: Ted Husted [mailto:[EMAIL PROTECTED]]
 Sent: Tuesday, October 09, 2001 9:01 PM
 To: [EMAIL PROTECTED]
 Subject: Re: PrePopulating a form
 
 The trick is to route control through an Action before display any JSP.
 The Action does all the real work, like populating the form. The JSP
 just displays the result.
 
 http://jakarta.apache.org/struts/userGuide/building_controller.html
 
 -- Ted Husted, Husted dot Com, Fairport NY USA.
 -- Custom Software ~ Technical Services.
 -- Tel +1 716 737-3463
 -- http://www.husted.com/struts/
 
 Minh Tran wrote:
 
  Could somebody let me know what the correct design pattern under struts is
  for prepopulating a form with data.. let say.. for example after someone
  logs on.. so a form is automattically filled out with their appropriate
 data
  for certain fields.. while some fields still need to be filled out..  I've
  got the validation and error handling part down..
 
  Of course the obvious way to do this.. to my limited knowledge of struts
 is
  to some how create the form bean and populate it before is is displayed
  through the JSP... which I think will automatically retreive whatever data
  that's in the form bean..  but i'm still not sure how to make struts creat
  the form bean before the form gets display.. it seems that the form beans
  gets created after the form is submitted so that it can be validated..
 
  Thanks,
  Minh Tran



Re: AW: HOW TO span a FormBean over several JSP's

2001-10-23 Thread Ted Husted

On the Scaffold index page, it should actually be 

 %@ taglib uri=/tags/struts-bean.tld prefix=bean %
 %@ taglib uri=/tags/struts-html.tld prefix=html %
 %@ taglib uri=/tags/struts-logic.tld prefix=logic %

Though, there really isn't any functionality in the Scaffold package
right now. It's just being used to as a utility class (something like
commons-beanutils). Eventually, there would be a test suite, but this is
all very early release. The scaffold.jar is used by Artimus.

-- Ted Husted, Husted dot Com, Fairport NY USA.
-- Custom Software ~ Technical Services.
-- Tel +1 716 737-3463
-- http://www.husted.com/struts/


Will Spies/Towers Perrin wrote:
 
 I deployed this into WebLogic 6.1 and received this error:
 
 Parsing of JSP File '/index.jsp' failed:
 
  /index.jsp(2): Could not parse deployment descriptor: java.io.IOException:
 cannot resolve '/WEB-INF/struts-bean.tld' into a valid tag library
 probably occurred due to an error in /index.jsp line 2:
 %@ taglib uri=/WEB-INF/struts-bean.tld prefix=bean %
 
 Tue Oct 23 11:11:34 EDT 2001
 
 Looks like the index.jsp has a bug. Should this:
 
 %@ taglib uri=/WEB-INF/struts-bean.tld prefix=bean %
 %@ taglib uri=/WEB-INF/struts-html.tld prefix=html %
 %@ taglib uri=/WEB-INF/struts-logic.tld prefix=logic %
 
 be this:
 
 %@ taglib uri=/WEB-INF/taglibs/struts-bean.tld prefix=bean %
 %@ taglib uri=/WEB-INF/taglibs/struts-html.tld prefix=html %
 %@ taglib uri=/WEB-INF/taglibs/struts-logic.tld prefix=logic %
 
 ?
 
 Will
 
 
 
  To: [EMAIL PROTECTED]
 Ted Husted   cc: (bcc: Will Spies/Towers Perrin)
 husted@apache   Subject: Re: AW: HOW TO span a FormBean 
over several JSP's
 .org
 
 10/23/01 10:53
 AM
 Please respond
 to struts-user
 
 
 
 http://www.husted.com/struts/resources.htm#new
 
 storck wrote:
 
  Sorry, but I cant find the right link :(
 
  -Ursprungliche Nachricht-
  Von: Ted Husted [mailto:[EMAIL PROTECTED]]
  Gesendet: Dienstag, 23. Oktober 2001 15:24
  An: [EMAIL PROTECTED]
  Betreff: Re: HOW TO span a FormBean over several JSP's
 
  I just posted a new version of Struts-Simple that includes a
  conventional wizard, and an early example of using the new workflow
  gimzo with Struts.
 
  -- Ted Husted, Husted dot Com, Fairport NY USA.
  -- Custom Software ~ Technical Services.
  -- Tel +1 716 737-3463
  -- http://www.husted.com/struts/
 
  storck wrote:
  
   Hi,
  
   I am looking for an example how to span a formbean over more than one
 JSP.
  I
   read that it is possible but I dont know exactly how to set up the
   struts-conf.xml
   Can anyone help?
  
   Thanks
 
 -- Ted Husted, Husted dot Com, Fairport NY USA.
 -- Custom Software ~ Technical Services.
 -- Tel +1 716 737-3463
 -- http://www.husted.com/struts/



Re: PoolMan JNDI probs

2001-10-23 Thread A. S. Drury




thanks for feedback, ted. i copied 
examplecode very much like that from a previous post of yours  
incorporated it into my struts code. however, it doesn't use jndi, right? am i 
missing something here?


RE: 24/7 availability

2001-10-23 Thread Zeltser, Mark

Migrate to Tomcat4, you can reload individual applications there.

Mark.

 -Original Message-
 From: David Morris [SMTP:[EMAIL PROTECTED]]
 Sent: Tuesday, October 23, 2001 2:31 PM
 To:   [EMAIL PROTECTED]
 Subject:  24/7 availability
 
 Group,
 
 Another question, which is not entirely Struts related. We recently
 implemented a system that relies heavily on Struts in a 24/7 environment.
 Right now we have some opportunities to cycle Tomcat 3.2.3, which is what
 we are running Struts on.  In the future those opportunities will get
 further apart. At that point, we will only be able to stop and restart
 individual applications. Struts seems to have some problems with objects
 disappearing, especially forms. 
 
 Has anyone implemented a mechanism that facilitates reloading of
 individual applications? If not does anyone have any suggestions on where
 I might begin implementing this type of support?
 
 Thanks,
 
 David Morris
 


--
This message is intended only for the personal and confidential use of the designated 
recipient(s) named above.  If you are not the intended recipient of this message you 
are hereby notified that any review, dissemination, distribution or copying of this 
message is strictly prohibited.  This communication is for information purposes only 
and should not be regarded as an offer to sell or as a solicitation of an offer to buy 
any financial product, an official confirmation of any transaction, or as an official 
statement of Lehman Brothers.  Email transmission cannot be guaranteed to be secure or 
error-free.  Therefore, we do not represent that this information is complete or 
accurate and it should not be relied upon as such.  All information is subject to 
change without notice.





Validator and Struts 1.0

2001-10-23 Thread Sandeep Takhar

sorry David, but I accidentally deleted the thread
that was started from my mail.

I think that having a final release of validator for
release 1.0 of struts is a great idea.

One thing that you mentioned is that using bCancel as
a javascript variable is optional.  How to do this
using the 7/2/2001 release?

The code in JavaScriptValidatorTag.java in the
getJavascriptBegin method adds this variable:

   sb.append(!-- Begin \n);
   sb.append(\n var bCancel = false; \n\n);

Is it possible that when you make the final release --
that you can make this compatible with the current
nightly builds as well.  

In the 7/2/2001 release one defines the buttons as
follows:

html:submit property=submit
onclick=bCancel=false;
 bean:message key=button.save/
  /html:submit
  nbsp;
  html:reset
 bean:message key=button.reset/
  /html:reset
  nbsp;
  html:cancel onclick=bCancel=true;
 bean:message key=button.cancel/
  /html:cancel

whereas in the nightly builds it seems like you need
to define a separate function to handle the variable
that you define:

script language=javascript
!--
function submitForm(form) {
  if (form.validate.value == 0) {
return true;
  }
  if (validateSimpleForm(form)) {
form.submit.value= ...; 
return true;
  } 
  else return false;
};
// --
/script

and then define the buttons as follows:

input type=hidden name=validate
value=0html:submit
onclick=this.form.validate.value='1';ENTER/html:submitnbsp;html:cancel
onclick=this.form.validate.value='0';CANCEL/html:cancel

Are my assumptions wrong?

You seem to have indicated that they are.  How can I
get these two to be compatible with each other.

thanks for taking the time

- Sandeep

__
Do You Yahoo!?
Make a great connection at Yahoo! Personals.
http://personals.yahoo.com



Re: Validator and Backwards Compatibility

2001-10-23 Thread David Winterfeldt

I started upgrading the example to use some JSP tags
(logic:messagesPresent  html:messages) in the Struts
nightly build, but if you take out those references it
should probably work.  

David

--- Sandeep Takhar [EMAIL PROTECTED] wrote:
 thanks for the reply,
 
 I just tried the 9/25/2001 release and used the
 validator.war file as a starting point.  All I did
 after that was delete the struts.jar and replace
 with
 struts1-0.jar.  This does not work.  Maybe I am
 doing
 something wrong?  The error is about ActionMessages
 which is in the nightly build but not the struts1-0
 release.
 
 - sandeep
 --- David Winterfeldt [EMAIL PROTECTED]
 wrote:
  
  --- Sandeep Takhar [EMAIL PROTECTED]
 wrote:
   Outside of what is defined as differences in the
   revisions.html file -- what are the backwards
   compatibility issues.  This is really an effort
 to
   understand what will be required when Struts1-1
  goes
   final and what changes will be required.
  I don't know when Struts 1.1 will go final so it
 is
  hard to say what features will be added between
 now
  and then.
  
   
   so...
   
   What are the backwards compatibility issues
  between
   the nightly builds of the validator and the
  7/2/2001
   build for struts1-0?
  The revision notes cover most things.  I'm aware
 of
  at
  least one person running a nightly build release
 of
  the Validator with Struts 1.0.  The commons
 packages
  (beans, collections, digester) are being used so
  they
  would need to be added.  Otherwise a nightly build
  of
  the Validator should work OK with Struts 1.0, but
 I
  haven't tested this.
  
   
   From a glance at the sample applications there
  seems
   to be a javascript difference.  In the 7/2/2001
   version the javascript requires a certain
 variable
   to
   be set bCancel, whereas the latest build
 allows
   you
   to code this, but a simple function is
 necessary:
  This shouldn't be required.  You don't need to add
  this javascript.  It just gives you a way to turn
  off
  the javascript validations for the cancel button
 (or
  any other button you don't want validation run
 on).
  
   
   script language=javascript
   !--
   function submitForm(form) {
 if (form.validate.value == 0) {
   return true;
 }
 if (validateSimpleForm(form)) {
   form.submit.value= ...; 
   return true;
 } 
 else return false;
   };
   // --
   /script
   
   What are the new validators that have been
 added? 
   Can
   these be used in the strut1-0 compliant version
 or
   will it not work?  What javascript additional
   functionality has been added for the old
  validators
   as
   well?  Basically what is a list of all changes
 to
   the
   validation.xml validators and which of these can
 I
   copy and paste into the struts1-0 compliant
  version?
  The revision list covers most changes.  The new
 min
  and max length validators could be cut and paste
  into
  the 7/2/2001 release.  I'm thinking about making a
  few
  updates (min/max and any bug fixes) to the
 7/2/2001
  release and making it a version 1.0 release.
  
   
   When defining a msg parameter does the name
   attribute
   have to be defined?
  Yes.
  
   
   The alternative format for variables i.e.
   
   var name= value=
   
   does not work for struts1-0 compliant version?
  I don't remember if you can still use this format
 or
  not, but you should really use the nested element
  structure.  This was changed so you could use
 cdata
  tags around a regular expression and not have to
  escape anything out.
  
  David
  
   
   
   - sandeep
   
   
  
 __
   Do You Yahoo!?
   Make a great connection at Yahoo! Personals.
   http://personals.yahoo.com
  
  
  __
  Do You Yahoo!?
  Make a great connection at Yahoo! Personals.
  http://personals.yahoo.com
 
 
 __
 Do You Yahoo!?
 Make a great connection at Yahoo! Personals.
 http://personals.yahoo.com


__
Do You Yahoo!?
Make a great connection at Yahoo! Personals.
http://personals.yahoo.com



Re: Problem with iterate tag

2001-10-23 Thread Brian Holzer

John,
I am doing the same thing and this is how I am coding it.

  strutslogic:iterate name=UserCollection id=user 
   tr class=body
td nbsp; nbsp; nbsp;
 strutshtml:link href=edituser.do
  paramId=APP_USER_ID
  paramName=user
  paramProperty=APP_USER_ID
  strutsbean:write name=user property=APP_USER_ID /:
  strutsbean:write name=user property=FIRST_NAME /
   nbsp;
  strutsbean:write name=user property=LAST_NAME /
 /strutshtml:link  
/td
   /tr
  /strutslogic:iterate

Where UserCollection is the key that I saved my  ArrayList of UserBeans ( with 
get/set for properties like APP_USER_ID, FIRST_NAME and LAST_NAME ) to the request 
with. 

Brian
 [EMAIL PROTECTED] 10/23/01 07:55am 

I have a collection (an ArrayList) that I stored in the request scope in an
action class:

request.setAttribute(trans, transactions);

In my JSP, I am attempting to use the iterate tag to access this collection
and iterate over the contents (the collection contains
com.juniper.app.site.databean.TransactionBean instances).

No matter what technique or options I use for the iterate tag, I get no
iteration on this collection.  Can someone enlighten me on how to get this
tag to work properly with a collection stored in the request scope?   Can
the tag be used in this manner, or does the collection need to be a property
of another bean?

FYI: When using plain scriptlet code, the iteration works fine, the iterate
tag usage is the problem.

Thanks for the assistance.

John




___ 

Juniper Bank 
Rated #1 in Customer Confidence 
Gomez Inc., Summer 2001 Internet Credit Card Scorecard 
www.juniper.com 
___ 

This e-mail and any files transmitted with it may contain confidential
and/or proprietary information. It is intended solely for the use of the
individual or entity who is the intended recipient. Unauthorized use of this
information is prohibited. If you have received this in error, please
contact the sender by replying to this message and delete this material from
any system it may be on.




RE: Auto-generating ActionForms

2001-10-23 Thread Stephen Hood

David -- 

Thanks very much for the reply.  I grabbed a recent nightly build and am now
using the indexed tag functionality; it is a very helpful addition.
However, I still find myself needing to write custom Actions to handle
manipulation of complex documents (i.e. adding another item to a nested
collection, etc.).  From Ted Husted's note, it sounds like this
functionality is further down the road.  If I end up writing anything useful
along these lines I will let everyone know...

regards,
--Steve


 -Original Message-
 From: David Winterfeldt [mailto:[EMAIL PROTECTED]]
 Sent: Monday, October 22, 2001 2:00 PM
 To: [EMAIL PROTECTED]
 Subject: Re: Auto-generating ActionForms
 
[...]
  2.  Has anyone had any experience dealing with
  complex ActionForms, such as
  those derived from a XML Schema?  It seems like the
  Struts taglibs are more
  about handling relatively flat documents; can anyone
  suggest other
  approaches for doing things like generating and
  handling forms with optional
  repeating groups, etc.?
 You can have nested properties if you aren't aware of
 that.  So for a property you could have address.name
 and this would be the equivalent of
 getAddress().getName().  (address[2].name -
 retrieve object from array and then call getName()) 
 So this can let you have different beans nested inside
 each other.
 
 Dave Hays has added the functionality of indexed
 functionality for tags.  This lets you reference
 anything the logic:iterator tag can loop through and
 generate the correct indexed property name
 dynamically.  It is in the nightly builds or you can
 download it here. 
 http://www.husted.com/struts/resources/indexed-tags.htm
 
 
 logic:iterate id=listElement name=newsscanForm
 property=listElementList indexId=index
 td align=right valign=center
html:text indexed=true name=listElement
 property=position size=2 maxlength=2/
 /td
 /logic:iterate
 
 public List getListElementList();
 public Object getListElement(int index);
 public void setListElement(int index, Object value);
 
 David



What is proper way to determine ActionForm type?

2001-10-23 Thread Stephen Hood

I am trying to write a generic Action class that I can use with any
ActionForm to add an item to any collection property it may contain.  For
example, if I had two ActionForms which each contain a collection (say
AddressList and ProductList), I could call the same Action with either
form, pass it the name of the collection, and have it add a new item to it,
passing control back to the calling View.

In order to make it generic, I want the class to figure out the ActionForm
type specified in the mapping, recast the generic ActionForm as the proper
type, and then add another item to the collection indicated by a passed
request attribute.

To dynamically determine the ActionForm type, I'm trying to use the
equivalent of ActionMapping.getFormClass(), which has been deprecated.  The
suggested alternative is to use ActionMapping.getName() and then use it to
look-up the ActionFormBean.  It seems the way to do this is to use
ActionFormBeans.findFormBean(String beanName).  However, the following code
returns a null ActionFormBean.

  String formBeanName = mapping.getName();
  ActionFormBeans actionFormBeans = new ActionFormBeans();
  ActionFormBean theFormBean = actionFormBeans.findFormBean(formBeanName);

I assume that my ActionFormBeans object itself is empty and I am not
creating or populating it properly, but I could not find details in the
Struts javadoc.

Is this the correct approach?

thanks for any suggestions,
--Steve






Re: PoolMan JNDI probs

2001-10-23 Thread Ted Husted

Poolman supports JNDI, but doesn't require it.

 A. S. Drury wrote:
 
 thanks for feedback, ted. i copied example code very much like that
 from a previous post of yours  incorporated it into my struts code.
 however, it doesn't use jndi, right? am i missing something here?



Re: [ANNOUNCE] Fast Track to MVC / JSP Framework Public Workshop

2001-10-23 Thread Vic Cekvenich

Cool. I am real glad Struts is spreading. baseBeans.net courseware is
more than 250 text pages (not slides), 6 months in making, not sure if
that is a differentiator. It is on Struts 1.1 w/Tomcat4 and J2EE and
talks about some good development designs using Struts; people have
already signed up at http://www.baseBeans.net. I was talking to
Bravepoint to see if they would use baseBeans courseware.
We will remove the offending reference bellow; my bad, please let us
know if there is something else amiss in marketing, from this point on.
There was some Java rags ads that went out for Nov. issue, too late for
them to change. (I am more interested in selling courseware to others,
and my web site says that I will not teach in cities that have an active
public instructor).

Competition is good thing, and one of the benefits of open standards,
you are not locked in to a single provider. :-) That is why I use it to
build applications. Sign up to one of the 3.


 *Master Struts in three Days!*


 Join our workshop and discover how the MVC/J2EE platform provides a
 number of benefits for organizations developing intranet and Internet
 applications. MVC designs require that you separate the presentation
 tier from the data access tier and your application be the 3rd tier.

 For more on MVC click on:

 http://java.sun.com/j2ee/blueprints/introduction/summary/index.html


 This is the first MVC and JSP public training class. The framework we
 will be learning is open standard Struts. For more on Struts and
 related technologies, click on:

 http://jakarta.apache.org


 You will master Struts in three days in Dallas (
 http://www.wyndham.com/Anatole), starting Dec. 2nd. This class is for
 trainers who will teach this class in the future, but a limited
 number of students are also permitted.

 Trainers will be able to establish themselves as leaders in the
 upcoming technology. Students will upgrade their skills and become
 more marketable as well as learn proper development techniques.

 For more information, including a list of topics and details on
 registration, please click on:

 http://www.basebean.com


 What Will be Covered:

 * DB Connection /Warm-up with JDBC and RowSet

 * Test Framework and RDBMS, Install Struts

 * Retrieving Data from SQL to Struts

 * OO Based Development and Extension

 * Drill Down from Screen-to-Screen

 * Data Entry Crud, Update, Insert and Delete

 * Master Detail Processing

 * Security Based on DB Roles

 * Portal Tiles (build real portal applications w/ layout for
 headers and footers)

 * Menu - Build a Struts Menu for Navigation

 * Deployment


 You will discover why flexibility is enhanced by using MVC/J2EE
 architecture in conjunction with a SQL database. This is the first
 and only public MVC/JSP class of its kind. We will learn to utilize
 applied technology toward solving business problems.

 / Open standards are an alternative to MS .NET./









Re: What is proper way to determine ActionForm type?

2001-10-23 Thread martin . cooper

You need to get the form bean data from the servlet, like this:

ActionFormBean theFormBean = getServlet().findFormBean(formBeanName);

--
Martin Cooper


At 02:02 PM 10/23/01, Stephen Hood wrote:
I am trying to write a generic Action class that I can use with any
ActionForm to add an item to any collection property it may contain.  For
example, if I had two ActionForms which each contain a collection (say
AddressList and ProductList), I could call the same Action with either
form, pass it the name of the collection, and have it add a new item to it,
passing control back to the calling View.

In order to make it generic, I want the class to figure out the ActionForm
type specified in the mapping, recast the generic ActionForm as the proper
type, and then add another item to the collection indicated by a passed
request attribute.

To dynamically determine the ActionForm type, I'm trying to use the
equivalent of ActionMapping.getFormClass(), which has been deprecated.  The
suggested alternative is to use ActionMapping.getName() and then use it to
look-up the ActionFormBean.  It seems the way to do this is to use
ActionFormBeans.findFormBean(String beanName).  However, the following code
returns a null ActionFormBean.

   String formBeanName = mapping.getName();
   ActionFormBeans actionFormBeans = new ActionFormBeans();
   ActionFormBean theFormBean = actionFormBeans.findFormBean(formBeanName);

I assume that my ActionFormBeans object itself is empty and I am not
creating or populating it properly, but I could not find details in the
Struts javadoc.

Is this the correct approach?

thanks for any suggestions,
--Steve





Re: What is proper way to determine ActionForm type?

2001-10-23 Thread Ted Husted

I'd consider using some type of polymorphism, where all of these
ActionForms share a common ancestor, with a known method, like
addItem(object), that would act as a wrapper. Each ActionForm could then
override addItem to call whatever list is appropriate. 

ProductList extends ActionList
 addItem(addProductItem(o)) ; 
AddressList extends ActionList
 addItem(addAddressItem(o)); 

In your framework Action, you could then just cast as the ancestor
method and call the overridden method

ActionList actionList = (ActionList) form; 

actionList.addItem(o);

If you are still interested in determining the ActionForm bean type, see
the source of the processActionForm method for how the ActionServlet
does it.

If you need to call a method based on a parameter, see the source for
DispatchAction in the Actions package, which calls a local method based
on the string given as the parameter property.

-- Ted Husted, Husted dot Com, Fairport NY USA.
-- Custom Software ~ Technical Services.
-- Tel +1 716 737-3463
-- http://www.husted.com/struts/


Stephen Hood wrote:
 
 I am trying to write a generic Action class that I can use with any
 ActionForm to add an item to any collection property it may contain.  For
 example, if I had two ActionForms which each contain a collection (say
 AddressList and ProductList), I could call the same Action with either
 form, pass it the name of the collection, and have it add a new item to it,
 passing control back to the calling View.
 
 In order to make it generic, I want the class to figure out the ActionForm
 type specified in the mapping, recast the generic ActionForm as the proper
 type, and then add another item to the collection indicated by a passed
 request attribute.
 
 To dynamically determine the ActionForm type, I'm trying to use the
 equivalent of ActionMapping.getFormClass(), which has been deprecated.  The
 suggested alternative is to use ActionMapping.getName() and then use it to
 look-up the ActionFormBean.  It seems the way to do this is to use
 ActionFormBeans.findFormBean(String beanName).  However, the following code
 returns a null ActionFormBean.
 
   String formBeanName = mapping.getName();
   ActionFormBeans actionFormBeans = new ActionFormBeans();
   ActionFormBean theFormBean = actionFormBeans.findFormBean(formBeanName);
 
 I assume that my ActionFormBeans object itself is empty and I am not
 creating or populating it properly, but I could not find details in the
 Struts javadoc.
 
 Is this the correct approach?
 
 thanks for any suggestions,
 --Steve



Creating your own ActionForm inside of an Action

2001-10-23 Thread Tony Li

Hi everyone,

I have a situation in which I would like to do the following:

1) I'm at a jsp page, let's call it a.jsp.  It has one link that looks
like:

html:link page=/mainMenu.do?action=customer Customer
/html:link

2) My mainMenu action in struts-config.xml looks like (name=... is
left out on purpose):

  action   path=/mainMenu
type=net.alfa.china.menus.MainMenuAction
forward name=customer path=/customer_main.jsp/
forward name=order path=/order_main.jsp/
forward name=purchase path=/purchase_main.jsp /
forward name=inventory path=/inventory_main.jsp /
  /action


3) Inside of perform in MainMenuAction, I would like to create my own
form bean of type ActionForm.  I am then going to load a customer from
my db (through a business logic bean), and set the fields in the
ActionForm.  I'm hoping to use that ActionForm to populate a form in
customer_main.jsp when we finally forward there.  That form is defined
using html:form.

I'm basically wondering what the mechanism is that struts uses to
populate a html:form with an ActionForm.  I'm coming from a page
without a form (a.jsp), would like to be able to create an ActionForm in
perform(), stick it in the request, and when I forward to my
customer_main.jsp, have struts populate the form there with what's in
the ActionForm.

I've tried quite a few different approaches and can't seem to make it
work.  Is this possible?  Any suggestions?

Thanks,

Tony Li