Re: qooxdoo-devel Digest, Vol 106, Issue 4

classic Classic list List threaded Threaded
2 messages Options
Reply | Threaded
Open this post in threaded view
|

Re: qooxdoo-devel Digest, Vol 106, Issue 4

Nischal Karki
Thanks. That worked great. 

I have another question: 

Is there any way I can hide that Label when the URL in the database is empty ?

Suppose if the url variable is empty then either we need to remove the hyper link or make the label invisible. 

How can i do this ?

I tried label1.setVisibility("hidden");

but this didn't work. Any suggestions ??

Thanks,
Nischal

On Tue, Mar 3, 2015 at 3:37 PM, <[hidden email]> wrote:
Send qooxdoo-devel mailing list submissions to
        [hidden email]

To subscribe or unsubscribe via the World Wide Web, visit
        https://lists.sourceforge.net/lists/listinfo/qooxdoo-devel
or, via email, send a message with subject or body 'help' to
        [hidden email]

You can reach the person managing the list at
        [hidden email]

When replying, please edit your Subject line so it is more specific
than "Re: Contents of qooxdoo-devel digest..."


Today's Topics:

   1. Re: Rest (Daniel Wagner)
   2. Re: Rest (Fr?d?ric)
   3. Re: Rest (Fr?d?ric)
   4. Re: Rest (Daniel Wagner)
   5. Re: Rest (Fr?d?ric)
   6. Re: Rest (Daniel Wagner)
   7. Re: Rest (Fr?d?ric)
   8. qooxdoo hyperlink not working (Nischal Karki)
   9. Re: qooxdoo hyperlink not working (Tobi Oetiker)


----------------------------------------------------------------------

Message: 1
Date: Tue, 03 Mar 2015 14:34:40 +0100
From: Daniel Wagner <[hidden email]>
Subject: Re: [qooxdoo-devel] Rest
To: [hidden email]
Message-ID: <[hidden email]>
Content-Type: text/plain; charset=UTF-8

I can't test it right now, but configureRequest should do it:

res.configureRequest(function(req, action, params, data) {
  req.setRequestData("foo=bar");
});

On 03.03.2015 12:45, Fr?d?ric wrote:
> Another question about Rest: how can I send params with a 'long poll'
> request ?
>



------------------------------

Message: 2
Date: Tue, 3 Mar 2015 14:35:35 +0100
From: Fr?d?ric <[hidden email]>
Subject: Re: [qooxdoo-devel] Rest
To: [hidden email]
Message-ID: <[hidden email]>
Content-Type: text/plain; charset=UTF-8

Le 03/03/2015, Daniel a ?crit :

> By timestamp do you mean a response header? You can get those from the
> Rest event:
>
> resource.addListenerOnce("success", function(ev) {
>   ev.getRequest().getResponseHeader("Last-Modified");
> });
>
> http://demo.qooxdoo.org/current/apiviewer/#qx.event.type.Rest

Thanks!

--
    Fr?d?ric



------------------------------

Message: 3
Date: Tue, 3 Mar 2015 14:58:55 +0100
From: Fr?d?ric <[hidden email]>
Subject: Re: [qooxdoo-devel] Rest
To: [hidden email]
Message-ID: <[hidden email]>
Content-Type: text/plain; charset=UTF-8

Le 03/03/2015, Daniel a ?crit :

> I can't test it right now, but configureRequest should do it:
>
> res.configureRequest(function(req, action, params, data) {
>   req.setRequestData("foo=bar");
> });

I made some tests, and I see 2 problems:

- params are not passed as REST url. For example, I have a REST resource
  pointing to /eib/new, and I want to add my ts as /eib/new/<ts>. If I use
  the setRequestData(), I get something like /eib/new/?ts=xxx...

- I can't give a private param of the class owning the REST resource (this
  is not defined in the function).

--
    Fr?d?ric



------------------------------

Message: 4
Date: Tue, 03 Mar 2015 15:57:46 +0100
From: Daniel Wagner <[hidden email]>
Subject: Re: [qooxdoo-devel] Rest
To: [hidden email]
Message-ID: <[hidden email]>
Content-Type: text/plain; charset=UTF-8



