Hi John,
first of all thanks for the reply.
I know that my 'converters' do not work the way they should. They were just
desperate things that I've tried. I should have left them out of the
playground example, sorry!
A parser/formatter that transforms "5 minutes" into 300 (or back) is
available, but:
How to *select* the right ListItem by its 'model' value?
In previous qooxdoo versions (0.7.x) a ListItem of a ComboBox could be
selected by something like this:
<code>
// 'cb' is a ComboBox instance
var model = ""+300; // ...had to be string back then
cb.setSelected( cb.getList().findValue(model) );
</code>
But this 'concept' has not survived all the upgrades 'till now :/
Nevertheless I think that I might have to think completely different here.
Thanks so far and nice weekend,
Peter
Am 9/26/2014 um 1:30 PM schrieb John Spackman:
> Hi Peter
>
> The problem is that ComboBox does not have a concept of last selected item,
> just the text of that item and so your controller’s converter method is
> passed the text “20 minutes” rather than the model value of the ListItem ie
> 1200. Because ComboBox is text based, your converter needs to be able to
> parse the human readable phrase “5 minutes” etc into a number.
>
> John
>
> On 26 Sep 2014, at 09:19, Peter Schneider <p.schnei...@tis-gmbh.de> wrote:
>
>> Hi there,
>>
>> I've a problem with the Model Controller and the ComboBox selection.
>>
>> This playground example: http://tinyurl.com/lyey6ye
>> shows what I mean.
>>
>> I have a model with some values. Some of them should be accessible via a
>> ComboBox, to allow free input.
>> But I don't even know how to connect the model value to the ComboBox
>> selection...
>>
>> SelectBox works fine with all my needs (integer, null, 'enumerations,...')
>>
>>
>> Concrete question for the playground example:
>> How to connect model.a2ndModel {Integer} to the 'A ComboBox' Item selection?
>>
>> The converter methods used there are just my desperate tries to get some
>> interaction ;) This *definitely* isn't the solution I think.
>>
>> I am free to even wildest changes (I have a Formatter for example to convert
>> those 'integer minutes' values into Text, so maybe using
>> qx.ui.form.AbstractSelectBox#format might be the way).
>> Only the models value (model.a2ndModel) must stay 'flat' integer.
>>
>>
>> Thanks in advance for any hint,
>> Peter
>>
>> [...]
--
** Unsere Veranstaltungen:
3. Innovationsforum Telematik in Bocholt, 16.10.2014
BWVL-Tagung in K�ln, 12.-13.11.2014
------------------------------------------------------------------------------
Meet PCI DSS 3.0 Compliance Requirements with EventLog Analyzer
Achieve PCI DSS 3.0 Compliant Status with Out-of-the-box PCI DSS Reports
Are you Audit-Ready for PCI DSS 3.0 Compliance? Download White paper
Comply to PCI DSS 3.0 Requirement 10 and 11.5 with EventLog Analyzer
http://pubads.g.doubleclick.net/gampad/clk?id=154622311&iu=/4140/ostg.clktrk
_______________________________________________
qooxdoo-devel mailing list
qooxdoo-devel@lists.sourceforge.net
https://lists.sourceforge.net/lists/listinfo/qooxdoo-devel