Use of Tiles

2005-02-27 Thread Mark Benussi
I use tiles in my webapp but only to replace the deprecated struts template
methodology.

 

What I want to know is can I do define a tile.. Similar I suppose to a
taglib.

 

My jsp would look like the following

 

tile action=/myoldstrutsaction.do

!-- Then place html and use beans exposed by the tile such as --

table

for collection

tr

td%= Collection property %/td

/tr

/for

/table

/tile

 

Would be interested to know what you guys and gals think.



Re: AW: Struts Approach

2005-02-27 Thread Mike Millson
On Sat, 2005-02-26 at 11:26, Tim Christopher wrote:
 
 I'm also a little concerned that my domain object (Customer.java) is
 also my DTO - is this good practice?

Take a look at the following article:
http://www.javaperformancetuning.com/news/roundup050.shtml

I think the author makes a good point. Having a separate DTO class is
like domain persistence, a very odd concept to me. I agree w/ the
author. Pass the domain object as the DTO, not a separate DTO class.

Mike


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



Iterate over validation errors?

2005-02-27 Thread Adam Jenkins
Hi All,

Is there a simple way to iterate over all the validation errors.  I
don't want to just do html:errors/  I want to actually for a
ulli.../li/ul of all the errors that occured when submitting the
page.

Is this possible?  Does anyone have an example I could use?

Cheers
Adam


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



Re: Iterate over validation errors?

2005-02-27 Thread Erik Weber
Last I checked, Struts came configured to do what I think you are asking 
by default.

This is an example of the (Struts 1.1) ApplicationResources.properties file:
#header and footer for form validation error messages
errors.header=table width=100% border=0 cellspacing=0 
cellpadding=0tr align=lefttdstrongfont color=redinput 
error/font/strong/td/trtrtdnbsp;/td/trtr 
align=lefttdPlease resubmit the form after correcting your input to 
meet the following requirement(s):ul
errors.footer=/ul/td/trtrtdnbsp;/td/tr/table

#form validation error messages
#(rendered between header and footer above)
errors.required=li{0} is required./li
errors.minlength=li{0} cannot contain fewer than {1} characters./li
errors.maxlength=li{0} cannot contain more than {2} characters./li
errors.invalid=li{0} is invalid./li
errors.byte=li{0} must be an byte./li
errors.short=li{0} must be an short./li
errors.integer=li{0} must be an integer./li
errors.long=li{0} must be an long./li
errors.float=li{0} must be an float./li
errors.double=li{0} must be an double./li
errors.date=li{0} is not a date./li
errors.range=li{0} is not in the range {1} through {2}./li
errors.creditcard=li{0} is not a valid credit card number./li
errors.email=li{0} is invalid./li
#user plugins
errors.twofields=li{0} must have the same value as {1}./li
errors.dateRange=li{0} is not an acceptable date./li
Then a simple html:errors/ results in the bulleted list of all current 
validation errors, assuming your validation.xml is set up properly so 
that errors are matched with the messages in the properties file.

Hope this helps.
Erik

Adam Jenkins wrote:
Hi All,
Is there a simple way to iterate over all the validation errors.  I
don't want to just do html:errors/  I want to actually for a
ulli.../li/ul of all the errors that occured when submitting the
page.
Is this possible?  Does anyone have an example I could use?
Cheers
Adam
-
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: Iterate over validation errors?

2005-02-27 Thread Adam Jenkins
Thanks for that, I'll give it a go.  Is there anyway you can accomplish
it without having to put html in the resource bundle?

