You are viewing a plain text version of this content. The canonical link for it is here.
Posted to user@struts.apache.org by Corneliu Rachieru <cr...@espial.com> on 2002/04/10 20:13:52 UTC

DynaBeans documentation

Hi,

Can anyone point me to any relevant DynaBeans documentation and/or examples
?

Thank you,
 Corneliu

RE: DynaBeans documentation

Posted by "Wellie W. Chao" <wc...@caraveltech.com>.
I haven't tried it. What is the bug you're having?

-----Original Message-----
From: Phase Web and Multimedia [mailto:mail@phase.ws]
Sent: Thursday, April 11, 2002 9:01 PM
To: Struts Users Mailing List
Subject: RE: DynaBeans documentation


Have you gotten the DynaValidation stuff working. I filed a bug on it. But,
I don't know if I am doing it correct or not. If, yes, then can you spare a
copy of code.

Brandon Goodin
Phase Web and Multimedia
P (406) 862-2245
F (406) 862-0354
mail@phase.ws
http://www.phase.ws


-----Original Message-----
From: Wellie W. Chao [mailto:wchao@caraveltech.com]
Sent: Thursday, April 11, 2002 6:22 PM
To: Struts Users Mailing List
Subject: RE: DynaBeans documentation


There is javadoc documentation for the DynaBean class in the Jakarta Commons
project (beanutil group). As for examples, I just experimented until I got
it working. Here's some code from an application I'm building:

DynaProperty[] dynaProps = null;
Vector dynaPropNames = null;
dynaPropNames = new Vector();
dynaPropNames.add("location");
dynaPropNames.add("employerId");
dynaPropNames.add("jobTitle");
dynaPropNames.add("postedDate");
// derived property
dynaPropNames.add("employerName");
// derived property
dynaPropNames.add("jobDetailLinkParams");
// derived property
dynaPropNames.add("employerDetailLinkParams");
dynaProps = new DynaProperty[dynaPropNames.size()];
for(int i = 0; i < dynaProps.length; i++) {
  dynaProps[i] = new DynaProperty((String)dynaPropNames.elementAt(i));
}
BasicDynaClass jobDynaClass =
  new BasicDynaClass("JobDynaClass", BasicDynaBean.class, dynaProps);
BasicDynaBean derivedJob = null;
derivedJob = new BasicDynaBean(jobDynaClass);

At this point, you can do derivedJob.set(propName, propVal) or
derivedJob.get(propName), where propName can be any of the names added to
the Vector above. You can also use derivedJob as a bean in the struts
<bean:write/> tag.

-----Original Message-----
From: Corneliu Rachieru [mailto:crachieru@espial.com]
Sent: Wednesday, April 10, 2002 2:14 PM
To: 'Struts Users Mailing List'
Subject: DynaBeans documentation


Hi,

Can anyone point me to any relevant DynaBeans documentation and/or examples
?

Thank you,
 Corneliu


--
To unsubscribe, e-mail:
<ma...@jakarta.apache.org>
For additional commands, e-mail:
<ma...@jakarta.apache.org>



--
To unsubscribe, e-mail:
<ma...@jakarta.apache.org>
For additional commands, e-mail:
<ma...@jakarta.apache.org>


--
To unsubscribe, e-mail:   <ma...@jakarta.apache.org>
For additional commands, e-mail: <ma...@jakarta.apache.org>


RE: DynaBeans documentation

Posted by Phase Web and Multimedia <ma...@phase.ws>.
Have you gotten the DynaValidation stuff working. I filed a bug on it. But,
I don't know if I am doing it correct or not. If, yes, then can you spare a
copy of code.

Brandon Goodin
Phase Web and Multimedia
P (406) 862-2245
F (406) 862-0354
mail@phase.ws
http://www.phase.ws


-----Original Message-----
From: Wellie W. Chao [mailto:wchao@caraveltech.com]
Sent: Thursday, April 11, 2002 6:22 PM
To: Struts Users Mailing List
Subject: RE: DynaBeans documentation