On 03.03.2015 14:58, Fr?d?ric wrote:
> Le 03/03/2015, Daniel a ?crit :
>
>> I can't test it right now, but configureRequest should do it:
>>
>> res.configureRequest(function(req, action, params, data) {
>>   req.setRequestData("foo=bar");
>> });
>
> I made some tests, and I see 2 problems:
>
> - params are not passed as REST url. For example, I have a REST resource
>   pointing to /eib/new, and I want to add my ts as /eib/new/<ts>. If I use
>   the setRequestData(), I get something like /eib/new/?ts=xxx...

I'm not really a REST expert, but isn't that something you'd configure
in your resource description? Something like

var description = {
  "put": { method: "PUT", url: "/eib/new/{ts}"},
};

resource.put({ts: something}, data);

>
> - I can't give a private param of the class owning the REST resource (this
>   is not defined in the function).
>

Use Function.bind:

res.configureRequest(function(req, action, params, data) {
  req.setRequestData(this.__private);
}.bind(this));



------------------------------

Message: 5
Date: Tue, 3 Mar 2015 16:04:00 +0100
From: Fr?d?ric <[hidden email]>
Subject: Re: [qooxdoo-devel] Rest
To: [hidden email]
Message-ID: <[hidden email]>
Content-Type: text/plain; charset=UTF-8

Le 03/03/2015, Daniel a ?crit :

> I'm not really a REST expert, but isn't that something you'd configure
> in your resource description? Something like
>
> var description = {
>   "put": { method: "PUT", url: "/eib/new/{ts}"},
> };
>
> resource.put({ts: something}, data);

Yes, but it is not possible when using long poll; this method only takes
the resource action, but no parameters.

I simulated the long poll by resending the action with its params from the
'success' callback. Don't know if it is very clean, but it seems to work.

--
    Fr?d?ric



------------------------------

Message: 6
Date: Tue, 03 Mar 2015 16:31:07 +0100
From: Daniel Wagner <[hidden email]>
Subject: Re: [qooxdoo-devel] Rest
To: [hidden email]
Message-ID: <[hidden email]>
Content-Type: text/plain; charset=UTF-8

On 03.03.2015 16:04, Fr?d?ric wrote:
> Le 03/03/2015, Daniel a ?crit :
>
>> I'm not really a REST expert, but isn't that something you'd configure
>> in your resource description? Something like
>>
>> var description = {
>>   "put": { method: "PUT", url: "/eib/new/{ts}"},
>> };
>>
>> resource.put({ts: something}, data);
>
> Yes, but it is not possible when using long poll; this method only takes
> the resource action, but no parameters.

I see. Looking at the implementation, it should be fairly easy to
support parameters in the longPoll method. It uses a single invoke()
call which would take the parameters and then repeated calls to
refresh() which uses the parameters from the original invocation. Feel
free to open an enhancement report for this.

>
> I simulated the long poll by resending the action with its params from the
> 'success' callback. Don't know if it is very clean, but it seems to work.
>

That's basically what longPoll does so it should be fine.



------------------------------

Message: 7
Date: Tue, 3 Mar 2015 19:53:52 +0100
From: Fr?d?ric <[hidden email]>
Subject: Re: [qooxdoo-devel] Rest
To: [hidden email]
Message-ID: <[hidden email]>
Content-Type: text/plain; charset=UTF-8

Le Tuesday 03 March 2015, Daniel a ?crit :

> I see. Looking at the implementation, it should be fairly easy to
> support parameters in the longPoll method. It uses a single invoke()
> call which would take the parameters and then repeated calls to
> refresh() which uses the parameters from the original invocation. Feel
> free to open an enhancement report for this.

In my case, I need the parameter to be changed at each refresh, but I
think having at least the feature you describe could be nice. I'll have
a look at the way to open a report.

> > I simulated the long poll by resending the action with its params
> > from the 'success' callback. Don't know if it is very clean, but it
> > seems to work.
>
> That's basically what longPoll does so it should be fine.

Good!

Thanks for your help,

--
    Fr?d?ric



