I am a little bit confused.

Here is my problem:

There is in exteNd Director a screen where you can define your forms.
The properties are stored in a database and there is an API to get each
property define for the a particular form.
Basically :
return a Collection of fields for a named form.
The collection defines
the name
the type (checkbox, radio, selectbox ...)
the default value

pretty much the same way it is done with  <form-property>

So I used the "introspect" method from DynaActionFormClass to set the
DynaProperty.
here is an excerpt of my code:

Collection documentFields =
m_cmgr.getDocumentFields(m_context,docType.getDocTypeID());
Iterator iterFields = documentFields.iterator();
while (iterFields.hasNext()) {
  EbiDocField field = (EbiDocField)iterFields.next();
  DocFieldExt docFieldExt =
DocFieldExt.getDocFieldExt(field.getExtensionMeta());
  // set the dynaProperty
  DynaProperty dynaProperty = new DynaProperty(field.getFieldName(),
docFieldExt.getClassType());
  propertiesMap.put(dynaProperty.getName(), dynaProperty);
  if (DocListExt.class.isAssignableFrom(docFieldExt.getClass())) {
    // options for select box and radio
    DocListExt docListExt = (DocListExt )docFieldExt;
    // set the dynaProperty
    dynaProperty = new DynaProperty(docListExt.getItemHolderName(),
docListExt.getItemHolderClassType());
    propertiesMap.put(dynaProperty.getName(), dynaProperty);
  }
  docFieldsExt.add(docFieldExt);
}

Thus, at the app server startup every thing is all set for all the forms
property and I just have to call the same JSP (with in the request the id of
my form, actually docTypeID) to see it dynamically change according to  what
it should reflect.

Excuse me if I misunderstood your previous answer and those explanation are
not from any help to let you understand my problem.

Alain


----- Original Message -----
From: "James Mitchell" <[EMAIL PROTECTED]>
To: "Struts Developers List" <[EMAIL PROTECTED]>
Sent: Friday, November 01, 2002 10:07 PM
Subject: RE: DynaActionFormClass


> Why don't you just set the value in the action prior to forwarding to your
> jsp?  You can easily do that using a value from the bundle.
>
>
> James Mitchell
> Software Engineer/Struts Evangelist
> http://www.open-tools.org
>
> "Only two things are infinite, the universe and human stupidity, and I'm
not
> sure about the former."
> - Albert Einstein (1879-1955)
>
>
> > -----Original Message-----
> > From: Alain Del Giust [mailto:java.dev@;noos.fr]
> > Sent: Friday, November 01, 2002 3:59 PM
> > To: Struts Developers List
> > Subject: Re: DynaActionFormClass
> >
> >
> > From my understanding if I want to create a Dynamic Form I have to use
> > struts-config.xml to configure the properties of the form.
> >
> > Example:
> >
> >     <form-property  name="email"     type="java.lang.String "/>
> >     <form-property  name="password"  type="java.lang.String "/>
> >     <form-property  initial="false"   name="rememberMe"
> > type="java.lang.Boolean "/>
> >
> > But I don't want to do that because those properties are define
elsewhere
> > (database for example, actually I am trying to integrate Struts Framwork
> > with one part of Novell/SilverStream exteNd Director Framework)
> >
> > That's why I think that I "need" to override DynaActionFormClass.
> >
> >
> > Alain
> >
> >
> > ----- Original Message -----
> > From: "Craig R. McClanahan" <[EMAIL PROTECTED]>
> > To: "Struts Developers List" <[EMAIL PROTECTED]>
> > Sent: Friday, November 01, 2002 9:15 PM
> > Subject: Re: DynaActionFormClass
> >
> >
> > >
> > >
> > > On Fri, 1 Nov 2002, Alain Del Giust wrote:
> > >
> > > > Date: Fri, 1 Nov 2002 20:58:28 +0100
> > > > From: Alain Del Giust <[EMAIL PROTECTED]>
> > > > Reply-To: Struts Developers List <[EMAIL PROTECTED]>
> > > > To: [EMAIL PROTECTED]
> > > > Subject: DynaActionFormClass
> > > >
> > > > Hi All,
> > > >
> > > > I'd like to use Dynamic Forms but not "only" based on
> > "struts-config.xml" file.
> > > >
> > > > I have build an application using Struts-b2.
> > > >
> > > > I have modified the following files.
> > > > I am not smart developer so perhaps it will be better to use
> > an abstract
> > class for DynaActionFormClass as I only override "introspect" method.
> > > >
> > >
> > > I'm having a hard time understanding why the existing facilities don't
> > > support all the functionality you need.  What is it you are trying to
do
> > > that is not currently possible?
> > >
> > > > Thanks for your help.
> > > >
> > > > Alain
> > > >
> > >
> > > Craig
> > >
> > >
> > > --
> > > To unsubscribe, e-mail:
> > <mailto:struts-dev-unsubscribe@;jakarta.apache.org>
> > > For additional commands, e-mail:
> > <mailto:struts-dev-help@;jakarta.apache.org>
> > >
> > >
> >
> >
> > --
> > To unsubscribe, e-mail:
> <mailto:struts-dev-unsubscribe@;jakarta.apache.org>
> For additional commands, e-mail:
<mailto:struts-dev-help@;jakarta.apache.org>
>
>
>
> --
> To unsubscribe, e-mail:
<mailto:struts-dev-unsubscribe@;jakarta.apache.org>
> For additional commands, e-mail:
<mailto:struts-dev-help@;jakarta.apache.org>
>


--
To unsubscribe, e-mail:   <mailto:struts-dev-unsubscribe@;jakarta.apache.org>
For additional commands, e-mail: <mailto:struts-dev-help@;jakarta.apache.org>

Reply via email to