Problem using Artimus by Ted

2005-05-10 Thread Ibha Gandhi
Hi All,

I am studying the code in Artimus_1_0 to make sure
that I understand how things actually work. 
I tried running http://localhost:8080/artimus/index.jsp but got the
following error
javax.servlet.ServletException: Cannot create redirect URL:
java.net.MalformedURLException: Cannot retrieve ActionForwards collection

org.apache.jasper.runtime.PageContextImpl.doHandlePageException(PageContextI
mpl.java:846)

org.apache.jasper.runtime.PageContextImpl.handlePageException(PageContextImp
l.java:779)
org.apache.jsp.index_jsp._jspService(org.apache.jsp.index_jsp:68)
org.apache.jasper.runtime.HttpJspBase.service(HttpJspBase.java:99)
javax.servlet.http.HttpServlet.service(HttpServlet.java:802)

org.apache.jasper.servlet.JspServletWrapper.service(JspServletWrapper.java:3
25)

org.apache.jasper.servlet.JspServlet.serviceJspFile(JspServlet.java:295)
org.apache.jasper.servlet.JspServlet.service(JspServlet.java:245)
javax.servlet.http.HttpServlet.service(HttpServlet.java:802)
Can anyone please help me to make this application work. 
Here is the code..
The index.jsp of the application contains two lines:

code:
-
<%@ taglib uri="/tags/struts-logic" prefix="logic" %>

---
The code in struts-config is:
---

...


...






Tiles-def code is 

  
  
  
  
   



RE: ERROR: Server side validation using Validation framework

2005-05-10 Thread Arindam Samanta


Thank you David. Yaa, I have done mistake with input attribute. It is 
working fine now.

Thanks,
Arindam




"David G. Friedman" <[EMAIL PROTECTED]> 
05/11/2005 04:07 AM
Please respond to
"Struts Users Mailing List" 


To
"Struts Users Mailing List" 
cc

Subject
RE: ERROR: Server side validation using Validation framework










Your input list "/login.jsp" but your other JSP's are listed under the 
/jsp
directory, SO, should your input be something different to get rid of the
page not found error BEFORE you mess with the Validator and claim it is 
the
source of all problems?

Instead of:
input="/login.jsp"

Is the file here (like your other examples for "Success" and Failure"):
input="/jsp/login.jsp"

Also, are you sure your action is forwarding to the "success" forward 
using
the correct CASE-sensitive spelling (i.e. "Success" not "success") ?

Regards,
David

-Original Message-
From: Arindam Samanta [mailto:[EMAIL PROTECTED]
Sent: Tuesday, May 10, 2005 5:47 AM
To: Struts Users Mailing List
Subject: ERROR: Server side validation using Validation framework




Hi,

I am new in struts.  I am getting 'Page can not be displayed error when I
click on 'SAVE' button. validation is working fine when I implemented
client side validation to add following line
  
But when I removed above code from jsp I faced page not found error but it
is not throwing any error into server. My Form class extends from
ValidatorForm.  My xml are,

 struts-config.xml***
 
   
  

  
  


validation.xm***





  
  
   
  
  
mask
^[a-zA-Z]*$
  

 
  
  
mask
^[a-zA-Z]*$
  

   
  


validator-rules.xml***


 

Re: Cannot find bean error in any scope

2005-05-10 Thread Nick Heudecker
> or as you say change the message resources default - or even make it always
> null=false?

I prefer this suggestion. Speaking only for myself, null=false is the
most sensible default.

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



Struts-flow and ActionForm

2005-05-10 Thread Vance Karimi
Hi list,

I picked up Struts-flow and decided to go with it basically to have
multi-page form wizards.  Looks like a really helpful tool. Kudos.

The example uses a HashMap to model the information submitted by the forms.
The wizard example states "To keep simple, no Struts JSP tags are used, but
could be by wrapping model with an ActionForm".  I do use struts tags and
ActionForms and was hoping someone would have an example or a guide.

The way I do things now is:

My struts action:










My struts plugin:

  





  

My wizard-flow.js: 

importPackage(Packages.java.util);
context.load("/WEB-INF/wizard.js");

function main() {
  var model = new HashMap();

  var wizard = new Wizard(model);
  
  wizard.populate = populate;
  wizard.validate = validate;
  
  wizard.showForm("a-form", {
  "title" : "Event Information"
  });
  wizard.showForm("b-form", {
  "title" : "Schedules and Type Information"
  });
  wizard.showForm("c-form", {
  "title" : "Credit Card Information"
  });}

function populate() {
  m = context.chainContext.paramValues;
  for (i = m.keySet().iterator(); i.hasNext(); ) {
key = i.next();
this.model.put(key, m.get(key)[0]);
 
  }
}

function validate() {
}

The wizard-flow.js is no different to the example, so I store the form
elements in the Map model. My understanding is I should use a map-backed
ActionForm as the model rather than the HashMap. Is this correct? I tried
that, but had no luck.

Within my Action:

public ActionForward doExecute(
ActionMapping mapping,
ActionForm form,
HttpServletRequest request,
HttpServletResponse response)
throws IOException, ServletException {



Map map = (Map) request.getAttribute("form");
if (map.get("elementA") != null) {
myForm.setElementA((String) map.get("elementA"));
}


}

To get the wizard working and avoid "wrapping the model with an ActionForm",
I use the above in my Actions, but I'm not sure if this is the right way to
do things.

I look forward to your suggestions,
Vance




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



Re: Cannot find bean error in any scope

2005-05-10 Thread Niall Pemberton
 defintely needs improvement - currently too much can go
wrong at the moment without providing any real clue to the problem.

or as you say change the message resources default - or even make it always
null=false?

Niall
- Original Message - 
From: "Michael Jouravlev" <[EMAIL PROTECTED]>
Sent: Wednesday, May 11, 2005 3:09 AM


P.S. Should not it produce a better diagnosic when messages not found?
Or should null="false" be a default mode?



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



Re: Cannot find bean error in any scope

2005-05-10 Thread Michael Jouravlev
On 5/10/05, Rick Reumann <[EMAIL PROTECTED]> wrote:
> Niall Pemberton wrote the following on 5/10/2005 12:49 PM:
> > My guess that one of your message keys is incorrect/missing. Are your
> > message resources configured to NOT return null in your struts-config.xml?
> >
> 
> And this could probably explain why Michael can't always repeat the
> error since probably one of the errors being added in the Action isn't
> always being added under all circumstances. Michael, make sure all of
> the keys like "some.key", when you do..
> 
> new ActionMessage("some.key"  are in your resources file.

Niall,  Rick, you are my heroes ;-) I set null="false" and here it
was: the problem in the property names. They got renamed in the java
files, when IDEA was doing automatic refactoring. But property file
remained the same.

Thanks a lot!

P.S. Should not it produce a better diagnosic when messages not found?
Or should null="false" be a default mode?

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



Re: [OT] Help !! Too many select-box in one page

2005-05-10 Thread Cliff Lam
Thx a lot !!

Really thank you to everyone =) !!!

Cliff

- Original Message - 
From: "Frank W. Zammetti" <[EMAIL PROTECTED]>
To: "Struts Users Mailing List" 
Sent: Wednesday, May 11, 2005 12:05 AM
Subject: Re: [OT] Help !! Too many select-box in one page


> I'd suggest doing some testing to determine where the delay is actually
> occurring... is it reading from the database that takes so long?  Is it
> transit time from the server to the client?  Is it rendering on the
> client?  The firsr two you should be able to determine on the
> server-side, then just subtract that out from the total time to see how
> long the client is taking.
>
> If it's either of the first two then people have given you some options
> to explore already... if it's the later, you'll almost certainly have to
> refactor your design... the suggestion of populating the boxes via
> scripting is a good one, but I've done this extensively and so can tell
> you that it will become a bottleneck in a hurry, no to mention the fact
> that the perceived performance of your site can vary greatly depending
> on the clients' PC.
>
> Hence, my suggestion... once you determine where the greatest amount of
> time is actually spent, then folks can probably help in a hurry :)
>
> -- 
> Frank W. Zammetti
> Founder and Chief Software Architect
> Omnytex Technologies
> http://www.omnytex.com
>
> John Fletcher wrote:
> > Cliff,
> >
> >
> but each select in each list has the same options.
> >
> > If each select in each list has the same options, you can just download
> > the options once to a javascript array and populate all of the select
> > boxes on the client side.  A quick example:
> >
> > 
> >   var optionArray = {};
> >
> >   function populateBoxes() {
> > var mySelectBox;
> > // You'll need to do this for each box on your form
> > for (var i = 0; i < optionArray.length; i++) {
> >   mySelectBox.options[i] = new Option(optionArray[i],
> > optionArray[i]);
> > }
> >   }
> > 
> >
> > Call that populateBoxes function on startup.  Who knows how long that'll
> > take to populate client-side, but it should reduce your page size
> > considerably.  If you need different values than text in the select
> > boxes, you could either have a 2-dimensional array (which would require
> > different formatting for the values, or a different method of printing
> > them out in the javascript), or you could maintain 2 arrays, one for
> > values and one for text.  Note that you will need to know all of the
> > names of the select boxes unless you want to just loop through all of
> > the form elements and do the action for any of the select form elements
> > that you find.
> >
> > Your CSV string that you drop into the optionArray will need to have
> > strings quoted if necessary of course.
> >
> > John
> >
> >
> > -
> > To unsubscribe, e-mail: [EMAIL PROTECTED]
> > For additional commands, e-mail: [EMAIL PROTECTED]
> >
> >
> >
> >
> >
>
>
>
> -
> To unsubscribe, e-mail: [EMAIL PROTECTED]
> For additional commands, e-mail: [EMAIL PROTECTED]


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



Re: Is struts more performant than JSF

2005-05-10 Thread Matt Raible
On May 10, 2005, at 4:48 PM, Jesse Alexander (KBSA 21) wrote:
Hi
I think this is not an easy question. I got the impression that Struts 
is needing more
JSP-tags to represent a page which seems to slow it down a bit. JSF 
uses more memory
(if you use server-side state) or more bandwidth (if you use 
client-side state) but
somehow processing seems quite optimized. It will be interesting 
comparing
a) Struts vs JSF
b) different state-strategies (client, server, oracle's mixture,...) 
within JSF

For this we would need an application implemented in both Struts and 
JSF, and then
let a server feel the heat of a stress-testing session ;-)
You could hammer on AppFuse and Equinox - they both have Struts and JSF 
versions.

http://demo.appfuse.org/appfuse (Struts 1.2.4)
http://demo.appfuse.org/appfuse-jsf (MyFaces 1.0.7)
http://demo.raibledesigns.com/equinox-struts (same versions as above)
http://demo.raibledesigns.com/equinox-jsf
I haven't seen any performance differences in my experience - but I 
also haven't stress tested either of these applications under 
super-heavy load.  I also haven't had any out-of-memory issues when 
using them in production - so they should make good test cases.

Matt
hth
Alexander
-Original Message-
From: Yan Hu [mailto:[EMAIL PROTECTED]
Sent: Tuesday, May 10, 2005 10:50 PM
To: Struts Users Mailing List
Subject: Is struts more performant than JSF
Hi:
I have been playing with JSF lately.  I really like it since it is 
very intuitive.  But as I
understand it, JSF keeps a component tree for each page with JSF 
widgets in it on the server. So
it is heavy weight compared with struts. Could I safely say that 
struts-based apps are a bit more
performant than JSF ones? someone please shed some light on it...


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

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


RE: Is struts more performant than JSF

2005-05-10 Thread Jesse Alexander (KBSA 21)
Hi

I think this is not an easy question. I got the impression that Struts is 
needing more 
JSP-tags to represent a page which seems to slow it down a bit. JSF uses more 
memory
(if you use server-side state) or more bandwidth (if you use client-side state) 
but 
somehow processing seems quite optimized. It will be interesting comparing
a) Struts vs JSF
b) different state-strategies (client, server, oracle's mixture,...) within JSF

For this we would need an application implemented in both Struts and JSF, and 
then
let a server feel the heat of a stress-testing session ;-)

hth
Alexander 

-Original Message-
From: Yan Hu [mailto:[EMAIL PROTECTED] 
Sent: Tuesday, May 10, 2005 10:50 PM
To: Struts Users Mailing List
Subject: Is struts more performant than JSF

Hi:
I have been playing with JSF lately.  I really like it since it is very 
intuitive.  But as I
understand it, JSF keeps a component tree for each page with JSF widgets in it 
on the server. So
it is heavy weight compared with struts. Could I safely say that struts-based 
apps are a bit more
performant than JSF ones? someone please shed some light on it...



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

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



Re: StrutsCatalogInputOutputSeparation

2005-05-10 Thread Michael Jouravlev
See inline

On 5/10/05, Leon Rosenberg <[EMAIL PROTECTED]> wrote:
> > > Aehm... The double submit problem is not a problem of POST
> > or GET request.
> > > Ist a problem of bad programmed browsers, proxies etc, and
> > there are
> > > enough techniques to avoid it.
> >
> > No. It IS a problem of POST and GET requests. First, the
> > dialog itself. According to HTTP specs, browser is required
> > to display warning dialog, when the same request is
> > re-POST-ed. Ok, you can submit your HTML forms with GET. But
> > this is against HTTP recommendations. Also, it just make the
> > problem invisible to the user, but does not eliminate the
> > problem itself. You would need to use tokens or whatever
> > other technique, to detect double submits.
> >
> > You are right in the way, that I mixed two things in one article:
> > separation of data and separation of processes of input and output.
> >
> 
> Well maybe I should bring in another example :-)
> 
> Consider a list of items with a delete function.
> You will have an action ShowItems which presents the list and DeleteItem
> which deletes an item from the list based on item's id, which is transmited
> as parameter to the action, and presents the updated list afterwards.
> 
> Now, it's clear, that DeleteItem and ShowItems share a lot of functionality
> on the use case level; the presentation logic of the itemlist.
> 
> What is often done, and I must admit, that I've done it either, is to let
> DeleteItem extend ShowItems, performing the delete
> process in it's execute and calling super.execute then.
> Does it work? Yes.
> Is it good? No, because, if a user deletes an item, then someone else
> creates a new item with the id of the deleted item, and the first
> user hits refresh, the new item will be deleted unintented.
> Does it mean that it's a general fault of struts or servlets? I don't think
> so.

As you may have noticed, I did not extend one action with another ;)
The grand idea, is that it is not really important, what happens on
the server. What important is how this processing is seen from the
client. In the case above the developer made a clear mistake from the
client perspective: it allowed to repost the delete request. And, if
this were a GET request, a user would not even know about it. _This_
is bad design.

> You can argue, that it's easy to send a redirect to the ShowItems action
> after the DeleteItem action performed it's task, and you will be right. I
> just wanted to show, that everything can be misused, but the fact it is,
> doesn't mean, that _it_ is bad. Like the GET request in the above example.

GET request is not bad ;) But not sending redirect in above situation
is really really bad.

> Hmm, never seen such an object before :-)
> 
> I mean the object must be _completely_ plain, not one field which is
> "decorated", only 100% the data, the user entered previously?
> I mean, if you would forget about your object sharing, and create an "input"
> and an "output" object from scratch, the result would be
> 100% identical? In this case, and only in this case, the above method would
> be "right" (in terms of good coding style, etc),
> but in this case I doubt, that you need an object at all. Since you object
> is just an encapsulation of properties, without ANY functionality ever,
> you'd be better served with a set or map of properties.

I am sorry, I lost in the argument, that we are still talking about
input and output form beans. Of course, this object would make better
sense as shared, as it currently is shared in my app. Thanks, a reason
not to change anything ;)

The object is not just encapsulation of properties. The "current
object" (possibly, a form bean) contains business object (with
validation methods, what else) and corresponding messages.

We can return to this topic later, in about two weeks, when I release
my "The M in Struts MVC" library ;-)

Michael.

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



RE: ERROR: Server side validation using Validation framework

2005-05-10 Thread David G. Friedman
Your input list "/login.jsp" but your other JSP's are listed under the /jsp
directory, SO, should your input be something different to get rid of the
page not found error BEFORE you mess with the Validator and claim it is the
source of all problems?

Instead of:
input="/login.jsp"

Is the file here (like your other examples for "Success" and Failure"):
input="/jsp/login.jsp"

Also, are you sure your action is forwarding to the "success" forward using
the correct CASE-sensitive spelling (i.e. "Success" not "success") ?

Regards,
David

-Original Message-
From: Arindam Samanta [mailto:[EMAIL PROTECTED]
Sent: Tuesday, May 10, 2005 5:47 AM
To: Struts Users Mailing List
Subject: ERROR: Server side validation using Validation framework




Hi,

I am new in struts.  I am getting 'Page can not be displayed error when I
click on 'SAVE' button. validation is working fine when I implemented
client side validation to add following line
  
But when I removed above code from jsp I faced page not found error but it
is not throwing any error into server. My Form class extends from
ValidatorForm.  My xml are,

 struts-config.xml***
 
   
  

  
  


validation.xm***





  
  
   
  
  
mask
^[a-zA-Z]*$
  

 
  
  
mask
^[a-zA-Z]*$
  

   
  


validator-rules.xml***


 

Re: StrutsCatalogInputOutputSeparation

2005-05-10 Thread Leon Rosenberg
 

> -Ursprüngliche Nachricht-
> Von: Michael Jouravlev [mailto:[EMAIL PROTECTED] 
> Gesendet: Dienstag, 10. Mai 2005 23:58
> An: Struts Users Mailing List
> Betreff: Re: StrutsCatalogInputOutputSeparation
> 
> One more thing:
> 
> On 5/10/05, Leon Rosenberg <[EMAIL PROTECTED]> wrote:
> > Now seriously. Using ActionForms for result presentation is just a 
> > matter of bad style, it doesn't mean, that struts is 
> badstyles, after 
> > all, everything, that can be misused, will be :-)
> 
> So, you are saying that using ActionForm for output is a bad style.
> Depends. Consider this situation (about 80% of this is copied 
> from my reply to Nancy Lin):
> 
> * There is permanent storage (database)
> * There is business object, which can be loaded from database.
> * There is a temporary area in the session ("current item")
> * "Current item" contains a working copy of persistent 
> business object (along with messages, more on them further). 
> Current item is the one that you are editing or viewing.
> * There is an action mapping, which does not care, where the 
> data that it shows, comes from. All it knows, that when is 
> receives object ID, it must show object's data.
> * When [form/action/whoever on that location] receives object 
> ID, it checks "current item" first. If "current item" has 
> object with needed ID in it, form uses object's properties.
> * If object with needed ID is not loaded in "current item", 
> then current item is discarded, object is loaded from 
> database into current item and is displayed.
> * When Cancel is clicked, current item is disposed, database 
> is not affected.
> * error messages are stored in the "current item" along with 
> business object, but messages themselves are not part of 
> persistent object.
> * each time page is reloaded, messages are redisplayed
> * when changes are reset or canceled, messages are cleared.
> 
> Now, in my older application I use a separate object to store 
> "current item". But if one has only one object on the page, 
> one can as well use form bean as a "current item". Form bean 
> scope would be set to session, and it would store error 
> messages, as well as reference to the business object.
> 
> Also, as you can see, the action which displayes the item, 
> does not accept input of item data. There is a completely 
> separate action for that. editItem action does not care where 
> the data is, and is it new or existing. It just takes ID and 
> pulls the object for presentation.
> 
> You may consider this bad style, but I think it is convenient.

Hmm, never seen such an object before :-) 

I mean the object must be _completely_ plain, not one field which is
"decorated", only 100% the data, the user entered previously? 
I mean, if you would forget about your object sharing, and create an "input"
and an "output" object from scratch, the result would be 
100% identical? In this case, and only in this case, the above method would
be "right" (in terms of good coding style, etc), 
but in this case I doubt, that you need an object at all. Since you object
is just an encapsulation of properties, without ANY functionality ever,
you'd be better served with a set or map of properties. 

Regards
Leon







 





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



Re: StrutsCatalogInputOutputSeparation

2005-05-10 Thread Leon Rosenberg
 

> -Ursprüngliche Nachricht-
> Von: Michael Jouravlev [mailto:[EMAIL PROTECTED] 
> Gesendet: Dienstag, 10. Mai 2005 23:58
> An: Struts Users Mailing List
> Betreff: Re: StrutsCatalogInputOutputSeparation
> 
> One more thing:
> 
> On 5/10/05, Leon Rosenberg <[EMAIL PROTECTED]> wrote:
> > Now seriously. Using ActionForms for result presentation is just a 
> > matter of bad style, it doesn't mean, that struts is 
> badstyles, after 
> > all, everything, that can be misused, will be :-)
> 
> So, you are saying that using ActionForm for output is a bad style.
> Depends. Consider this situation (about 80% of this is copied 
> from my reply to Nancy Lin):
> 
> * There is permanent storage (database)
> * There is business object, which can be loaded from database.
> * There is a temporary area in the session ("current item")
> * "Current item" contains a working copy of persistent 
> business object (along with messages, more on them further). 
> Current item is the one that you are editing or viewing.
> * There is an action mapping, which does not care, where the 
> data that it shows, comes from. All it knows, that when is 
> receives object ID, it must show object's data.
> * When [form/action/whoever on that location] receives object 
> ID, it checks "current item" first. If "current item" has 
> object with needed ID in it, form uses object's properties.
> * If object with needed ID is not loaded in "current item", 
> then current item is discarded, object is loaded from 
> database into current item and is displayed.
> * When Cancel is clicked, current item is disposed, database 
> is not affected.
> * error messages are stored in the "current item" along with 
> business object, but messages themselves are not part of 
> persistent object.
> * each time page is reloaded, messages are redisplayed
> * when changes are reset or canceled, messages are cleared.
> 
> Now, in my older application I use a separate object to store 
> "current item". But if one has only one object on the page, 
> one can as well use form bean as a "current item". Form bean 
> scope would be set to session, and it would store error 
> messages, as well as reference to the business object.
> 
> Also, as you can see, the action which displayes the item, 
> does not accept input of item data. There is a completely 
> separate action for that. editItem action does not care where 
> the data is, and is it new or existing. It just takes ID and 
> pulls the object for presentation.
> 
> You may consider this bad style, but I think it is convenient.

Hmm, never seen such an object before :-) 