On Sun, 2005-02-27 at 19:04 -0500, Erik Weber wrote:
 Last I checked, Struts came configured to do what I think you are asking 
 by default.
 
 This is an example of the (Struts 1.1) ApplicationResources.properties file:
 
 #header and footer for form validation error messages
 errors.header=table width=100% border=0 cellspacing=0 
 cellpadding=0tr align=lefttdstrongfont color=redinput 
 error/font/strong/td/trtrtdnbsp;/td/trtr 
 align=lefttdPlease resubmit the form after correcting your input to 
 meet the following requirement(s):ul
 errors.footer=/ul/td/trtrtdnbsp;/td/tr/table
 
 
 #form validation error messages
 #(rendered between header and footer above)
 errors.required=li{0} is required./li
 errors.minlength=li{0} cannot contain fewer than {1} characters./li
 errors.maxlength=li{0} cannot contain more than {2} characters./li
 errors.invalid=li{0} is invalid./li
 errors.byte=li{0} must be an byte./li
 errors.short=li{0} must be an short./li
 errors.integer=li{0} must be an integer./li
 errors.long=li{0} must be an long./li
 errors.float=li{0} must be an float./li
 errors.double=li{0} must be an double./li
 errors.date=li{0} is not a date./li
 errors.range=li{0} is not in the range {1} through {2}./li
 errors.creditcard=li{0} is not a valid credit card number./li
 errors.email=li{0} is invalid./li
 #user plugins
 errors.twofields=li{0} must have the same value as {1}./li
 errors.dateRange=li{0} is not an acceptable date./li
 
 
 Then a simple html:errors/ results in the bulleted list of all current 
 validation errors, assuming your validation.xml is set up properly so 
 that errors are matched with the messages in the properties file.
 
 Hope this helps.
 
 Erik
 
 
 
 Adam Jenkins wrote:
 
 Hi All,
 
 Is there a simple way to iterate over all the validation errors.  I
 don't want to just do html:errors/  I want to actually for a
 ulli.../li/ul of all the errors that occured when submitting the
 page.
 
 Is this possible?  Does anyone have an example I could use?
 
 Cheers
 Adam
 
 
 -
 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: Iterate over validation errors?

2005-02-27 Thread Joe Hertz
There's one improvement on that method:

errors.prefix=li
errors.suffix=/li

So you don't need to put the markup into each error definition in your
properties file.

If you don't want markup in it at all, you can do something like

logic:messagesPresent 
UL
 html:messages id=error 
 LIbean:write name=error//LI
 /html:messages 
/UL 
/logic:messagesPresent

Ted has a good page on this:

http://husted.com/struts/tips/017.html