------------------------------

Message: 8
Date: Tue, 3 Mar 2015 15:33:09 -0600
From: Nischal Karki <[hidden email]>
Subject: [qooxdoo-devel] qooxdoo hyperlink not working
To: [hidden email]
Message-ID:
        <[hidden email]>
Content-Type: text/plain; charset="utf-8"

Hi,

I am trying to use hyperlink in qooxdoo Desktop app and I retrieve the URL
from the database which is stored as variable. How do I pass that URL
variable in qooxdoo ?

For e.g.
My code is like this:

var url = "www.qooxdoo.org";

listContainer2.add(new qx.ui.basic.Label('<a href='+url+
'target="_blank">Open URL</a>').set ({rich:true, textColor:"white"}),
{left: 45, top:  215});

I did this but it returns the path of the local server -  localhost/UI/
www.qooxdoo.com


How can I just get "www.qooxdoo.com" in the hyperlink and not get the local
server path?


Thanks,
Nischal Karki
-------------- next part --------------
An HTML attachment was scrubbed...

------------------------------

Message: 9
Date: Tue, 3 Mar 2015 22:37:32 +0100
From: Tobi Oetiker <[hidden email]>
Subject: Re: [qooxdoo-devel] qooxdoo hyperlink not working
To: qooxdoo Development <[hidden email]>
Message-ID: <[hidden email]>
Content-Type: text/plain; charset="us-ascii"


> On 03.03.2015, at 22:33, Nischal Karki <[hidden email]> wrote:
>
> Hi,
>
> I am trying to use hyperlink in qooxdoo Desktop app and I retrieve the URL from the database which is stored as variable. How do I pass that URL variable in qooxdoo ?
>
> For e.g.
> My code is like this:
>
> var url = "www.qooxdoo.org";
>


try

var url="http://www.qooxdoo.org";

cheers
tobi

> listContainer2.add(new qx.ui.basic.Label('<a href='+url+ 'target="_blank">Open URL</a>').set   ({rich:true, textColor:"white"}), {left: 45, top:  215});
>
> I did this but it returns the path of the local server -  localhost/UI/www.qooxdoo.com
>
>
> How can I just get "www.qooxdoo.com" in the hyperlink and not get the local server path?
>
>
> Thanks,
> Nischal Karki
>
> ------------------------------------------------------------------------------
> Dive into the World of Parallel Programming The Go Parallel Website, sponsored
> by Intel and developed in partnership with Slashdot Media, is your hub for all
> things parallel software development, from weekly thought leadership blogs to
> news, videos, case studies, tutorials and more. Take a look and join the
> conversation now. http://goparallel.sourceforge.net/
> _______________________________________________
> qooxdoo-devel mailing list
> [hidden email]
> https://lists.sourceforge.net/lists/listinfo/qooxdoo-devel
-------------- next part --------------
An HTML attachment was scrubbed...

------------------------------

------------------------------------------------------------------------------
Dive into the World of Parallel Programming The Go Parallel Website, sponsored
by Intel and developed in partnership with Slashdot Media, is your hub for all
things parallel software development, from weekly thought leadership blogs to
news, videos, case studies, tutorials and more. Take a look and join the
conversation now. http://goparallel.sourceforge.net/

------------------------------

_______________________________________________
qooxdoo-devel mailing list
[hidden email]
https://lists.sourceforge.net/lists/listinfo/qooxdoo-devel


End of qooxdoo-devel Digest, Vol 106, Issue 4
*********************************************


------------------------------------------------------------------------------
Dive into the World of Parallel Programming The Go Parallel Website, sponsored
by Intel and developed in partnership with Slashdot Media, is your hub for all
things parallel software development, from weekly thought leadership blogs to
news, videos, case studies, tutorials and more. Take a look and join the
conversation now. http://goparallel.sourceforge.net/
_______________________________________________
qooxdoo-devel mailing list
[hidden email]
https://lists.sourceforge.net/lists/listinfo/qooxdoo-devel
Reply | Threaded
Open this post in threaded view
|

Re: qooxdoo-devel Digest, Vol 106, Issue 4

