Re: [qooxdoo-devel] Refreshing mobile NavigationPage's content?

2014-03-04 Thread Dragonheart
Thanks, Christopher!

It works like a charm except for I can't use method with "initialize" name,
so I just renamed it.



--
View this message in context: 
http://qooxdoo.678.n2.nabble.com/Refreshing-mobile-NavigationPage-s-content-tp7585313p7585413.html
Sent from the qooxdoo mailing list archive at Nabble.com.

--
Subversion Kills Productivity. Get off Subversion & Make the Move to Perforce.
With Perforce, you get hassle-free workflows. Merge that actually works. 
Faster operations. Version large binaries.  Built-in WAN optimization and the
freedom to use Git, Perforce or both. Make the move to Perforce.
http://pubads.g.doubleclick.net/gampad/clk?id=122218951&iu=/4140/ostg.clktrk
___
qooxdoo-devel mailing list
[email protected]
https://lists.sourceforge.net/lists/listinfo/qooxdoo-devel


Re: [qooxdoo-devel] Refreshing mobile NavigationPage's content?

2014-02-27 Thread Christopher Zündorf
The initialize method is only called once when Page appears first time on
screen, and never again, because of a logic inside the abstract page.

Extract the page creation inside a separate method and call it on
initialize(). Also call the method when page "start" event occurs.

Then keep the "removeAll()" part, on the first line of your createPage()
method.

Then everything should work as you expected.

Greetz Christopher




Am 27.02.14 10:55 schrieb "Dragonheart" unter :

>Hello once again :)
>
>Is there a way to completely remove page's content? My page is a step of
>some survey and after finishing it there's a possibility for the user to
>go
>back to the step 1. Not only all the previous selections must be dropped,
>but I also need to recreate the page's content completely. It's
>_initialize
>method contains all the code for generating different controls according
>on
>some previous selections, so I can't just drop the selections, I need to
>rerun this code to generate another set of controls and to clear the
>previous one. I have an event on the end of the survey on which I can run
>the method to recreate the page. If I simply run the page's _initialize
>method again I have the new content added to the old one. So I tried
>adding
>a single string to the _initialize right after the this.base(arguments);
>string:
>
>_initialize: function() {
>this.base(arguments);
>this.getContent().removeAll();
>
>Anyway, I'm still getting the new content just added to the previous one
>without clearing it. Any thoughts?
>Thanks!
>
>
>
>--
>View this message in context:
>http://qooxdoo.678.n2.nabble.com/Refreshing-mobile-NavigationPage-s-conten
>t-tp7585313p7585394.html
>Sent from the qooxdoo mailing list archive at Nabble.com.
>
>--
>
>Flow-based real-time traffic analytics software. Cisco certified tool.
>Monitor traffic, SLAs, QoS, Medianet, WAAS etc. with NetFlow Analyzer
>Customize your own dashboards, set traffic alerts and generate reports.
>Network behavioral analysis & security monitoring. All-in-one tool.
>http://pubads.g.doubleclick.net/gampad/clk?id=126839071&iu=/4140/ostg.clkt
>rk
>___
>qooxdoo-devel mailing list
>[email protected]
>https://lists.sourceforge.net/lists/listinfo/qooxdoo-devel


--
Flow-based real-time traffic analytics software. Cisco certified tool.
Monitor traffic, SLAs, QoS, Medianet, WAAS etc. with NetFlow Analyzer
Customize your own dashboards, set traffic alerts and generate reports.
Network behavioral analysis & security monitoring. All-in-one tool.
http://pubads.g.doubleclick.net/gampad/clk?id=126839071&iu=/4140/ostg.clktrk
___
qooxdoo-devel mailing list
[email protected]
https://lists.sourceforge.net/lists/listinfo/qooxdoo-devel


Re: [qooxdoo-devel] Refreshing mobile NavigationPage's content?

2014-02-27 Thread Dragonheart
Hello once again :)

Is there a way to completely remove page's content? My page is a step of
some survey and after finishing it there's a possibility for the user to go
back to the step 1. Not only all the previous selections must be dropped,
but I also need to recreate the page's content completely. It's _initialize
method contains all the code for generating different controls according on
some previous selections, so I can't just drop the selections, I need to
rerun this code to generate another set of controls and to clear the
previous one. I have an event on the end of the survey on which I can run
the method to recreate the page. If I simply run the page's _initialize
method again I have the new content added to the old one. So I tried adding
a single string to the _initialize right after the this.base(arguments);
string:

_initialize: function() {
this.base(arguments);
this.getContent().removeAll();

Anyway, I'm still getting the new content just added to the previous one
without clearing it. Any thoughts?
Thanks!



--
View this message in context: 
http://qooxdoo.678.n2.nabble.com/Refreshing-mobile-NavigationPage-s-content-tp7585313p7585394.html
Sent from the qooxdoo mailing list archive at Nabble.com.

--
Flow-based real-time traffic analytics software. Cisco certified tool.
Monitor traffic, SLAs, QoS, Medianet, WAAS etc. with NetFlow Analyzer
Customize your own dashboards, set traffic alerts and generate reports.
Network behavioral analysis & security monitoring. All-in-one tool.
http://pubads.g.doubleclick.net/gampad/clk?id=126839071&iu=/4140/ostg.clktrk
___
qooxdoo-devel mailing list
[email protected]
https://lists.sourceforge.net/lists/listinfo/qooxdoo-devel


Re: [qooxdoo-devel] Refreshing mobile NavigationPage's content?

2014-02-18 Thread Dragonheart
Thanks for the response, but triggering the update wasn't the real problem :)

I just thought that it's impossible to change the widget which is already
added to the page's content, but I already had an event to update the page -
an "apply" event of it's property which is updated every time before I go to
this page. So to update the embed html with the property I just had to do
smth like this:

members: {
__html: null,

_initialize: function () {
this.base(arguments);

var html =  this.__html = new qx.ui.mobile.embed.Html();
html.setHtml(this._genHtml());
this.getContent().add(html);
},

_genHtml: function() {
var string = "some html";
return string;
},

_reinitializePage: function () {
this.__html.setHtml(this._genHtml());
}
}

where "reinitializePage" is a method called by "apply" event of the property
from this page so by rewriting the _genHtml method I can update the page as
I want.



--
View this message in context: 
http://qooxdoo.678.n2.nabble.com/Refreshing-mobile-NavigationPage-s-content-tp7585313p7585344.html
Sent from the qooxdoo mailing list archive at Nabble.com.

--
Managing the Performance of Cloud-Based Applications
Take advantage of what the Cloud has to offer - Avoid Common Pitfalls.
Read the Whitepaper.
http://pubads.g.doubleclick.net/gampad/clk?id=121054471&iu=/4140/ostg.clktrk
___
qooxdoo-devel mailing list
[email protected]
https://lists.sourceforge.net/lists/listinfo/qooxdoo-devel


Re: [qooxdoo-devel] Refreshing mobile NavigationPage's content?

2014-02-13 Thread Christopher Zündorf
Hi,

I would refactor everything you do inside the initialize method inside another 
method.
For example myInit : function() {

}


then I would add a listener to the page "start" event. This event is executes 
everytime the page gets visible.

page.addListener("start",this.myInit,this);


Please make sure to dispose all elements you want to re-create, before. 
Overwise you would get memory leaks after multiple starts of the page.

Greetz Christopher



Am 12.02.2014 um 15:32 schrieb Dragonheart :

> Hello!
> 
> What is the best way of refreshing mobile NavigationPage's content?
> 
> For example I have a page with clickable list where click on every item
> shows another page and transfers some array to it - I have two binded
> properties for that and debugging shows that the destination page gets all
> the data ok. But inside of it I have a generation of embed html inside of
> _initialize method that uses the data from array property. 
> 
> The problem is - everything is fine when I'm opening the second page for the
> first time, but if I go back to the page with list, then click on some item
> and open the second page - I still have the old data, since _initialize
> method doesn't run for the second time. I can run it manually inside of an
> apply method of the property, but in this case I just have a new content
> added to the old content. In other cases i've solved such problems in
> different ways, but I have no ideas how to solve the updating of embed html
> content (to make usage of new updated html string). I tried things like
> .initialize() inside of the event showing second page, but no luck.
> 
> Thanks in advance!
> 
> 
> 
> --
> View this message in context: 
> http://qooxdoo.678.n2.nabble.com/Refreshing-mobile-NavigationPage-s-content-tp7585313.html
> Sent from the qooxdoo mailing list archive at Nabble.com.
> 
> --
> Android apps run on BlackBerry 10
> Introducing the new BlackBerry 10.2.1 Runtime for Android apps.
> Now with support for Jelly Bean, Bluetooth, Mapview and more.
> Get your Android app in front of a whole new audience.  Start now.
> http://pubads.g.doubleclick.net/gampad/clk?id=124407151&iu=/4140/ostg.clktrk
> ___
> qooxdoo-devel mailing list
> [email protected]
> https://lists.sourceforge.net/lists/listinfo/qooxdoo-devel


--
Android apps run on BlackBerry 10
Introducing the new BlackBerry 10.2.1 Runtime for Android apps.
Now with support for Jelly Bean, Bluetooth, Mapview and more.
Get your Android app in front of a whole new audience.  Start now.
http://pubads.g.doubleclick.net/gampad/clk?id=124407151&iu=/4140/ostg.clktrk
___
qooxdoo-devel mailing list
[email protected]
https://lists.sourceforge.net/lists/listinfo/qooxdoo-devel