I have my own validator method defined in validator-rules.xml.
When an exception is thrown by the validation method, I would
expect it to be handled by the global error handling,
like what happens when an error is thrown by an action.
Instead it proceeds forward just as if validation
succeeded with
I am wondering about best practices in struts for
internationalization of dates and numbers. Formatting
is not too hard, but parsing and validation is trickier.
We must simultaneously handle different formats for
different users, so any validation or parsing has to
take into account the user's loc
html-el gives you the ability to process expression language (EL) within
the tag attributes. Look at the JSTL docs to see the definition for EL.
Look in the "contrib" directory of the struts release to see the TLDs
and JARs for html-el.
- Dan
> -Original Message-
> From: Abdullah Jibaly
Yes, just extend the PropertyMessageResources and overide the
loadLocale() method. You should extend the factory too and specify
the new factory in struts-config.xml. Add a method to clear
the cache in the PropertyMessageResources and clear it when the user
changes something.
- Dan
> -Origin
Why do you do all that work to print the stack trace?
Shouldn't exception.printStackTrace(out) do what you want?
This also follows the exception.getCause() chain and
prints out nested exceptions.
As a side note, if you really want to log
all nested exceptions then you have to do a little extra
wor
That's definitely one solution. The other is to have
an onsubmit method on the form with javascript to
iterate over all the input elements in the form,
find unchecked check-boxes, and create a hidden
input with the same name and a value of "false".
- Dan
> -Original Message-
> From: James
Set filter=false in the bean:write tag. RTFM for more info.
> -Original Message-
> From: kjc [mailto:[EMAIL PROTECTED]
> Sent: Monday, January 03, 2005 5:58 PM
>
> I'm trying to use the struts bean:write tag to render an html page.
> The html that I would like to display is generated
It is available for the duration of the HTTP request.
That may be more than one page if you are forwarding (server-side)
but if you are not it is more or less equivalent to a page.
The 4 scopes are
page, request, session, application
so if you want to keep something for longer
you probably want to
If you use Struts-EL you can use and use
EL syntax for arg0, arg1, etc. The syntax in the .properties file
is still '{0}', etc. But I think that is best for flexibility
and robustness. Otherwise the property file has to assume a bean
with a certain name will exist and name changes would have to
> -Original Message-
> From: Jim Barrows [mailto:[EMAIL PROTECTED]
> Sent: Wednesday, December 29, 2004 8:15 AM
> To: Struts Users Mailing List
> Subject: RE: message resources in db
>
> > -Original Message-
> > From: Nathan Coast [mailto:[EMAIL PROTECTED]
> > Sent: Wednesday,
I have a field I want to require only if the bean
it exists inside exists (is not null).
I cannot use validwhen because I am using struts 1.1.
I tried to use requiredif like this
field[0]
You should probably use bean:define instead of bean:parameter.
Even better learn JSTL and use c:set, c:if, and c:forEach to facilitate
you.
You will find JSTL has better versions of
everything in the struts "logic" and "bean" taglibs.
I don't think there is any readymade tags for grouping.
But if
Can you just escape it in your .properties file
or whereever the message is defined? I think that
would be best practice unless you need to only escape it
some of the time.
- Dan
> -Original Message-
> From: Edgar Poce [mailto:[EMAIL PROTECTED]
> Sent: Saturday, December 18, 2004 2:42 PM
You can also set "additivity" to false for the class or package,
which prevents it from inheriting appenders. You will have to
look up the syntax yourself, since I do not use the XML style.
- Dan
> -Original Message-
> From: Hubert Rabago [mailto:[EMAIL PROTECTED]
> Sent: Tuesday, Decemb
7;s Test"); %>
<% session.setAttribute("y","The \"other\" test"); %>
Works in IE and Firefox/Mozilla (and I assume other browsers too).
- Dan
> -Original Message-
> From: Daniel Lipofsky
> Sent: Thursday, January 22, 2004 5:22 PM
>
I have this problem with bean:message. I would like it to output
nothing if the key is null or empty. I tried these 2 forms:
But I get ???en_US.null??? or ???en_US.??? for these. If I set
null="true" in my message resources they throw exceptions instead.
Also if myProp is an Integer the fir
I have one web module with many struts modules.
I am wondering if there is a way to get a hold
of the list of modules? I have 1 shared action
servlet and I want to get the list of modules in
the init() method.
Thanks,
Dan
-
To u
17 matches
Mail list logo