Tobias Oberrauch

Hi Nischal,


what about label.hide()?

http://tinyurl.com/oekrsra


Cheers Tobias


Von: Nischal Karki <[hidden email]>
Gesendet: Mittwoch, 4. März 2015 00:12
An: [hidden email]
Betreff: Re: [qooxdoo-devel] qooxdoo-devel Digest, Vol 106, Issue 4
 
Thanks. That worked great. 

I have another question: 

Is there any way I can hide that Label when the URL in the database is empty ?

Suppose if the url variable is empty then either we need to remove the hyper link or make the label invisible. 

How can i do this ?

I tried label1.setVisibility("hidden");

but this didn't work. Any suggestions ??

Thanks,
Nischal

On Tue, Mar 3, 2015 at 3:37 PM, <[hidden email]> wrote:
Send qooxdoo-devel mailing list submissions to
        [hidden email]

To subscribe or unsubscribe via the World Wide Web, visit
        https://lists.sourceforge.net/lists/listinfo/qooxdoo-devel
or, via email, send a message with subject or body 'help' to
        [hidden email]

You can reach the person managing the list at
        [hidden email]

When replying, please edit your Subject line so it is more specific
than "Re: Contents of qooxdoo-devel digest..."


Today's Topics:

   1. Re: Rest (Daniel Wagner)
   2. Re: Rest (Fr?d?ric)
   3. Re: Rest (Fr?d?ric)
   4. Re: Rest (Daniel Wagner)
   5. Re: Rest (Fr?d?ric)
   6. Re: Rest (Daniel Wagner)
   7. Re: Rest (Fr?d?ric)
   8. qooxdoo hyperlink not working (Nischal Karki)
   9. Re: qooxdoo hyperlink not working (Tobi Oetiker)


----------------------------------------------------------------------

Message: 1
Date: Tue, 03 Mar 2015 14:34:40 +0100
From: Daniel Wagner <[hidden email]>
Subject: Re: [qooxdoo-devel] Rest
To: [hidden email]
Message-ID: <[hidden email]>
Content-Type: text/plain; charset=UTF-8

I can't test it right now, but configureRequest should do it:

res.configureRequest(function(req, action, params, data) {
  req.setRequestData("foo=bar");
});

On 03.03.2015 12:45, Fr?d?ric wrote:
> Another question about Rest: how can I send params with a 'long poll'
> request ?
>



------------------------------

Message: 2
Date: Tue, 3 Mar 2015 14:35:35 +0100
From: Fr?d?ric <[hidden email]>
Subject: Re: [qooxdoo-devel] Rest
To: [hidden email]
Message-ID: <[hidden email]>
Content-Type: text/plain; charset=UTF-8

Le 03/03/2015, Daniel a ?crit :

> By timestamp do you mean a response header? You can get those from the
> Rest event:
>
> resource.addListenerOnce("success", function(ev) {
>   ev.getRequest().getResponseHeader("Last-Modified");
> });
>
> http://demo.qooxdoo.org/current/apiviewer/#qx.event.type.Rest

Thanks!

--
    Fr?d?ric



------------------------------

Message: 3
Date: Tue, 3 Mar 2015 14:58:55 +0100
From: Fr?d?ric <[hidden email]>
Subject: Re: [qooxdoo-devel] Rest
To: [hidden email]
Message-ID: <[hidden email]>
Content-Type: text/plain; charset=UTF-8

Le 03/03/2015, Daniel a ?crit :

> I can't test it right now, but configureRequest should do it:
>
> res.configureRequest(function(req, action, params, data) {
>   req.setRequestData("foo=bar");
> });

I made some tests, and I see 2 problems:

- params are not passed as REST url. For example, I have a REST resource
  pointing to /eib/new, and I want to add my ts as /eib/new/<ts>. If I use
  the setRequestData(), I get something like /eib/new/?ts=xxx...

- I can't give a private param of the class owning the REST resource (this
  is not defined in the function).

--
    Fr?d?ric



------------------------------