I mean the object must be _completely_ plain, not one field which is
"decorated", only 100% the data, the user entered previously? 
I mean, if you would forget about your object sharing, and create an "input"
and an "output" object from scratch, the result would be 
100% identical? In this case, and only in this case, the above method would
be "right" (in terms of good coding style, etc), 
but in this case I doubt, that you need an object at all. Since you object
is just an encapsulation of properties, without ANY functionality ever,
you'd be better served with a set or map of properties. 

Regards
Leon







 





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



AW: StrutsCatalogInputOutputSeparation

2005-05-10 Thread Leon Rosenberg
> > Aehm... The double submit problem is not a problem of POST 
> or GET request.
> > Ist a problem of bad programmed browsers, proxies etc, and 
> there are 
> > enough techniques to avoid it.
> 
> No. It IS a problem of POST and GET requests. First, the 
> dialog itself. According to HTTP specs, browser is required 
> to display warning dialog, when the same request is 
> re-POST-ed. Ok, you can submit your HTML forms with GET. But 
> this is against HTTP recommendations. Also, it just make the 
> problem invisible to the user, but does not eliminate the 
> problem itself. You would need to use tokens or whatever 
> other technique, to detect double submits.
> 
> You are right in the way, that I mixed two things in one article:
> separation of data and separation of processes of input and output.
>  

Well maybe I should bring in another example :-)

Consider a list of items with a delete function. 
You will have an action ShowItems which presents the list and DeleteItem
which deletes an item from the list based on item's id, which is transmited
as parameter to the action, and presents the updated list afterwards. 

Now, it's clear, that DeleteItem and ShowItems share a lot of functionality
on the use case level; the presentation logic of the itemlist.

What is often done, and I must admit, that I've done it either, is to let
DeleteItem extend ShowItems, performing the delete 
process in it's execute and calling super.execute then. 
Does it work? Yes. 
Is it good? No, because, if a user deletes an item, then someone else
creates a new item with the id of the deleted item, and the first 
user hits refresh, the new item will be deleted unintented. 
Does it mean that it's a general fault of struts or servlets? I don't think
so.

You can argue, that it's easy to send a redirect to the ShowItems action
after the DeleteItem action performed it's task, and you will be right. I
just wanted to show, that everything can be misused, but the fact it is,
doesn't mean, that _it_ is bad. Like the GET request in the above example.

> > Since your preposition about "Traditional Struts 
> request/response cycle"
> > isn't TRUE in my eyes, you provide a solution to a problem, that 
> > doesn't exists :-)
> >
> > Now seriously. Using ActionForms for result presentation is just a 
> > matter of bad style, it doesn't mean, that struts is 
> badstyles, after 
> > all, everything, that can be misused, will be :-)
> 
> I would love your version of "Traditional Struts 
> request/response cycle". I guess, it is the one where all 
> output is put into a separate bean, not related to form bean. 
> Is it traditional? Then who taught me to use form beans for 
> output? I must have read it somewhere :) I am not really fond 
> of this too. This is in part how I came with the idea of two 
> forms. Anyway, I guess this "traditional" cycle was my own 
> premise based on the fact that action mapping contains 
> "name". Seems, that everyone uses form bean for input only. 
> Official Struts users guide does not exactly endorse any 
> specific method of where to put output data, as I can see. or does it?

I don't know it to be true, it's just what my mind told me to do, as I
learned it. In fact 
I started using struts with action mappings and taglibs only, and was
parsing the form input by myself (some abstraction layer on
request.getParameter), so it was all natural to me to use output beans,
because i wasn't using any action forms at this moment.


> 
> I will update wiki page. Thanks for comments!

:-)

Regards
Leon



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



AW: StrutsCatalogInputOutputSeparation

2005-05-10 Thread Leon Rosenberg
> > Aehm... The double submit problem is not a problem of POST 
> or GET request.
> > Ist a problem of bad programmed browsers, proxies etc, and 
> there are 
> > enough techniques to avoid it.
> 
> No. It IS a problem of POST and GET requests. First, the 
> dialog itself. According to HTTP specs, browser is required 
> to display warning dialog, when the same request is 
> re-POST-ed. Ok, you can submit your HTML forms with GET. But 
> this is against HTTP recommendations. Also, it just make the 
> problem invisible to the user, but does not eliminate the 
> problem itself. You would need to use tokens or whatever 
> other technique, to detect double submits.
> 
> You are right in the way, that I mixed two things in one article:
> separation of data and separation of processes of input and output.
>  

Well maybe I should bring in another example :-)

Consider a list of items with a delete function. 
You will have an action ShowItems which presents the list and DeleteItem
which deletes an item from the list based on item's id, which is transmited
as parameter to the action, and presents the updated list afterwards. 

Now, it's clear, that DeleteItem and ShowItems share a lot of functionality
on the use case level; the presentation logic of the itemlist.

What is often done, and I must admit, that I've done it either, is to let
DeleteItem extend ShowItems, performing the delete 
process in it's execute and calling super.execute then. 
Does it work? Yes. 
Is it good? No, because, if a user deletes an item, then someone else
creates a new item with the id of the deleted item, and the first 
user hits refresh, the new item will be deleted unintented. 
Does it mean that it's a general fault of struts or servlets? I don't think
so.

You can argue, that it's easy to send a redirect to the ShowItems action
after the DeleteItem action performed it's task, and you will be right. I
just wanted to show, that everything can be misused, but the fact it is,
doesn't mean, that _it_ is bad. Like the GET request in the above example.

> > Since your preposition about "Traditional Struts 
> request/response cycle"
> > isn't TRUE in my eyes, you provide a solution to a problem, that 
> > doesn't exists :-)
> >
> > Now seriously. Using ActionForms for result presentation is just a 
> > matter of bad style, it doesn't mean, that struts is 
> badstyles, after 
> > all, everything, that can be misused, will be :-)
> 
> I would love your version of "Traditional Struts 
> request/response cycle". I guess, it is the one where all 
> output is put into a separate bean, not related to form bean. 
> Is it traditional? Then who taught me to use form beans for 
> output? I must have read it somewhere :) I am not really fond 
> of this too. This is in part how I came with the idea of two 
> forms. Anyway, I guess this "traditional" cycle was my own 
> premise based on the fact that action mapping contains 
> "name". Seems, that everyone uses form bean for input only. 
> Official Struts users guide does not exactly endorse any 
> specific method of where to put output data, as I can see. or does it?

I don't know it to be true, it's just what my mind told me to do, as I
learned it. In fact 
I started using struts with action mappings and taglibs only, and was
parsing the form input by myself (some abstraction layer on
request.getParameter), so it was all natural to me to use output beans,
because i wasn't using any action forms at this moment.


> 
> I will update wiki page. Thanks for comments!

:-)

Regards
Leon



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



Re: StrutsCatalogInputOutputSeparation

2005-05-10 Thread Michael Jouravlev
One more thing:

On 5/10/05, Leon Rosenberg <[EMAIL PROTECTED]> wrote:
> Now seriously. Using ActionForms for result presentation is just a matter of
> bad style, it doesn't mean, that struts is badstyles,
> after all, everything, that can be misused, will be :-)

So, you are saying that using ActionForm for output is a bad style.
Depends. Consider this situation (about 80% of this is copied from my
reply to Nancy Lin):

* There is permanent storage (database)
* There is business object, which can be loaded from database.
* There is a temporary area in the session ("current item")
* "Current item" contains a working copy of persistent business object
(along with messages, more on them further). Current item is the one
that you are editing or viewing.
* There is an action mapping, which does not care, where the data that
it shows, comes from. All it knows, that when is receives object ID,
it must show object's data.
* When [form/action/whoever on that location] receives object ID, it
checks "current item" first. If "current item" has object with needed
ID in it, form uses object's properties.
* If object with needed ID is not loaded in "current item", then
current item is discarded, object is loaded from database into current
item and is displayed.
* When Cancel is clicked, current item is disposed, database is not affected.
* error messages are stored in the "current item" along with business
object, but messages themselves are not part of persistent object.
* each time page is reloaded, messages are redisplayed
* when changes are reset or canceled, messages are cleared.

Now, in my older application I use a separate object to store "current
item". But if one has only one object on the page, one can as well use
form bean as a "current item". Form bean scope would be set to
session, and it would store error messages, as well as reference to
the business object.

Also, as you can see, the action which displayes the item, does not
accept input of item data. There is a completely separate action for
that. editItem action does not care where the data is, and is it new
or existing. It just takes ID and pulls the object for presentation.

You may consider this bad style, but I think it is convenient.

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



Re: StrutsCatalogInputOutputSeparation

2005-05-10 Thread Leon Rosenberg
I've read the article now too, and must say i can't disagree more.


First:

>HTML FORM is submitted from the input page, usually using POST request
method. Struts populates form bean (marked with [F]) with 
>request data. Then form bean validates input and if something wrong, it
generates error messages. If validate() returns errors, Struts 
>does not bother to call action class. Instead, it forwards to location,
which is defined in "input" property of  element. If, 
>on the other hand, input data is correct, Struts calls execute() method of
the action class. It usually performs model update, then 
>fills out form bean with output values, and forwards to JSP page, which
displays output data. 

Especially the last one: 
>fills out form bean with output values, and forwards to JSP page, which
displays output data

Is complete nonsense in my eyes. I've never seen an application doing this.
Maybe I haven't seen enough struts applications, 
but our current application for example, with 1500 classes, 500 jsps, and
over 100K lines of code doesn't show this behaviour at a single place. 

ActionForms are "the better way" to parse request after form submission.
That's it. Nothing less, nothing more. 

...

Further in text:

> Form bean is used both for input and for output. If input and output page
uses same fields, this is OK, but usually this is not the 
> case. So, one form has to combine input and output fields. 

See above. I don't think it's struts typical, if it is, again, never seen
this before.

> On error action class is not called. This may be useful in some cases, but
not always

This depends solely on the validation technique. Actually we are using
validate methods of the ActionForm solely to perform javascript validation
on the client side (to reduce traffic for client) and to backup it on the
server side in case one switched off javascript. 
What I do validate in Forms are things like length of a specific text field
or presence of needed fields.
If logic is required, the validation is performed in the action, or even in
the service layer.

>On error control is forwarded to location, defined in "input" property.
This property itself is a source of misunderstanding for 
>Struts newbies, and makes clean request->processing->response sequence a
little fuzzy. 

Typicall for all GUI applications, isn't it? If you don't like it, you can
override this behavior. Noone says you MUST use actionforms, struts has
enough power without action forms.

>Because in case of error most applications forward to input page instead of
redirecting, page is sent back to broswser immediately in >response to POST
request. This produces POSTDATA effect on reload, which results in double
sumbit. 

Aehm... The double submit problem is not a problem of POST or GET request.
Ist a problem of bad programmed browsers, proxies etc, and there are enough
techniques to avoid it.


Since your preposition about "Traditional Struts request/response cycle"
isn't TRUE in my eyes, you provide a solution to a problem, that doesn't
exists :-) 

Now seriously. Using ActionForms for result presentation is just a matter of
bad style, it doesn't mean, that struts is badstyles, 
after all, everything, that can be misused, will be :-)


Regards
Leon











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



Re: StrutsCatalogInputOutputSeparation

2005-05-10 Thread Leon Rosenberg
I've read the article now too, and must say i can't disagree more.


First:

>HTML FORM is submitted from the input page, usually using POST request
method. Struts populates form bean (marked with [F]) with 
>request data. Then form bean validates input and if something wrong, it
generates error messages. If validate() returns errors, Struts 
>does not bother to call action class. Instead, it forwards to location,
which is defined in "input" property of  element. If, 
>on the other hand, input data is correct, Struts calls execute() method of
the action class. It usually performs model update, then 
>fills out form bean with output values, and forwards to JSP page, which
displays output data. 

Especially the last one: 
>fills out form bean with output values, and forwards to JSP page, which
displays output data

Is complete nonsense in my eyes. I've never seen an application doing this.
Maybe I haven't seen enough struts applications, 
but our current application for example, with 1500 classes, 500 jsps, and
over 100K lines of code doesn't show this behaviour at a single place. 

ActionForms are "the better way" to parse request after form submission.
That's it. Nothing less, nothing more. 

...

Further in text:

> Form bean is used both for input and for output. If input and output page
uses same fields, this is OK, but usually this is not the 
> case. So, one form has to combine input and output fields. 

See above. I don't think it's struts typical, if it is, again, never seen
this before.

> On error action class is not called. This may be useful in some cases, but
not always

This depends solely on the validation technique. Actually we are using
validate methods of the ActionForm solely to perform javascript validation
on the client side (to reduce traffic for client) and to backup it on the
server side in case one switched off javascript. 
What I do validate in Forms are things like length of a specific text field
or presence of needed fields.
If logic is required, the validation is performed in the action, or even in
the service layer.

>On error control is forwarded to location, defined in "input" property.
This property itself is a source of misunderstanding for 
>Struts newbies, and makes clean request->processing->response sequence a
little fuzzy. 

Typicall for all GUI applications, isn't it? If you don't like it, you can
override this behavior. Noone says you MUST use actionforms, struts has
enough power without action forms.

>Because in case of error most applications forward to input page instead of
redirecting, page is sent back to broswser immediately in >response to POST
request. This produces POSTDATA effect on reload, which results in double
sumbit. 

Aehm... The double submit problem is not a problem of POST or GET request.
Ist a problem of bad programmed browsers, proxies etc, and there are enough
techniques to avoid it.


Since your preposition about "Traditional Struts request/response cycle"
isn't TRUE in my eyes, you provide a solution to a problem, that doesn't
exists :-) 

Now seriously. Using ActionForms for result presentation is just a matter of
bad style, it doesn't mean, that struts is badstyles, 
after all, everything, that can be misused, will be :-)


Regards
Leon











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



Problems with Form Action Using Struts-Faces Integration Library

2005-05-10 Thread Kevin Hinners
I am trying to rewrite a Struts-based web application to use JavaServer
Faces and Struts-Faces Integration Library. I am trying to rewrite the
web pages from struts tags to JSF and Struts-Faces tags. I want to reuse
my existing Action and ActionForm classes and Struts for the controller.

The problem I am having is the way page view.jsp renders  to the browser. When I view source on the rendered
web page, the form shows the action as ,
not . When I try to submit the page,
I get an error "Invalid path /view.do". What am I doing wrong here?

I tried looking at the example web apps that come with the Struts-Faces
Integration Library, but I am confused by the need for backing beans.
Are these required?


Kevin Hinners

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



Re: StrutsCatalogInputOutputSeparation

2005-05-10 Thread Michael Jouravlev
On 5/10/05, Benedict, Paul C <[EMAIL PROTECTED]> wrote:
> I have read Michael Jouravlev's article:
> http://wiki.apache.org/struts/StrutsCatalogInputOutputSeparation
> 
> I can't find any blog or comment box on the page, so I'll write here. I
> would like people to freely respond to my comments.
> 
> I disagree with the two-actions methodology to solve the separation of input
> and output data. If Actions are a web-interface into your business logic,
> there is no need to go into another action to do more processing; I believe
> the chains approach in Struts 1.3 solves this problem by keeping chains of
> logic below the Web/Struts layer.

Perhaps, the wiki page does not have enough arguments and explanation,
why I believe this is the good way do Struts UI actions. If you can
spare 20 minutes, maybe you would like to read this arcticle:
http://www.theserverside.com/articles/article.tss?l=RedirectAfterPost
And them check these two applications, they do exactly the same thing,
but this one http://www.superinterface.com/fwapp/viewList.do uses
in-server forward, and this one
http://www.superinterface.com/rdapp/viewList.do uses redirect via
browser (sorry, when I was updating the redirecting app, I lost
original pages with explanatory text, but the functionality is the
same).

Try them, try to refresh pages, to go back and forward, to delete item
from the list and refresh the list, etc. You will see how robust the
redirecting app is comparing to forwarding one.

> This technique is known as ActionChaining and, as I agree, it seems to be
> frowned upon:
> http://wiki.apache.org/struts/ActionChaining

Do you think that this technique is bad only because of someone else's
opinion? ;) Even King Arthur, Einstein and Von Braun made mistakes.
Plese, think it over again, and see i/o separation has its benefits.
Also, Ted Husted does not consider a single forward from one action to
another to be chaining ;)
 
> I personally do not like putting any output data in the form unless it
> started as input. I envision ActionForms to be tightly linked to HTML forms.

I see, this is what I call a DialogAction. I have this too, this is
slightly different type of separation, but it is there, too. First, i
submit input data to the action using POST, then I redirect to the
same action, and load the page using GET. Action decides, is it input
or output by request type. Form has session scope. Simple and it
works. To clean form I use a special "init" request parameter.

> Conceptually speaking, since HTML forms can only contain input-like
> elements, so should only ActionForm objects too. I put my output data
> exclusively in request or session attributes as necessary, but never the
> form; I believe this complicates and misuses the conception of a form.

I guess, you use approach like this:
http://wiki.apache.org/struts-data/attachments/StrutsCatalogInputOutputSeparation/attachments/actioncombo03.gif

I am totally not against it, I use it myself too. But here you
disagree with yourself. You just said, that you "do not like putting
any output data in the form unless it started as input". So, you _can_
use the same form for input and output? This is just a matter of
particular situation.

But I agree with you, that ActionForm is probably not the best place
to put output data. On the other hand, if I have a business object or
DTO, and a reference to this DTO in the form, this would work too,
would not it?

> I am ready to be disagreed with... But I want to know why.

Umm... I think I need to split the wiki page into two, or something.
There are two aspects:

* First, is how to separate data itself.
* Second, how to separate the _processes_ of input and output.

The second is important in order to provide better user experience and
to allow a user to click Refresh, Back and Forward wherever he likes,
and not to produce POSTDATA situations and double submits. As a user I
hate POSTDATA dialogs, they make me want to reach out for a shotgun
(but I do not have a shotgun). As a developer I hate to process double
submits and to handle tokens. POST->redirect->GET solves both my
problems as a user and as a developer problems.

Roundtrip? I do not care about roundtrip.

There are additional benefits of redirection like having a single URL
for GET. You can POST whatever data you like, but if you redirect
after your POST, and pull the page using GET, browser would use only
the GET location to include in session history. And if your GET
location is always the same, the session history will not grow.

Check out this link: http://www.superinterface.com/rdapp/viewList.do
Click "edit", try to enter some non-integer stuff. Do it several
times. Try to reload, see, no POSTDATA. Then click Back, see that you
return to the list _immediately_. You do not need to click Back as
many times, as many times you entered wrong data. This is what empty
GET after redirect gives you.

I definetely need to put more arguments, and to split article in two,
I guess. The subje

Is struts more performant than JSF

2005-05-10 Thread Yan Hu
Hi:
I have been playing with JSF lately.  I really like it since it is very 
intuitive.  But as I
understand it, JSF keeps a component tree for each page with JSF widgets in it 
on the server. So
it is heavy weight compared with struts. Could I safely say that struts-based 
apps are a bit more
performant than JSF ones? someone please shed some light on it...



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



Re: StrutsCatalogInputOutputSeparation

