Do you still have a DateField inside your FlexDateField?  Could you
show the full template and the HTML output?  I think we're not quite
hooking up here.

On Wed, Apr 16, 2008 at 7:16 PM, Bill Holloway <[EMAIL PROTECTED]> wrote:
> If I add "_0" to elementName, I'm fine.  But that's fairly brittle :)
>
>
>
>  On Wed, Apr 16, 2008 at 8:47 PM, Howard Lewis Ship <[EMAIL PROTECTED]> wrote:
>
>  > Well, binding the clientId parameter of DateField can influence what
>  > the control name will be (though it will be uniqued).
>  >
>  > I still don't understand exactly what you are going to pull out of the
>  > request inside the FlexDateEditor's processSubmission().
>  >
>  > The DateField is almost undoubtedly scheduled as the next component to
>  > process the submission (its basically render order, and the
>  > FlexDateField will render before the DateField because the DateField
>  > is embedded inside the FlexDateField).
>  >
>  > The DateField will update its value parameter, which is bound to the,
>  > well something we haven't seen.
>  >
>  > Perhaps what you need is a callback for *after* the embedded DateField
>  > has done its part, and shoved a value into some property of the
>  > FlexDateField?
>  >
>  >
>  > On Wed, Apr 16, 2008 at 6:14 PM, Bill Holloway <[EMAIL PROTECTED]> wrote:
>  > > I guess one way to look at it is that in AppPropertyEditBlocks.java, I
>  > can't
>  > >  have
>  > >
>  > >  <t:flexDateEditor name="prop:context.controlName" ... />
>  > >
>  > >  !
>  > >
>  > >  Bill
>  > >
>  > >
>  > >  On Wed, Apr 16, 2008 at 6:21 PM, Howard Lewis Ship <[EMAIL PROTECTED]>
>  > wrote:
>  > >
>  > >
>  > >
>  > > > Hard to tell without checking the code, but:  looks like the
>  > >  > FlexDataEditor delegates all its behavior to the built-in DateField
>  > >  > component, right?
>  > >  >
>  > >  > So the DateField is the component that (at render) negotiates an
>  > >  > control name (i.e., FormSupport.allocateControlName() ), and then
>  > >  > pushes the parsed and validated date back up.  You should see this in
>  > >  > the HTML and form submission, a component whose client element has a
>  > >  > name like "datefield" (or "datefield_0", etc.).
>  > >  >
>  > >  > Presumable the DateField is tied to a property of the FlexDateEditor,
>  > >  > and that property is tied eventually up to your bean.
>  > >  >
>  > >  > On Wed, Apr 16, 2008 at 3:42 PM, Bill Holloway <[EMAIL PROTECTED]>
>  > wrote:
>  > >  > > I've got a custom data type called FlexDate, and I've made a simple
>  > >  > >  <t:flexdateeditor> component for it which (for now) just holds a
>  > date
>  > >  > >  field.  It will get more complex later.  I put this editor into my
>  > >  > >  AppPropertyEditBlocks.tml.  Code is below.  Then I have a data
>  > object
>  > >  > with
>  > >  > >  an instance var of FlexDate type.  I pump this into a
>  > beanformeditor.
>  > >  >  The
>  > >  > >  problem is that the elementName arg of processSubmission (in
>  > >  > >  FlexDateEditor.java) never seems to be in my
>  > >  > _request.getParameterNames() so
>  > >  > >  I can extract the date!  Help?
>  > >  > >
>  > >  > >  FlexDateEditor.tml:
>  > >  > >
>  > >  > >  <div class="flexDateEditor" xmlns:t="
>  > >  > >  http://tapestry.apache.org/schema/tapestry_5_0_0.xsd";>
>  > >  > >
>  > >  > >     <t:dateField value="date1" />
>  > >  > >
>  > >  > >  </div>
>  > >  > >
>  > >  > >  Date1 is defined in FlexDateEditor.java and evaluated to new
>  > Date()
>  > >  > during
>  > >  > >  beginRender().
>  > >  > >
>  > >  > >  AppPropertyEditBlocks.tml (snippet):
>  > >  > >
>  > >  > >  <t:block t:id="flexDate">
>  > >  > >
>  > >  > >         <t:label for="flexDateEditor" />
>  > >  > >         <t:flexDateEditor t:id="flexDateEditor" />
>  > >  > >
>  > >  > >  </t:block>
>  > >  > >
>  > >  > >  The elementName arg of processSubmission in FlexDateEditor.java is
>  > >  > always
>  > >  > >  the name of the instance variable in my data object that goes into
>  > >  > >  beanformeditor.  Grr.  How can I get the fields of the datefield
>  > to be
>  > >  > named
>  > >  > >  that way so I can extract the value?
>  > >  > >
>  > >  > >  --
>  > >  > >  Bill @ PeoplePad
>  > >  > >
>  > >  >
>  > >  >
>  > >  >
>  > >  > --
>  > >  > Howard M. Lewis Ship
>  > >  >
>  > >  > Creator Apache Tapestry and Apache HiveMind
>  > >  >
>  > >
>  > >
>  > > > ---------------------------------------------------------------------
>  > >  > To unsubscribe, e-mail: [EMAIL PROTECTED]
>  > >  > For additional commands, e-mail: [EMAIL PROTECTED]
>  > >  >
>  > >  >
>  > >
>  > >
>  > >  --
>  > >  Bill @ PeoplePad
>  > >
>  >
>  >
>  >
>  > --
>  > Howard M. Lewis Ship
>  >
>  > Creator Apache Tapestry and Apache HiveMind
>  >
>  > ---------------------------------------------------------------------
>  > To unsubscribe, e-mail: [EMAIL PROTECTED]
>  > For additional commands, e-mail: [EMAIL PROTECTED]
>  >
>  >
>
>
>  --
>  Bill @ PeoplePad
>



-- 
Howard M. Lewis Ship

Creator Apache Tapestry and Apache HiveMind

---------------------------------------------------------------------
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]

Reply via email to