Message: 4
Date: Tue, 03 Mar 2015 15:57:46 +0100
From: Daniel Wagner <[hidden email]>
Subject: Re: [qooxdoo-devel] Rest
To: [hidden email]
Message-ID: <[hidden email]>
Content-Type: text/plain; charset=UTF-8



On 03.03.2015 14:58, Fr?d?ric wrote:
> Le 03/03/2015, Daniel a ?crit :
>
>> I can't test it right now, but configureRequest should do it:
>>
>> res.configureRequest(function(req, action, params, data) {
>>   req.setRequestData("foo=bar");
>> });
>
> I made some tests, and I see 2 problems:
>
> - params are not passed as REST url. For example, I have a REST resource
>   pointing to /eib/new, and I want to add my ts as /eib/new/<ts>. If I use
>   the setRequestData(), I get something like /eib/new/?ts=xxx...

I'm not really a REST expert, but isn't that something you'd configure
in your resource description? Something like

var description = {
  "put": { method: "PUT", url: "/eib/new/{ts}"},
};

resource.put({ts: something}, data);

>
> - I can't give a private param of the class owning the REST resource (this
>   is not defined in the function).
>

Use Function.bind:

res.configureRequest(function(req, action, params, data) {
  req.setRequestData(this.__private);
}.bind(this));



------------------------------

Message: 5
Date: Tue, 3 Mar 2015 16:04:00 +0100
From: Fr?d?ric <[hidden email]>
Subject: Re: [qooxdoo-devel] Rest
To: [hidden email]
Message-ID: <[hidden email]>
Content-Type: text/plain; charset=UTF-8

Le 03/03/2015, Daniel a ?crit :

> I'm not really a REST expert, but isn't that something you'd configure
> in your resource description? Something like
>
> var description = {
>   "put": { method: "PUT", url: "/eib/new/{ts}"},
> };
>
> resource.put({ts: something}, data);

Yes, but it is not possible when using long poll; this method only takes
the resource action, but no parameters.

I simulated the long poll by resending the action with its params from the
'success' callback. Don't know if it is very clean, but it seems to work.

--
    Fr?d?ric



------------------------------

Message: 6
Date: Tue, 03 Mar 2015 16:31:07 +0100
From: Daniel Wagner <[hidden email]>
Subject: Re: [qooxdoo-devel] Rest
To: [hidden email]
Message-ID: <[hidden email]>
Content-Type: text/plain; charset=UTF-8

On 03.03.2015 16:04, Fr?d?ric wrote:
> Le 03/03/2015, Daniel a ?crit :
>
>> I'm not really a REST expert, but isn't that something you'd configure
>> in your resource description? Something like
>>
>> var description = {
>>   "put": { method: "PUT", url: "/eib/new/{ts}"},
>> };
>>
>> resource.put({ts: something}, data);
>
> Yes, but it is not possible when using long poll; this method only takes
> the resource action, but no parameters.

I see. Looking at the implementation, it should be fairly easy to
support parameters in the longPoll method. It uses a single invoke()
call which would take the parameters and then repeated calls to
refresh() which uses the parameters from the original invocation. Feel
free to open an enhancement report for this.

>
> I simulated the long poll by resending the action with its params from the
> 'success' callback. Don't know if it is very clean, but it seems to work.
>

That's basically what longPoll does so it should be fine.



------------------------------

Message: 7
Date: Tue, 3 Mar 2015 19:53:52 +0100
From: Fr?d?ric <[hidden email]>
Subject: Re: [qooxdoo-devel] Rest
To: [hidden email]
Message-ID: <[hidden email]>
Content-Type: text/plain; charset=UTF-8

Le Tuesday 03 March 2015, Daniel a ?crit :

> I see. Looking at the implementation, it should be fairly easy to
> support parameters in the longPoll method. It uses a single invoke()
> call which would take the parameters and then repeated calls to
> refresh() which uses the parameters from the original invocation. Feel
> free to open an enhancement report for this.

In my case, I need the parameter to be changed at each refresh, but I
think having at least the feature you describe could be nice. I'll have
a look at the way to open a report.

> > I simulated the long poll by resending the action with its params
> > from the 'success' callback. Don't know if it is very clean, but it
> > seems to work.
>
> That's basically what longPoll does so it should be fine.