2005-05-10 Thread Aladin Alaily
Dave Newton wrote:
Isn't that where ActionForms are? In any case, nobody said it couldn't 
be encapsulated in some nice, tidy object.
You're absolutely right.  This is exactly what I do.  It's just that 
when Paul said the following:

> I put my output data
> exclusively in request or session attributes as necessary, but never the
> form
I took it to mean that he literally puts attribute1->value1 ... 
attributeN->valueN in the session or the request rather than in an 
object (like an ActionForm).

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


Re: StrutsCatalogInputOutputSeparation

2005-05-10 Thread Pedro Salgado
On 10/05/2005 22:21, "Aladin Alaily" <[EMAIL PROTECTED]> wrote:

> Hi Paul,
> 
> Doesn't putting all of the output data in the session or even in the
> request add even more clutter and confusion?  When the data is nicely
> packaged in an object you can manipulate it more easily and you can keep
> track of where the information came from.  Although using an ActionForm
> for this purpose might confuse some, I think that it is a better
> alternative than putting the data in the session or request scope.

What about packaging the output data on a java bean and always register it
on a specific name (for example "view") either on the request or session
scope? 

In the end you have something like ${view.property} on your jsp file.

It is true that you might not be able to easily use  but with
JSTL you can reduce this disadvantage.

Pedro Salgado 

> 
> Aladin
> 
> 
> Benedict, Paul C wrote:
>> I have read Michael Jouravlev's article:
>> http://wiki.apache.org/struts/StrutsCatalogInputOutputSeparation
>> 
>> I can't find any blog or comment box on the page, so I'll write here. I
>> would like people to freely respond to my comments.
>> 
>> I disagree with the two-actions methodology to solve the separation of input
>> and output data. If Actions are a web-interface into your business logic,
>> there is no need to go into another action to do more processing; I believe
>> the chains approach in Struts 1.3 solves this problem by keeping chains of
>> logic below the Web/Struts layer.
>> 
>> This technique is known as ActionChaining and, as I agree, it seems to be
>> frowned upon:
>> http://wiki.apache.org/struts/ActionChaining
>> 
>> I personally do not like putting any output data in the form unless it
>> started as input. I envision ActionForms to be tightly linked to HTML forms.
>> Conceptually speaking, since HTML forms can only contain input-like
>> elements, so should only ActionForm objects too. I put my output data
>> exclusively in request or session attributes as necessary, but never the
>> form; I believe this complicates and misuses the conception of a form.
>> 
>> I am ready to be disagreed with... But I want to know why.
>> 
>> Thanks,
>> Paul
>> 
>> 
>> 
>> 
>> 
>> 
>> 
->>
-
>> Notice:  This e-mail message, together with any attachments, contains
>> information of Merck & Co., Inc. (One Merck Drive, Whitehouse Station, New
>> Jersey, USA 08889), and/or its affiliates (which may be known outside the
>> United States as Merck Frosst, Merck Sharp & Dohme or MSD and in Japan, as
>> Banyu) that may be confidential, proprietary copyrighted and/or legally
>> privileged. It is intended solely for the use of the individual or entity
>> named on this message.  If you are not the intended recipient, and have
>> received this message in error, please notify us immediately by reply e-mail
>> and then delete it from your system.
>> 
->>
-
>> 
>> -
>> To unsubscribe, e-mail: [EMAIL PROTECTED]
>> For additional commands, e-mail: [EMAIL PROTECTED]
>> 
>> 
>> 
>> 
> 
> 
> -
> To unsubscribe, e-mail: [EMAIL PROTECTED]
> For additional commands, e-mail: [EMAIL PROTECTED]


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



Re: StrutsCatalogInputOutputSeparation

2005-05-10 Thread Dave Newton
Aladin Alaily wrote:
Doesn't putting all of the output data in the session or even in the 
request add even more clutter and confusion?  When the data is nicely 
packaged in an object you can manipulate it more easily and you can 
keep track of where the information came from.  Although using an 
ActionForm for this purpose might confuse some, I think that it is a 
better alternative than putting the data in the session or request scope.
Isn't that where ActionForms are? In any case, nobody said it couldn't 
be encapsulated in some nice, tidy object.

One project I saw had "output" data in ActionForms: hit a page, the 
ActionForm is loaded (for instance, with a list of headlines, etc.) by 
Struts then used on the page as an output object.

I was opposed, although it was nice that it was magickally instantiated 
and the logic was completely removed from the Action. However, 
everything was tied to Struts and I couldn't reuse functionality in 
non-Struts code.

I think whether or not ActionForms are input or output could be argued 
either way. Even the Struts page says:

*"Note:* While ActionForm beans often have properties that correspond to 
properties in your Model beans, the form beans themselves should be 
considered a Controller component. As such, they are able to transfer 
data between the Model and View layers."

That said, I've never (and most likely never will) put data into an 
ActionForm that isn't destined for an HTML form: I like the _concept_ of 
putting "output" in ActionForms but think that ActionForms are best 
reserved for HTML forms. Output data belongs elsewhere, preferably in a 
nice automagically-instantiated ActionForm analogue, decoupled from Struts.

Dave


Re: StrutsCatalogInputOutputSeparation

2005-05-10 Thread Aladin Alaily
Hi Paul,
Doesn't putting all of the output data in the session or even in the 
request add even more clutter and confusion?  When the data is nicely 
packaged in an object you can manipulate it more easily and you can keep 
track of where the information came from.  Although using an ActionForm 
for this purpose might confuse some, I think that it is a better 
alternative than putting the data in the session or request scope.

Aladin
Benedict, Paul C wrote:
I have read Michael Jouravlev's article:
http://wiki.apache.org/struts/StrutsCatalogInputOutputSeparation
I can't find any blog or comment box on the page, so I'll write here. I
would like people to freely respond to my comments.
I disagree with the two-actions methodology to solve the separation of input
and output data. If Actions are a web-interface into your business logic,
there is no need to go into another action to do more processing; I believe
the chains approach in Struts 1.3 solves this problem by keeping chains of
logic below the Web/Struts layer. 

This technique is known as ActionChaining and, as I agree, it seems to be
frowned upon:
http://wiki.apache.org/struts/ActionChaining
I personally do not like putting any output data in the form unless it
started as input. I envision ActionForms to be tightly linked to HTML forms.
Conceptually speaking, since HTML forms can only contain input-like
elements, so should only ActionForm objects too. I put my output data
exclusively in request or session attributes as necessary, but never the
form; I believe this complicates and misuses the conception of a form.
I am ready to be disagreed with... But I want to know why.
Thanks,
Paul


--
Notice:  This e-mail message, together with any attachments, contains information of 
Merck & Co., Inc. (One Merck Drive, Whitehouse Station, New Jersey, USA 08889), 
and/or its affiliates (which may be known outside the United States as Merck Frosst, 
Merck Sharp & Dohme or MSD and in Japan, as Banyu) that may be confidential, 
proprietary copyrighted and/or legally privileged. It is intended solely for the use of 
the individual or entity named on this message.  If you are not the intended recipient, 
and have received this message in error, please notify us immediately by reply e-mail 
and then delete it from your system.
--
-
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]



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


Re: StrutsCatalogInputOutputSeparation

2005-05-10 Thread Pedro Salgado
On 10/05/2005 21:30, "Benedict, Paul C" <[EMAIL PROTECTED]> wrote:

> I have read Michael Jouravlev's article:
> http://wiki.apache.org/struts/StrutsCatalogInputOutputSeparation
> 
> I can't find any blog or comment box on the page, so I'll write here. I
> would like people to freely respond to my comments.
> 
> I disagree with the two-actions methodology to solve the separation of input
> and output data. If Actions are a web-interface into your business logic,
> there is no need to go into another action to do more processing; I believe
> the chains approach in Struts 1.3 solves this problem by keeping chains of
> logic below the Web/Struts layer.
> 
> This technique is known as ActionChaining and, as I agree, it seems to be
> frowned upon:
> http://wiki.apache.org/struts/ActionChaining
> 
> I personally do not like putting any output data in the form unless it
> started as input. I envision ActionForms to be tightly linked to HTML forms.
> Conceptually speaking, since HTML forms can only contain input-like
> elements, so should only ActionForm objects too. I put my output data
> exclusively in request or session attributes as necessary, but never the
> form; I believe this complicates and misuses the conception of a form.

I also agree with you.
I even created some small package to make my own "viewbeans".

Pedro Salgado

> 
> I am ready to be disagreed with... But I want to know why.
> 
> Thanks,
> Paul
> 
> 
> 
> 
> 
> 
> --
> Notice:  This e-mail message, together with any attachments, contains
> information of Merck & Co., Inc. (One Merck Drive, Whitehouse Station, New
> Jersey, USA 08889), and/or its affiliates (which may be known outside the
> United States as Merck Frosst, Merck Sharp & Dohme or MSD and in Japan, as
> Banyu) that may be confidential, proprietary copyrighted and/or legally
> privileged. It is intended solely for the use of the individual or entity
> named on this message.  If you are not the intended recipient, and have
> received this message in error, please notify us immediately by reply e-mail
> and then delete it from your system.
> --
> 
> -
> To unsubscribe, e-mail: [EMAIL PROTECTED]
> For additional commands, e-mail: [EMAIL PROTECTED]


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



StrutsCatalogInputOutputSeparation

2005-05-10 Thread Benedict, Paul C
I have read Michael Jouravlev's article:
http://wiki.apache.org/struts/StrutsCatalogInputOutputSeparation

I can't find any blog or comment box on the page, so I'll write here. I
would like people to freely respond to my comments.

I disagree with the two-actions methodology to solve the separation of input
and output data. If Actions are a web-interface into your business logic,
there is no need to go into another action to do more processing; I believe
the chains approach in Struts 1.3 solves this problem by keeping chains of
logic below the Web/Struts layer. 

This technique is known as ActionChaining and, as I agree, it seems to be
frowned upon:
http://wiki.apache.org/struts/ActionChaining

I personally do not like putting any output data in the form unless it
started as input. I envision ActionForms to be tightly linked to HTML forms.
Conceptually speaking, since HTML forms can only contain input-like
elements, so should only ActionForm objects too. I put my output data
exclusively in request or session attributes as necessary, but never the
form; I believe this complicates and misuses the conception of a form.

I am ready to be disagreed with... But I want to know why.

Thanks,
Paul






--
Notice:  This e-mail message, together with any attachments, contains 
information of Merck & Co., Inc. (One Merck Drive, Whitehouse Station, New 
Jersey, USA 08889), and/or its affiliates (which may be known outside the 
United States as Merck Frosst, Merck Sharp & Dohme or MSD and in Japan, as 
Banyu) that may be confidential, proprietary copyrighted and/or legally 
privileged. It is intended solely for the use of the individual or entity named 
on this message.  If you are not the intended recipient, and have received this 
message in error, please notify us immediately by reply e-mail and then delete 
it from your system.
--

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



Re: Radio button for a 3rd level list

2005-05-10 Thread Rick Reumann
Kalyan Ayyagari wrote the following on 5/10/2005 12:16 PM:
Here is what I'm trying to do:
I get the top level list from the backend. The list contains the other lists
that I already described before. Apart from that it contains the information
based on which I have to generate the UI. That is, my UI might look like
this:
---
GROUP-1:
ITEM-11
  . component111
. component112
. component113
  ITEM-12
= component121
= component122
= component123
GROUP-2:
   ...
   ...

The back-end might specify that I need to use radio buttons for components
under ITEM-11 and use checkboxes for ITEM-12.
I can use the ids for value of radio buttons instead of trying to set a
boolean as you said. But I'm not sure how I can do this.
But what is that you truly need when the user submits this form? Is it 
just the comonents they selected?

The cleanest solution would be if you could add an
Integer componentSelected property to the Item object.
Then on the form, it depends on how you are building it. I suggest for 
this using the nested tags... makes thigns clean (I use some JSTL here
using c:out but you can use bean or nested:write if you want).




   
   
  
 
<%--in above '/' is important-goes up a leve to item--%>
 
  
   



When the form submits you'll then be able to pull out all the "Item" 
objects and look at the "componentSelected" property in each Item which 
will give you the component ID of the one selected in the Item';s group.

I didn't test the above so there might be a typo. I think the above is 
your cleanest solution.

There are other ways you can accomplish what you want but what makes it 
a bit tricky is the "radio" button concept set up in groups. You can 
avoid using the Item object to hold the componentSelected property if 
you instead decide to make your own separate object to hold it. In that 
case you could have...

MyObjectForHoldingSelected
  Integer componentID;
In form Bean...
List listOfMyObjects //holds list of MyObjectForHoldingSelecte objects
Then this section below would be replaced..
replace..

 
<%--in above '/' is important-goes up a leve to item--%>
 
  
with...

   
  
  
   

With the above though you'll have to use a LazyList or make you give the 
List and appropriate size to accomodate the number of items you'll need 
or you'll get indexOfOutOfBounds errors. THe first solution won't give 
you those problems.

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


Re: Cannot find bean error in any scope

2005-05-10 Thread Michael Jouravlev
I already caught this one ;) But this is not it this time. Thanks!

On 5/10/05, Simon Chappell <[EMAIL PROTECTED]> wrote:
> I also had this error recently when I inadvertently left out a taglib
> in the header of my JSP. Took me a while to catch that one because the
> symptom and the cause were so different.
> 
> Simon
> 
> On 5/10/05, Rick Reumann <[EMAIL PROTECTED]> wrote:
> > Niall Pemberton wrote the following on 5/10/2005 12:49 PM:
> > > My guess that one of your message keys is incorrect/missing. Are your
> > > message resources configured to NOT return null in your struts-config.xml?
> > >
> >
> > And this could probably explain why Michael can't always repeat the
> > error since probably one of the errors being added in the Action isn't
> > always being added under all circumstances. Michael, make sure all of
> > the keys like "some.key", when you do..
> >
> > new ActionMessage("some.key"  are in your resources file.
> >
> > --
> > Rick

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



Re: Browser Refresh & Reload

2005-05-10 Thread Michael Jouravlev
Same stuff different day. I hope I will not be accused in
self-advertising again ;)

Anyway, here is how I solve this problem:
* There is permanent storage (database)
* There is business object, which can be loaded from database.
* There is a temporary area in the session ("current item")
* "Current item" contains a _working copy_ of persistent business
object (along with messages, more on them further). Current item is
the one that you are editing or viewing.
* There is a form, which does not care, where the data that it shows,
comes from. All it knows, that when is receives object ID, it must
show object's data.
* When form receives object ID, it checks "current item" first. If it
has object with needed ID in it, form uses object's properties.
* If object with needed ID is not loaded in "current item", then
current item is discarded (cuurently just one per session, per EDIT or
VIEW operations), object is loaded from database into current item,
and copied to the form bean.
* When reset is clicked, current item is reloaded from database, then
page is refreshed (with current data, as you may have guessed)
* When Cancel is clicked, current item is disposed, database is not affected.

Oh, yeah, and the cherry on the cake:

* error messages are stored in the "current item" along with business
object, but messages themselves are not part of persistent object.
* each time page is reloaded, messages are redisplayed
* when changes are reset or canceled, messages are cleared.

Check out this link: http://www.superinterface.com/rdapp/viewList.do
Granted, it does not have reset, but to add it would be a ten-minute
deal. Click "edit", try to enter some non-integer stuff. Try to
reload, see, messages are reloaded as well. Then click Back, see that
you return to the list _immediately_. You do not need to click Back as
many times, as many times you entered wrong data. Then you can edit
the same item again, or just click Forward. See, it is the same old
item, reloaded. Back/Forward is like reset. Adding explicit reset
processing will be really simple.

I don't want to share the source code now, since I am about to
overhaul it and to release together with dialog/wizard library.
Hopefully, no more than two weeks.

Michael.

On 5/10/05, Nancy Lin <[EMAIL PROTECTED]> wrote:
> All,
> 
> I have a button action named "reset".  The busines requirement for
> reset buttion are:
> 
>   a)  Roll back the changes if reset button is clicked
>   b)  If user modify something data and causes error, the reset
>   button will act like a cancel button and remain on the same
>   page.
> 
> This "Remain on the same page" is something like reload.  I need to
> be able to reload the page with it's original information, not the
> information modified that causes the error.
> 
> Any suggestions?
> 
> P.S.  This is like chaining action, but instead of calling a
> different action, I want to reload the same action.
> 
> Thanks.
> Nancy.

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



Re: Cannot find bean error in any scope

2005-05-10 Thread Simon Chappell
I also had this error recently when I inadvertently left out a taglib
in the header of my JSP. Took me a while to catch that one because the
symptom and the cause were so different.

Simon

On 5/10/05, Rick Reumann <[EMAIL PROTECTED]> wrote:
> Niall Pemberton wrote the following on 5/10/2005 12:49 PM:
> > My guess that one of your message keys is incorrect/missing. Are your
> > message resources configured to NOT return null in your struts-config.xml?
> >
> 
> And this could probably explain why Michael can't always repeat the
> error since probably one of the errors being added in the Action isn't
> always being added under all circumstances. Michael, make sure all of
> the keys like "some.key", when you do..
> 
> new ActionMessage("some.key"  are in your resources file.
> 
> --
> Rick
> 
> -
> To unsubscribe, e-mail: [EMAIL PROTECTED]
> For additional commands, e-mail: [EMAIL PROTECTED]
> 
>

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



Browser Refresh & Reload

2005-05-10 Thread Nancy Lin
All,

I have a button action named "reset".  The busines requirement for
reset buttion are:

  a)  Roll back the changes if reset button is clicked
  b)  If user modify something data and causes error, the reset
  button will act like a cancel button and remain on the same 
  page.

This "Remain on the same page" is something like reload.  I need to
be able to reload the page with it's original information, not the
information modified that causes the error.


Any suggestions?

P.S.  This is like chaining action, but instead of calling a
different action, I want to reload the same action.

Thanks.
Nancy.



Discover Yahoo! 
Find restaurants, movies, travel and more fun for the weekend. Check it out! 
http://discover.yahoo.com/weekend.html 


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



Re: Cannot find bean error in any scope

2005-05-10 Thread Rick Reumann
Niall Pemberton wrote the following on 5/10/2005 12:49 PM:
My guess that one of your message keys is incorrect/missing. Are your
message resources configured to NOT return null in your struts-config.xml?
And this could probably explain why Michael can't always repeat the 
error since probably one of the errors being added in the Action isn't 
always being added under all circumstances. Michael, make sure all of 
the keys like "some.key", when you do..

new ActionMessage("some.key"  are in your resources file.
--
Rick
-
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]


Re: Any way to retrieve the index of html:select?

2005-05-10 Thread Rick Reumann
Vijaya S wrote the following on 5/9/2005 1:40 AM:
You can create a bean using LabelValueBean in which the label will be male,
female and the value will be 1, 2.  In your jsp you do the following



On submit, your form-property-name will have the values 1 or 2 depending on
the selection.
Yes, but this doesn't solve his problem unless you make sure the obove 
bean is really a Map where you can look up the name based on the value. 
This is one option, but not always possible if you are working with a 
collection of beans you get from backend.

I usually opt to use a hidden param and use javascript to set it...

...



Tim's idea of using a compound value is also good where you parse it out 
in the Action.

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


Re: Validating LazyValidatorForm

2005-05-10 Thread Michael Jouravlev
I find things like this disturbing:

=== cut here ===
BeanValidatorForm: Validating ActionForm 'eddForm' using key
 'AddBoxAction' for mapping '/AddBoxAction'
RequestProcessor:   No errors detected, accepting input
=== cut here ===

If validator cannot not match key and mapping, should not it throw an
exception right away, instead of accepting input? Is not this a bug?

Michael.