-Original Message-
From: Wendy Smoak [mailto:[EMAIL PROTECTED] 
Sent: Sunday, February 27, 2005 7:06 PM
To: Struts Users Mailing List
Subject: Re: Iterate over validation errors?

From: Adam Jenkins [EMAIL PROTECTED]
 Is there a simple way to iterate over all the validation errors.  I
 don't want to just do html:errors/  I want to actually for a
 ulli.../li/ul of all the errors that occured when submitting the
 page.
 Is this possible?  Does anyone have an example I could use?

Do you _really_ want to iterate over the validation errors, or do you just 
want the output to be a bulleted list?  If all you want is the ulli tags

around your errors, this works:

ApplicationResources.properties:
   errors.integer=li{0} must be an integer./li
   error.no.userId=liUser ID does not exist/li
   error.no.email=liNo email address on file/li
   errors.header=ul
   errors.footer=/ul

somePage.jsp:
   div class=error  html-el:errors/  /div
(The 'error' style just sets the font and turns it red, it's not required.)

I'm interested to know if there's a better way to do this-- putting markup 
in the .properties file doesn't seem right to me.

HTH,
Wendy Smoak







-
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: Iterate over validation errors?

2005-02-27 Thread Joe Hertz
There's one improvement on that method:

errors.prefix=li
errors.suffix=/li

So you don't need to put the markup into each error definition in your
properties file.

If you don't want markup in it at all, you can do something like

logic:messagesPresent 
UL
 html:messages id=error 
 LIbean:write name=error//LI
 /html:messages 
/UL 
/logic:messagesPresent

Ted has a good page on this:

http://husted.com/struts/tips/017.html

-Original Message-
From: Wendy Smoak [mailto:[EMAIL PROTECTED] 
Sent: Sunday, February 27, 2005 7:06 PM
To: Struts Users Mailing List
Subject: Re: Iterate over validation errors?

From: Adam Jenkins [EMAIL PROTECTED]
 Is there a simple way to iterate over all the validation errors.  I
 don't want to just do html:errors/  I want to actually for a
 ulli.../li/ul of all the errors that occured when submitting the
 page.
 Is this possible?  Does anyone have an example I could use?

Do you _really_ want to iterate over the validation errors, or do you just 
want the output to be a bulleted list?  If all you want is the ulli tags

around your errors, this works:

ApplicationResources.properties:
   errors.integer=li{0} must be an integer./li
   error.no.userId=liUser ID does not exist/li
   error.no.email=liNo email address on file/li
   errors.header=ul
   errors.footer=/ul

somePage.jsp:
   div class=error  html-el:errors/  /div
(The 'error' style just sets the font and turns it red, it's not required.)

I'm interested to know if there's a better way to do this-- putting markup 
in the .properties file doesn't seem right to me.

HTH,
Wendy Smoak







-
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: Iterate over validation errors?

2005-02-27 Thread Erik Weber
You could leave errors.header and errors.footer blank, and then wrap 
your html:errors with the markup. Somewhere in the properties file 
you're going to have to at least specify (markup) that you are using a 
bulleted list if I'm not mistaken. There also is a way that you could 
iterate over the individual error messages as you suggest. Then you 
could have no markup in the properties file. See the docs for the 
html:errors and html:messages tags.

Erik
Adam Jenkins wrote:
Thanks for that, I'll give it a go.  Is there anyway you can accomplish
it without having to put html in the resource bundle?
On Sun, 2005-02-27 at 19:04 -0500, Erik Weber wrote:
 

Last I checked, Struts came configured to do what I think you are asking 
by default.

This is an example of the (Struts 1.1) ApplicationResources.properties file:
#header and footer for form validation error messages
errors.header=table width=100% border=0 cellspacing=0 
cellpadding=0tr align=lefttdstrongfont color=redinput 
error/font/strong/td/trtrtdnbsp;/td/trtr 
align=lefttdPlease resubmit the form after correcting your input to 
meet the following requirement(s):ul
errors.footer=/ul/td/trtrtdnbsp;/td/tr/table

#form validation error messages
#(rendered between header and footer above)
errors.required=li{0} is required./li
errors.minlength=li{0} cannot contain fewer than {1} characters./li
errors.maxlength=li{0} cannot contain more than {2} characters./li
errors.invalid=li{0} is invalid./li
errors.byte=li{0} must be an byte./li
errors.short=li{0} must be an short./li
errors.integer=li{0} must be an integer./li
errors.long=li{0} must be an long./li
errors.float=li{0} must be an float./li
errors.double=li{0} must be an double./li
errors.date=li{0} is not a date./li
errors.range=li{0} is not in the range {1} through {2}./li
errors.creditcard=li{0} is not a valid credit card number./li
errors.email=li{0} is invalid./li
#user plugins
errors.twofields=li{0} must have the same value as {1}./li
errors.dateRange=li{0} is not an acceptable date./li
Then a simple html:errors/ results in the bulleted list of all current 
validation errors, assuming your validation.xml is set up properly so 
that errors are matched with the messages in the properties file.

Hope this helps.
Erik

Adam Jenkins wrote:
   

Hi All,
Is there a simple way to iterate over all the validation errors.  I
don't want to just do html:errors/  I want to actually for a
ulli.../li/ul of all the errors that occured when submitting the
page.
Is this possible?  Does anyone have an example I could use?
Cheers
Adam
-
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: Iterate over validation errors?

2005-02-27 Thread Joe Germuska
html:messages is an iterator through messages, so you can leave the 
HTML out of the resources file:

For the example below, here's how to do it with html:messages instead:
div class=error
ul
html:messages id=msg
lic:out value=${msg} //li
/html:messages
/ul
/div
Despite the name, html:messages defaults to looking for 
ActionMessages saved using saveErrors, not saveMessages, although 
you can use the messages='true' attribute to change that, and you 
can use other attributes to look up an arbitrary ActionMessages saved 
under any key; you can also specify a property attribute to filter 
the list to only messages associated with a certain property.

As usual, see the docs for full details, but I prefer html:messages 
to html:errors for this very reason.

Joe

At 5:06 PM -0700 2/27/05, Wendy Smoak wrote:
From: Adam Jenkins [EMAIL PROTECTED]
Is there a simple way to iterate over all the validation errors.  I
don't want to just do html:errors/  I want to actually for a
ulli.../li/ul of all the errors that occured when submitting the
page.
Is this possible?  Does anyone have an example I could use?
Do you _really_ want to iterate over the validation errors, or do 
you just want the output to be a bulleted list?  If all you want is 
the ulli tags around your errors, this works:

ApplicationResources.properties:
  errors.integer=li{0} must be an integer./li
  error.no.userId=liUser ID does not exist/li
  error.no.email=liNo email address on file/li
  errors.header=ul
  errors.footer=/ul
somePage.jsp:
  div class=error  html-el:errors/  /div
(The 'error' style just sets the font and turns it red, it's not required.)
I'm interested to know if there's a better way to do this-- putting 
markup in the .properties file doesn't seem right to me.

--
Joe Germuska
[EMAIL PROTECTED]  
http://blog.germuska.com
Narrow minds are weapons made for mass destruction  -The Ex

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


Re: Iterate over validation errors?

2005-02-27 Thread Erik Weber
Here are a couple of old posts I saved that might help too:

At 5:10 PM -0500 11/8/04, Erik Weber wrote:
Here is a way to do it that works with 1.1:
logic:messagesPresent name=org.apache.struts.action.ERROR 
property=username
bean:message key=error.username.required/
/logic:messagesPresent
pUsername: html:text property=username//p

Omitting the name attribute in this would have the same effect as 
including it - it's the default.  It's suggested that if you are storing 
messages in your actions using saveErrors or saveMessages (or 
dealing with validation errors, which are stored as if using 
saveErrors) then you shouldn't specify name literally; instead, you 
can either rely on the default (to get errors) or use the message 
attribute with a value of true (to get saveMessages messages) or 
false (to get errors -- that is, the default behavior).  This helps to 
encapsulate the logic of how Struts handles those messages, and makes 
your JSP a bit less verbose also.

Additionally, your code above assumes that the nature of the error 
message is such that you know that the user should be shown the 
error.username.required message -- it's probably more flexible to let 
the validation/error handling framework create an ActionMessage object 
with that key itself, and then you would use the messages object; this 
way if any other error should come up (say you add a max-length 
restriction, or forbidden characters), then you don't have to change 
your JSP.

In another response I demonstrated how html:messages can be used to 
achieve the same result you had above, plus this added flexibility I 
mention.

Some people still like to use html:errors, which predates 
html:messages and which has a slightly different syntax for providing 
any HTML which might wrap your messages.  Personally, I prefer 
html:messages.

None of this changed from Struts 1.1 to Struts 1.2.
Hope this helps,
   Joe

Not sure if that tag has changed for 1.2.
Erik
Struts User wrote:
Hello,
Currently, I am using struts validator to validate the fields in my 
ActionForm.
Before I updated to struts 1.2.4, I could add an error this way - 
errors.add(
username, new ActionError(error.username.required));

If the validation failed, the error message for username will be
displayed right beside the user name text field if I use PUsername:
html:text property=username//P.
Can someone tell me how to display error message beside an input field
using struts validator?
Thanks,
Lee
-
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]

The other response Joe mentioned I think was this one:
At 3:49 PM -0600 11/8/04, Struts User wrote:
Hello,
Currently, I am using struts validator to validate the fields in my 
ActionForm.

Before I updated to struts 1.2.4, I could add an error this way - 
errors.add(
username, new ActionError(error.username.required));

If the validation failed, the error message for username will be
displayed right beside the user name text field if I use PUsername:
html:text property=username//P.
Can someone tell me how to display error message beside an input field
using struts validator?

I've never seen any automatic message placement.  You can access 
messages like this:

html:messages property=username id=msg/html:messages
html:messages is effectively a combination logic/iterator tag.  If there 
are any username messages in the ActionMessages object saved as the 
errors messages, the body of html:messages will be evaluated once for 
each, with a scripting variable of type String defined with the name 
specified in the id attribute.  You can use c:out or bean:write to 
display this value, wrapped with span, div, or other tags which format 
your messages correctly.

I kind of think someone talked on the list once about making something 
which rendered an HTML label tag and which was also smart about the 
presence of errors.  I like the idea of something like that in general, 
but wonder if you'd be able to specify something suitably general for 
inclusion in Struts.  Seems like it might be better left for local 
development.

Joe

But I think Niall recently mentioned some improvements in this area in 
1.2.6 . . .

Erik

Adam Jenkins wrote:
Thanks for that, I'll give it a go.  Is there anyway you can accomplish
it without having to put html in the resource bundle?
On Sun, 2005-02-27 at 19:04 -0500, Erik Weber wrote:
 

Last I checked, Struts came configured to do what I think you are asking 
by default.

This is an example of the (Struts 1.1) ApplicationResources.properties file:
#header and footer for form validation error messages
errors.header=table width=100% border=0 cellspacing=0 
cellpadding=0tr align=lefttdstrongfont color=redinput 
error/font/strong/td/trtrtdnbsp;/td/trtr 
align=lefttdPlease resubmit the form after correcting your input to 
meet the following requirement(s):ul

Re: Iterate over validation errors?

2005-02-27 Thread Erik Weber
Heh, just ignore everything I wrote and listen to Joe.
:)
Erik
Joe Germuska wrote:
html:messages is an iterator through messages, so you can leave the 
HTML out of the resources file:

For the example below, here's how to do it with html:messages instead:
div class=error
ul
html:messages id=msg
lic:out value=${msg} //li
/html:messages
/ul
/div
Despite the name, html:messages defaults to looking for ActionMessages 
saved using saveErrors, not saveMessages, although you can use the 
messages='true' attribute to change that, and you can use other 
attributes to look up an arbitrary ActionMessages saved under any key; 
you can also specify a property attribute to filter the list to only 
messages associated with a certain property.

As usual, see the docs for full details, but I prefer html:messages to 
html:errors for this very reason.

Joe

At 5:06 PM -0700 2/27/05, Wendy Smoak wrote:
From: Adam Jenkins [EMAIL PROTECTED]
Is there a simple way to iterate over all the validation errors.  I
don't want to just do html:errors/  I want to actually for a
ulli.../li/ul of all the errors that occured when submitting 
the
page.
Is this possible?  Does anyone have an example I could use?

Do you _really_ want to iterate over the validation errors, or do you 
just want the output to be a bulleted list?  If all you want is the 
ulli tags around your errors, this works:

ApplicationResources.properties:
  errors.integer=li{0} must be an integer./li
  error.no.userId=liUser ID does not exist/li
  error.no.email=liNo email address on file/li
  errors.header=ul
  errors.footer=/ul
somePage.jsp:
  div class=error  html-el:errors/  /div
(The 'error' style just sets the font and turns it red, it's not 
required.)

I'm interested to know if there's a better way to do this-- putting 
markup in the .properties file doesn't seem right to me.


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


RequestURI (Action not JSP)

2005-02-27 Thread Ben Taylor
Can anyone tell me if it is possible to extract the name of the
current action from within a JSP? ie. /welcome.do, or
/secure/login.do...  Is there a tag that can do this - maybe within
one of the additional tag libraries?

Thank you in advance.

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



Re: Uploading: And a Wish List for Struts v1.3 and v2.0 Jericho

2005-02-27 Thread Dakota Jack
The wiki list is for trying to convince the struts developers to take
Struts 1.3 chain to a place that alternative upload applications can
be submitted?  I think this is an irrelevant response to a substantial
question.

Jacki


On Sat, 26 Feb 2005 20:14:28 -0800, Craig McClanahan [EMAIL PROTECTED] wrote:
 What you describe is pretty much what the Wiki is for
 (http://wiki.apache.org/struts).   There are no limitations on who can
 post to it (other than having to have a valid login), and nothing that
 is on topic - i.e. generally related to the development of Struts - is
 likely to be frowned on.
 
 Of course, that won't work any better than mailing lists do until
 people start writing code instead of writing words.  If you want to
 see some feature constructed, make it so, by doing it!  (Among other
 reasons, this is why you see me focusing more on code than on the
 mailing lists, for example.)
 
 If nobody ever does this, wishes will just remain wishes.
 
 Craig
 
 On Sat, 26 Feb 2005 22:59:56 -0500, Frank W. Zammetti
 [EMAIL PROTECTED] wrote:
  You know what might actually make a wish list more interesting (at least
  to me)?  What if we had a site we could go to and see a list of all the
  pie-in-the-sky kinds of things people wanted, and I as someone who might
  want to contribute could say gee, X over here sounds very interesting
  to me, I'd like to do that and I could kind of assign it to myself?
 
  This might sound a little bit like Bugzilla or SourceForge, but I think
  it would serve a different purpose and have some different features...
 
  For instance, what it one of the things it did was every week or two
  sent out an eMail to the person who said they were working on something
  and requested an update?  If no response was recieved in 48 hours lets
  say, then the person loses their assignment.  That doesn't mean they
  can't still work on it, just that as far as the community knows, no one
  is actively working on that project.
 
  Such a site would serve as something of a central clearing house for the
  various wish list items people have.  A person could go there and see
  what people want, what is being worked on, what the current status is,
  etc.  This would minimize duplication of effort, and would also help two
  people interested in the same thing get together and help each other.
 
  I don't propose that this would be anything officially sanctioned,
  certainly not initially, nor would it be anything other than kind of a
  meeting place and status database (i.e., I'm not talking about storing
  code or posting releases like SF or anything).
 
  It just seems to me that we all have our own wish lists, and some of us
  are willing to put in some effort to implement some of the ideas.
  Wouldn't we all help ourselves and each other by introducing some minor
  level of organization to such efforts?  We certainly can't all know what
  each other is doing all the time, so isn't anything that facilitates
  communication a Good Thing(tm)?
 
  I would be more than willing to put such a site together, and I'd even
  be willing to host it (assuming it didn't prove to be a financial
  burden).  But I'd like to know if I'm the only one that thinks it might
  be a good idea or not first. :)
 
  --
  Frank W. Zammetti
  Founder and Chief Software Architect
  Omnytex Technologies
  http://www.omnytex.com
 
  Ted Husted wrote:
   On Fri, 25 Feb 2005 11:56:02 -0800, Dakota Jack wrote:
  
   Hope this is helpful.  If not, please understand it was meant to be
   helpful.
  
  
   Wish lists like this are mildly interesting, but what's helpful is when 
   people give back to the community by creating new extensions.
  
   A Struts Upload extension would probably be interesting to a lot of 
   people. But someone who uses one must be the one to create it. Just like 
   when Steve created ssl-ext, and Hubert created FormDef, and Frank created 
   WS,  and Don created Scripting, and once upon a time, when David created 
   Validator and Cedric created Tiles.
  
   All of us are writing applications. The difference is that a few kind 
   souls package their stuff to share with others.
  
   -Ted.
  
  
  
   -
   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]
 
 


-- 
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: Uploading: And a Wish List for Struts v1.3 and v2.0 Jericho

2005-02-27 Thread Dakota Jack
I wish I had never said wish list.  I was talking about a KIND OF
INTERFACE needed in Struts and the example application is just to show
what KIND OF INTERFACE might be helpful.  DId no one get that?  I try
to save space by not spelling out what seems to be obvious and I get
these answers from left field.

What this upload application needs to utilize ActionForm is something
other applications that are not multipart request oriented also need. 
Can we abstract a little here?

This is not a wish list for the upload.  I SAID THAT THE UPLOAD WAS
BUILT, RUNNING, ETC.  The wish list is that Struts could ACCOMMODATE
this sort of structure in applications generally.  Sheezsch, I must be
horrible at communicating and you guys must be horrible at reading. 
How can the upload application be the wish list when it is built and
in production?

Sorry, Frank!  You ususally read everything very closely and I usually
have this same frustration with others.

Jack


On Sat, 26 Feb 2005 22:59:56 -0500, Frank W. Zammetti
[EMAIL PROTECTED] wrote:
 You know what might actually make a wish list more interesting (at least
 to me)?  What if we had a site we could go to and see a list of all the
 pie-in-the-sky kinds of things people wanted, and I as someone who might
 want to contribute could say gee, X over here sounds very interesting
 to me, I'd like to do that and I could kind of assign it to myself?
 
 This might sound a little bit like Bugzilla or SourceForge, but I think
 it would serve a different purpose and have some different features...
 
 For instance, what it one of the things it did was every week or two
 sent out an eMail to the person who said they were working on something
 and requested an update?  If no response was recieved in 48 hours lets
 say, then the person loses their assignment.  That doesn't mean they
 can't still work on it, just that as far as the community knows, no one
 is actively working on that project.
 
 Such a site would serve as something of a central clearing house for the
 various wish list items people have.  A person could go there and see
 what people want, what is being worked on, what the current status is,
 etc.  This would minimize duplication of effort, and would also help two
 people interested in the same thing get together and help each other.
 
 I don't propose that this would be anything officially sanctioned,
 certainly not initially, nor would it be anything other than kind of a
 meeting place and status database (i.e., I'm not talking about storing
 code or posting releases like SF or anything).
 
 It just seems to me that we all have our own wish lists, and some of us
 are willing to put in some effort to implement some of the ideas.
 Wouldn't we all help ourselves and each other by introducing some minor
 level of organization to such efforts?  We certainly can't all know what
 each other is doing all the time, so isn't anything that facilitates
 communication a Good Thing(tm)?
 
 I would be more than willing to put such a site together, and I'd even
 be willing to host it (assuming it didn't prove to be a financial
 burden).  But I'd like to know if I'm the only one that thinks it might
 be a good idea or not first. :)
 
 --
 Frank W. Zammetti
 Founder and Chief Software Architect
 Omnytex Technologies
 http://www.omnytex.com
 
 Ted Husted wrote:
  On Fri, 25 Feb 2005 11:56:02 -0800, Dakota Jack wrote:
 
  Hope this is helpful.  If not, please understand it was meant to be
  helpful.
 
 
  Wish lists like this are mildly interesting, but what's helpful is when 
  people give back to the community by creating new extensions.
 
  A Struts Upload extension would probably be interesting to a lot of people. 
  But someone who uses one must be the one to create it. Just like when Steve 
  created ssl-ext, and Hubert created FormDef, and Frank created WS,  and Don 
  created Scripting, and once upon a time, when David created Validator and 
  Cedric created Tiles.
 
  All of us are writing applications. The difference is that a few kind souls 
  package their stuff to share with others.
 
  -Ted.
 
 
 
  -
  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]
 
 


