On Apr 28, 2011, at 5:47 PM, Chuck Hill wrote:

> 
> On Apr 28, 2011, at 3:10 PM, Miguel Angel Torres Avila wrote:
> 
>> Right, maybe that was a silly question.
> 
> I was wondering why you were asking that.  :-P
> 
> 
>> I tried using a String before and it didn't work.
>> 
>> 
>> This the scenario:
>> 
>> HTML file of the component where I inserted the DhtmlxCombo Component.
>> 
>> <webobject name = "comboProducts"/>
>> 
>> With bindings
>> 
>> comboProducts : DhtmlxCombo {
>>   list = productsList;
>>   item = productIterator;
>>   selection = productSelected;
>>   displayString = productIterator.producto|keyAndDescriptionHTML;//VALID
>>   noSelectionString = "--Seleccione&nbsp;un&nbsp;Producto--";
>>   id = "pubProducts";
>> 
>> }
>> 
>> 
>> Code In the DhtmlxComboComponent's html file
> 
> For things like this it can ultimately be easier to sub-class WOPopUpButton 
> and implement DhtmlxComboComponent as a WODynamicElement.  See 
> ERXOptGroupPopupButton in Wonder for an example.
> 
> Otherwise, I think you will be better off making DhtmlxComboComponent be 
> stateless and make the binding adjustments below.  
> 
> 
> 
>> <webobject name = "jsCombo"></webobject>
>> <webobject name = "wopubSelectionList"/><webobject name = 
>> "jsComboAfterList"></webobject>
>> 
>> With bindings
>> 
>> jsCombo : WOJavaScript {
>>  scriptString = dhtmlxComboJS;
>> }
>> 
>> 
>> wopubSelectionList : WOPopUpButton {
>>   list = list;
>>   item = item;
>>   selection = selection;
>>   displayString = displayString;
>>   noSelectionString = noSelectionString;
>>   escapeHTML = false;
>>   id = id;
>> }
> 
> Use the carat notation for the bindings above, e.g.:
>>   list = ^list;

I didn't know about carat notation. That did the trick.

I declared the bindings in the API file and set the bindings of the 
WOPopUpButton like 

wopubSelectionList : WOPopUpButton {
  list = ^list;
  item = ^item;
  selection = ^selection;
  displayString = ^displayString;
  noSelectionString = ^noSelectionString;
  escapeHTML = false;
  id = id;
  name = id;
}

And that was all, the bindings are passed directly there is not need to get 
them into Objects in the .java file

Thanks Chuck.