On 5/10/05, Vincent <[EMAIL PROTECTED]> wrote:
> took the leading "/" in validation.xml. Works like a charm now.
> Thanks!
> 
> Niall Pemberton wrote:
> > If you use "setPathValidation(true)" it uses a key of the path name - with
> > the leading "/" stripped off. Either you need to specify the form name in
> > your validation.xml without the leading "/" - or in your custom class
> > override the getValidationKey() method (rather than using  the
> > setPathValidation() method):
> >
> > public String getValidationKey(ActionMapping mapping,
> >   HttpServletRequest request) {
> > return mapping.getPath();
> > }
> >
> > Niall
> >
> > - Original Message -
> > From: "Vincent" <[EMAIL PROTECTED]>
> > Sent: Tuesday, May 10, 2005 5:47 PM
> >
> >
> >
> >>Hello All,
> >>As the subject says I am having some trouble
> >>trying to validate a LazyValidatorForm. Using the great examples
> >>on the LazyValidatorForm page I created a custom class with
> >>the required: setPathValidation(true) in the
> >>constructor.
> >>
> >>The Action path calling the form is "/AddBoxAction"
> >>and validation= "true"
> >>
> >>
> >>the following is from validation.xml:
> >>
> >>  
> >>>>depends="required">
> >>
> >> 
> >> 
> >>
> >>
> >>The above is just the latest iteration, nothing I try seems
> >>to have any effect at all on what I type in this text field.
>
> from the log I get:
> 
> RequestProcessor: Processing a 'POST' for path '/AddBoxAction'
> RequestUtils:  Looking for ActionForm bean instance in scope 'session'
> under attribute key 'eddForm'
> RequestUtils:  Can recycle existing ActionForm instance of type
> 'xxx.webapp.forms.NestedLazyForm'?: true
> RequestUtils:  --> [EMAIL PROTECTED]
> RequestProcessor:  Storing ActionForm bean instance in scope 'session'
> under attribute key 'eddForm'
> RequestProcessor:  Populating bean properties from this request
> RequestProcessor:  Validating input form properties
> BeanValidatorForm: Validating ActionForm 'eddForm' using key
> 'AddBoxAction' for mapping '/AddBoxAction'
> RequestProcessor:   No errors detected, accepting input

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



Re: Validating LazyValidatorForm

2005-05-10 Thread Vincent
took the leading "/" in validation.xml. Works like a charm now.
Thanks!
Niall Pemberton wrote:
If you use "setPathValidation(true)" it uses a key of the path name - with
the leading "/" stripped off. Either you need to specify the form name in
your validation.xml without the leading "/" - or in your custom class
override the getValidationKey() method (rather than using  the
setPathValidation() method):
public String getValidationKey(ActionMapping mapping,
  HttpServletRequest request) {
return mapping.getPath();
}
Niall
- Original Message - 
From: "Vincent" <[EMAIL PROTECTED]>
Sent: Tuesday, May 10, 2005 5:47 PM


Hello All,
As the subject says I am having some trouble
trying to validate a LazyValidatorForm. Using the great examples
on the LazyValidatorForm page I created a custom class with
the required: setPathValidation(true) in the
constructor.
The Action path calling the form is "/AddBoxAction"
and validation= "true"
the following is from validation.xml:
 
  
   


The above is just the latest iteration, nothing I try seems
to have any effect at all on what I type in this text field.


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

--
Plato is my friend, Aristotle is my friend, but my greatest friend is truth.
- Isaac Newton
-
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]


Re: Cannot find bean error in any scope

2005-05-10 Thread Michael Jouravlev
Why would it be missing, if it was not missing before? I changed only
java code, and in the different action.

Resources configured to return null. Well, whatever it returns, it
does not return ???key??? instead of displaying null. This is a very
helpful hint, I will put null="false" and try it today. I also will
try to debug JSP. I am not sure that I can run 1.3 on Tomcat 4.06,
though. But I had the same issue with 1.2.4 as well.

Thanks.

On 5/10/05, Niall Pemberton <[EMAIL PROTECTED]> wrote:
> My guess that one of your message keys is incorrect/missing. Are your
> message resources configured to NOT return null in your struts-config.xml?
> 
> Niall
> 
> - Original Message -
> From: "Michael Jouravlev" <[EMAIL PROTECTED]>
> Sent: Tuesday, May 10, 2005 7:53 AM
> 
> This is ridiculous. I cannot find what the problem is, it depends on
> the phase of the Moon. I have exactly the same problem as this one:
> 
>   http://marc.theaimsgroup.com/?l=struts-user&m=111348029907000&w=2
> 
> Which is, I have the following block:
> 
> 
> 
>  
>  
>  
> 
> 
> 
> which throws javax.servlet.ServletException: Cannot find bean error in any
> scope

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



Re: Global scope

2005-05-10 Thread gdeschen
True for the Action and Action Form, but the original code snippet is a 
ServletContextListener and that the methods get called once when the 
application is deployed and undeployed.
At this point (since I'm no expert in the specification) I believe that 
the Request object is not yet available.

public class ApplicationContextListener implements ServletContextListener 
{

private ServletContext servletContext = null;

public void contextInitialized(ServletContextEvent arg0) {
servletContext = arg0.getServletContext();
ApplicationBean applicationBean = new ApplicationBean();
servletContext.setAttribute("applicationBean", 
applicationBean);
}

public void contextDestroyed(ServletContextEvent arg0) {
servletContext = arg0.getServletContext();
servletContext.removeAttribute("applicationBean");
}
}


Yeah, I think that it can be static.
Does it make a significant difference if it is or is not static ?

- Glenn





"Niall Pemberton" <[EMAIL PROTECTED]> 
10/05/2005 12:56 PM
Please respond to
"Struts Users Mailing List" 


To
"Struts Users Mailing List" 
cc

Subject
Re: Global scope
Classification








The Action and ActionForm both should have the servlet variable 
initialized.
Thats a better way of getting the ServletContext:

   servlet.getServletContext();

Niall

- Original Message - 
From: "Michael Jouravlev" <[EMAIL PROTECTED]>
Sent: Tuesday, May 10, 2005 5:09 PM


request.getSession().getServletContext();

I guess, servlet context makes sense even without session, but this
seems to be the easiest way to obtain it through the request, which is
passed to your reset(), validate() and execute() methods.

On 5/10/05, Nils Liebelt <[EMAIL PROTECTED]> wrote:
> Can the servletcontext declared as static:
>
> private static ServletContext servletContext;
>
> Not sure about it? Makes sense to me.
>
> GreetZ
>
> Nils



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





Re: Validating LazyValidatorForm

2005-05-10 Thread Niall Pemberton
If you use "setPathValidation(true)" it uses a key of the path name - with
the leading "/" stripped off. Either you need to specify the form name in
your validation.xml without the leading "/" - or in your custom class
override the getValidationKey() method (rather than using  the
setPathValidation() method):

public String getValidationKey(ActionMapping mapping,
  HttpServletRequest request) {
return mapping.getPath();
}

Niall

- Original Message - 
From: "Vincent" <[EMAIL PROTECTED]>
Sent: Tuesday, May 10, 2005 5:47 PM


> Hello All,
> As the subject says I am having some trouble
> trying to validate a LazyValidatorForm. Using the great examples
> on the LazyValidatorForm page I created a custom class with
> the required: setPathValidation(true) in the
> constructor.
>
> The Action path calling the form is "/AddBoxAction"
> and validation= "true"
>
>
> the following is from validation.xml:
>
>   
> depends="required">
> 
>  
>  
>
>
> The above is just the latest iteration, nothing I try seems
> to have any effect at all on what I type in this text field.



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



Re: Global scope

2005-05-10 Thread Niall Pemberton
The Action and ActionForm both should have the servlet variable initialized.
Thats a better way of getting the ServletContext:

   servlet.getServletContext();

Niall

- Original Message - 
From: "Michael Jouravlev" <[EMAIL PROTECTED]>
Sent: Tuesday, May 10, 2005 5:09 PM


request.getSession().getServletContext();

I guess, servlet context makes sense even without session, but this
seems to be the easiest way to obtain it through the request, which is
passed to your reset(), validate() and execute() methods.

On 5/10/05, Nils Liebelt <[EMAIL PROTECTED]> wrote:
> Can the servletcontext declared as static:
>
> private static ServletContext servletContext;
>
> Not sure about it? Makes sense to me.
>
> GreetZ
>
> Nils



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



Validating LazyValidatorForm

2005-05-10 Thread Vincent
Hello All,
As the subject says I am having some trouble
trying to validate a LazyValidatorForm. Using the great examples
on the LazyValidatorForm page I created a custom class with
the required: setPathValidation(true) in the
constructor.
The Action path calling the form is "/AddBoxAction"
and validation= "true"
the following is from validation.xml:
 
  
   


The above is just the latest iteration, nothing I try seems
to have any effect at all on what I type in this text field.
from the log I get:
RequestProcessor: Processing a 'POST' for path '/AddBoxAction'
RequestUtils:  Looking for ActionForm bean instance in scope 'session' 
under attribute key 'eddForm'
RequestUtils:  Can recycle existing ActionForm instance of type 
'xxx.webapp.forms.NestedLazyForm'?: true
RequestUtils:  --> [EMAIL PROTECTED]
RequestProcessor:  Storing ActionForm bean instance in scope 'session' 
under attribute key 'eddForm'
RequestProcessor:  Populating bean properties from this request
RequestProcessor:  Validating input form properties
BeanValidatorForm: Validating ActionForm 'eddForm' using key 
'AddBoxAction' for mapping '/AddBoxAction'
RequestProcessor:   No errors detected, accepting input

This is right after I submitted a form with an empty textbox with the
property of "howManyNewBoxes"
Is everyone else able to validate ok?
Thanks in advance,
Vincent
--
Plato is my friend, Aristotle is my friend, but my greatest friend is truth.
- Isaac Newton
-
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]


Re: Cannot find bean error in any scope

2005-05-10 Thread Niall Pemberton
My guess that one of your message keys is incorrect/missing. Are your
message resources configured to NOT return null in your struts-config.xml?

Niall

- Original Message - 
From: "Michael Jouravlev" <[EMAIL PROTECTED]>
Sent: Tuesday, May 10, 2005 7:53 AM


This is ridiculous. I cannot find what the problem is, it depends on
the phase of the Moon. I have exactly the same problem as this one:

  http://marc.theaimsgroup.com/?l=struts-user&m=111348029907000&w=2

Which is, I have the following block:



 
 
 



which throws javax.servlet.ServletException: Cannot find bean error in any
scope



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



Re: Reg. ClassCastException:ActionErrors

2005-05-10 Thread Niall Pemberton
Since you're using a custom RequestProcessor how can we help without knowing
what code is in there? Also you don't say what version of Struts you're
using.

Niall

- Original Message - 
From: "Iyanu, Rajasekaran" <[EMAIL PROTECTED]>
Sent: Tuesday, May 10, 2005 11:08 AM

 Hi,

 I'm getting the following exception when I enable validation for my
entry page..
 Can anyone please help me with a resolution in this regard.

CallStack:
java.lang.ClassCastException:
org.apache.struts.action.ActionErrors
at
com.fidelity.ewp.framework.web.EwpErrorsData.init(EwpErrorsData.java:72)
at
com.fidelity.ewp.framework.web.EwpTilesRequestProcessor.processValidate(
EwpTilesRequestProcessor.java:479)
at
org.apache.struts.action.RequestProcessor.process(RequestProcessor.java:
348)
at
com.fidelity.electra.web.ElectraRequestProcessor.process(ElectraRequestP
rocessor.java:71)



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



Re: datePatternStrict for MM/dd/yyyy seems to allow 04/04/200w

2005-05-10 Thread Niall Pemberton
SimpleDateFormat does indeed parse this value as a valid date.

Niall

- Original Message - 
From: "Robert Taylor" <[EMAIL PROTECTED]>
Sent: Tuesday, May 10, 2005 10:34 AM


> Greetings, I'm using Struts 1.2.7 and trying to validate a date field
> using the datePatternStrict with a date format of MM/dd/. Everything
> seems to work as expected until I enter a date like 04/04/200w. It seems
> that the date validation routine thinks that this is a valid date...or
> atleast it allows validation of the date field to pass. The docs say
> that date validation leverages SimpleDateFormat so I looked at the
> javadocs, but found nothing to indicate that parsing "04/04/200w" should
> pass (although I haven't tested it explicitely with just
SimpleDateFormat).
>
> I'm using the following snippet in my validation.xml file:
>
datePatternStrictMM/dd/

>
> BTW, the javascript for date validation seems to catch this, but the
> server side validation does not.
>
> I must be doing something wrong or this must be a known issue.



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



Re: Global scope

2005-05-10 Thread Michael Jouravlev
request.getSession().getServletContext();

I guess, servlet context makes sense even without session, but this
seems to be the easiest way to obtain it through the request, which is
passed to your reset(), validate() and execute() methods.

On 5/10/05, Nils Liebelt <[EMAIL PROTECTED]> wrote:
> Can the servletcontext declared as static:
> 
> private static ServletContext servletContext;
> 
> Not sure about it? Makes sense to me.
> 
> GreetZ
> 
> Nils

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



RE: Radio button for a 3rd level list

2005-05-10 Thread Kalyan Ayyagari
Thanks Rick for the response.

Here is what I'm trying to do:
I get the top level list from the backend. The list contains the other lists
that I already described before. Apart from that it contains the information
based on which I have to generate the UI. That is, my UI might look like
this:

---

GROUP-1:
ITEM-11
  . component111
. component112
. component113

  ITEM-12
= component121
= component122
= component123

GROUP-2:
   ...
   ...



The back-end might specify that I need to use radio buttons for components
under ITEM-11 and use checkboxes for ITEM-12.

I can use the ids for value of radio buttons instead of trying to set a
boolean as you said. But I'm not sure how I can do this.

Thanks,
Kalyan
-Original Message-
From: Rick Reumann [mailto:[EMAIL PROTECTED] 
Sent: Tuesday, May 10, 2005 11:00 AM
To: Struts Users Mailing List
Subject: Re: Radio button for a 3rd level list

Kalyan Ayyagari wrote the following on 5/10/2005 10:47 AM:
> 
> public class Component{
> int id;
> 
> boolean amISelected; }
> 
> My JSP needs to have a radio button for each component. For example, say
> level3List has 3 components, red, green and blue. Then the JSP will have 3
> radio buttons, one for red, one for green and one for blue. Now let's say
> that we have only clicked the radio button for red. Now when we submit the
> form I want the boolean amIselected for red to be true; and false for
green
> and blue.

Well, this can be a little tricky or really simple. The first thing I 
need to ask is "What is your business requirement that you are actually 
trying to tackle?" The reason I ask this is, before I get into how you 
can do what you want, their could possibly be a much cleaner solution.

For example, if you want the user to "select" between three components, 
even if selecting between multiple sets of three components (red, green, 
blue). Why not provide radio buttons but for the value simply provide 
the unique componentID for the value ? Then when the form submits you 
have the 'id's of the components the user selected? I think this would 
be a much cleaner solution, however sometimes you do need to do 
something like you are describing, so there are ways.

The tricky part is that name of each radio button would be different 
based on the fact that you are wanting to modify a property of bean in 
the form (not a simple boolean property directly in the form). I think 
you would have to use javascript here. I'd probably go with a checkbox 
for each and although the names would be different for the checkbox, you 
could give them all a similar id based on your iteration. Then when one 
is checked you'd pass in the id of that checkbox and your javascript 
function would know how to turn off the other ones. Again, first step is 
figuring out what exactly you need to capture, because my guess is you 
don't have to go this route.


-- 
Rick

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



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



Re: Feature wanted: autocomplete attribute for html:text/form tag s

2005-05-10 Thread Niall Pemberton
Since Struts 1.2.5 the html tags have had some re-factoring that makes it
easier to create your own custom version. All you need to do is extend the
TextTag, add appropriate getter/setter methods for a new "autocomplete"
property and override the prepareOtherAttributes() method to output your
additional attribute:

protected void prepareOtherAttributes(StringBuffer handlers) {
prepareAttribute(handlers, "autocomplete", getAutocomplete());
}

You will also either need to modify the struts tld to point to your custom
tag and add your additional attribute - or create your own tld for the
custom tag.

Bug 1598 talked about adding the kind of facility you mention, but no-ones
done anything about it and there are other bug tickets which are related:

http://issues.apache.org/bugzilla/show_bug.cgi?id=1598
http://issues.apache.org/bugzilla/show_bug.cgi?id=29379
http://issues.apache.org/bugzilla/show_bug.cgi?id=32215

Niall

- Original Message - 
From: "Tomasz Nazar" <[EMAIL PROTECTED]>
Sent: Monday, May 09, 2005 7:15 PM


> On Mon, May 09, 2005 at 02:02:52PM -0400, Benedict, Paul C wrote:
> > Tomasz,
> >
> > If you need to output additional attributes, you don't use Struts to
write
> > that particular tag. You are not forced to use Strut's  tags.
> > Consider vanilla HTML -- the good ol' days -- and use EL to get what you
> > want from Struts.
>
> That's the way it works now. But, you know I like my work to be
> "consistent".
> I even don't like to use <%= .. %>. I treat Struts as a high level web
> framework and every exception (like "autocomplete") just isn't right..
>
> Anyway.. are there any efforts to introduce "options" or
> "autocomplete" attributes to those tags like T. Husted suggested?



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



Re: [OT] Help !! Too many select-box in one page

2005-05-10 Thread Frank W. Zammetti
I'd suggest doing some testing to determine where the delay is actually 
occurring... is it reading from the database that takes so long?  Is it 
transit time from the server to the client?  Is it rendering on the 
client?  The firsr two you should be able to determine on the 
server-side, then just subtract that out from the total time to see how 
long the client is taking.

If it's either of the first two then people have given you some options 
to explore already... if it's the later, you'll almost certainly have to 
refactor your design... the suggestion of populating the boxes via 
scripting is a good one, but I've done this extensively and so can tell 
you that it will become a bottleneck in a hurry, no to mention the fact 
that the perceived performance of your site can vary greatly depending 
on the clients' PC.

Hence, my suggestion... once you determine where the greatest amount of 
time is actually spent, then folks can probably help in a hurry :)

--
Frank W. Zammetti
Founder and Chief Software Architect
Omnytex Technologies
http://www.omnytex.com
John Fletcher wrote:
Cliff,

but each select in each list has the same options.
If each select in each list has the same options, you can just download
the options once to a javascript array and populate all of the select
boxes on the client side.  A quick example:

  var optionArray = {};

  function populateBoxes() {
var mySelectBox;
// You'll need to do this for each box on your form
for (var i = 0; i < optionArray.length; i++) {
  mySelectBox.options[i] = new Option(optionArray[i],
optionArray[i]);
}
  }

Call that populateBoxes function on startup.  Who knows how long that'll
take to populate client-side, but it should reduce your page size
considerably.  If you need different values than text in the select
boxes, you could either have a 2-dimensional array (which would require
different formatting for the values, or a different method of printing
them out in the javascript), or you could maintain 2 arrays, one for
values and one for text.  Note that you will need to know all of the
names of the select boxes unless you want to just loop through all of
the form elements and do the action for any of the select form elements
that you find.
Your CSV string that you drop into the optionArray will need to have
strings quoted if necessary of course.
John
-
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]



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


RE: Global scope

2005-05-10 Thread Nils Liebelt
Can the servletcontext declared as static:

private static ServletContext servletContext;


Not sure about it? Makes sense to me.


GreetZ

Nils