There is javadoc documentation for the DynaBean class in the Jakarta Commons
project (beanutil group). As for examples, I just experimented until I got
it working. Here's some code from an application I'm building:

DynaProperty[] dynaProps = null;
Vector dynaPropNames = null;
dynaPropNames = new Vector();
dynaPropNames.add("location");
dynaPropNames.add("employerId");
dynaPropNames.add("jobTitle");
dynaPropNames.add("postedDate");
// derived property
dynaPropNames.add("employerName");
// derived property
dynaPropNames.add("jobDetailLinkParams");
// derived property
dynaPropNames.add("employerDetailLinkParams");
dynaProps = new DynaProperty[dynaPropNames.size()];
for(int i = 0; i < dynaProps.length; i++) {
  dynaProps[i] = new DynaProperty((String)dynaPropNames.elementAt(i));
}
BasicDynaClass jobDynaClass =
  new BasicDynaClass("JobDynaClass", BasicDynaBean.class, dynaProps);
BasicDynaBean derivedJob = null;
derivedJob = new BasicDynaBean(jobDynaClass);

At this point, you can do derivedJob.set(propName, propVal) or
derivedJob.get(propName), where propName can be any of the names added to
the Vector above. You can also use derivedJob as a bean in the struts
<bean:write/> tag.

-----Original Message-----
From: Corneliu Rachieru [mailto:crachieru@espial.com]
Sent: Wednesday, April 10, 2002 2:14 PM
To: 'Struts Users Mailing List'
Subject: DynaBeans documentation


Hi,

Can anyone point me to any relevant DynaBeans documentation and/or examples
?

Thank you,
 Corneliu


--
To unsubscribe, e-mail:
<ma...@jakarta.apache.org>
For additional commands, e-mail:
<ma...@jakarta.apache.org>



--
To unsubscribe, e-mail:   <ma...@jakarta.apache.org>
For additional commands, e-mail: <ma...@jakarta.apache.org>


RE: DynaBeans documentation

Posted by "Wellie W. Chao" <wc...@caraveltech.com>.
There is javadoc documentation for the DynaBean class in the Jakarta Commons
project (beanutil group). As for examples, I just experimented until I got
it working. Here's some code from an application I'm building:

DynaProperty[] dynaProps = null;
Vector dynaPropNames = null;
dynaPropNames = new Vector();
dynaPropNames.add("location");
dynaPropNames.add("employerId");
dynaPropNames.add("jobTitle");
dynaPropNames.add("postedDate");
// derived property
dynaPropNames.add("employerName");
// derived property
dynaPropNames.add("jobDetailLinkParams");
// derived property
dynaPropNames.add("employerDetailLinkParams");
dynaProps = new DynaProperty[dynaPropNames.size()];
for(int i = 0; i < dynaProps.length; i++) {
  dynaProps[i] = new DynaProperty((String)dynaPropNames.elementAt(i));
}
BasicDynaClass jobDynaClass =
  new BasicDynaClass("JobDynaClass", BasicDynaBean.class, dynaProps);
BasicDynaBean derivedJob = null;
derivedJob = new BasicDynaBean(jobDynaClass);

At this point, you can do derivedJob.set(propName, propVal) or
derivedJob.get(propName), where propName can be any of the names added to
the Vector above. You can also use derivedJob as a bean in the struts
<bean:write/> tag.

-----Original Message-----
From: Corneliu Rachieru [mailto:crachieru@espial.com]
Sent: Wednesday, April 10, 2002 2:14 PM
To: 'Struts Users Mailing List'
Subject: DynaBeans documentation


Hi,

Can anyone point me to any relevant DynaBeans documentation and/or examples
?

Thank you,
 Corneliu


--
To unsubscribe, e-mail:   <ma...@jakarta.apache.org>
For additional commands, e-mail: <ma...@jakarta.apache.org>