-- 
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: [OT] Re: Struts Approach

2005-02-27 Thread Andrew Hill
snip
 Not to hit below the belt, but the only place that I have seen that
 naming used in practice is in the Win32/COM world. Can you name
 another? ;-)
/snip
We do it as part of our coding conventions (we also do the Abstractxxx 
thing too). Im rather pro doing it that way too. Mostly its a matter of 
taste, though I do find it helps to visualise the design better (a 
diagram would also help - but who has time for that, and anyhow I think 
better in code than in pictures) - as soon as I see an Ixxx I know that 
its intended that will be different impls that plug in, and that Id get 
a lot further trying to instantiate one of those than the interface 
class... etc...
It works niely for us, but I doubt we would lose much doing it the other 
way. Certainly beats trying to think of new words that end in 'able'. 
;-) Ymmv...


Larry Meadors wrote:
On Sat, 26 Feb 2005 14:30:18 +0100, [EMAIL PROTECTED] wrote:
Can you tell me the exact difference between a leading I and a leading
Abstract  ?
AbstractButton, AbstractModel, AbstractAction...

Abstract describes the behavior (the class is an abstract or partial
implementation), where I is just a name mangler...I suppose you
*could* argue that it describes the *lack of* behavior, but that still
seems like nonsense. ;-)

