Hi,
I think it isn't so easy, you have to create three classes:
1) A class witch is extend from "qx.ui.selection.RadioManager". This
class should override the "_applySelected" method. Here you can put your
confirm code.
2) The next class extend from "qx.ui.pageview.tabview.Bar". There you
have to set your own "radio manager" by setting the "_manager" member.
3) The last class has to extend from "qx.ui.pageview.AbstractPageView",
copy the code from "qx.ui.pageview.tabview.TabView" in it, but change
the constructor code (your own "bar" should be used).
I know it isn't a good way, but I can't see a other one. Perhaps,
someone has a better idea.
Cheers,
Chris
sgallego schrieb:
> Well, I'm trying with an example like this
>
> qx.Class.define("custom.ButtonViewOmyst", {
> extend: qx.ui.pageview.buttonview.Button,
> members: {
> setChecked : function() {
>
> var res = confirm("Cambio de pagina...");
> if( res ){
> this.base(arguments);
> }
>
> }
> }
>
> });
>
>
> When I click over a button...a javascript popup ask me about changing the
> page... but when I click over 'Yes' nothing occurs :S
> When I put the cursor over the popup the button comes deselected!!
>
> I don't know what am I doing bad!! Can anyone help me!!
>
>
>
> thron7-2 wrote:
>
>>
>> sgallego wrote:
>>
>>> Ok, I have defined a little class that ask before changing the page...
>>> now
>>> the problem is... how can I include this new class in the build process??
>>>
>>>
>> It's picked up automatically with the next make source or make build -
>> provided you are working with a skeleton-based application.
>>
>>
>>> I'm using 0.7 version qooxdoo
>>>
>>>
>> Well, this is something you should have mentioned before.
>>
>> T.
>>
>>
>>> Here's the code:
>>>
>>> qx.OO.defineClass("qx.ui.pageview.buttonview.MyButton",
>>> qx.ui.pageview.buttonview.Button,
>>> function(vText, vIcon, vIconWidth, vIconHeight, vFlash) {
>>>
>>> qx.ui.pageview.buttonview.Button.call(this, vText, vIcon, vIconWidth,
>>> vIconHeight, vFlash);
>>>
>>> });
>>>
>>> qx.Proto._oldSetChecked = qx.Proto.setChecked;
>>>
>>> qx.Proto.setChecked = function(value) {
>>>
>>> if(value && confirm("change page...") ){
>>> this._oldSetChecked(value);
>>> }
>>>
>>> }
>>>
>>> Thanks
>>>
>>>
>>>
>>>
>>> thron7-2 wrote:
>>>
>>>
>>>> Currently, you would need to define an own class extending TabView. In
>>>> this class, you could override the _apply method of the 'selected'
>>>> property, to do your own stuff. You might have to call the parent's
>>>> _apply method at the end, to continue with normal operation.
>>>>
>>>> There is a bug to introduce a 'beforeChangeSelected' event, to provide a
>>>> hook for the kind of situations you described, but its not yet worked
>>>> out (http://bugzilla.qooxdoo.org/show_bug.cgi?id=1835).
>>>>
>>>> HTH,
>>>> Thomas
>>>>
>>>> sgallego wrote:
>>>>
>>>>
>>>>> Hi, I'd like that a popup appears asking the user before changing
>>>>> page
>>>>> in
>>>>> a buttonview. The user could select if changes to the new page or does
>>>>> nothing.
>>>>> I tried to handle the changechecked event in every Button...but page
>>>>> changes before asking...
>>>>>
>>>>> Is there any way to do this?
>>>>>
>>>>> Thanks!
>>>>>
>>>>>
>>>>>
>>>> ------------------------------------------------------------------------------
>>>> Apps built with the Adobe(R) Flex(R) framework and Flex Builder(TM) are
>>>> powering Web 2.0 with engaging, cross-platform capabilities. Quickly and
>>>> easily build your RIAs with Flex Builder, the Eclipse(TM)based
>>>> development
>>>> software that enables intelligent coding and step-through debugging.
>>>> Download the free 60 day trial. http://p.sf.net/sfu/www-adobe-com
>>>> _______________________________________________
>>>> qooxdoo-devel mailing list
>>>> [email protected]
>>>> https://lists.sourceforge.net/lists/listinfo/qooxdoo-devel
>>>>
>>>>
>>>>
>>>>
>>>
>>>
>> ------------------------------------------------------------------------------
>> Apps built with the Adobe(R) Flex(R) framework and Flex Builder(TM) are
>> powering Web 2.0 with engaging, cross-platform capabilities. Quickly and
>> easily build your RIAs with Flex Builder, the Eclipse(TM)based development
>> software that enables intelligent coding and step-through debugging.
>> Download the free 60 day trial. http://p.sf.net/sfu/www-adobe-com
>> _______________________________________________
>> qooxdoo-devel mailing list
>> [email protected]
>> https://lists.sourceforge.net/lists/listinfo/qooxdoo-devel
>>
>>
>>
>
>
--
Christian Schmidt
Software Engineer
Core Development :: Web Technologies
1&1 Internet AG
Ernst-Frey-Str. 9
76135 Karlsruhe, Germany
http://www.1und1.de
Amtsgericht Montabaur / HRB 6484
Vorstände: Henning Ahlert, Ralph Dommermuth, Matthias Ehrlich, Thomas
Gottschlich, Robert Hoffmann, Markus Huhn, Hans-Henning Kettler, Dr. Oliver
Mauss, Jan Oetjen
Aufsichtsratsvorsitzender: Michael Scheeren
------------------------------------------------------------------------------
Apps built with the Adobe(R) Flex(R) framework and Flex Builder(TM) are
powering Web 2.0 with engaging, cross-platform capabilities. Quickly and
easily build your RIAs with Flex Builder, the Eclipse(TM)based development
software that enables intelligent coding and step-through debugging.
Download the free 60 day trial. http://p.sf.net/sfu/www-adobe-com
_______________________________________________
qooxdoo-devel mailing list
[email protected]
https://lists.sourceforge.net/lists/listinfo/qooxdoo-devel