Gmail Calendar Documents Reader Web more »
Recently Visited Groups | Help | Sign in
Google Groups Home
form:checkbox seems not to bind
There are currently too many topics in this group that display first. To make this topic appear first, remove this option from another topic.
There was an error processing your request. Please try again.
flag
  5 messages - Collapse all  -  Translate all to Translated (View all originals)
The group you are posting to is a Usenet group. Messages posted to this group will make your email address visible to anyone on the Internet.
Your reply message has not been sent.
Your post was successful
 
From:
To:
Cc:
Followup To:
Add Cc | Add Followup-to | Edit Subject
Subject:
Validation:
For verification purposes please type the characters you see in the picture below or the numbers you hear by clicking the accessibility icon. Listen and type the numbers you hear
 
Mike Rogers  
View profile  
 More options Nov 7, 3:15 pm
From: Mike Rogers <r.m.rog...@gmail.com>
Date: Sat, 7 Nov 2009 12:15:56 -0800 (PST)
Local: Sat, Nov 7 2009 3:15 pm
Subject: form:checkbox seems not to bind
All,

Has anyone played with <form:checkbox>? I have a decorator on a
TransferObject that seems never to be called. My view:

      <label for="educationFormatString">Education Format</label>
      <cfloop query="educationFormatQuery">
        <form:checkbox path="educationFormatString"
value="#educationFormatQuery.id#"/>#educationFormatQuery.format#
      </cfloop>

My decorator method (this TransferObject is being used as an event-
bean, and all non-checkbox fields are binding correctly through
decorator methods):

  <cffunction name="setEducationFormatString" returntype="void"
output="false">
    <cfargument name="educationFormatString" type="string"
required="true"/>
    <cfset var array = ListToArray(arguments.educationFormatString)/>
    <cfthrow message="educationFormatString:
#arguments.educationFormatString#"/>
    <cfset clearEducationFormats()/>
    <cfloop from="1" to="#ArrayLen(array)#" index="i">
      <cfset addEducationFormats(getTransfer().get
("gorgon.EducationFormat", array[i]))/>
    </cfloop>
  </cffunction>

The CFTHROW command on line 4 in the decorator method is never getting
called.

Does anyone have a clue where I've gone wrong? Did I find a bug?

Thanks,

-Mike Rogers


    Reply    Reply to author    Forward  
You must Sign in before you can post messages.
To post a message you must first join this group.
Please update your nickname on the subscription settings page before posting.
You do not have the permission required to post.
Peter J. Farrell  
View profile  
 More options Nov 7, 3:39 pm
From: "Peter J. Farrell" <pe...@mach-ii.com>
Date: Sat, 07 Nov 2009 14:39:56 -0600
Local: Sat, Nov 7 2009 3:39 pm
Subject: Re: [Mach-II] form:checkbox seems not to bind
What does your <form:form> tag or <form:bind> tag look like?  I suspect
the form is bound to the Event object and not bound to your object.  Our
test in the test harness for checkbox is working -- so I suspect a
simple configuration issue we're not seeing.

Best,
.Peter

Mike Rogers said the following on 11/07/2009 02:15 PM:


    Reply    Reply to author    Forward  
You must Sign in before you can post messages.
To post a message you must first join this group.
Please update your nickname on the subscription settings page before posting.
You do not have the permission required to post.
Peter J. Farrell  
View profile  
 More options Nov 7, 5:21 pm
From: "Peter J. Farrell" <pe...@mach-ii.com>
Date: Sat, 07 Nov 2009 16:21:57 -0600
Local: Sat, Nov 7 2009 5:21 pm
Subject: Re: [Mach-II] form:checkbox seems not to bind
One thought on this is do you have a matching getter called
getEducationFormatString()?  I'm pretty sure we look for a get* when
introspecting the metadata. It is how it was setup years ago by the
original Mach-II developers so changing it to look for setters as well I
believe would break backwards compatibility.  Also we don't walk the
inheritance chain of the component either so if the getter is  inherited
-- it's won't get picked up either.  We may have to consider and walk
the inheritance chain though.

.pjf

Mike Rogers said the following on 11/07/2009 02:15 PM:


    Reply    Reply to author    Forward  
You must Sign in before you can post messages.
To post a message you must first join this group.
Please update your nickname on the subscription settings page before posting.
You do not have the permission required to post.
Mike Rogers  
View profile  
 More options Nov 7, 5:18 pm
From: Mike Rogers <r.m.rog...@gmail.com>
Date: Sat, 7 Nov 2009 14:18:09 -0800 (PST)
Local: Sat, Nov 7 2009 5:18 pm
Subject: Re: form:checkbox seems not to bind
False alarm. I forgot to add that particular form element to the
'fields' collection in the event-bean.

Thanks for your help!

-Mike

On Nov 7, 3:39 pm, "Peter J. Farrell" <pe...@mach-ii.com> wrote:


    Reply    Reply to author    Forward  
You must Sign in before you can post messages.
To post a message you must first join this group.
Please update your nickname on the subscription settings page before posting.
You do not have the permission required to post.
Peter J. Farrell  
View profile  
 More options Nov 7, 5:41 pm
From: "Peter J. Farrell" <pe...@mach-ii.com>
Date: Sat, 07 Nov 2009 16:41:45 -0600
Local: Sat, Nov 7 2009 5:41 pm
Subject: Re: [Mach-II] Re: form:checkbox seems not to bind
Mike Rogers said the following on 11/07/2009 04:18 PM:
> False alarm. I forgot to add that particular form element to the
> 'fields' collection in the event-bean.

Awesome. Glad it all worked out.  You could also use the `autopopulate`
attribute if you don't want to list all the fields you want to populte.  
See the XML configuration reference for more information:

http://greatbiztoolsllc.trac.cvsdude.com/mach-ii/wiki/ConfigFileExpla...

Best,
.Peter

P.s.  FYI, your question did cause be to find Ticket #426 which I just
fixed in the BER.  Kudos and thanks for you help!

http://greatbiztoolsllc.trac.cvsdude.com/mach-ii/ticket/426


    Reply    Reply to author    Forward  
You must Sign in before you can post messages.
To post a message you must first join this group.
Please update your nickname on the subscription settings page before posting.
You do not have the permission required to post.
End of messages
« Back to Discussions « Newer topic     Older topic »

Create a group - Google Groups - Google Home - Terms of Service - Privacy Policy
©2009 Google