-Original Message-
From: [EMAIL PROTECTED] [mailto:[EMAIL PROTECTED] 
Sent: Tuesday, May 10, 2005 4:46 PM
To: Struts Users Mailing List
Subject: Re: Global scope

Take a look at this:

public class ApplicationContextListener implements ServletContextListener 
{

private ServletContext servletContext = null;

public void contextInitialized(ServletContextEvent arg0) {
servletContext = arg0.getServletContext();
ApplicationBean applicationBean = new ApplicationBean();
servletContext.setAttribute("applicationBean", 
applicationBean);
}

public void contextDestroyed(ServletContextEvent arg0) {
servletContext = arg0.getServletContext();
servletContext.removeAttribute("applicationBean");
}
}

HTH,
Glenn




"Nils Liebelt" <[EMAIL PROTECTED]> 
10/05/2005 10:41 AM
Please respond to
"Struts Users Mailing List" 


To
"'Struts Users Mailing List'" 
cc
<[EMAIL PROTECTED]>
Subject
Global scope
Classification








Hi everybody, 

 

Is there a global scope where you could dump e.g. a list of all users or
stuff that is needed in global context. Or just adding to each single
session?

 

 

GreetZ

 

Nils




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



RE: Global scope

2005-05-10 Thread Nils Liebelt
Can the servletcontext declared as static:

private static ServletContext servletContext;


Not sure about it? Makes sense to me.


GreetZ

Nils




-Original Message-
From: [EMAIL PROTECTED] [mailto:[EMAIL PROTECTED] 
Sent: Tuesday, May 10, 2005 4:46 PM
To: Struts Users Mailing List
Subject: Re: Global scope

Take a look at this:

public class ApplicationContextListener implements ServletContextListener 
{

private ServletContext servletContext = null;

public void contextInitialized(ServletContextEvent arg0) {
servletContext = arg0.getServletContext();
ApplicationBean applicationBean = new ApplicationBean();
servletContext.setAttribute("applicationBean", 
applicationBean);
}

public void contextDestroyed(ServletContextEvent arg0) {
servletContext = arg0.getServletContext();
servletContext.removeAttribute("applicationBean");
}
}

HTH,
Glenn




"Nils Liebelt" <[EMAIL PROTECTED]> 
10/05/2005 10:41 AM
Please respond to
"Struts Users Mailing List" 


To
"'Struts Users Mailing List'" 
cc
<[EMAIL PROTECTED]>
Subject
Global scope
Classification








Hi everybody, 

 

Is there a global scope where you could dump e.g. a list of all users or
stuff that is needed in global context. Or just adding to each single
session?

 

 

GreetZ

 

Nils




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



RE: [OT] Help !! Too many select-box in one page

2005-05-10 Thread John Fletcher
Cliff,

>>> but each select in each list has the same options.
If each select in each list has the same options, you can just download
the options once to a javascript array and populate all of the select
boxes on the client side.  A quick example:


  var optionArray = {};

  function populateBoxes() {
var mySelectBox;
// You'll need to do this for each box on your form
for (var i = 0; i < optionArray.length; i++) {
  mySelectBox.options[i] = new Option(optionArray[i],
optionArray[i]);
}
  }


Call that populateBoxes function on startup.  Who knows how long that'll
take to populate client-side, but it should reduce your page size
considerably.  If you need different values than text in the select
boxes, you could either have a 2-dimensional array (which would require
different formatting for the values, or a different method of printing
them out in the javascript), or you could maintain 2 arrays, one for
values and one for text.  Note that you will need to know all of the
names of the select boxes unless you want to just loop through all of
the form elements and do the action for any of the select form elements
that you find.

Your CSV string that you drop into the optionArray will need to have
strings quoted if necessary of course.

John


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



Re: Radio button for a 3rd level list

2005-05-10 Thread Rick Reumann
Kalyan Ayyagari wrote the following on 5/10/2005 10:47 AM:
public class Component{
int id;
boolean amISelected; }
My JSP needs to have a radio button for each component. For example, say
level3List has 3 components, red, green and blue. Then the JSP will have 3
radio buttons, one for red, one for green and one for blue. Now let's say
that we have only clicked the radio button for red. Now when we submit the
form I want the boolean amIselected for red to be true; and false for green
and blue.
Well, this can be a little tricky or really simple. The first thing I 
need to ask is "What is your business requirement that you are actually 
trying to tackle?" The reason I ask this is, before I get into how you 
can do what you want, their could possibly be a much cleaner solution.

For example, if you want the user to "select" between three components, 
even if selecting between multiple sets of three components (red, green, 
blue). Why not provide radio buttons but for the value simply provide 
the unique componentID for the value ? Then when the form submits you 
have the 'id's of the components the user selected? I think this would 
be a much cleaner solution, however sometimes you do need to do 
something like you are describing, so there are ways.

The tricky part is that name of each radio button would be different 
based on the fact that you are wanting to modify a property of bean in 
the form (not a simple boolean property directly in the form). I think 
you would have to use javascript here. I'd probably go with a checkbox 
for each and although the names would be different for the checkbox, you 
could give them all a similar id based on your iteration. Then when one 
is checked you'd pass in the id of that checkbox and your javascript 
function would know how to turn off the other ones. Again, first step is 
figuring out what exactly you need to capture, because my guess is you 
don't have to go this route.

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


RE: Global scope

2005-05-10 Thread Nils Liebelt
Ah looks gd thanks,

Cheers

Nils

-Original Message-
From: [EMAIL PROTECTED] [mailto:[EMAIL PROTECTED] 
Sent: Tuesday, May 10, 2005 4:46 PM
To: Struts Users Mailing List
Subject: Re: Global scope

Take a look at this:

public class ApplicationContextListener implements ServletContextListener 
{

private ServletContext servletContext = null;

public void contextInitialized(ServletContextEvent arg0) {
servletContext = arg0.getServletContext();
ApplicationBean applicationBean = new ApplicationBean();
servletContext.setAttribute("applicationBean", 
applicationBean);
}

public void contextDestroyed(ServletContextEvent arg0) {
servletContext = arg0.getServletContext();
servletContext.removeAttribute("applicationBean");
}
}

HTH,
Glenn




"Nils Liebelt" <[EMAIL PROTECTED]> 
10/05/2005 10:41 AM
Please respond to
"Struts Users Mailing List" 


To
"'Struts Users Mailing List'" 
cc
<[EMAIL PROTECTED]>
Subject
Global scope
Classification








Hi everybody, 

 

Is there a global scope where you could dump e.g. a list of all users or
stuff that is needed in global context. Or just adding to each single
session?

 

 

GreetZ

 

Nils




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



RE: Global scope

2005-05-10 Thread Nils Liebelt
Ah looks gd thanks,

Cheers

Nils

-Original Message-
From: [EMAIL PROTECTED] [mailto:[EMAIL PROTECTED] 
Sent: Tuesday, May 10, 2005 4:46 PM
To: Struts Users Mailing List
Subject: Re: Global scope

Take a look at this:

public class ApplicationContextListener implements ServletContextListener 
{

private ServletContext servletContext = null;

public void contextInitialized(ServletContextEvent arg0) {
servletContext = arg0.getServletContext();
ApplicationBean applicationBean = new ApplicationBean();
servletContext.setAttribute("applicationBean", 
applicationBean);
}

public void contextDestroyed(ServletContextEvent arg0) {
servletContext = arg0.getServletContext();
servletContext.removeAttribute("applicationBean");
}
}

HTH,
Glenn




"Nils Liebelt" <[EMAIL PROTECTED]> 
10/05/2005 10:41 AM
Please respond to
"Struts Users Mailing List" 


To
"'Struts Users Mailing List'" 
cc
<[EMAIL PROTECTED]>
Subject
Global scope
Classification








Hi everybody, 

 

Is there a global scope where you could dump e.g. a list of all users or
stuff that is needed in global context. Or just adding to each single
session?

 

 

GreetZ

 

Nils




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



multiple forms from 1 action

2005-05-10 Thread rmanchu
i have the following case:
click link "search" => action => output.jsp
output.jsp has 2 forms, both forms use a hidden variable "table"
link "search" passes parameter "table". action creates "search form" and 
"table" is correctly set by struts. now in output.jsp i have a tag that 
creates a "recent records" form using RequestUtils.createActionForm. 
however, in this form the "table" parameter is not set.

i thought if there were parameters that were of the same name as fields 
then they would be set? i must be doing something wrong here. doesn't 
creating the form, populate it? or is it separate?

 [snip]
Object tmp = request.getAttribute(formName);
if (tmp == null) {
ActionServlet servlet = getActionServlet(pCntxt);
ModuleConfig modConfig = getModuleConfig(pCntxt);
FormBeanConfig formBean = modConfig.findFormBeanConfig(formName);
tmp = RequestUtils.createActionForm(formBean, servlet);
}
// Dyna is guaranteed by struts-config - only extensios r used
return (DynaActionForm)tmp;
:(
riyaz
-
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]


Re: Global scope

2005-05-10 Thread gdeschen
Take a look at this:

public class ApplicationContextListener implements ServletContextListener 
{

private ServletContext servletContext = null;

public void contextInitialized(ServletContextEvent arg0) {
servletContext = arg0.getServletContext();
ApplicationBean applicationBean = new ApplicationBean();
servletContext.setAttribute("applicationBean", 
applicationBean);
}

public void contextDestroyed(ServletContextEvent arg0) {
servletContext = arg0.getServletContext();
servletContext.removeAttribute("applicationBean");
}
}

HTH,
Glenn




"Nils Liebelt" <[EMAIL PROTECTED]> 
10/05/2005 10:41 AM
Please respond to
"Struts Users Mailing List" 


To
"'Struts Users Mailing List'" 
cc
<[EMAIL PROTECTED]>
Subject
Global scope
Classification








Hi everybody, 

 

Is there a global scope where you could dump e.g. a list of all users or
stuff that is needed in global context. Or just adding to each single
session?

 

 

GreetZ

 

Nils




Global scope

2005-05-10 Thread Nils Liebelt
Hi everybody, 

 

Is there a global scope where you could dump e.g. a list of all users or
stuff that is needed in global context. Or just adding to each single
session?

 

 

GreetZ

 

Nils



Global scope

2005-05-10 Thread Nils Liebelt
Hi everybody, 

 

Is there a global scope where you could dump e.g. a list of all users or
stuff that is needed in global context. Or just adding to each single
session?

 

 

GreetZ

 

Nils



Radio button for a 3rd level list

2005-05-10 Thread Kalyan Ayyagari
My form contains a list, say topLevelList. topLevelList in turn contains
lists, lets say level2List(s). This level2List in turn contains lists, say
level3List(s).

Level3List contains objects of type Component.

 

public class Component{

 

int id;

boolean amISelected;

 

}

 

My JSP needs to have a radio button for each component. For example, say
level3List has 3 components, red, green and blue. Then the JSP will have 3
radio buttons, one for red, one for green and one for blue. Now let's say
that we have only clicked the radio button for red. Now when we submit the
form I want the boolean amIselected for red to be true; and false for green
and blue.

 

How can I do it?

 

I tried to search for a similar post but couldn't find one. If there is a
similar post already and I've missed it then please point me to it.

 

Thanks,

Kalyan



RE: Multiple tiles layouts for single application

2005-05-10 Thread Benedict, Paul C
Andreas,

This is a wild solution. I don't understand page 15 and I've used Tiles
before, but not in this way. Could you explain it?

-Original Message-
From: Andreas Toom [mailto:[EMAIL PROTECTED] 
Sent: Tuesday, May 10, 2005 1:58 AM
To: Struts Users Mailing List
Subject: Re: Multiple tiles layouts for single application


Hello again, great pdf there, solved my problem nice and easy. Instead 
of a jsp in the path attribute of a definition I used a struts action 
which forwards to the right template, should work really nice.

Thank you very much for the help!

/Andreas

Allistair Crossley wrote:
> http://www.lifl.fr/~dumoulin/tiles/tilesAdvancedFeatures.pdf
> 
> page 15 may help you
> 
> Cheers.
> 
> 
>>-Original Message-
>>From: Andreas Toom [mailto:[EMAIL PROTECTED]
>>Sent: 09 May 2005 15:33
>>To: Struts Users Mailing List
>>Subject: Re: Multiple tiles layouts for single application
>>
>>
>>Yes, but a tile definition is just a.. tile definition. All my 
>>definitions extends a base tile:
>>
>>>path="/front/tiles/tiles_front_main.jsp">
>>  
>>  
>>
>>
>>>extends="com.acme.web.search.tiles.main">
>>  
>>
>>
>>And my forwards are:
>>
>>
>>
>>
>>So now, if a request has been made to 
>>http://mysite/?layout=layout1 or 
>>whatever it seems like a nice solution not have to change 
>>anything in my 
>>action configuration and instead have a filter/extension of a 
>>controller 
>>indicating which tile definitions to use, is this possible? 
>>or do I have 
>>to add a action-mapping/forward for each new site I want enable this 
>>search functionality?
>>
>>As I sad before, the main problem as I see it is the input 
>>parameter in 
>>form validation, I guess I could solve it with some action in 
>>the input 
>>parameter instead, but all those solutions feel ugly and 
>>leaves me with 
>>much work if anything is about to change..
>>
>>Any other ideas? :)
>>
>>/Andreas
>>
>>Allistair Crossley wrote:
>>
>>>Your requests should be routing through a Struts Controller 
>>
>>via an ActionMapping, and therefore your Action can examine 
>>the request and return the appropriate view which will be a 
>>forward to the tile definition of your choice.
>>
>>>Cheers, Allistair.
>>>
>>>
>>>
-Original Message-
From: Andreas Toom [mailto:[EMAIL PROTECTED]
Sent: 09 May 2005 15:05
To: user@struts.apache.org
Subject: Multiple tiles layouts for single application


Hello, is there a way to switch tiles layout in an applaction 
depending 
on let's say request url. I have a struts-based application with a 
single purpose and I want to share this functionality with other 
php-based sites that my company have.

So if a request comes in to the site I want different layouts, each 
matching the calling site, for example:

http://myhost/myapp/ <- Original layout
http://myhost/myapp/site1 <- Site1 layout
http://myhost/myapp/site2 <- Site2 layout

The reason I wan't this is because I don't want do duplicate 
any action 
mappings in my struts-config. The major problem is form validation, 
since the input is just a simple tile definitions the app has 
no way to 
determine which layout to use. So if I had tiles-defs.xml, 
tiles-defs-site1.xml tiles-defs-site2.xml and a way to tell 
struts when 
to use which definition I figure the problem would be solved...

Is there a way to solve this without extending the request 
>>
>>processor/ 
>>
tiles plugin?, if not can anyone point me in a good start direction?

Any ideas appreciated.

/Andreas



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


>>>
>>>
>>>
>>> 
>>>---
>>>QAS Ltd.
>>>Developers of QuickAddress Software
>>>http://www.qas.com";>www.qas.com
>>>Registered in England: No 2582055
>>>Registered in Australia: No 082 851 474
>>>---
>>>
>>>
>>>
>>>
>>-
>>
>>>To unsubscribe, e-mail: [EMAIL PROTECTED]
>>>For additional commands, e-mail: [EMAIL PROTECTED]
>>>
>>>
>>>
>>
>>
>>
>>-
>>To unsubscribe, e-mail: [EMAIL PROTECTED]
>>For additional commands, e-mail: [EMAIL PROTECTED]
>>
>>
> 
> 
> -
> To unsubscribe, e-mail: [EMAIL PROTECTED]
> For additional commands, e-mail: [EMAIL PROTECTED]
> 
> 
> 



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





--
Notice:  This e-mail message, toget

Re: [OT] Help !! Too many select-box in one page

2005-05-10 Thread Rick Reumann
Cliff Lam wrote the following on 5/10/2005 4:25 AM:

> My page has too many select-box in one page. The .html has 17XXX lines.

Nobody asked this, so I wanted to make sure, Are each of the select box
entries a "different" list? I'm assuming so, but sometimes for master
detail records where you have multiple select boxes that have the same
list of options (for example having to select a role from a drop down
for several persons), javascript and dhtml is great option. I'm guessing
you have a case though where each drop down is different set of options?
(If so redesign, as others have brought up, or just live with a long
rendering time.)

-- 
Rick

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



Re: Html:muttibox tag help

2005-05-10 Thread Rafael Taboada
 Which object belongs resourceIds??? which form??? Let's suppose is searchForm

 so Try this:

 

 

-- 

 Rafael Taboada

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



RE: Html:muttibox tag help

2005-05-10 Thread Faisal.Shoukat
Can u specify a bit further please. I thought I had already specified the
object by the property value in the tag as below. Where resourceIds is the
field in the actionclient form and the value to write to this object is the
resourceId of the clientVO.
 

 

-Original Message-
From: Rafael Taboada [mailto:[EMAIL PROTECTED] 
Sent: 10 May 2005 13:45
To: Struts Users Mailing List
Subject: Re: Html:muttibox tag help

 U need to specify which object belongs resourceIds in ur html:multibox


-- 

 Rafael Taboada

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





This email may contain information which is privileged or confidential. If you 
are not the intended recipient of this email, please notify the sender 
immediately and delete it without reading, copying, storing, forwarding or 
disclosing its contents to any other person
Thank you

Check us out at http://www.bt.com/consulting




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



Re: Html:muttibox tag help

2005-05-10 Thread Rafael Taboada
 U need to specify which object belongs resourceIds in ur html:multibox


-- 

 Rafael Taboada

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



RE: Accessing java.util.Properties in JSP

2005-05-10 Thread Allistair Crossley
instead of using a Properties object you could use a Map. That way, you can use 
JSTL associatively, e.g

Map myMap = new HashMap();
myMap.put("aKey", "aVal");
request/session/application.setAttribute("myMap", myMap);

in your JSPs with EL

${request/session/applicationScope.myMap['aKey']}

Allistair.

> -Original Message-
> From: Richard Reyes [mailto:[EMAIL PROTECTED]
> Sent: 10 May 2005 12:57
> To: Struts Users Mailing List
> Subject: Re: Accessing java.util.Properties in JSP
> 
> 
> Okay I realized that I might use a static method. How do I call it in
> a JSP that is not like this...
> 
> <%Utilities.getDisplay( "BANNER_IMAGE" ) %>
> 
> 
> On 5/10/05, Richard Reyes <[EMAIL PROTECTED]> wrote:
> > Hello Guys,
> > 
> > I have a properties object saved in my session and i need 
> to access it
> > in my jsp pages. can the bean tag handle this? how?
> > 
> > perhaps el?
> > 
> > thanks in advance
> > richard
> >
> 
> -
> To unsubscribe, e-mail: [EMAIL PROTECTED]
> For additional commands, e-mail: [EMAIL PROTECTED]
> 
> 


 
---
QAS Ltd.
Developers of QuickAddress Software
http://www.qas.com";>www.qas.com
Registered in England: No 2582055
Registered in Australia: No 082 851 474
---



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



Re: Accessing java.util.Properties in JSP

2005-05-10 Thread Richard Reyes
Okay I realized that I might use a static method. How do I call it in
a JSP that is not like this...

<%Utilities.getDisplay( "BANNER_IMAGE" ) %>


On 5/10/05, Richard Reyes <[EMAIL PROTECTED]> wrote:
> Hello Guys,
> 
> I have a properties object saved in my session and i need to access it
> in my jsp pages. can the bean tag handle this? how?
> 
> perhaps el?
> 
> thanks in advance
> richard
>

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



Accessing java.util.Properties in JSP

2005-05-10 Thread Richard Reyes
Hello Guys,

I have a properties object saved in my session and i need to access it
in my jsp pages. can the bean tag handle this? how?

perhaps el?

thanks in advance
richard

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



Re: Cannot find bean error in any scope

2005-05-10 Thread Dakota Jack
Don't know what your action tools do, but the code I sent works.  If
you want messages instead of actions, then user the following:


  messages = new ActionMessages();
  messages.add(Globals.MESSAGE_KEY, new
ActionMessage("button.crop.crop_allowed_width","" + width));
  messages.add(Globals.MESSAGE_KEY, new
ActionMessage("button.crop.crop_allowed_height","" + height));
  messages.add(Globals.MESSAGE_KEY, new
ActionMessage("button.crop.crop_allowed_percent_width","" + width));
  messages.add(Globals.MESSAGE_KEY, new
ActionMessage("button.crop.crop_allowed_percent_height","" + height));
  messages.add(Globals.MESSAGE_KEY, new
ActionMessage("button.crop.crop_allowed_percent_width_mix","" +
width));
  messages.add(Globals.MESSAGE_KEY, new
ActionMessage("button.crop.crop_allowed_percent_height_mix","" +
height));
  saveMessages(request, messages);

On 5/9/05, Michael Jouravlev <[EMAIL PROTECTED]> wrote:
> This is ridiculous. I cannot find what the problem is, it depends on
> the phase of the Moon. I have exactly the same problem as this one:
> 
>   http://marc.theaimsgroup.com/?l=struts-user&m=111348029907000&w=2
> 
> Which is, I have the following block:
> 
> 
> 
>  
>  
>  
> 
> 
> 
> which throws javax.servlet.ServletException: Cannot find bean error in any 
> scope
> 
> If I change it to this one:
> 
> 
> 
>  Yes mess
> 
> 
> 
> It shows "Yes mess", which means that messages are present. It works
> sometimes, than it stops and I don't know what did I do that broke it!
> When it breaks, I cannot fix it. I do stupid things like rolling back
> the code until it works, but I could not find where it exactly breaks.
> 
> I save messages in my action:
> 
> ActionMessages errors =
> ActionTools.getStrutsErrors(wizardManager.getErrors());
> saveErrors(request, errors);
> return mapping.findForward(strMapping);
> 
> Using ActionErrors does not help. Mapping is a forward, not a
> redirect. Even if it were redirect,  should not
> work, but it shows that there are messages present!
> 
> I have all the taglibs in place:
> 
> <%@ page contentType="text/html;charset=UTF-8" language="java" %>
> <%@ 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" %>
> 
> What the... ? Btw, was like this with 1.2.4, and the same thing with
> 1.3, which I compiled from sources.
> 
> Michael.
> 
> -
> To unsubscribe, e-mail: [EMAIL PROTECTED]
> For additional commands, e-mail: [EMAIL PROTECTED]
> 
> 


-- 
"You can lead a horse to water but you cannot make it float on its back."
~Dakota Jack~

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



Re: Cannot find bean error in any scope

2005-05-10 Thread Dakota Jack
errors = new ActionMessages();
errors.add(Globals.ERROR_KEY, new
ActionMessage("button.crop.no_letters_except_%"));
errors.add(Globals.ERROR_KEY, new
ActionMessage("button.crop.crop_allowed_width","" + width));
errors.add(Globals.ERROR_KEY, new
ActionMessage("button.crop.crop_allowed_height","" + height));
errors.add(Globals.ERROR_KEY, new
ActionMessage("button.crop.crop_allowed_percent_width","" + width));
errors.add(Globals.ERROR_KEY, new
ActionMessage("button.crop.crop_allowed_percent_height","" + height));
errors.add(Globals.ERROR_KEY, new
ActionMessage("button.crop.crop_allowed_percent_width_mix","" +
width));
errors.add(Globals.ERROR_KEY, new
ActionMessage("button.crop.crop_allowed_percent_height_mix","" +
height));
saveErrors(request, errors);


























  































On 5/9/05, Michael Jouravlev <[EMAIL PROTECTED]> wrote:
> This is ridiculous. I cannot find what the problem is, it depends on
> the phase of the Moon. I have exactly the same problem as this one:
> 
>   http://marc.theaimsgroup.com/?l=struts-user&m=111348029907000&w=2
> 
> Which is, I have the following block:
> 
> 
> 
>  
>  
>  
> 
> 
> 
> which throws javax.servlet.ServletException: Cannot find bean error in any 
> scope
> 
> If I change it to this one:
> 
> 
> 
>  Yes mess
> 
> 
> 
> It shows "Yes mess", which means that messages are present. It works
> sometimes, than it stops and I don't know what did I do that broke it!
> When it breaks, I cannot fix it. I do stupid things like rolling back
> the code until it works, but I could not find where it exactly breaks.
> 
> I save messages in my action:
> 
> ActionMessages errors =
> ActionTools.getStrutsErrors(wizardManager.getErrors());
> saveErrors(request, errors);
> return mapping.findForward(strMapping);
> 
> Using ActionErrors does not help. Mapping is a forward, not a
> redirect. Even if it were redirect,  should not
> work, but it shows that there are messages present!
> 
> I have all the taglibs in place:
> 
> <%@ page contentType="text/html;charset=UTF-8" language="java" %>
> <%@ 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" %>
> 
> What the... ? Btw, was like this with 1.2.4, and the same thing with
> 1.3, which I compiled from sources.
> 
> Michael.
> 
> -

Re: is there a better way of creating SQL queries from form objects ?

2005-05-10 Thread Sean Burlington
Erik Weber wrote:
As far as the implementation goes, there is no reason to be scared of 
switches and loops. (But favor polymorphism/virtual functions over a 
giant loop.) However, you should get rid of all those concat operators 
and use StringBuffer.append instead. The performance will improve 
significantly.

thanks Eric
polymorphism - that was the word I needed :-)
now google can help me ...
--
Sean
-
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]


RE: [OT] Help !! Too many select-box in one page

2005-05-10 Thread Allistair Crossley
I think I can consider myself lucky that my managers here are fairly switched 
on and buy into my advice on best practices and re-factoring, but I accept this 
is not always the case. With any new projects I certainly build in best 
practices as a matter of course. Once you've done one properly, the cost of 
using frameworks I believe from my own experience has accelerated application 
development and reduced spaghetti code etc... Struts an Tiles has done a 
wonderful job for us so far and we're just about to pull in some Spring to 
handle the DAO side of things which we do in a custom fashion right now.

All the best, Allistair.

> -Original Message-
> From: James Neville [mailto:[EMAIL PROTECTED]
> Sent: 10 May 2005 11:28
> To: Struts Users Mailing List
> Subject: Re: [OT] Help !! Too many select-box in one page
> 
> 
> Allistair Crossley wrote:
> 
> >unless they see the 1+ minute performance time and you take 
> a hard stance on it and say "well that's what you get when 
> you ask for silly design" ;))
> >
> We still have PowerBuilder apps in production, 1+ minute 
> responses from 
> equally silly forms is regarded as normal.
> Still, it makes the Struts apps look like a good technology choice ;)
> 
> James.
> 
> -
> To unsubscribe, e-mail: [EMAIL PROTECTED]
> For additional commands, e-mail: [EMAIL PROTECTED]
> 
> 


 
---
QAS Ltd.
Developers of QuickAddress Software
http://www.qas.com";>www.qas.com
Registered in England: No 2582055
Registered in Australia: No 082 851 474
---



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



Html:muttibox tag help

2005-05-10 Thread Faisal.Shoukat


Hi,

I need some help with the html:multibox tag.  I have the following situation
where I do a search for some clients and the search.jsp displays displays a
number of rows each with a checkbox associated with it.  The user can then
click one or many checkboxes and click submit.  The submit passes the data
onto the next action which should pull the data out of the array which holds
the checkbox values and go and retrieve there remaining data.

The problem I have is that the action gets called but the actionForm field
which holds the array of checkboxes is null. 

In my jsp I have the following:





 







the results property of searchClientform holds a list of clientVOs. The
clientVO has a field resourceId. please note that clientVO has filed
resourceID and action client form has field resourceIds.

The actionclientform is as follows:

private String [] resourceIds = {};


/**
* @return Returns the resourceIds.
*/
public String[] getResourceIds() {
return resourceIds;
}
/**
* @param resourceIds The resourceIds to set.
*/
public void setResourceIds(String[] resourceIds) {
this.resourceIds = resourceIds;
}

my struts config action mapping is as follows:






The error thrown is:

java.lang.NullPointerException
com.medina.web.action.ActionClientAction.execute(ActionClientAction.java:44)
org.apache.struts.action.RequestProcessor.processActionPerform(RequestProcess
or.java:484)
org.apache.struts.action.RequestProcessor.process(RequestProcessor.java:274)
org.apache.struts.action.ActionServlet.process(ActionServlet.java:1482)
org.apache.struts.action.ActionServlet.doGet(ActionServlet.java:507)
javax.servlet.http.HttpServlet.service(HttpServlet.java:697)
javax.servlet.http.HttpServlet.service(HttpServlet.java:810)

The code throws a null pointer on the following line:

ActionClientForm clntForm = (ActionClientForm)actionForm;

System.out.println("resource Id = " + (clntForm.getResourceIds()).length);

So can anyone tell mewhat I am doing wrong and how to pass the value to my
action class.  After debugging the clntForm is not null. It is the
resourceIds array which is null.

thanks in advance  




This email may contain information which is privileged or confidential. If you 
are not the intended recipient of this email, please notify the sender 
immediately and delete it without reading, copying, storing, forwarding or 
disclosing its contents to any other person
Thank you

Check us out at http://www.bt.com/consulting




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



Re: [OT] Help !! Too many select-box in one page

2005-05-10 Thread James Neville
Allistair Crossley wrote:
unless they see the 1+ minute performance time and you take a hard stance on it and say 
"well that's what you get when you ask for silly design" ;))
We still have PowerBuilder apps in production, 1+ minute responses from 
equally silly forms is regarded as normal.
Still, it makes the Struts apps look like a good technology choice ;)

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


Reg. ClassCastException:ActionErrors

2005-05-10 Thread Iyanu, Rajasekaran

 Hi,

 I'm getting the following exception when I enable validation for my
entry page.. 
 Can anyone please help me with a resolution in this regard.

CallStack:
java.lang.ClassCastException:
org.apache.struts.action.ActionErrors
at
com.fidelity.ewp.framework.web.EwpErrorsData.init(EwpErrorsData.java:72)
at
com.fidelity.ewp.framework.web.EwpTilesRequestProcessor.processValidate(
EwpTilesRequestProcessor.java:479)
at
org.apache.struts.action.RequestProcessor.process(RequestProcessor.java:
348)
at
com.fidelity.electra.web.ElectraRequestProcessor.process(ElectraRequestP
rocessor.java:71)
at
org.apache.struts.action.ActionServlet.process(ActionServlet.java:1519)
at
org.apache.struts.action.ActionServlet.doPost(ActionServlet.java:532)
at javax.servlet.http.HttpServlet.service(HttpServlet.java:760)
at javax.servlet.http.HttpServlet.service(HttpServlet.java:853)
at
com.ibm.ws.webcontainer.servlet.StrictServletInstance.doService(StrictSe
rvletInstance.java:110)
at
com.ibm.ws.webcontainer.servlet.StrictLifecycleServlet._service(StrictLi
fecycleServlet.java:174)
at
com.ibm.ws.webcontainer.servlet.IdleServletState.service(StrictLifecycle
Servlet.java:313)
at
com.ibm.ws.webcontainer.servlet.StrictLifecycleServlet.service(StrictLif
ecycleServlet.java:116)
at
com.ibm.ws.webcontainer.servlet.ServletInstance.service(ServletInstance.
java:283)
at
com.ibm.ws.webcontainer.servlet.ValidServletReferenceState.dispatch(Vali
dServletReferenceState.java:42)
at
com.ibm.ws.webcontainer.servlet.ServletInstanceReference.dispatch(Servle
tInstanceReference.java:40)
at
com.ibm.ws.webcontainer.filter.WebAppFilterChain.doFilter(WebAppFilterCh
ain.java:76)
at
com.fmr.commons.servlet.SEMFilter.doFilter(SEMFilter.java:161)
at
com.ibm.ws.webcontainer.filter.FilterInstanceWrapper.doFilter(FilterInst
anceWrapper.java:132)
at
com.ibm.ws.webcontainer.filter.WebAppFilterChain.doFilter(WebAppFilterCh
ain.java:71)
at
com.ibm.ws.webcontainer.webapp.WebAppRequestDispatcher.handleWebAppDispa
tch(WebAppRequestDispatcher.java:965)
at
com.ibm.ws.webcontainer.webapp.WebAppRequestDispatcher.dispatch(WebAppRe
questDispatcher.java:555)
at
com.ibm.ws.webcontainer.webapp.WebAppRequestDispatcher.forward(WebAppReq
uestDispatcher.java:200)
at
com.ibm.ws.webcontainer.srt.WebAppInvoker.doForward(WebAppInvoker.java:1
19)
at
com.ibm.ws.webcontainer.srt.WebAppInvoker.handleInvocationHook(WebAppInv
oker.java:276)
at
com.ibm.ws.webcontainer.cache.invocation.CachedInvocation.handleInvocati
on(CachedInvocation.java:71)
at
com.ibm.ws.webcontainer.srp.ServletRequestProcessor.dispatchByURI(Servle
tRequestProcessor.java:182)
at
com.ibm.ws.webcontainer.oselistener.OSEListenerDispatcher.service(OSELis
tener.java:334)
at
com.ibm.ws.webcontainer.http.HttpConnection.handleRequest(HttpConnection
.java:56)
at
com.ibm.ws.http.HttpConnection.readAndHandleRequest(HttpConnection.java:
618)
at com.ibm.ws.http.HttpConnection.run(HttpConnection.java:439)
at com.ibm.ws.util.ThreadPool$Worker.run(ThreadPool.java:593)


Thanks and Regards
Rajasekaran Iyanu.



RE: [OT] Help !! Too many select-box in one page

2005-05-10 Thread Allistair Crossley
unless they see the 1+ minute performance time and you take a hard stance on it 
and say "well that's what you get when you ask for silly design" ;))

Allistair.

> -Original Message-
> From: James Neville [mailto:[EMAIL PROTECTED]
> Sent: 10 May 2005 11:04
> To: Struts Users Mailing List
> Subject: Re: [OT] Help !! Too many select-box in one page
> 
> 
> Allistair Crossley wrote:
> 
> >it's plausible but has it's own performance implications. 
> best to just try it out for your case and maybe it's a quick fix.
> >
> Yup, its a hack in this case, but still a useful tool for the box.
> 
> >however, if you *can* spend some time re-factoring your 
> forms, you should .. does not sound like a particularly 
> useful design right now.
> >
> I'd agree here, but sometimes the person making the business 
> decisions 
> is a bit of a spoilt child, and if thats how they want it.
> Best way round these folks is simply don't give it to them in 
> the first 
> place, and deny the possibility.
> Unfortunately, once they've seen that it *can* work (albeit badly), 
> you've lost ;)
> 
> James
> 
> 
> -
> To unsubscribe, e-mail: [EMAIL PROTECTED]
> For additional commands, e-mail: [EMAIL PROTECTED]
> 
> 


 
---
QAS Ltd.
Developers of QuickAddress Software
http://www.qas.com";>www.qas.com
Registered in England: No 2582055
Registered in Australia: No 082 851 474
---



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



Struts 1.2 +Tomcat +SSL Problem

2005-05-10 Thread Fco Javier Jiemnez
Hello,

I have a problem with Tomcat 5.0.28 with SSL mode enabled + Struts 1.2 + 
Windows XP + j2sdk 1.4.2

When I use Tomcat in ssl mode i read this error in console every time that 
click a link aplication web.

10-may-2005 0:55:21 org.apache.tomcat.util.net.TcpWorkerThread runIt
GRAVE: Remote Host /192.168.0.1 SocketException: Software caused connection 
abort: recv failed


If  I use http in 8080, there isn't error but if I use https 8443 appears the 
error.

I uncomment server.xml to enable ssl mode in Tomcat(default port 8443) and y 
generate self-signed certificate with keytool (default password changeit)

Anybody helps me? What's the problem?


Thanks.

PD: Sorry but my english is bad ;P

Re: [OT] Help !! Too many select-box in one page

2005-05-10 Thread James Neville
Allistair Crossley wrote:
it's plausible but has it's own performance implications. best to just try it 
out for your case and maybe it's a quick fix.
Yup, its a hack in this case, but still a useful tool for the box.
however, if you *can* spend some time re-factoring your forms, you should .. 
does not sound like a particularly useful design right now.
I'd agree here, but sometimes the person making the business decisions 
is a bit of a spoilt child, and if thats how they want it.
Best way round these folks is simply don't give it to them in the first 
place, and deny the possibility.
Unfortunately, once they've seen that it *can* work (albeit badly), 
you've lost ;)

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


ERROR: Server side validation using Validation framework

2005-05-10 Thread Arindam Samanta


Hi,

I am new in struts.  I am getting 'Page can not be displayed error when I 
click on 'SAVE' button. validation is working fine when I implemented 
client side validation to add following line 
  
But when I removed above code from jsp I faced page not found error but it 
is not throwing any error into server. My Form class extends from 
ValidatorForm.  My xml are,

 struts-config.xml***
 
   
   

  
  
 

validation.xm***





   
  
   
   
  
mask
^[a-zA-Z]*$
   

 
   
  
mask
^[a-zA-Z]*$
   


   


validator-rules.xml***


 

RE: [OT] Help !! Too many select-box in one page

2005-05-10 Thread Allistair Crossley
it's plausible but has it's own performance implications. best to just try it 
out for your case and maybe it's a quick fix. however, if you *can* spend some 
time re-factoring your forms, you should .. does not sound like a particularly 
useful design right now.

all the best, Allistair.

> -Original Message-
> From: Cliff Lam [mailto:[EMAIL PROTECTED]
> Sent: 10 May 2005 10:46
> To: Struts Users Mailing List
> Subject: Re: [OT] Help !! Too many select-box in one page
> 
> 
> woo...
> 
> Thx a lot ^^
> 
> Cliff
> 
> - Original Message - 
> From: "James Neville" <[EMAIL PROTECTED]>
> To: "Struts Users Mailing List" 
> Sent: Tuesday, May 10, 2005 5:21 PM
> Subject: Re: [OT] Help !! Too many select-box in one page
> 
> 
> > Cliff,
> >
> > If you truly have no choice but to collect the data from 
> one huge form,
> > try using a compression filter on the offending jsps.
> >
> > http://www.netspade.com/software/java/compression-filter/
> > 
> http://www.javaworld.com/javaworld/jw-06-2001/jw-0622-filters-p3.html
> >
> http://www.google.co.uk/search?hl=en&q=java+compression+filter
> &btnG=Google+Search&meta=
> >
> > Works well for us on some heavily scripted pages, and I 
> don't need to
> > worry about splitting/slimming down large css files too ;)
> >
> > James
> >
> >
> > Cliff Lam wrote:
> >
> > > Thank you very much for your reply ^^
> > >
> > > You are right !! I should not get the list from db so 
> many times ^^"
> > >
> > > But I want to solve the loading time in the client side frist = (.
> > >
> > > It loaded 1 min even I copy the html source code loaded in the
> > > drameweaver =
> > > (
> > >
> > > it is the html has 17XXX lines is too big ?
> > >
> > > Thanks a lot 
> > >
> > > Cliff
> > >
> > > - Original Message -
> > > From: "Allistair Crossley" <[EMAIL PROTECTED]>
> > > To: "Struts Users Mailing List" 
> > > Sent: Tuesday, May 10, 2005 4:58 PM
> > > Subject: RE: [OT] Help !! Too many select-box in one page
> > >
> > >
> > >> yes you won't be able to solve that problem if you are 
> rendering 88
> > >> select
> > >
> > > boxes. why? because you are rending 88 select boxes that 
> are populated
> > > from
> > > the database. no amount of client-sise javascript (yuck) 
> is going to
> help
> > > you.
> > >
> > >> you need to re-factor your design which is clearly not 
> working for you.
> > >>
> > >> if you absolutely cannot re-factor the design, then you 
> could consider
> > >
> > > using some caching strategy to prevent the huge database 
> lookup more
> than
> > > once using something like OSCACHE perhaps.
> > >
> > >> you could also consider hitting the database for 1 
> select list and
> > >
> > > building the html select
> > >
> > >> list into a java String, i.e
> > >>
> > >> String select = "";
> > >> // loop database result set adding  to select
> > >> // render JSP page
> > >>
> > >> in your JSP, replace the PLACEHOLDER with the select 
> name you need
> > >>
> > >> <%
> > >> String select = request.getAttribute("select");
> > >> %>
> > >>
> > >> <%= select.replaceAll("PLACEHOLDER", "selectNameA") %>
> > >> <%= select.replaceAll("PLACEHOLDER", "selectNameB") %>
> > >>
> > >> This method therefore hits the database ONCE (since you 
> say you can
> reuse
> > >
> > > the select lists) and should be much faster.
> > >
> > >> Allistair.
> > >>
> > >>> -Original Message-
> > >>> From: Cliff Lam [mailto:[EMAIL PROTECTED]
> > >>> Sent: 10 May 2005 09:52
> > >>> To: Struts Users Mailing List
> > >>> Subject: Re: [OT] Help !! Too many select-box in one page
> > >>>
> > >>>
> > >>> Thank you for your reply
> > >>>
> > >>> I get the options from the db
> > >>>
> > >>> But the main concern is in the client side ...
> > >>>
> > >>> It loaded about 1min for the 17XXX lines html ...
> > >>>
> > >>> Cliff
> > >>>
> > >>> - Original Message -
> > >>> From: "rmanchu" <[EMAIL PROTECTED]>
> > >>> To: "Struts Users Mailing List" 
> > >>> Sent: Tuesday, May 10, 2005 5:27 PM
> > >>> Subject: Re: [OT] Help !! Too many select-box in one page
> > >>>
> > >>>
> >  how r u rendering you select boxes? ie, database call for
> > >>>
> > >>> each render?
> > >>>
> >  riyaz
> > 
> >  Cliff Lam wrote:
> > 
> > > Hi,
> > >
> > > My page has too many select-box in one page. The .html
> > 
> > >>> has 17XXX lines.
> > >>>
> > > This make the page load for a long time to appear =(
> > >
> > > Anyone face this problem too??
> > >
> > > Please give me some idea > <" Thx a lot
> > >
> > > Cliff
> > 
> > 
> > 
> > >>> 
> -
> > >>>
> >  To unsubscribe, e-mail: [EMAIL PROTECTED]
> >  For additional commands, e-mail: [EMAIL PROTECTED]
> > >>>
> > >>> 
> -
> > >>> To unsubscribe, e-mail: [EMAIL PROTECTED]
> > >>> For additional commands, e-mail: [EMAIL PROTECTED]

Re: [OT] Help !! Too many select-box in one page

2005-05-10 Thread Cliff Lam
woo...

Thx a lot ^^

Cliff

- Original Message - 
From: "James Neville" <[EMAIL PROTECTED]>
To: "Struts Users Mailing List" 
Sent: Tuesday, May 10, 2005 5:21 PM
Subject: Re: [OT] Help !! Too many select-box in one page


> Cliff,
>
> If you truly have no choice but to collect the data from one huge form,
> try using a compression filter on the offending jsps.
>
> http://www.netspade.com/software/java/compression-filter/
> http://www.javaworld.com/javaworld/jw-06-2001/jw-0622-filters-p3.html
>
http://www.google.co.uk/search?hl=en&q=java+compression+filter&btnG=Google+Search&meta=
>
> Works well for us on some heavily scripted pages, and I don't need to
> worry about splitting/slimming down large css files too ;)
>
> James
>
>
> Cliff Lam wrote:
>
> > Thank you very much for your reply ^^
> >
> > You are right !! I should not get the list from db so many times ^^"
> >
> > But I want to solve the loading time in the client side frist = (.
> >
> > It loaded 1 min even I copy the html source code loaded in the
> > drameweaver =
> > (
> >
> > it is the html has 17XXX lines is too big ?
> >
> > Thanks a lot 
> >
> > Cliff
> >
> > - Original Message -
> > From: "Allistair Crossley" <[EMAIL PROTECTED]>
> > To: "Struts Users Mailing List" 
> > Sent: Tuesday, May 10, 2005 4:58 PM
> > Subject: RE: [OT] Help !! Too many select-box in one page
> >
> >
> >> yes you won't be able to solve that problem if you are rendering 88
> >> select
> >
> > boxes. why? because you are rending 88 select boxes that are populated
> > from
> > the database. no amount of client-sise javascript (yuck) is going to
help
> > you.
> >
> >> you need to re-factor your design which is clearly not working for you.
> >>
> >> if you absolutely cannot re-factor the design, then you could consider
> >
> > using some caching strategy to prevent the huge database lookup more
than
> > once using something like OSCACHE perhaps.
> >
> >> you could also consider hitting the database for 1 select list and
> >
> > building the html select
> >
> >> list into a java String, i.e
> >>
> >> String select = "";
> >> // loop database result set adding  to select
> >> // render JSP page
> >>
> >> in your JSP, replace the PLACEHOLDER with the select name you need
> >>
> >> <%
> >> String select = request.getAttribute("select");
> >> %>
> >>
> >> <%= select.replaceAll("PLACEHOLDER", "selectNameA") %>
> >> <%= select.replaceAll("PLACEHOLDER", "selectNameB") %>
> >>
> >> This method therefore hits the database ONCE (since you say you can
reuse
> >
> > the select lists) and should be much faster.
> >
> >> Allistair.
> >>
> >>> -Original Message-
> >>> From: Cliff Lam [mailto:[EMAIL PROTECTED]
> >>> Sent: 10 May 2005 09:52
> >>> To: Struts Users Mailing List
> >>> Subject: Re: [OT] Help !! Too many select-box in one page
> >>>
> >>>
> >>> Thank you for your reply
> >>>
> >>> I get the options from the db
> >>>
> >>> But the main concern is in the client side ...
> >>>
> >>> It loaded about 1min for the 17XXX lines html ...
> >>>
> >>> Cliff
> >>>
> >>> - Original Message -
> >>> From: "rmanchu" <[EMAIL PROTECTED]>
> >>> To: "Struts Users Mailing List" 
> >>> Sent: Tuesday, May 10, 2005 5:27 PM
> >>> Subject: Re: [OT] Help !! Too many select-box in one page
> >>>
> >>>
>  how r u rendering you select boxes? ie, database call for
> >>>
> >>> each render?
> >>>
>  riyaz
> 
>  Cliff Lam wrote:
> 
> > Hi,
> >
> > My page has too many select-box in one page. The .html
> 
> >>> has 17XXX lines.
> >>>
> > This make the page load for a long time to appear =(
> >
> > Anyone face this problem too??
> >
> > Please give me some idea > <" Thx a lot
> >
> > Cliff
> 
> 
> 
> >>> -
> >>>
>  To unsubscribe, e-mail: [EMAIL PROTECTED]
>  For additional commands, e-mail: [EMAIL PROTECTED]
> >>>
> >>> -
> >>> To unsubscribe, e-mail: [EMAIL PROTECTED]
> >>> For additional commands, e-mail: [EMAIL PROTECTED]
> >>>
> >>>
> >>
> >> 
> >> ---
> >> QAS Ltd.
> >> Developers of QuickAddress Software
> >> http://www.qas.com";>www.qas.com
> >> Registered in England: No 2582055
> >> Registered in Australia: No 082 851 474
> >> ---
> >> 
> >>
> >>
> >> -
> >> To unsubscribe, e-mail: [EMAIL PROTECTED]
> >> For additional commands, e-mail: [EMAIL PROTECTED]
> >>
> >
> >
> > -
> > To unsubscribe, e-mail: [EMAIL PROTECTED]
> > For additional commands, e-mail: [EMAIL PROTECTED]
> >
>
>
> -
> To unsubscribe, e-mail: [EMAIL PROTECTED]
> For additio

datePatternStrict for MM/dd/yyyy seems to allow 04/04/200w

2005-05-10 Thread Robert Taylor
Greetings, I'm using Struts 1.2.7 and trying to validate a date field 
using the datePatternStrict with a date format of MM/dd/. Everything 
seems to work as expected until I enter a date like 04/04/200w. It seems 
that the date validation routine thinks that this is a valid date...or 
atleast it allows validation of the date field to pass. The docs say 
that date validation leverages SimpleDateFormat so I looked at the 
javadocs, but found nothing to indicate that parsing "04/04/200w" should 
pass (although I haven't tested it explicitely with just SimpleDateFormat).

I'm using the following snippet in my validation.xml file:
datePatternStrictMM/dd/
BTW, the javascript for date validation seems to catch this, but the 
server side validation does not.

I must be doing something wrong or this must be a known issue.
Any ideas?
/robert
-
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]


tiles and static includes?

2005-05-10 Thread rey abe

I wondered if it is somehow possible to make tiles templates
perform like static includes. (i.e. the the template's includes
should be copied before compilation of the jsp)

The problem is that I have a number of very complex pages that
are made out of fragments that depends on each other.
(taglibs in the included page depend on parent taglibs that are
opened in the including page (a lot of  tags) and on
s in the including page)

I know I could somehow solve it by making a parameter out of
every dependancy and work with dynamic including, but it would
be a real hassle to identify all dependancies for each include
and some contexts like the nesting level of for the  tags
can't easily be passed as a parameter. (at least from what I
could figure out)

Of course I would appreciate any other solution to this problem too :)

-
Rey Abe
UCS - unique computing solutions gmbh


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



Re: [OT] Help !! Too many select-box in one page

2005-05-10 Thread Cliff Lam
haha.. ='(

really Thx a lot !!!

Cliff

- Original Message - 
From: "Allistair Crossley" <[EMAIL PROTECTED]>
To: "Struts Users Mailing List" 
Sent: Tuesday, May 10, 2005 5:16 PM
Subject: RE: [OT] Help !! Too many select-box in one page


> the problem as I have said in both my previous replies is that you cannot
possibly expect 17,000 lines of HTML to be fast not matter how you go about
generating that 17,000 lines of code.
>
> so, as I have suggested, you need to look at your forms design and break
it down into more pages I would say
>
> Form now:
>
> select1
> select2
> select3
> select4
>
> Re-factor 2-step process
>
> Page 1
>
> select1
> select2
>
> Page 2
>
> select3
> select4
>
> FOR EXAMPLE. Please note I am not in a position to tell you how to design
your forms or application, but I am in a position to tell you that there is
nothing you can do about making 17,000 lines of HTML quicker (unless you buy
a new desktop PC for every user and increase network bandwidth ;) ).
>
> Re-factor Re-factor Re-factor
>
>
> > -Original Message-
> > From: Cliff Lam [mailto:[EMAIL PROTECTED]
> > Sent: 10 May 2005 10:07
> > To: Struts Users Mailing List
> > Subject: Re: [OT] Help !! Too many select-box in one page
> >
> >
> > Thank you very much for your reply ^^
> >
> > You are right !! I should not get the list from db so many times ^^"
> >
> > But I want to solve the loading time in the client side frist = (.
> >
> > It loaded 1 min even I copy the html source code loaded in
> > the drameweaver =
> > (
> >
> > it is the html has 17XXX lines is too big ?
> >
> > Thanks a lot 
> >
> > Cliff
> >
> > - Original Message - 
> > From: "Allistair Crossley" <[EMAIL PROTECTED]>
> > To: "Struts Users Mailing List" 
> > Sent: Tuesday, May 10, 2005 4:58 PM
> > Subject: RE: [OT] Help !! Too many select-box in one page
> >
> >
> > > yes you won't be able to solve that problem if you are
> > rendering 88 select
> > boxes. why? because you are rending 88 select boxes that are
> > populated from
> > the database. no amount of client-sise javascript (yuck) is
> > going to help
> > you.
> > >
> > > you need to re-factor your design which is clearly not
> > working for you.
> > >
> > > if you absolutely cannot re-factor the design, then you
> > could consider
> > using some caching strategy to prevent the huge database
> > lookup more than
> > once using something like OSCACHE perhaps.
> > >
> > > you could also consider hitting the database for 1 select list and
> > building the html select
> > > list into a java String, i.e
> > >
> > > String select = "";
> > > // loop database result set adding  to select
> > > // render JSP page
> > >
> > > in your JSP, replace the PLACEHOLDER with the select name you need
> > >
> > > <%
> > >   String select = request.getAttribute("select");
> > > %>
> > >
> > > <%= select.replaceAll("PLACEHOLDER", "selectNameA") %>
> > > <%= select.replaceAll("PLACEHOLDER", "selectNameB") %>
> > >
> > > This method therefore hits the database ONCE (since you say
> > you can reuse
> > the select lists) and should be much faster.
> > >
> > > Allistair.
> > >
> > > > -Original Message-
> > > > From: Cliff Lam [mailto:[EMAIL PROTECTED]
> > > > Sent: 10 May 2005 09:52
> > > > To: Struts Users Mailing List
> > > > Subject: Re: [OT] Help !! Too many select-box in one page
> > > >
> > > >
> > > > Thank you for your reply
> > > >
> > > > I get the options from the db
> > > >
> > > > But the main concern is in the client side ...
> > > >
> > > > It loaded about 1min for the 17XXX lines html ...
> > > >
> > > > Cliff
> > > >
> > > > - Original Message - 
> > > > From: "rmanchu" <[EMAIL PROTECTED]>
> > > > To: "Struts Users Mailing List" 
> > > > Sent: Tuesday, May 10, 2005 5:27 PM
> > > > Subject: Re: [OT] Help !! Too many select-box in one page
> > > >
> > > >
> > > > >
> > > > > how r u rendering you select boxes? ie, database call for
> > > > each render?
> > > > >
> > > > > riyaz
> > > > >
> > > > > Cliff Lam wrote:
> > > > > > Hi,
> > > > > >
> > > > > > My page has too many select-box in one page. The .html
> > > > has 17XXX lines.
> > > > > >
> > > > > > This make the page load for a long time to appear =(
> > > > > >
> > > > > > Anyone face this problem too??
> > > > > >
> > > > > > Please give me some idea > <" Thx a lot
> > > > > >
> > > > > > Cliff
> > > > >
> > > > >
> > > > >
> > > >
> > -
> > > > > To unsubscribe, e-mail: [EMAIL PROTECTED]
> > > > > For additional commands, e-mail: [EMAIL PROTECTED]
> > > >
> > > >
> > -
> > > > To unsubscribe, e-mail: [EMAIL PROTECTED]
> > > > For additional commands, e-mail: [EMAIL PROTECTED]
> > > >
> > > >
> > >
> > >
> > > 
> > > ---
> > > QAS Ltd.
> > > Developers of QuickAddress Software
> > > http://www.qas.com";>www.qas.com
> 

Re: [OT] Help !! Too many select-box in one page

2005-05-10 Thread James Neville
Cliff,

If you truly have no choice but to collect the data from one huge form,
try using a compression filter on the offending jsps.

http://www.netspade.com/software/java/compression-filter/
http://www.javaworld.com/javaworld/jw-06-2001/jw-0622-filters-p3.html
http://www.google.co.uk/search?hl=en&q=java+compression+filter&btnG=Google+Search&meta=

Works well for us on some heavily scripted pages, and I don't need to
worry about splitting/slimming down large css files too ;)

James


Cliff Lam wrote:

> Thank you very much for your reply ^^
>
> You are right !! I should not get the list from db so many times ^^"
>
> But I want to solve the loading time in the client side frist = (.
>
> It loaded 1 min even I copy the html source code loaded in the
> drameweaver =
> (
>
> it is the html has 17XXX lines is too big ?
>
> Thanks a lot 
>
> Cliff
>
> - Original Message -
> From: "Allistair Crossley" <[EMAIL PROTECTED]>
> To: "Struts Users Mailing List" 
> Sent: Tuesday, May 10, 2005 4:58 PM
> Subject: RE: [OT] Help !! Too many select-box in one page
>
>
>> yes you won't be able to solve that problem if you are rendering 88
>> select
>
> boxes. why? because you are rending 88 select boxes that are populated
> from
> the database. no amount of client-sise javascript (yuck) is going to help
> you.
>
>> you need to re-factor your design which is clearly not working for you.
>>
>> if you absolutely cannot re-factor the design, then you could consider
>
> using some caching strategy to prevent the huge database lookup more than
> once using something like OSCACHE perhaps.
>
>> you could also consider hitting the database for 1 select list and
>
> building the html select
>
>> list into a java String, i.e
>>
>> String select = "";
>> // loop database result set adding  to select
>> // render JSP page
>>
>> in your JSP, replace the PLACEHOLDER with the select name you need
>>
>> <%
>> String select = request.getAttribute("select");
>> %>
>>
>> <%= select.replaceAll("PLACEHOLDER", "selectNameA") %>
>> <%= select.replaceAll("PLACEHOLDER", "selectNameB") %>
>>
>> This method therefore hits the database ONCE (since you say you can reuse
>
> the select lists) and should be much faster.
>
>> Allistair.
>>
>>> -Original Message-
>>> From: Cliff Lam [mailto:[EMAIL PROTECTED]
>>> Sent: 10 May 2005 09:52
>>> To: Struts Users Mailing List
>>> Subject: Re: [OT] Help !! Too many select-box in one page
>>>
>>>
>>> Thank you for your reply
>>>
>>> I get the options from the db
>>>
>>> But the main concern is in the client side ...
>>>
>>> It loaded about 1min for the 17XXX lines html ...
>>>
>>> Cliff
>>>
>>> - Original Message -
>>> From: "rmanchu" <[EMAIL PROTECTED]>
>>> To: "Struts Users Mailing List" 
>>> Sent: Tuesday, May 10, 2005 5:27 PM
>>> Subject: Re: [OT] Help !! Too many select-box in one page
>>>
>>>
 how r u rendering you select boxes? ie, database call for
>>>
>>> each render?
>>>
 riyaz

 Cliff Lam wrote:

> Hi,
>
> My page has too many select-box in one page. The .html

>>> has 17XXX lines.
>>>
> This make the page load for a long time to appear =(
>
> Anyone face this problem too??
>
> Please give me some idea > <" Thx a lot
>
> Cliff



>>> -
>>>
 To unsubscribe, e-mail: [EMAIL PROTECTED]
 For additional commands, e-mail: [EMAIL PROTECTED]
>>>
>>> -
>>> To unsubscribe, e-mail: [EMAIL PROTECTED]
>>> For additional commands, e-mail: [EMAIL PROTECTED]
>>>
>>>
>>
>> 
>> ---
>> QAS Ltd.
>> Developers of QuickAddress Software
>> http://www.qas.com";>www.qas.com
>> Registered in England: No 2582055
>> Registered in Australia: No 082 851 474
>> ---
>> 
>>
>>
>> -
>> To unsubscribe, e-mail: [EMAIL PROTECTED]
>> For additional commands, e-mail: [EMAIL PROTECTED]
>>
>
>
> -
> To unsubscribe, e-mail: [EMAIL PROTECTED]
> For additional commands, e-mail: [EMAIL PROTECTED]
>


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



RE: [OT] Help !! Too many select-box in one page

2005-05-10 Thread Allistair Crossley
the problem as I have said in both my previous replies is that you cannot 
possibly expect 17,000 lines of HTML to be fast not matter how you go about 
generating that 17,000 lines of code.

so, as I have suggested, you need to look at your forms design and break it 
down into more pages I would say

Form now:

select1
select2
select3
select4

Re-factor 2-step process

Page 1

select1
select2

Page 2

select3
select4

FOR EXAMPLE. Please note I am not in a position to tell you how to design your 
forms or application, but I am in a position to tell you that there is nothing 
you can do about making 17,000 lines of HTML quicker (unless you buy a new 
desktop PC for every user and increase network bandwidth ;) ). 

Re-factor Re-factor Re-factor


> -Original Message-
> From: Cliff Lam [mailto:[EMAIL PROTECTED]
> Sent: 10 May 2005 10:07
> To: Struts Users Mailing List
> Subject: Re: [OT] Help !! Too many select-box in one page
> 
> 
> Thank you very much for your reply ^^
> 
> You are right !! I should not get the list from db so many times ^^"
> 
> But I want to solve the loading time in the client side frist = (.
> 
> It loaded 1 min even I copy the html source code loaded in 
> the drameweaver =
> (
> 
> it is the html has 17XXX lines is too big ?
> 
> Thanks a lot 
> 
> Cliff
> 
> - Original Message - 
> From: "Allistair Crossley" <[EMAIL PROTECTED]>
> To: "Struts Users Mailing List" 
> Sent: Tuesday, May 10, 2005 4:58 PM
> Subject: RE: [OT] Help !! Too many select-box in one page
> 
> 
> > yes you won't be able to solve that problem if you are 
> rendering 88 select
> boxes. why? because you are rending 88 select boxes that are 
> populated from
> the database. no amount of client-sise javascript (yuck) is 
> going to help
> you.
> >
> > you need to re-factor your design which is clearly not 
> working for you.
> >
> > if you absolutely cannot re-factor the design, then you 
> could consider
> using some caching strategy to prevent the huge database 
> lookup more than
> once using something like OSCACHE perhaps.
> >
> > you could also consider hitting the database for 1 select list and
> building the html select
> > list into a java String, i.e
> >
> > String select = "";
> > // loop database result set adding  to select
> > // render JSP page
> >
> > in your JSP, replace the PLACEHOLDER with the select name you need
> >
> > <%
> >   String select = request.getAttribute("select");
> > %>
> >
> > <%= select.replaceAll("PLACEHOLDER", "selectNameA") %>
> > <%= select.replaceAll("PLACEHOLDER", "selectNameB") %>
> >
> > This method therefore hits the database ONCE (since you say 
> you can reuse
> the select lists) and should be much faster.
> >
> > Allistair.
> >
> > > -Original Message-
> > > From: Cliff Lam [mailto:[EMAIL PROTECTED]
> > > Sent: 10 May 2005 09:52
> > > To: Struts Users Mailing List
> > > Subject: Re: [OT] Help !! Too many select-box in one page
> > >
> > >
> > > Thank you for your reply
> > >
> > > I get the options from the db
> > >
> > > But the main concern is in the client side ...
> > >
> > > It loaded about 1min for the 17XXX lines html ...
> > >
> > > Cliff
> > >
> > > - Original Message - 
> > > From: "rmanchu" <[EMAIL PROTECTED]>
> > > To: "Struts Users Mailing List" 
> > > Sent: Tuesday, May 10, 2005 5:27 PM
> > > Subject: Re: [OT] Help !! Too many select-box in one page
> > >
> > >
> > > >
> > > > how r u rendering you select boxes? ie, database call for
> > > each render?
> > > >
> > > > riyaz
> > > >
> > > > Cliff Lam wrote:
> > > > > Hi,
> > > > >
> > > > > My page has too many select-box in one page. The .html
> > > has 17XXX lines.
> > > > >
> > > > > This make the page load for a long time to appear =(
> > > > >
> > > > > Anyone face this problem too??
> > > > >
> > > > > Please give me some idea > <" Thx a lot
> > > > >
> > > > > Cliff
> > > >
> > > >
> > > >
> > > 
> -
> > > > To unsubscribe, e-mail: [EMAIL PROTECTED]
> > > > For additional commands, e-mail: [EMAIL PROTECTED]
> > >
> > > 
> -
> > > To unsubscribe, e-mail: [EMAIL PROTECTED]
> > > For additional commands, e-mail: [EMAIL PROTECTED]
> > >
> > >
> >
> >
> > 
> > ---
> > QAS Ltd.
> > Developers of QuickAddress Software
> > http://www.qas.com";>www.qas.com
> > Registered in England: No 2582055
> > Registered in Australia: No 082 851 474
> > ---
> > 
> >
> >
> > 
> -
> > To unsubscribe, e-mail: [EMAIL PROTECTED]
> > For additional commands, e-mail: [EMAIL PROTECTED]
> >
> 
> 
> -
> To unsubscribe, e-mail: [EMAIL PROTECTED]
> For additional commands, e-mail: [EMAIL PROTECTED]
> 
> 

--

Re: [OT] Help !! Too many select-box in one page

2005-05-10 Thread rmanchu

i don't think u can do this on the client side. i suggest a caching
solution. something like this might be useful

write a small plugin that stores a Map at servlet context. The map.key
could be the table/form/field name. upto u. The value is a SQL statement
that retrieves the data for the dropdown/checkboxes [of the form
LabeL/Value using LabelValueBean]. anytime i need a dropdown or list of
checkboxes i just call the Map. if the map needs to be updated, u can
use another attribute that says if whether it is update. whenever an
underlying table changes, u can set it to false. Map is updated only
when there is a call to retrieve a list and if it is not uptodate.

HTH
riyaz


Cliff Lam wrote:
> Thank you for your reply
> 
> I get the options from the db
> 
> But the main concern is in the client side ...
> 
> It loaded about 1min for the 17XXX lines html ...
> 
> Cliff
> 
> - Original Message - 
> From: "rmanchu" <[EMAIL PROTECTED]>
> To: "Struts Users Mailing List" 
> Sent: Tuesday, May 10, 2005 5:27 PM
> Subject: Re: [OT] Help !! Too many select-box in one page
> 
> 
> 
>>how r u rendering you select boxes? ie, database call for each render?
>>
>>riyaz
>>
>>Cliff Lam wrote:
>>
>>>Hi,
>>>
>>>My page has too many select-box in one page. The .html has 17XXX lines.
>>>
>>>This make the page load for a long time to appear =(
>>>
>>>Anyone face this problem too??
>>>
>>>Please give me some idea > <" Thx a lot
>>>
>>>Cliff
>>
>>
>>-
>>To unsubscribe, e-mail: [EMAIL PROTECTED]
>>For additional commands, e-mail: [EMAIL PROTECTED]
> 
> 
> -
> To unsubscribe, e-mail: [EMAIL PROTECTED]
> For additional commands, e-mail: [EMAIL PROTECTED]
> 
> 


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



Re: [OT] Help !! Too many select-box in one page

2005-05-10 Thread Cliff Lam
Thank you very much for your reply ^^

You are right !! I should not get the list from db so many times ^^"

But I want to solve the loading time in the client side frist = (.

It loaded 1 min even I copy the html source code loaded in the drameweaver =
(

it is the html has 17XXX lines is too big ?

Thanks a lot 

Cliff

- Original Message - 
From: "Allistair Crossley" <[EMAIL PROTECTED]>
To: "Struts Users Mailing List" 
Sent: Tuesday, May 10, 2005 4:58 PM
Subject: RE: [OT] Help !! Too many select-box in one page


> yes you won't be able to solve that problem if you are rendering 88 select
boxes. why? because you are rending 88 select boxes that are populated from
the database. no amount of client-sise javascript (yuck) is going to help
you.
>
> you need to re-factor your design which is clearly not working for you.
>
> if you absolutely cannot re-factor the design, then you could consider
using some caching strategy to prevent the huge database lookup more than
once using something like OSCACHE perhaps.
>
> you could also consider hitting the database for 1 select list and
building the html select
> list into a java String, i.e
>
> String select = "";
> // loop database result set adding  to select
> // render JSP page
>
> in your JSP, replace the PLACEHOLDER with the select name you need
>
> <%
>   String select = request.getAttribute("select");
> %>
>
> <%= select.replaceAll("PLACEHOLDER", "selectNameA") %>
> <%= select.replaceAll("PLACEHOLDER", "selectNameB") %>
>
> This method therefore hits the database ONCE (since you say you can reuse
the select lists) and should be much faster.
>
> Allistair.
>
> > -Original Message-
> > From: Cliff Lam [mailto:[EMAIL PROTECTED]
> > Sent: 10 May 2005 09:52
> > To: Struts Users Mailing List
> > Subject: Re: [OT] Help !! Too many select-box in one page
> >
> >
> > Thank you for your reply
> >
> > I get the options from the db
> >
> > But the main concern is in the client side ...
> >
> > It loaded about 1min for the 17XXX lines html ...
> >
> > Cliff
> >
> > - Original Message - 
> > From: "rmanchu" <[EMAIL PROTECTED]>
> > To: "Struts Users Mailing List" 
> > Sent: Tuesday, May 10, 2005 5:27 PM
> > Subject: Re: [OT] Help !! Too many select-box in one page
> >
> >
> > >
> > > how r u rendering you select boxes? ie, database call for
> > each render?
> > >
> > > riyaz
> > >
> > > Cliff Lam wrote:
> > > > Hi,
> > > >
> > > > My page has too many select-box in one page. The .html
> > has 17XXX lines.
> > > >
> > > > This make the page load for a long time to appear =(
> > > >
> > > > Anyone face this problem too??
> > > >
> > > > Please give me some idea > <" Thx a lot
> > > >
> > > > Cliff
> > >
> > >
> > >
> > -
> > > To unsubscribe, e-mail: [EMAIL PROTECTED]
> > > For additional commands, e-mail: [EMAIL PROTECTED]
> >
> > -
> > To unsubscribe, e-mail: [EMAIL PROTECTED]
> > For additional commands, e-mail: [EMAIL PROTECTED]
> >
> >
>
>
> 
> ---
> QAS Ltd.
> Developers of QuickAddress Software
> http://www.qas.com";>www.qas.com
> Registered in England: No 2582055
> Registered in Australia: No 082 851 474
> ---
> 
>
>
> -
> To unsubscribe, e-mail: [EMAIL PROTECTED]
> For additional commands, e-mail: [EMAIL PROTECTED]
>


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



RE: [OT] Help !! Too many select-box in one page

2005-05-10 Thread Allistair Crossley
yes you won't be able to solve that problem if you are rendering 88 select 
boxes. why? because you are rending 88 select boxes that are populated from the 
database. no amount of client-sise javascript (yuck) is going to help you.

you need to re-factor your design which is clearly not working for you. 

if you absolutely cannot re-factor the design, then you could consider using 
some caching strategy to prevent the huge database lookup more than once using 
something like OSCACHE perhaps.

you could also consider hitting the database for 1 select list and building the 
html select 
list into a java String, i.e

String select = "";
// loop database result set adding  to select
// render JSP page

in your JSP, replace the PLACEHOLDER with the select name you need

<%
  String select = request.getAttribute("select");
%>

<%= select.replaceAll("PLACEHOLDER", "selectNameA") %>
<%= select.replaceAll("PLACEHOLDER", "selectNameB") %>

This method therefore hits the database ONCE (since you say you can reuse the 
select lists) and should be much faster.

Allistair.

> -Original Message-
> From: Cliff Lam [mailto:[EMAIL PROTECTED]
> Sent: 10 May 2005 09:52
> To: Struts Users Mailing List
> Subject: Re: [OT] Help !! Too many select-box in one page
> 
> 
> Thank you for your reply
> 
> I get the options from the db
> 
> But the main concern is in the client side ...
> 
> It loaded about 1min for the 17XXX lines html ...
> 
> Cliff
> 
> - Original Message - 
> From: "rmanchu" <[EMAIL PROTECTED]>
> To: "Struts Users Mailing List" 
> Sent: Tuesday, May 10, 2005 5:27 PM
> Subject: Re: [OT] Help !! Too many select-box in one page
> 
> 
> > 
> > how r u rendering you select boxes? ie, database call for 
> each render?
> > 
> > riyaz
> > 
> > Cliff Lam wrote:
> > > Hi,
> > > 
> > > My page has too many select-box in one page. The .html 
> has 17XXX lines.
> > > 
> > > This make the page load for a long time to appear =(
> > > 
> > > Anyone face this problem too??
> > > 
> > > Please give me some idea > <" Thx a lot
> > > 
> > > Cliff
> > 
> > 
> > 
> -
> > To unsubscribe, e-mail: [EMAIL PROTECTED]
> > For additional commands, e-mail: [EMAIL PROTECTED]
> 
> -
> To unsubscribe, e-mail: [EMAIL PROTECTED]
> For additional commands, e-mail: [EMAIL PROTECTED]
> 
> 


 
---
QAS Ltd.
Developers of QuickAddress Software
http://www.qas.com";>www.qas.com
Registered in England: No 2582055
Registered in Australia: No 082 851 474
---



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



Re: [OT] Help !! Too many select-box in one page

2005-05-10 Thread Cliff Lam
Thank you for your reply

I get the options from the db

But the main concern is in the client side ...

It loaded about 1min for the 17XXX lines html ...

Cliff

- Original Message - 
From: "rmanchu" <[EMAIL PROTECTED]>
To: "Struts Users Mailing List" 
Sent: Tuesday, May 10, 2005 5:27 PM
Subject: Re: [OT] Help !! Too many select-box in one page


> 
> how r u rendering you select boxes? ie, database call for each render?
> 
> riyaz
> 
> Cliff Lam wrote:
> > Hi,
> > 
> > My page has too many select-box in one page. The .html has 17XXX lines.
> > 
> > This make the page load for a long time to appear =(
> > 
> > Anyone face this problem too??
> > 
> > Please give me some idea > <" Thx a lot
> > 
> > Cliff
> 
> 
> -
> To unsubscribe, e-mail: [EMAIL PROTECTED]
> For additional commands, e-mail: [EMAIL PROTECTED]

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



Re: [OT] Help !! Too many select-box in one page

2005-05-10 Thread rmanchu

how r u rendering you select boxes? ie, database call for each render?

riyaz

Cliff Lam wrote:
> Hi,
> 
> My page has too many select-box in one page. The .html has 17XXX lines.
> 
> This make the page load for a long time to appear =(
> 
> Anyone face this problem too??
> 
> Please give me some idea > <" Thx a lot
> 
> Cliff


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



Re: [OT] Help !! Too many select-box in one page

2005-05-10 Thread Cliff Lam
thank you for you reply

I really want to solve the problem in the client side. It load for 1 min for
the page
= (

kill me please  X.X

Cliff

- Original Message - 
From: "Allistair Crossley" <[EMAIL PROTECTED]>
To: "Struts Users Mailing List" 
Sent: Tuesday, May 10, 2005 4:40 PM
Subject: RE: [OT] Help !! Too many select-box in one page


> You could define a JSP include file with one of these select lists, e.g
>
> 
>   ...
> 
>
> And then in your main form, using JSTL before each select change the
selectName page variable
>
> 
> 
>   ...
> 
>
> 
> 
>   ...
> 
>
> However, this will not reduce your HTML page size, because you are still
using 88 select blocks. You should understand the difference between
reducing page size (less code) and producing re-usable code (includes)
>
> Cheers, Allistair.
>
> > -Original Message-
> > From: Cliff Lam [mailto:[EMAIL PROTECTED]
> > Sent: 10 May 2005 09:36
> > To: Struts Users Mailing List
> > Subject: Re: [OT] Help !! Too many select-box in one page
> >
> >
> > Thank you very much for your quick reply.
> >
> > Actually, all the select-box is in one table contain 89 lists
> > and each list has several select-box in-side.
> >
> > but each select in each list has the same options.
> >
> > I'm trying to find a way to reuse it. So i can just generate
> > one select-box
> > for the other 88 select-box =(
> >
> > Cliff
> >
> >
> > - Original Message - 
> > From: "Allistair Crossley" <[EMAIL PROTECTED]>
> > To: "Struts Users Mailing List" 
> > Sent: Tuesday, May 10, 2005 4:31 PM
> > Subject: RE: [OT] Help !! Too many select-box in one page
> >
> >
> > > You need to decide also whether those "too many
> > select-boxes" are there
> > for a reason or not. If they are, then you can't very well
> > get rid of them,
> > if they are not, again, re-factor the form, re-gather
> > requirements for the
> > form data capture and work from that.
> > >
> > > Sounds like you could re-factor your HTML forms into
> > perhaps a "series" of
> > forms rather than one page.
> > >
> > > You might like to provide more information to the list with
> > regard to how
> > your page is built, what it's function is, the type of info
> > it collects and
> > the type of info it shows.
> > >
> > > Allistair.
> > >
> > > > -Original Message-
> > > > From: Cliff Lam [mailto:[EMAIL PROTECTED]
> > > > Sent: 10 May 2005 09:25
> > > > To: Struts Users Mailing List
> > > > Subject: [OT] Help !! Too many select-box in one page
> > > >
> > > >
> > > > Hi,
> > > >
> > > > My page has too many select-box in one page. The .html has
> > > > 17XXX lines.
> > > >
> > > > This make the page load for a long time to appear =(
> > > >
> > > > Anyone face this problem too??
> > > >
> > > > Please give me some idea > <" Thx a lot
> > > >
> > > > Cliff
> > > >
> > >
> > >
> > > 
> > > ---
> > > QAS Ltd.
> > > Developers of QuickAddress Software
> > > http://www.qas.com";>www.qas.com
> > > Registered in England: No 2582055
> > > Registered in Australia: No 082 851 474
> > > ---
> > > 
> > >
> > >
> > >
> > -
> > > To unsubscribe, e-mail: [EMAIL PROTECTED]
> > > For additional commands, e-mail: [EMAIL PROTECTED]
> > >
> >
> >
> > -
> > To unsubscribe, e-mail: [EMAIL PROTECTED]
> > For additional commands, e-mail: [EMAIL PROTECTED]
> >
> >
>
> -
> To unsubscribe, e-mail: [EMAIL PROTECTED]
> For additional commands, e-mail: [EMAIL PROTECTED]
>


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



RE: [OT] Help !! Too many select-box in one page

2005-05-10 Thread Allistair Crossley
You could define a JSP include file with one of these select lists, e.g


  ...


And then in your main form, using JSTL before each select change the selectName 
page variable



  ...




  ...


However, this will not reduce your HTML page size, because you are still using 
88 select blocks. You should understand the difference between reducing page 
size (less code) and producing re-usable code (includes)

Cheers, Allistair.

> -Original Message-
> From: Cliff Lam [mailto:[EMAIL PROTECTED]
> Sent: 10 May 2005 09:36
> To: Struts Users Mailing List
> Subject: Re: [OT] Help !! Too many select-box in one page
> 
> 
> Thank you very much for your quick reply.
> 
> Actually, all the select-box is in one table contain 89 lists
> and each list has several select-box in-side.
> 
> but each select in each list has the same options.
> 
> I'm trying to find a way to reuse it. So i can just generate 
> one select-box
> for the other 88 select-box =(
> 
> Cliff
> 
> 
> - Original Message - 
> From: "Allistair Crossley" <[EMAIL PROTECTED]>
> To: "Struts Users Mailing List" 
> Sent: Tuesday, May 10, 2005 4:31 PM
> Subject: RE: [OT] Help !! Too many select-box in one page
> 
> 
> > You need to decide also whether those "too many 
> select-boxes" are there
> for a reason or not. If they are, then you can't very well 
> get rid of them,
> if they are not, again, re-factor the form, re-gather 
> requirements for the
> form data capture and work from that.
> >
> > Sounds like you could re-factor your HTML forms into 
> perhaps a "series" of
> forms rather than one page.
> >
> > You might like to provide more information to the list with 
> regard to how
> your page is built, what it's function is, the type of info 
> it collects and
> the type of info it shows.
> >
> > Allistair.
> >
> > > -Original Message-
> > > From: Cliff Lam [mailto:[EMAIL PROTECTED]
> > > Sent: 10 May 2005 09:25
> > > To: Struts Users Mailing List
> > > Subject: [OT] Help !! Too many select-box in one page
> > >
> > >
> > > Hi,
> > >
> > > My page has too many select-box in one page. The .html has
> > > 17XXX lines.
> > >
> > > This make the page load for a long time to appear =(
> > >
> > > Anyone face this problem too??
> > >
> > > Please give me some idea > <" Thx a lot
> > >
> > > Cliff
> > >
> >
> >
> > 
> > ---
> > QAS Ltd.
> > Developers of QuickAddress Software
> > http://www.qas.com";>www.qas.com
> > Registered in England: No 2582055
> > Registered in Australia: No 082 851 474
> > ---
> > 
> >
> >
> > 
> -
> > To unsubscribe, e-mail: [EMAIL PROTECTED]
> > For additional commands, e-mail: [EMAIL PROTECTED]
> >
> 
> 
> -
> To unsubscribe, e-mail: [EMAIL PROTECTED]
> For additional commands, e-mail: [EMAIL PROTECTED]
> 
> 

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



Re: [OT] Help !! Too many select-box in one page

2005-05-10 Thread Cliff Lam
Thank you very much for your quick reply.

Actually, all the select-box is in one table contain 89 lists
and each list has several select-box in-side.

but each select in each list has the same options.

I'm trying to find a way to reuse it. So i can just generate one select-box
for the other 88 select-box =(

Cliff


- Original Message - 
From: "Allistair Crossley" <[EMAIL PROTECTED]>
To: "Struts Users Mailing List" 
Sent: Tuesday, May 10, 2005 4:31 PM
Subject: RE: [OT] Help !! Too many select-box in one page


> You need to decide also whether those "too many select-boxes" are there
for a reason or not. If they are, then you can't very well get rid of them,
if they are not, again, re-factor the form, re-gather requirements for the
form data capture and work from that.
>
> Sounds like you could re-factor your HTML forms into perhaps a "series" of
forms rather than one page.
>
> You might like to provide more information to the list with regard to how
your page is built, what it's function is, the type of info it collects and
the type of info it shows.
>
> Allistair.
>
> > -Original Message-
> > From: Cliff Lam [mailto:[EMAIL PROTECTED]
> > Sent: 10 May 2005 09:25
> > To: Struts Users Mailing List
> > Subject: [OT] Help !! Too many select-box in one page
> >
> >
> > Hi,
> >
> > My page has too many select-box in one page. The .html has
> > 17XXX lines.
> >
> > This make the page load for a long time to appear =(
> >
> > Anyone face this problem too??
> >
> > Please give me some idea > <" Thx a lot
> >
> > Cliff
> >
>
>
> 
> ---
> QAS Ltd.
> Developers of QuickAddress Software
> http://www.qas.com";>www.qas.com
> Registered in England: No 2582055
> Registered in Australia: No 082 851 474
> ---
> 
>
>
> -
> To unsubscribe, e-mail: [EMAIL PROTECTED]
> For additional commands, e-mail: [EMAIL PROTECTED]
>


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



RE: [OT] Help !! Too many select-box in one page

2005-05-10 Thread Allistair Crossley
You need to decide also whether those "too many select-boxes" are there for a 
reason or not. If they are, then you can't very well get rid of them, if they 
are not, again, re-factor the form, re-gather requirements for the form data 
capture and work from that. 

Sounds like you could re-factor your HTML forms into perhaps a "series" of 
forms rather than one page.

You might like to provide more information to the list with regard to how your 
page is built, what it's function is, the type of info it collects and the type 
of info it shows.

Allistair.

> -Original Message-
> From: Cliff Lam [mailto:[EMAIL PROTECTED]
> Sent: 10 May 2005 09:25
> To: Struts Users Mailing List
> Subject: [OT] Help !! Too many select-box in one page
> 
> 
> Hi,
> 
> My page has too many select-box in one page. The .html has 
> 17XXX lines.
> 
> This make the page load for a long time to appear =(
> 
> Anyone face this problem too??
> 
> Please give me some idea > <" Thx a lot
> 
> Cliff
> 


 
---
QAS Ltd.
Developers of QuickAddress Software
http://www.qas.com";>www.qas.com
Registered in England: No 2582055
Registered in Australia: No 082 851 474
---



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



Re: [OT] Help !! Too many select-box in one page

2005-05-10 Thread Robin Ericsson
Cliff Lam wrote:
> Hi,
> 
> My page has too many select-box in one page. The .html has 17XXX lines.
> 
> This make the page load for a long time to appear =(
> 
> Anyone face this problem too??
> 
> Please give me some idea > <" Thx a lot

Maybe some of the select-boxes can be rendered using javascript on the
clientside? Or maybe Ajax, since that seems to be popular at the moment :)


-- 
Robin Ericsson
http://robin.vill.ha.kuddkrig.nu/

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



Re: The field name in jsp

2005-05-10 Thread rmanchu

did u try with ur forms? i think it should work. also, if you're jsp is
not backed by an action then, u'll need to create a form, which u can
easily by using a RequestUtils.createActionForm method

riyaz


Cliff Lam wrote:
> Thx a lot.
> 
> This is a good method but I'm not using DynaActionForms = ( .
> 

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



[OT] Help !! Too many select-box in one page

2005-05-10 Thread Cliff Lam
Hi,

My page has too many select-box in one page. The .html has 17XXX lines.

This make the page load for a long time to appear =(

Anyone face this problem too??

Please give me some idea > <" Thx a lot

Cliff

Fwd: Cannot find bean error in any scope

2005-05-10 Thread Michael Jouravlev
Yes, and if I change 

 
 
 

to 



then I do not see any errors. Seems like the errors bean cannot be
loaded from messages. Wny?

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