Good!

Thanks for your help,

--
    Fr?d?ric



------------------------------

Message: 8
Date: Tue, 3 Mar 2015 15:33:09 -0600
From: Nischal Karki <[hidden email]>
Subject: [qooxdoo-devel] qooxdoo hyperlink not working
To: [hidden email]
Message-ID:
        <[hidden email]>
Content-Type: text/plain; charset="utf-8"

Hi,

I am trying to use hyperlink in qooxdoo Desktop app and I retrieve the URL
from the database which is stored as variable. How do I pass that URL
variable in qooxdoo ?

For e.g.
My code is like this:

var url = "www.qooxdoo.org";

listContainer2.add(new qx.ui.basic.Label('<a href='+url+
'target="_blank">Open URL</a>').set ({rich:true, textColor:"white"}),
{left: 45, top:  215});

I did this but it returns the path of the local server -  localhost/UI/
www.qooxdoo.com


How can I just get "www.qooxdoo.com" in the hyperlink and not get the local
server path?


Thanks,
Nischal Karki
-------------- next part --------------
An HTML attachment was scrubbed...

------------------------------

Message: 9
Date: Tue, 3 Mar 2015 22:37:32 +0100
From: Tobi Oetiker <[hidden email]>
Subject: Re: [qooxdoo-devel] qooxdoo hyperlink not working
To: qooxdoo Development <[hidden email]>
Message-ID: <[hidden email]>
Content-Type: text/plain; charset="us-ascii"


> On 03.03.2015, at 22:33, Nischal Karki <[hidden email]> wrote:
>
> Hi,
>
> I am trying to use hyperlink in qooxdoo Desktop app and I retrieve the URL from the database which is stored as variable. How do I pass that URL variable in qooxdoo ?
>
> For e.g.
> My code is like this:
>
> var url = "www.qooxdoo.org";
>


try

var url="http://www.qooxdoo.org";

cheers
tobi

> listContainer2.add(new qx.ui.basic.Label('<a href='+url+ 'target="_blank">Open URL</a>').set   ({rich:true, textColor:"white"}), {left: 45, top:  215});
>
> I did this but it returns the path of the local server -  localhost/UI/www.qooxdoo.com
>
>
> How can I just get "www.qooxdoo.com" in the hyperlink and not get the local server path?
>
>
> Thanks,
> Nischal Karki
>
> ------------------------------------------------------------------------------
> Dive into the World of Parallel Programming The Go Parallel Website, sponsored
> by Intel and developed in partnership with Slashdot Media, is your hub for all
> things parallel software development, from weekly thought leadership blogs to
> news, videos, case studies, tutorials and more. Take a look and join the
> conversation now. http://goparallel.sourceforge.net/
> _______________________________________________
> qooxdoo-devel mailing list
> [hidden email]
> https://lists.sourceforge.net/lists/listinfo/qooxdoo-devel
-------------- next part --------------
An HTML attachment was scrubbed...

------------------------------

------------------------------------------------------------------------------
Dive into the World of Parallel Programming The Go Parallel Website, sponsored
by Intel and developed in partnership with Slashdot Media, is your hub for all
things parallel software development, from weekly thought leadership blogs to
news, videos, case studies, tutorials and more. Take a look and join the
conversation now. http://goparallel.sourceforge.net/

------------------------------

_______________________________________________
qooxdoo-devel mailing list
[hidden email]
https://lists.sourceforge.net/lists/listinfo/qooxdoo-devel


End of qooxdoo-devel Digest, Vol 106, Issue 4
*********************************************


------------------------------------------------------------------------------
Dive into the World of Parallel Programming The Go Parallel Website, sponsored
by Intel and developed in partnership with Slashdot Media, is your hub for all
things parallel software development, from weekly thought leadership blogs to
news, videos, case studies, tutorials and more. Take a look and join the
conversation now. http://goparallel.sourceforge.net/
_______________________________________________
qooxdoo-devel mailing list
[hidden email]
https://lists.sourceforge.net/lists/listinfo/qooxdoo-devel