Skip to content
This repository has been archived by the owner on Feb 15, 2022. It is now read-only.

get/set individual options #11

Closed
GoogleCodeExporter opened this issue Mar 14, 2015 · 8 comments
Closed

get/set individual options #11

GoogleCodeExporter opened this issue Mar 14, 2015 · 8 comments

Comments

@GoogleCodeExporter
Copy link

Seems like there is no appropriate way to get/set options equivalent to 
jQueryUIs:

Get or set the disabled option, after init.

    //getter
    var disabled = $( ".selector" ).tabs( "option", "disabled" );
    //setter
    $( ".selector" ).tabs( "option", "disabled", [1, 2] );

Since the qwtquery-ui is just a wrapper, I'm not sure what's the best way to 
patch it. Every UI widget has its own arguments or return values.
Best workaround would probably be an Options getter, but that way it doesn't 
comply with the jQueryUI conforms.

What do you think?

Original issue reported on code.google.com by arny...@gmail.com on 14 Aug 2011 at 2:01

@GoogleCodeExporter
Copy link
Author

jQuery UI provides an options property for each widget. GWTQuery UI could 
provide a getter for this property in UiWidget so that every widget inherits it.

Original comment by philippe...@gmail.com on 14 Aug 2011 at 11:54

@GoogleCodeExporter
Copy link
Author

Well, I've added an options getter.
But I had to fix some of the argument & return formats to native, instead of 
Java objects. JavaScriptObject cannot be cast to Java objects (Number, Boolean, 
etc.)

You may take a look and just test if you like.
Example:
Tabs.Options options = $("#tabs").as(Ui).tabs().options();
Window.alert("selected: " + options.selected());

Original comment by arny...@gmail.com on 15 Aug 2011 at 2:23

Attachments:

@GoogleCodeExporter
Copy link
Author

It's hard to figure out what you changed exactly. Can you issue a svn diff and 
submit that?

Original comment by philippe...@gmail.com on 15 Aug 2011 at 2:57

  • Changed state: Accepted

@GoogleCodeExporter
Copy link
Author

Ok, seems like you did the changes in svn already.

Check the Datepicker & Dialog as well.
There are parameters & return types which should be fixed as well.

Thanks

Original comment by arny...@gmail.com on 15 Aug 2011 at 1:20

@GoogleCodeExporter
Copy link
Author

Oh, and could you update the maven repository as well?
Thanks and keep up the great work.

Original comment by arny...@gmail.com on 15 Aug 2011 at 1:22

@GoogleCodeExporter
Copy link
Author

Can you tell me which methods need changing in Datepicker and Dialog?

Original comment by philippe...@gmail.com on 15 Aug 2011 at 1:24

@GoogleCodeExporter
Copy link
Author

See

Original comment by arny...@gmail.com on 15 Aug 2011 at 1:36

Attachments:

@GoogleCodeExporter
Copy link
Author

Fixed in r142. Will try to make a release asap.

Original comment by philippe...@gmail.com on 15 Aug 2011 at 2:02

  • Changed state: Fixed

Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Projects
None yet
Development

No branches or pull requests

1 participant