I am unaware of any interfaces in the JDK that are ISomething.
There was almost none of those in jdks 1.0, 1.1.x and so on, till swing / 
1.2.
Wait till 1.6 :-)

OK, you made me look at 1.6, which I suppose is a good thing. :-) 

But you also proved my point - I am looking at it now, and see many,
many interfaces, and not a *single one* that is named with a leading
I that is not part of what the interface describes - and no,
Iterator does not count...but it was still darn funny!
Not to hit below the belt, but the only place that I have seen that
naming used in practice is in the Win32/COM world. Can you name
another? ;-)
Larry
-
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: Uploading: And a Wish List for Struts v1.3 and v2.0 Jericho

2005-02-27 Thread Dakota Jack
If you check the discussions I have had with Niall on this on this
list, that might be helpful.  He understands clearly what I am talking
about and where the extension points in 1.3 need to be tweeked in
relation to this real problem.  This submission was to be a helpful
addition to that discussion, and instead has degenerated into this
irrelevant whatever stuff.

Jack


On Sat, 26 Feb 2005 18:42:38 -0500, Ted Husted [EMAIL PROTECTED] wrote:
 On Fri, 25 Feb 2005 11:56:02 -0800, Dakota Jack wrote:
  Hope this is helpful.  If not, please understand it was meant to be
  helpful.
 
 Wish lists like this are mildly interesting, but what's helpful is when 
 people give back to the community by creating new extensions.
 
 A Struts Upload extension would probably be interesting to a lot of people. 
 But someone who uses one must be the one to create it. Just like when Steve 
 created ssl-ext, and Hubert created FormDef, and Frank created WS,  and Don 
 created Scripting, and once upon a time, when David created Validator and 
 Cedric created Tiles.
 
 All of us are writing applications. The difference is that a few kind souls 
 package their stuff to share with others.
 
 -Ted.
 
 -
 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: RequestURI (Action not JSP)