> 
> I think that might work...
> 
> 
> Chuck
> 
> 
>> 
>> jsComboAfterList : WOJavaScript {
>>   scriptString = dhtmlxComboJSAfterList;
>> }
>> 
>> 
>> It looks like DhtmlxCombo component receives the evaluation of 
>> 
>> displayString = productIterator.producto|keyAndDescriptionHTML;//VALID
>> 
>> Which at that moment is null because is the item in the List but it does not 
>> get next value until the WOPopUpButton is rendered.
>> 
>> Then when DhtmlxCombo sends the object to the WOPopUpButton it is a null 
>> String.
>> 
>> Any ideas how to pass the instruction of the evaluation of 
>> productIterator.producto|keyAndDescriptionHTML to the WOPopUpButton inside 
>> the DhtmlxCombo Component?
>> 
>> Thanks.
>> 
>> On Apr 28, 2011, at 4:59 PM, Chuck Hill wrote:
>> 
>>> displayString is a String
>>> 
>>> 
>>> On Apr 28, 2011, at 2:57 PM, Miguel Angel Torres Avila wrote:
>>> 
>>>> Hi List,
>>>> 
>>>> I am trying to implement DHTMLXCombo 
>>>> http://www.dhtmlx.com/docs/products/dhtmlxCombo/index.shtml
>>>> 
>>>> I am creating a subcomponent that wraps a WOPopUpButton and inserts all 
>>>> the JS Code to convert it into DHTMLXCombo, the approach is to create a 
>>>> component with similar bindings as WOPopUpButton in order to easily 
>>>> replace them. But I have a problem with binding definition.
>>>> 
>>>> I have these vars so far:
>>>> 
>>>>    
>>>>    public NSArray<Object> list = null;
>>>>    
>>>>    public Object item = null;
>>>>    
>>>>    public Object selection = null;
>>>>    
>>>> 
>>>>    public String noSelectionString = null;
>>>> 
>>>> But which class the displayString Object should be?
>>>> 
>>>> My intention is to pass these objects to the WOPopUpButtom that will be 
>>>> wrapped by my DhtmlxCombo Component.
>>>> 
>>>> Thanks in advance!
>>>> 
>>>> 
>>>> _______________________________
>>>> Ing. Miguel Angel Torres Avila
>>>> Director General
>>>> Tel: +52 (33) 3367 1892
>>>> Cel: +52 (33) 3106 8758
>>>> E-mail: [email protected]
>>>> www.toracom.net
>>>> 
>>>> Antes de imprimir, piense en el Medio Ambiente. Before printing think 
>>>> about the Environment. Avant d'imprimer, pensez à l'Environnement 
>>>> 
>>>> 
>>>> 
>>>>  
>>>> 
>>>> _______________________________________________
>>>> Do not post admin requests to the list. They will be ignored.
>>>> Webobjects-dev mailing list      ([email protected])
>>>> Help/Unsubscribe/Update your Subscription:
>>>> http://lists.apple.com/mailman/options/webobjects-dev/chill%40global-village.net
>>>> 
>>>> This email sent to [email protected]
>>> 
>>> -- 
>>> Chuck Hill             Senior Consultant / VP Development
>>> 
>>> Come to WOWODC this July for unparalleled WO learning opportunities and 
>>> real peer to peer problem solving!  Network, socialize, and enjoy a great 
>>> cosmopolitan city.  See you there!  http://www.wocommunity.org/wowodc11/
>>> 
>> 
>> 
>> 
>> _______________________________
>> Ing. Miguel Angel Torres Avila
>> Director General
>> Tel: +52 (33) 3367 1892
>> Cel: +52 (33) 3106 8758
>> E-mail: [email protected]
>> www.toracom.net
>> 
>> Antes de imprimir, piense en el Medio Ambiente. Before printing think about 
>> the Environment. Avant d'imprimer, pensez à l'Environnement 
>> 
>> 
>> 
>>  
>> 
>> _______________________________________________
>> Do not post admin requests to the list. They will be ignored.
>> Webobjects-dev mailing list      ([email protected])
>> Help/Unsubscribe/Update your Subscription:
>> http://lists.apple.com/mailman/options/webobjects-dev/chill%40global-village.net
>> 
>> This email sent to [email protected]
> 
> -- 
> Chuck Hill             Senior Consultant / VP Development
> 
> Come to WOWODC this July for unparalleled WO learning opportunities and real 
> peer to peer problem solving!  Network, socialize, and enjoy a great 
> cosmopolitan city.  See you there!  http://www.wocommunity.org/wowodc11/
> 

_______________________________
Ing. Miguel Angel Torres Avila
Director General
Tel: +52 (33) 3367 1892
Cel: +52 (33) 3106 8758
E-mail: [email protected]
www.toracom.net

Antes de imprimir, piense en el Medio Ambiente. Before printing think about the 
Environment. Avant d'imprimer, pensez à l'Environnement 



 

 _______________________________________________
Do not post admin requests to the list. They will be ignored.
Webobjects-dev mailing list      ([email protected])
Help/Unsubscribe/Update your Subscription:
http://lists.apple.com/mailman/options/webobjects-dev/archive%40mail-archive.com

This email sent to [email protected]

Reply via email to