Your bean looks correct... It is probably something to do with the JSP tags.
I'm not an expert of the Struts tags (I'm more on the Java side), but
perhaps the tag does not handle the property as indexed. There is an
attribute indexed on the html:select tag, but the documentation says it's
used
The Struts PropertyUtils is now deprecated: all further developement is done
within the commons beanutils project. Future Struts release after 1.0.x will
use the new commons library. If you really want this feature with Struts
1.0.x, see this posting:
Why can't you use the Commons BeanUtils MappedProperty feature?
Supposing you have these methods on your bean:
public void setProperty(String key, Object value)
public Object getProperty(String key)
then you can use this notation in the Struts nightly build:
bean:write name=formBean
Dimitri,
I'm not sure what would be the best way to use the common BeanUtils with
Struts 1.0. I suppose your suggestion will work, but you'll have to change
many java file in order to change the imports. If your project is not going
into production until later, it may be easier to take the
This feature is now available in the Jakarta commons project, where
BeanUtils/PropertyUtils have been upgrated to support MappedProperties,
which is exactly what you describe. Have a look at the BeanUtils 1.1
component on http://jakarta.apache.org/commons/components.html.
Fr.
PS:
The ActionServlet does this resolution already, it looks for this DTD
locally:
ActionServlet {
...
/**
* The set of public identifiers, and corresponding resource names, for
* the versions of the configuration file DTDs that we know about.
There
* strongMUST/strong be
There is also the possibility to use the Digester's caller ClassLoader. The
little helper class I attach with this email is quite helpful in getting the
caller's ClassLoader. With this approach, I would think there is no need to
specify additional options for a class loader, assuming of course
Look at the mapper configuration file loading process in the mapper
framework that is available on Ted Husted site (
http://www.husted.com/about/struts/resources.htm#extensions
http://www.husted.com/about/struts/resources.htm#extensions ).
See Mappers.initDigester(). I've had to create a few
David,
I agree with you: tokens should be used. See my previous postings as well
where I give reasons on why:
http://www.mail-archive.com/struts-dev@jakarta.apache.org/msg01330.html.
All these discussions about alternate scopes, workflow, custom context,
transaction token, command token, etc. are
Just a few remarks on the mapper framework that Ted has published on his
site (http://www.husted.com/about/struts/resources.htm#extensions).
It is still work in progress, so consider it as an early release. It is
still lacking a few things, especially proper doc and javadoc!
This release
Your idea would certainly work. To avoid the overhead of introspection,
you'll probably want to do some caching of the introspection results (e.g.
the validate methods). A concern I have is whether subclassing from your
base validation class is a desired feature: unless you do some code
I definitely would like to share the code but I don't have a web server
somewhere where I can put it. And the zip file will be over 200Kb so I don't
think sending it to the list is recommended, is it?
A couple options:
- Yahoo My Briefcase (and you get a couple banners)
- SourceForge
Actually I like emptyString very much !
I use the same keyword in my validation properties (in the mapper-config.xml
:)
Just a couple tips which may or may not be relevant:
1. I had to distinguish empty strings from blank strings in order to provide
finer control over validation and conversion.
it to me, Francois. I'll post it on my Struts page right
away, and add it to the Contributor's area in the Struts CVS later this
week.
-- Ted Husted, Husted dot Com, Fairport NY USA.
-- Custom Software ~ Technical Services.
-- Tel 716 737-3463.
-- http://www.husted.com/about/struts/
Rey Francois
I'm not so much of an XML expert, but isn't the CCDATA character section
offering a nice solution in order to preserve the real look of a reg. exp.
in an XML file?
Fr.
-Original Message-
From: David Winterfeldt [mailto:[EMAIL PROTECTED]]
Sent: 25 June 2001 18:11
To: [EMAIL PROTECTED]
This is also an area I like to discuss but I do not have any implementation
nor the requirement yet to implement alternate scopes.
I've made an earlier posting on this topic giving my thoughts, which I
repeat below.
--- start of extract ---
(...)
This has suggested me the notion of contexts,
Another possibility is to develop extensions for the TogetherJ CASE tool. It
is entirely written in Java, therefore can run on most platform, and from my
understanding it is possible to define new diagram types and patterns.
This may not directly relate to workflow, but we have in our team
We have also explored such idea, although this was just a discussion in our
team. We however have also concluded that the notion of workflow, or
contexts in our terms, is strongly related to the notion of command token
already discussed in this user list in Dec. 2000, and therefore both should
/
-Original Message-
From: Rey Francois [mailto:[EMAIL PROTECTED]]
Sent: 08 March 2001 14:40
To: '[EMAIL PROTECTED]'
Subject: JSP Components
In the context of building reusable JSP components, I have been confronted
with the following limitation that both the Struts templating and the
Components from
new generic Validator class that
will do something like the following:
validateEmail
validateRange
validateText
etc, etc.
What do you think?
- Original Message -
From: "Rey Francois" [EMAIL PROTECTED]
To: [EMAIL PROTECTED]
Sent: Wednesday, February 28, 2001 11:20 PM
Subject: RE:
getDateAsText(), Date getDateValue()).
David
--- Rey Francois [EMAIL PROTECTED] wrote:
See also the posting I made a few days ago regarding
validation. I've pasted
it below.
The main idea is to use the java.text.Format class
to do the validation and
transformation
between Strings and objects (both
See also the posting I made a few days ago regarding validation. I've pasted
it below.
The main idea is to use the java.text.Format class to do the validation and
transformation
between Strings and objects (both ways). The XML customization you're
talking about should achieve
this double goal:
22 matches
Mail list logo