2005-02-27 Thread Erik Weber
I don't have the best answer, but I've got two ideas for you.
One is to remember that the ActionMapping (which inherits from 
ActionConfig) instance is available to the setup action before you 
transfer control to your JSP. Not sure if that would help or not.

Also, I found it very helpful to override a RequestProcessor method 
(such as processPath) and print all the request, session and application 
scoped attributes out to the console for each request during 
development. If I recall, something pretty close to what you want is 
available as an attribute in some scope, but I can't exactly remember 
the key. Checking the constant field values page in the API docs might 
help, but I found it easier to just print them all out and see for myself.

Erik
Ben Taylor wrote:
Can anyone tell me if it is possible to extract the name of the
current action from within a JSP? ie. /welcome.do, or
/secure/login.do...  Is there a tag that can do this - maybe within
one of the additional tag libraries?
Thank you in advance.
-
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]


help with bean:write

2005-02-27 Thread Richard Reyes
Hello Guys,

Please advise

I have this code below... and i need to add the username property to
the javascript.

td align=right bgcolor=#ff 
   bean:write name=idRuser property=username/nbsp;
html:button property=btnDelete value=Delete 
   
onclick=document.location.replace('delete-ruser.rr?ruser='+bean:write
name=idRuser property=username/ ) /
/td

