Re: How to display a non-attribute form field that's embedded in a WORepetition
Re: How to display a non-attribute form field that's embedded in a WORepetition
- Subject: Re: How to display a non-attribute form field that's embedded in a WORepetition
- From: David LeBer <email@hidden>
- Date: Wed, 10 Nov 2010 09:36:36 -0500
On 2010-11-10, at 9:23 AM, Ramsey Gurley wrote:
> Maybe create a getter/setter for the non-attribute on your ComplianceItem entity class. Bind the WOTextField to that. Then in willUpdate()/willInsert() transfer the data from the non-attribute to the attribute.
>
> Ramsey
Other options:
Do it in the component:
public String myWeirdAttribute() {
String value = // constructed value from complianceItem
return value;
}
public void setMyWeirdAttributeValue(String value) {
String mungedValue = // munged value
complianceItem.setMyNotWeirdAttribute(mungedValue);
}
Bind the WOTextField's value to 'myWeirdAttribute'
Or create a reusable component that wraps a WOTextField, and takes a complianceItem via a binding and does the munging for you and use that in your repetition.
>
> On Nov 10, 2010, at 8:32 AM, Paula Loehr wrote:
>
>> I have a WORepetition of complianceItems.
>> I want to display a WOTextField within the repetition and it’s not an attribute of complianceItem.
>> When the user clicks the “Save Changes” button, I want to be able to reference the
>> WOTextField for each complianceItem and add the contents of it to an attribute in complianceItem.
>>
>> Thanks in advance,
>> Paula
>>
>> --
>> Paula Loehr
>>
>> K12 Inc
>> 719-460-4350
>> email@hidden
>>
>> _______________________________________________
>> Do not post admin requests to the list. They will be ignored.
>> Webobjects-dev mailing list (email@hidden)
>> Help/Unsubscribe/Update your Subscription:
>>
>> This email sent to email@hidden
>
> _______________________________________________
> Do not post admin requests to the list. They will be ignored.
> Webobjects-dev mailing list (email@hidden)
> Help/Unsubscribe/Update your Subscription:
>
> This email sent to email@hidden
;david
--
David LeBer
Codeferous Software
'co-def-er-ous' adj. Literally 'code-bearing'
site: http://codeferous.com
blog: http://davidleber.net
profile: http://www.linkedin.com/in/davidleber
twitter: http://twitter.com/rebeld
--
Toronto Area Cocoa / WebObjects developers group:
http://tacow.org
_______________________________________________
Do not post admin requests to the list. They will be ignored.
Webobjects-dev mailing list (email@hidden)
Help/Unsubscribe/Update your Subscription:
This email sent to email@hidden