Okay, then, no, you can't directly because the only things HTTP carries are strings. But you can intercept the request in your action form, type-cast the returned String into your custom type and pass it to your ActionForm. Or based on the returned String, create a new MyClass( someValue ) and pass that to the appropriate setter in your ActionForm.
Is this what you mean? Mark -----Original Message----- From: Dan Tran [mailto:[EMAIL PROTECTED]] Sent: Friday, October 04, 2002 12:15 PM To: Struts Users Mailing List Subject: Re: DanaFormBean and Non Primative property type Hi Mark, I am looking for way to code a custom property in a ActionForm For example: public class MyFormBean .... { ...... public MyType getMyType() ..... } If this is not a right place to ask for this kind of question then please drop this. -D ----- Original Message ----- From: "Galbreath, Mark" <[EMAIL PROTECTED]> To: "'Struts Users Mailing List'" <[EMAIL PROTECTED]> Sent: Friday, October 04, 2002 8:51 AM Subject: RE: DanaFormBean and Non Primative property type > Dan, > > Are you asking how to code a standard JavaBean for use as an ActionForm > object? > > Mark > > -----Original Message----- > From: Dan Tran [mailto:[EMAIL PROTECTED]] > Sent: Friday, October 04, 2002 10:35 AM > > I was wrong, String is not a primative type. > > To make thing more clear, here is my class > > public class Duns > { > public Duns(); > public Duns(String value); > public String toString(); > } > > I hope this is clearer this time. > > -D > ----- Original Message ----- > From: "Galbreath, Mark" <[EMAIL PROTECTED]> > To: "'Struts Users Mailing List'" <[EMAIL PROTECTED]> > > > RU kidding? You need more help than you can get here if you think a > String > > is a primitive. And what kind of question is this? Are we to, like, read > > your mind and "see" your code to guess whatever it is you are trying to do > > in your classes? Hey! Even we are not that good. But so this post is > not > > totally bw wastage, here's a suggestion I hope you appreciate: > > > > http://www.tuxedo.org/~esr/faqs/smart-questions.html > > > > > > Mark > > > > -----Original Message----- > > From: Dan Tran [mailto:[EMAIL PROTECTED]] > > Sent: Thursday, October 03, 2002 9:39 PM > > > > Hi I would like to use DataFormBean with properties are > > not primative types like int, java.lang.String > > > > What are the requirements to create a customized > > property type? > > > > For example, I have a DUNS java class which is a > > specialized string. What kind of methods in my DUNS class that I need to > > implement to make DanaFormBean happy? (like toString, DUNS(String init), > > etc??) > > > > Suggestions are greatly appreciated. > > > > -Dan > > -- > To unsubscribe, e-mail: <mailto:[EMAIL PROTECTED]> > For additional commands, e-mail: <mailto:[EMAIL PROTECTED]> > -- To unsubscribe, e-mail: <mailto:[EMAIL PROTECTED]> For additional commands, e-mail: <mailto:[EMAIL PROTECTED]> -- To unsubscribe, e-mail: <mailto:[EMAIL PROTECTED]> For additional commands, e-mail: <mailto:[EMAIL PROTECTED]>