On Tuesday, January 21, 2003, 2:41:05 PM, Jeremy wrote:
JC I wasn't exactly clear with what I am trying to do. Here is what
JC I really want to do:
JC logic:iterate name=problemArray id=currentProb scope=request
JC bean:write name=currentProb property=problemName/
JC html:radio
On Friday, January 17, 2003, 8:42:11 AM, Suresh wrote:
SA But now, my whole form is not getting displayed because I am not
SA getting the form bean back. Any thing I am missing? **Must the
SA form bean be in session scope if I want this functionality?**
No, the FormBean can have request scope.
On Friday, January 17, 2003, 10:23:16 AM, Suresh wrote:
SA Form-bean related config:
SA form-bean name=servicesForm
SA type=org.apache.struts.validator.DynaValidatorForm
SA form-property name=serviceSets type=java.util.Vector /
SA form-property name=services
On Friday, January 17, 2003, 12:14:40 PM, Ashish wrote:
AK Hi, What i am trying to do it the following, I have a
AK DispatchAction class which is called from a jsp ( and passed user)
AK then i need to popluate a Bean (Action or Dyna) and put it in
AK request and pass it to jsp, so the jsp will
On Fri, 17 Jan 2003 14:17:04 -0800 (PST)
Ashish Kulkarni [EMAIL PROTECTED] wrote:
Hi,
the code did not work that way , so what i did is the
following
DynaValidatorForm PL1820DeleteForm =
(DynaValidatorForm)
DynaActionFormClass.getDynaActionFormClass(
On Thursday, January 16, 2003, 5:00:19 PM, Ginger wrote:
GC As a matter of fact, I did try version1.0 from that one and it did
GC not work out for me because the init method in validateForm
GC requires a filed that doesn't exist.
When you install the latest struts it comes with all the
On Thursday, January 16, 2003, 5:01:28 PM, John wrote:
HJ Has anyone been able to get server side validation to work with
HJ beta 3?
Seems to be working fine for me.
--
Rick
mailto:[EMAIL PROTECTED]
--
To unsubscribe, e-mail: mailto:[EMAIL PROTECTED]
For additional commands, e-mail:
On Wed, 15 Jan 2003 12:27:02 -0800 (PST)
Craig R. McClanahan [EMAIL PROTECTED] wrote:
(Presuming 1.1b3 here)
Thanks! Actually that was the whole problem right there- I was using
1.1b1. Definitely worth upgrading! Thanks again.
--
Rick
--
To unsubscribe, e-mail: mailto:[EMAIL
On Wed, 15 Jan 2003 19:53:36 -0800 (PST)
Ashish Kulkarni [EMAIL PROTECTED] wrote:
Hi,
I am trying to do the following,
I have one CommonForm which extends DynaValidatorForm
The i have a DispatchAction class which populates the
value for CommonForm and stores it is request and then
Sorry to repost this yet another time. If maybe someone can just let
me know if they are successfully using declarative exception handling in
conjunction with DispatchAction methods that would be a start. Maybe
nobody even does this so I can just give up. If I know it is working
for others I'll
Time, too much have you
major geeks these people are
boss know you do this? :)
On Monday, January 13, 2003, 4:17:13 PM, James wrote:
JM Interesting post. What does all this mean to me? I have errors
JM now.
JM --
JM James Mitchell
-Original Message-
From: James Turner
Yoda think hard now..
Me think this Friday yes hmmm?
topic cause these thinks
On Monday, January 13, 2003, 4:04:51 PM, Mark wrote:
ML a Struts Haiku
ML model view control
ML struts is good for this model
ML simple it is not
--
Rick
mailto:[EMAIL PROTECTED]
--
To unsubscribe, e-mail:
On Monday, January 13, 2003, 4:44:47 PM, James wrote:
JT Or, moving to a slightly less elevated form.
JT There once was a form validation.
JT That wasn't invoked, consternation!
JT The class I'd extended,
JT Keyed on form as intended.
JT But the formset was the action variation.
There was once
On Monday, January 13, 2003, 4:47:06 PM, James wrote:
-Original Message- From: Mark Galbreath
[mailto:[EMAIL PROTECTED]] Sent: Monday, January 13, 2003
4:37 PM To: 'Struts Users Mailing List' Subject: RE: A Struts Haiku
Jakarta Struts rules
learn it, code it, live it
.NET is
Sorry for this repost, but I'm still pretty stuck.
Hope someone could help with this..
If I use a normal Action and declare an exception in the action
configuration in the config file, everything works perfectly if that
Exception is thrown.
However, when normally I like to use DispatchAction and
Actually a lot has been done on this tag lately by Tim Golden (and I
added a little bit to allow you to add an array of columns to
display). Tim could post the link to where the latest jar he worked on
is. I don't have the link here but have it at home if he doesn't reply
to the list before
You can check out Tim's latest updates to the display tag and get the
latest jar and source code here:
http://timgolden.com/taglib/
Both of us have tried also to get a hold of Ed for a long time now and
I think he's disappeared:) Anyway he started some great work which is
easy to build upon. Tim
The problem with this survey is that the results you would get would not
be accurate for assessing the time it would take new developers to catch
on to using Struts at the present time. There is now a lot more
documentation and examples out there to learn from than there was just
six months ago.
I'm probably just being an idiot here but does configuring declarative
exceptions in your config.xml file work with DispatchActions?
According to this post it looks like you need to override
dispatchMethod. Just double checking if this is really necessary?
After purchasing and reading Chuck's Jakarta Struts (O'Reilly -great
book also) I was made aware of being able to declare Exceptions for
your Actions in the struts-config file. Now that I'm aware that I
could do that, it's possible to avoid the try/catch blocks that most
of my dispatch action
On Wednesday, January 8, 2003, 5:07:24 PM, Robert wrote:
RT If you are using DynaActionForm or DynaValidatorActionForm then you can
RT cast the form to a DynaBean in your Action class and pass it to the business
RT layer.
RT This does not couple your business/service layer to Struts. It does
On Wednesday, January 8, 2003, 5:11:59 PM, Juan wrote:
AJc Can you register the exceptions that beanutils throws in the
AJc struts config???
Actually I thought about doing that also. Might not be a bad idea.
Each of my action mappings is going to start to get pretty large
though:)
--
Rick
On Wednesday, January 8, 2003, 5:34:18 PM, Rachel wrote:
R import org.apache.struts.Action.*;
Try org.apache.struts.action ( lower case A )
--
Rick
mailto:[EMAIL PROTECTED]
--
To unsubscribe, e-mail: mailto:[EMAIL PROTECTED]
For additional commands, e-mail: mailto:[EMAIL PROTECTED]
On Wednesday, January 8, 2003, 5:21:57 PM, Rick wrote:
RR On Wednesday, January 8, 2003, 5:07:24 PM, Robert wrote:
RT If you are using DynaActionForm or DynaValidatorActionForm then you can
RT cast the form to a DynaBean in your Action class and pass it to the business
RT layer.
RT This does
On Mon, 6 Jan 2003 17:01:48 -0800
LUCERO,DENNIS (HP-Boise,ex1) [EMAIL PROTECTED] wrote:
-Original Message-
From: Joe Barefoot [mailto:[EMAIL PROTECTED]]
Sent: Monday, January 06, 2003 5:18 PM
To: Struts Users Mailing List
Subject: RE: scope
LDHBe The jsp containing the
On Tuesday, January 7, 2003, 10:15:16 AM, FM wrote:
PPF I am in fix with a IDE I have never used before in my life,
PPF Oracle JDeveloper 9i. Is there anyone out there who give some pointers
PPF on how to compile and deploy a Struts demo on to an external
PPF running Tomcat 4.1.18 server on
On Tuesday, January 7, 2003, 3:40:10 PM, Steve wrote:
SM Sounds like you're not using the latest production release
SM which has lots of enhancements in many area that seemed to
SM frustrate you in previous releases.
Sorry, I didn't want to sound so negative:) Glad to see the latest
release has
On Monday, January 6, 2003, 9:16:15 AM, Bill wrote:
SB Struts does not convert Strings to dates --
A nice why to deal with Date conversions though is to use
BeanUtils.copyProperties(..) and make sure you have a bean(DTO) to hold the
correct properties (ie. java.util.Date, etc ). You have to
On Monday, January 6, 2003, 9:23:04 AM, Samir wrote:
SS The problem is when the user is sent back to
SS the input screen on error, it is not finding the
SS required Javabeans in the request object and is
SS failing to create the form with the data.
I know we started working on this on Friday.
On Monday, January 6, 2003, 10:46:10 AM, Samir wrote:
SS Ok, here are the relevant pieces of information
SS !-- Step 1 Action, this takes you to form to edit
--
SS actionpath=/gotoStep1
SStype=com.fdl.quoteweb.GotoStep1Action
SSscope=request
On Monday, January 6, 2003, 12:44:38 PM, Paul wrote:
PI rootCause
PI java.lang.IllegalArgumentException: argument type mismatch at
PI sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method) at
PI sun.reflect.NativeMethodAccessorImpl.invoke(NativeMethodAccessorImpl.java:39
snip
PI What do
On Monday, January 6, 2003, 2:14:38 PM, Gus wrote:
GD html:select name=editUserForm property=accessType
GDhtml:options collection=accessTypeList property=value
GD labelProperty=label/
GD /html:select
GD Example. the options are Read-only, Admin, and Analyst that's the
GD order of the
On Monday, January 6, 2003, 2:41:02 PM, Jordan wrote:
JT Hi,
JT I am wanting to use a logic:equal tag inside an interate tag like this
JT logic:iterate id=permission name=permissions indexId=idx
JT logic:equal scope=page name=idx value=request.permissionsSize
JT blah blah...
JT
On Monday, January 6, 2003, 2:59:41 PM, Rick wrote:
RR Did you try:
RR logic:iterate id=permission name=permissions indexId=idx
RRlogic:equal name=permissionsSize value=idx
RR blah blah...
RR/logic:equal
RR /logic:iterate
Sorry to have tried to help so soon, the above that
On Monday, January 6, 2003, 3:26:26 PM, Rick wrote:
RR To avoid the scriplet though I think you are going to have to use the
RR logic-el tag, but possibly someone else has a better solution.
Actually logic-el wouldn't be what you want either. I think if you
just used the JSTL choose and when
On Monday, January 6, 2003, 6:57:15 PM, ex1) wrote:
LDHBe The jsp containing the html:option tag is the last thing the request is
LDHBe forwarded to
The forwarded page does not have access to the request any longer.
If you want to have access to what was selected on the form page and
then
I know this isn't a struts question, but the log4j list seems pretty
dead that I posted this to and I've searched and searched for some
answers and I'm desperate now:). Maybe someone else using log4j in
their struts apps has run into this problem...
I'm using log4j 1.2.7jar and Tomcat 4.0.6 on
On Friday, January 3, 2003, 11:04:08 AM, Samir wrote:
SS PROBLEM: The problem is it fails to draw the form
SS with the information. basically no form in drawn.
Is absolutely nothing drawn or is the html form drawn but just the
fields aren't filled back in with what the user selected? Stupid
On Friday, January 3, 2003, 11:27:08 AM, Bill wrote:
SB Rick,I have had this working with Log4j 1.2.6 on both solaris
SB and windows. I saw your post on the struts-atlanta group about
SB this and noting some possible windows file locking issue. Have
SB you tried a different path to see if
On Friday, January 3, 2003, 12:11:48 PM, Bill wrote:
SB Are you saying that when it reaches 2K it is creating a new
SB backoffice.log but not creating the archive (backup) copy?
Yes exactly. It doesn't create the archive(backup) copy.
(And actually it doesn't 'always' seem to even create a
On Friday, January 3, 2003, 1:56:38 PM, Bill wrote:
SB Do you have a Windows Explorer window open on that folder? I have
SB found that Windows explorer can hold locks this way.
Even with everything closed except the web browser, the archive file
is not being created. It does seem to
On Friday, January 3, 2003, 2:35:41 PM, Bill wrote:
SB One wierd thing I noticed was that it seemed like WLS only picked
SB up my new log4j.properties when I hot deployed my webapp -- but
SB not when I restarted WLS -- WLS has always been flakely when it
SB comes to deployment.
Well Bill
On Thursday, January 2, 2003, 10:10:32 AM, Toni wrote:
TC I would like to have a setter method called before another.
TC What's the best way to do that in the ActionForm
Do you mean in a FormBean you are using with an Action that is
populated when you submit? If so I'm not certain how you would
On Tue, 31 Dec 2002 09:39:09 -0700
Larry Young [EMAIL PROTECTED] wrote:
Does anyone have an opinion on the Eclipse IDE product?
I've been using IDEA for awhile now and am having problems using
Eclipse, it just doesn't seem intuitive to me, and their popup menus
are buggy. However, I'd like
On Tue, 31 Dec 2002 05:20:22 -0500
Ted Husted [EMAIL PROTECTED] wrote:
http://intellij.com/idea/
Best IDE hands down in my opinion. I have a question though... I've only
used it on Windows and now I'm using Linux at home (SuSE 8.1) and can't
get it to work. Maybe someone smart can decipher
On Mon, 23 Dec 2002 11:49:04 -0500
Jim Krygowski [EMAIL PROTECTED] wrote:
This is my test:
...
String input = null;
// check to make sure the datatype is right
input = 2002-03-17;
Date dateValue = (Date)ConvertUtils.convert(input, Date.class);
On Mon, 23 Dec 2002 12:32:13 -0500
Jim Krygowski [EMAIL PROTECTED] wrote:
It seems like the only way things work out properly in the rendering
phase is to have a ValueObject that contains the Date properties and
an ActionForm that has a String for each Date on the ValueObject.
This is what I
On Mon, 23 Dec 2002 13:33:59 -0500
Jim Krygowski [EMAIL PROTECTED] wrote:
As regards the tags, I would like to render an html input type=text.
As
far as I know, you can't nest tags so...
html:text name=myForm property=myDate value=fmt:formatDate
pattern=MM/dd/yy
On Mon, 23 Dec 2002 19:41:02 -0800 (PST)
Craig R. McClanahan [EMAIL PROTECTED] wrote:
not-giving-a-rip-about-political-correctness
Let us all spend some time this joyous season reflecting on the
magnitude of a God that would bother to create the likes of us, and
His willingness to sacrifice
On Tue, 24 Dec 2002 01:10:28 -0500
James Mitchell [EMAIL PROTECTED] wrote:
Oh WOWthat is really good.
I think I'll post it to the Wiki
http://nagoya.apache.org/wiki/apachewiki.cgi?MerryChristmas
I wonder when my wife and I have kids if she'll let me read that
version to them by the
On Sun, 22 Dec 2002 15:01:42 -0500
John Menke [EMAIL PROTECTED] wrote:
html:select property=taskCodeTypehtml:optionsCollection
property=taskCodeTypeOptions //html:select
MY JSP WILL RUN AND POPULATE THE SELECT TAG CORRECTLY, BUT IT DOESN'T
CHOOSE THE CORRECT INITIAL VALUE.
IE. THE
On Sun, 22 Dec 2002 18:39:05 -0500
John Menke [EMAIL PROTECTED] wrote:
I have to get JSP debugging setup to do that. Do you know if eclipse
supports
JSP debugging with Tomcat?
Actually first just to appease me/us do a bean:write
property=taskCodeType right before you do the select
On Friday, December 20, 2002, 3:29:15 PM, Eric wrote:
ECH Is there anyway to capture the value of the bean before it is overwritten?
Since your using javascript coulnd't you set a hidden field
oldValue that you can set before you do any overwriting? Then you
would have access to the old value
On Wednesday, December 18, 2002, 9:36:33 AM, Jeremy wrote:
WJ Could someone post the very simplest example of some custom
WJ validation code. I am still having problems with my code as
WJ explained in previous post below. Maybe if I start of smaller I
WJ could make some sense of whats going on.
On Wednesday, December 18, 2002, 11:18:06 AM, Jeremy wrote:
WJ Still no go. I had some problems with my package paths etc., but
WJ that wasnt the cause either. The default validations do work but
WJ do I need to do anything else in struts-config.xml?
When trying to debug validation
On Sun, 15 Dec 2002 15:39:23 -0500
Mark Conlin [EMAIL PROTECTED] wrote:
%= messages.size() %
logic:iterate id=myMessage collection=%=messages%
%= myMessage.getSubject() %
/logic:iterate
Try collection=messages (without the scriplets).
--
Rick
--
To
On Sat, 14 Dec 2002 16:32:07 -0500
Cathy [EMAIL PROTECTED] wrote:
I am using pager tag library from
http://jsptags.com/tags/navigation/pager/
I use the display tag here
http://edhill.its.uiowa.edu/display-0.8/
and it works great. Very easy to use also.
--
Rick
--
To unsubscribe,
For all of my forms I have an appropriate DynaValidatorForm bean
defined in my struts-config file. This form eventually populates a
bean (Data Transfer Object) that corresponds to the form bean but with
the correct data types (ie java.util.Date birthDate vs String
birthDate ).
The question I have
On Thursday, December 12, 2002, 1:31:08 PM, Wendy wrote:
WS I have a 'dto' package which has the beans that are really intended to
WS transport data in both directions. Then I have 'dto.custom' in which all
WS the classes are named with View in the name. These are only for display.
I was
On Wednesday, December 11, 2002, 1:05:36 PM, Jordan wrote:
JT a) Put all my actions for a particluar area (i.e. creating, editing and
JT deleting user accounts) in one Action class
I guess I am in the minority here but lately I've been building
one big DispatchAction class that acts as
On Wednesday, December 11, 2002, 4:16:31 PM, Rob wrote:
RL One of the developers that took over the project merged a number of the
RL actions
RL edit, delete, create, list into one big ugly mess.
Was this all being done a 'normal' action class or a
DispatchAction class? I think a
On Wednesday, December 11, 2002, 5:53:54 PM, Michelle wrote:
MH However, the Struts 1.1 gives more information and says that the root
MH cause is because java.lang.NoSuchFieldError:
MH org.apache.commons.validator.Validator: field SERVLET_CONTEXT_KEY not
MH found.
Double check that all
Im new to structs so please be gentle.
I have an action that forwards onto a jsp page with a form.
When the form buttons are pressed a different action is called.
Action1 --- testform.jsp --- Action2
All works fine if the form passes validation.
When the form fails
On Tuesday, December 10, 2002, 12:39:26 PM, Vinh wrote:
VT have you tried this?
VT html:option name=element value=key
Tried that, but name is an invalid attribute of html:option.
I must be missing something simple here. There has to be a way to
get the value of the key set as the
On Tuesday, December 10, 2002, 2:21:36 PM, Kris wrote:
KS You may have to cast element:
KS %= ((java.util.Map.Entry)element).getKey() %
Thanks Kris! Yes that's exactly what I had to do (mostly). I say
mostly, because so many times I've been bitten in the butt by this
and I'm not
On Tuesday, December 10, 2002, 5:06:26 PM, Kris wrote:
KS Glad it's working, but I don't understand why you'd have a problem with the JSP
KS expression. IIRC, it's equivalent to the following code getting generated within
KS the page's _jspService method:
Trust me I don't know either. I'm
I apologize, I haven't been following this whole thread, but I'm
wondering if what I've implemented is a poor solution. For a
particular app called taskmanager I created a Logging class which is
pretty small and looks like this:
public class Logging {
static Category log =
On Tue, 10 Dec 2002 17:34:10 -0800 (PST)
Craig R. McClanahan [EMAIL PROTECTED] wrote:
If I'm understanding what you are doing correctly, doesn't this make
the logging level global to all logging in your application? The
approach Struts uses internally (essentially a category name per
class)
On Thursday, December 5, 2002, 9:47:46 AM, Andrew wrote:
AH Eclipse (an IDE): http://www.eclipse.org/
AH Jalopy (code formatter):
AH http://jalopy.sourceforge.net/
The Jalopy plugin and many other coding style plugins are also
available for JEdit as well (already mentioned the
I would appreciate any comments as to whether this is an 'ok' design
practice and/or suggestions on a better way to handle this...
For a simple example picture a case where an administrator can enter
inventory items. Admins would also want the ability to see a view
of inventory items based on
On Monday, November 18, 2002, 6:35:52 PM, Zsolt wrote:
ZK logic:iterate id=field indexId=counter name=rows
ZK type=java.lang.Object[]
ZK bean:write
I'm pretty sure you could just do
bean:write name=field/
as you are iterating (assuming the Object[] array in this example
In recent weeks I've noticed several people inquire about Ed Hill's
awesome display tag http://edhill.its.uiowa.edu/display-0.8/
and the ability to only display certain columns.
I modified the jar and tld so that you can now provide a
columnsToDisplay attribute in the display:table tag.
On Thursday, November 7, 2002, 1:19:33 PM, micael wrote:
m I have been into the online version a bit, and am loving it. How
m do we get credit when ordering the hard copy? The site mentions
m the credit but seems to have no mechanism that is obvious.
Did you find out any more info on
On Wednesday, November 6, 2002, 3:21:28 PM, Antoni wrote:
AR Keep in mind that DateFormat (and SimpleDateFormat) is not thread safe so you
AR have to be very careful when reusing them.
I like Max's suggestion though. I think I will move it to the
setFormatPattern for sure. Correct
On Wednesday, November 6, 2002, 4:47:32 PM, Eddie wrote:
EB static blocks are run with the class - right? So it's really
EB irrelevant how many instances get created - that code is run a
EB maximum of one time - when the class is first loaded.
EB Am I wrong?
Right that's what I was
On Wednesday, November 6, 2002, 4:05:45 PM, Antoni wrote:
AR Hi, I don't speak english very very well, so this is a bit
AR difficult for me to explain, but I'll try ;-)
No problem. Most American's don't speak English very well
(including myself I'm sure:)
AR I have'nt looked at
On Wednesday, November 6, 2002, 4:51:58 PM, Antoni wrote:
AR The problem is that during execution of SimpleDateFormat.parse some private
AR fields of SimpleDateFormat are modified.
A yes thank you. I bet I have this problem in other pieces of
my code as well. What would you
On Wednesday, November 6, 2002, 4:31:09 PM, Kris wrote:
KS The creation of the converters and their registration can
KS obviously be accomplished in a thread-safe manner, but if multiple
KS threads call into parse and/or format at the same time, this will
KS cause a problem. If that's not what
On Wednesday, November 6, 2002, 6:51:22 PM, Wendy Smoak wrote:
WS Rick, thanks for posting this! I almost missed it, but caught Max's reply.
WS You say that the default BeanUtils.copyProperties works fie with
WS java.sql.Date, but I find that I still have a problem unless the user types
WS in
-Original Message-
SS From: Rick Reumann [mailto:maillist;reumann.net]
SS Sent: Monday, November 04, 2002 10:20 AM
SS To: Struts List
SS Subject: Nested Tags situation any light would be appreciated
SS Sorry to repeat this question... possibly some fresh Monday blood could help...
SS I'm
On Monday, November 4, 2002, 2:33:26 PM, Sri wrote:
SS Rick: I think the problem is in how you are initializing your
SS objects. In particular the problem is where you call the
SS setCarList() method. Both Persons are getting a reference to the
SS same list. In other words you have only one
On Monday, November 4, 2002, 3:16:31 PM, Sri wrote:
SS Without going into why would you want to set them to false I'd
SS urge you to use your action. This way, the logic isn't coupled
SS with the bean but with the action that presents it.
SS I would give serious thought into whether you
On Monday, November 4, 2002, 5:53:52 PM, Mark wrote:
MA What are other people using to extract and map data out of the DynaActionForm ?
I use BeanUtils.copyProperties(..) to copy the properties from my
DynaActionForm into my Model layer bean. In the action just do:
On Monday, November 4, 2002, 6:13:28 PM, Mark wrote:
MA Rick I read your email and had an Ahh Moment ! Thats quite elegent
MA and now less lines of code to maintain. Are there any caveats to
MA doing this.
Only caveat is I ran into some headaches when dealing with
converting
I'm posting this with a different subject line so it will hopefully
come up in the archives if someone needs to search for it. I posted a
solution a while ago and since that time several have asked about it
but searching through the archives myself doesn't bring it up the
post, so here's a
I'm stumped here what I'm screwing up and would appreciate any help.
I'm playing around using nested tags and for this simple example I
have:
Form Bean
ArrayList people
people is populated with Person beans
Each Person bean has the field
String name;
On Thursday, October 31, 2002, 11:31:15 AM, Sriram wrote:
SH javax.servlet.jsp.JspException: Property 'recordList' is not indexed.
I haven't seen this error before... just guessing .. are you sure
recordList is a collection of some sort?
--
Rick
mailto:maillist;reumann.net
--
To
Over lunch I was discussing struts with someone that works at another
company. He hasn't implemented struts at all but only has looked at
some articles, and doesn't see what all they 'hype' is about. In his
opinion, building a j2ee controller that follow's Sun's J2EE pattern
is not that difficult
Hi,
Struts1.1b2: BeanUtils.copyProperties(formBean, javaBean) not
converting
String properties into Dates:
It will not covert them into java.util.Date. You need to create a
Converter class to do it an register it. I just went through all
this with Eldercle who posted to this
Hey Elder,
(posting this to Struts list as well in case anyone else finds it
useful while digging through the archives)
I modified the code you sent just a bit and also provided a method
taking a format String for how they want the date formatted (actually
someone might want to modify the code
My business layer bean has a field as java.util.Date (example:
birthDate). My form bean uses the String for this date (in this
example.. String birthDate). The problem is I can't seem to use
BeanUtils to copy the properties since it appears BeanUtils will only
convert a java.sql.Date by default
On Wednesday, October 16, 2002, 12:28:15 PM, James wrote:
JH If you search the list archives at www.mail-archive.com, I think
JH you will find your question answered. Pappa Struts (Craig)
JH answered it, as did other folks.
Can you please show me where this is the case?
Before my
On Wednesday, October 16, 2002, 1:19:01 PM, James wrote:
JH Simple search for date conversion:
JH http://www.mail-archive.com/cgi-bin/htsearch?method=andformat=shortcon
JH fig=struts-user_jakarta_apache_orgrestrict=exclude=words=date+convers
JH ion
James, I posted myself many times in
On Wednesday, October 16, 2002, 12:40:01 PM, kiuma wrote:
k Since I'm connected to jboss I use java.sql.Date.
k Then I pass values in millis and use a GregorianCalendar to manage dates.
Thank you, but that's not really my question.
I'm wondering more how others deal with getting their
On Wednesday, October 16, 2002, 5:54:50 PM, Elderclei wrote:
ERR Here is the horrible piece of code for the converters:
Hi. I can get a nice Date converter to work but how can you use
BeanUtils to go the other way -converting your business bean
java.util.Date to a String in
On Wednesday, October 16, 2002, 7:06:45 PM, Elderclei R Reami wrote:
ERR That's why I include the horrible if statement in
ERR StringConverterDateDecorator.
ERR if (type==String.class value.getClass()==Date.class)
ERR {
ERR /* do
Craig,
I'm still having a bit of trouble trying to use BeanUtils to copy
java.util.Date properties. It appears that it will work fine by
default with java.sql.Date but isn't set up by default for
java.util.Date (which I'm using for Dates in my business bean). I
build a class implements Converter
On Friday, October 11, 2002, 12:59:31 PM, Craig wrote:
CRM Form bean properties should generally be Strings, so that you can
CRM redisplay whatever the user actually typed. Do your conversions in the
CRM Action after validation is complete -- in 1.1b2 and later, you can use
CRM
On Friday, October 11, 2002, 2:02:11 PM, Craig wrote:
CRM * Form bean property is a String.
SNIP
CRM * Value/DTO objects would use the native data types
CRM (java.util.Date in this case). Property name would
CRM be the same birthDate.
SNIP
CRM * Either use a copyProperties method or
On Friday, October 11, 2002, 2:58:44 PM, Craig wrote:
CRM Without knowing what crap out on me means, it's impossible to diagnose
CRM this. Are you getting an exception so you can look at a stack trace?
I didn't know BeanUtils.copyProperties() should be able to take a
String date and
201 - 300 of 433 matches
Mail list logo