thanks
richard

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



Encoding problems with russian / bean:write / html:text

2005-02-27 Thread Leon Rosenberg
Hi,

First of all, I'm not very experienced with encoding, so it's could be a very 
newbie problem.
I have a website-builder, which generates a complete struts web-app out of an 
xml file. 
However I now have a customer who wants to present his data in russian and 
german. 
The data for presentation is entered and stored via Dialogs produced with html 
taglib, like:
html:text property=name/

then, it's stored on the disk as a serializable object. Then it's presented in 
another html-page via bean:write. If I give both the page and the meta tags 
charset UTF-8, I get only complete crap like  in the presentation 
page.

If I use iso-8859-1, bean:write produces things like: 
#1074;#1072;#1074;#1072;#1074;#1072;, the html-sourcecode is 
amp;#1074;amp;#1072;amp;#1074;amp;#1072;amp;#1074;amp;#1072; (the source 
string was something like qwqwqwqw in russian). 

If I add filter=false to the bean:write call, everything works fine (with 
iso-8859-1). 
Unfortunately there is no filter option in html:text tag, so as soon as I 
present the data in edit-form for editing
aain, I see the #1074; in the input form.

So I assume, I'm making an idiotical mistake, but I don't have much experience 
with editing in russian, so I'd like to ask, if anyone can point me to the 
right direction. 

