• Open Menu Close Menu
  • Apple
  • Shopping Bag
  • Apple
  • Mac
  • iPad
  • iPhone
  • Watch
  • TV
  • Music
  • Support
  • Search apple.com
  • Shopping Bag

Lists

Open Menu Close Menu
  • Terms and Conditions
  • Lists hosted on this site
  • Email the Postmaster
  • Tips for posting to public mailing lists
AjaxExpansion "expanded" flag binding problem?
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

AjaxExpansion "expanded" flag binding problem?


  • Subject: AjaxExpansion "expanded" flag binding problem?
  • From: Mai Nguyen <email@hidden>
  • Date: Wed, 13 Apr 2011 16:08:12 -0700

Dear List,

I tried to solve the problem of using the AjaxExpansion per row inside a repetition and providing a unique "expanded" flag binding per row.
Since each row matches a particular product, the binding of "expanded" is set to the visible flag of each product in the array by using a setter/getter method.

If I use a public instance variable, such as a global "isVisible" flag, this would work like the AjaxExample, but the global instance variable is not suitable for each row in a repetition.

I do not understand why the binding to a setter/getter method would fail?

Thanks for any hints,

-mai

CurrentProductRepetition: WORepetition {
item = bundleProductItem;
list = currentMainBundleProducts;
index = logIndex;
} 
AgreementDetailsAjaxExpansion : AjaxExpansion {
id = ~"AgreementDetailsAjaxExpansion" + logIndex;
insertion = "Effect.blind";
insertionDuration = "0.1";
string = "Agreement Details";
expanded = isAgreementDetailsVisibleForBundleProductItem;
}

In the java file, I have the following simple code:

public boolean isAgreementDetailsVisibleForBundleProductItem() {
return (bundleProductItemC.isAgreementDetailsVisible());
}

public void setIsAgreementDetailsVisibleForBundleProductItem(boolean aValue) {
bundleProductItemC.setIsAgreementDetailsVisible(aValue);
}


==
// Methods used in AjaxExpansion for bundle product
public boolean isAgreementDetailsVisibleC = false;

public boolean isAgreementDetailsVisible() {
return isAgreementDetailsVisibleC;
}

public void setIsAgreementDetailsVisible(boolean value) {
isAgreementDetailsVisibleC = value;
}

However, at runtime, I would get the following exception:

<com.webobjects.foundation.NSKeyValueCoding$UnknownKeyException message '[<CustomerSummary name:  CustomerSummary subcomponents: {0.15.13.7.1.5.0.1.3 = <er.ajax.AjaxExpansion name: er.ajax.AjaxExpansion subcomponents: null >; 0.15.13.7.1.7 = <er.ajax.AjaxModalDialog name: er.ajax.AjaxModalDialog subcomponents: null >; } > takeValueForKey()]: attempt to assign value to unknown key: 'isAgreementDetailsVisibleForBundleProductItem'.
This WOComponent does not have an instance variable of the name isAgreementDetailsVisibleForBundleProductItem or _isAgreementDetailsVisibleForBundleProductItem, nor a method of the name setIsAgreementDetailsVisibleForBundleProductItem or _setIsAgreementDetailsVisibleForBundleProductItem' object '<CustomerSummary name: CustomerSummary subcomponents: {0.15.13.7.1.5.0.1.3 = <er.ajax.AjaxExpansion name: er.ajax.AjaxExpansion subcomponents: null >; 0.15.13.7.1.7 = <er.ajax.AjaxModalDialog name: er.ajax.AjaxModalDialog subcomponents: null >; } >' key 'isAgreementDetailsVisibleForBundleProductItem'>
at com.webobjects.appserver.WOComponent.handleTakeValueForUnboundKey(WOComponent.java:1781)
at com.webobjects.foundation.NSKeyValueCoding$Utility.handleTakeValueForUnboundKey(NSKeyValueCoding.java:519)
at com.webobjects.foundation.NSKeyValueCoding$_KeyBinding.setValueInObject(NSKeyValueCoding.java:899)
at com.webobjects.foundation.NSKeyValueCoding$DefaultImplementation.takeValueForKey(NSKeyValueCoding.java:1354)
at com.webobjects.appserver.WOComponent.takeValueForKey(WOComponent.java:1748)
at com.webobjects.foundation.NSKeyValueCoding$Utility.takeValueForKey(NSKeyValueCoding.java:469)
at com.webobjects.foundation.NSValidation$DefaultImplementation.validateTakeValueForKeyPath(NSValidation.java:679)
at com.webobjects.appserver.WOComponent.validateTakeValueForKeyPath(WOComponent.java:1424)
at com.webobjects.appserver._private.WOKeyValueAssociation.setValue(WOKeyValueAssociation.java:76)
at ognl.helperfunction.WOHelperFunctionKeyValueAssociation.setValue(WOHelperFunctionKeyValueAssociation.java:21)
at com.webobjects.appserver.WOComponent.setValueForBinding(WOComponent.java:910)
at er.ajax.AjaxExpansion.setExpanded(AjaxExpansion.java:138)
at er.ajax.AjaxExpansion.toggle(AjaxExpansion.java:146)
 _______________________________________________
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

  • Follow-Ups:
    • Re: AjaxExpansion "expanded" flag binding problem?
      • From: Henrique Gomes <email@hidden>
  • Prev by Date: Re: Semi OT: Apache goes into frozen state [solved - I think]
  • Next by Date: Re: AjaxExpansion "expanded" flag binding problem?
  • Previous by thread: Re: static 'toolbar' question
  • Next by thread: Re: AjaxExpansion "expanded" flag binding problem?
  • Index(es):
    • Date
    • Thread