Thanx in advance

Leon

 

 

 




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



Encoding problems with russian / bean:write / html:text

2005-02-27 Thread Leon Rosenberg
Hi,

First of all, I'm not very experienced with encoding, so it's could be a very 
newbie problem.
I have a website-builder, which generates a complete struts web-app out of an 
xml file. 
However I now have a customer who wants to present his data in russian and 
german. 
The data for presentation is entered and stored via Dialogs produced with html 
taglib, like:
html:text property=name/

then, it's stored on the disk as a serializable object. Then it's presented in 
another html-page via bean:write. If I give both the page and the meta tags 
charset UTF-8, I get only complete crap like  in the presentation 
page.

If I use iso-8859-1, bean:write produces things like: 
#1074;#1072;#1074;#1072;#1074;#1072;, the html-sourcecode is 
amp;#1074;amp;#1072;amp;#1074;amp;#1072;amp;#1074;amp;#1072; (the source 
string was something like qwqwqwqw in russian). 

If I add filter=false to the bean:write call, everything works fine (with 
iso-8859-1). 
Unfortunately there is no filter option in html:text tag, so as soon as I 
present the data in edit-form for editing
aain, I see the #1074; in the input form.

So I assume, I'm making an idiotical mistake, but I don't have much experience 
with editing in russian, so I'd like to ask, if anyone can point me to the 
right direction. 

Thanx in advance

Leon

 

 

 




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