Pre-caching pages in xamvvm with Xamarin.Forms and ReactiveUI - mvvm

We are currently building a Xamarin.forms iOS and Android app and the MVVM framework we are using xamvvm.
https://github.com/xamvvm/xamvvm/wiki
When we push a page to the stack as a new instance (or for the first time from cache), the page is animated in and displayed before any data binding for dynamic fields and lists take place.
ViewModel.PushModalPageFromCacheAsync<MenuPageModel>();
This results in the user seeing effectively a broken page during the animation and for short time afterwards until the binding completes.
I was wondering if there is a way of delaying showing the page until the binding has completed, or if there is a way of pre-caching certain pages in xamvvm?
Thanks.

Related

Web view with pull to refresh

I am beginner with Android development.
I have used https://github.com/chrisbanes/Android-PullToRefresh library for 'Pull to Refersh' feature.
I have configured web view for this feature and it's working fine.
The issue is when we pull to refresh, the web view gets stuck and i can not scroll the existing page.
Please help to resolve this issue or suggest alternate library for this feature.
Thanks
Try to make a webpage with scrolling functionality. In every scroll down and up data is loaded on web view pages. In my code we uses a number with next and previous button. All of web pages are store on web server. If we press next than data is show on web pages.

Passing data from one screen to another screen in iPhone using phone gap

I have just started to look into the phone gap.I have created one basic form which taking the data of the employee.I have table view in another screen .I want to pass the employee details to the second screen .I was googling for this purpose.I have found that there are some ways to do this like:
1.Server side post back
2. Client side URL examination
3.What's in a window.name = local cross-page session
4.HTML5 local storage
5. Cookies
But will my phone gap application be 100% native by using these ways? Is there any alternate way or tutorial to pass the data between the screens?
What you actually mean by "a screen"? If you're talking about a pop-up dialog box or page by jQuery Mobile you can probably serialize the form with jQuery and assign it to a JavaSCript variable.
But if you're changing your "screen" by changing UIView to a different url you can use either:
File API to store serialized form in a file and load it on the 2nd "screen"
Storage API to ... actually do the same
I'd go for number one, as it's easier to implement than using SQL and writing loads of additional code.
Search for:
jQuery.serialize()
PhoneGap File API

GWT Page Navigation [duplicate]

This question already has answers here:
Closed 10 years ago.
Possible Duplicate:
GWT: How to create a new page
i'm new to GWT. I want to know, how to navigate from one page to another one?
In my application, in the home screen, after enter the username, password. If the username, password matches. A new page should open to display the contents. I'm using the MVP Architecture.
In GWT application navigation is different from a classic webapp model. GWT is an asynchronous framework, you rather switch content of your page and manage the History by built in tools rather that opening new webpages. Plese refer to Expenses sample located inside GWT SDK or try to use Spring ROO to scaffold your app using MVP.
Expenses in particular uses custom sliding panel to switch contents between for instance Details View and list view of all expenses.
If you really need to move to a new page, please see this solution.
I think your best bet is to study Activities and Places. Work through the documentation and the examples. When you figure it out, you'll realize that it gives you the page-to-page experience that a user expects from a website, including navigation via history, bookmarks, and the Back button, but in an MVP achitecture (also built into Activities and Places via the ActivityManager) and within a single actual page with GWT swapping in and out the contents (as per the answer from VoodoRider).

Repeater User Control and Viewstate

I maintain an ASP.NET Web Forms application on framework 3.5. Essentially it is a list of items and a checkbox to signify the state of the item. The users can sort the items by any of a number of columns. New items are added and removed between postbacks. This list is hosted in a Repeater and the item template is a usercontrol. The page has no master page as it is an application that was upgraded from framework 1.0 to 1.1 to 2.0 to 3.5. The application does this if it is hosted by IIS6.1 and 7.5, 32 bit and 64 bit. It is in it's own application pool and the pool has 4 threads.
Now the problem: If a checkbox is checked in the thrid row and the item in position 1 is removed in the database, then it should move up to position 2. It does move up, but the checked check box stays in position 3. If the rows are sorted, then all the checked checkboxes stay in their position, but the rest of the information is sorted and displayed correctly, including the title on the parent tag.
Viewstate is disabled on the user control, and on the checkbox within the user control. Caching of the page is disabled in a page directive. The repeater is bound in page load.
I've checked the state of the controls in the repeater that should be checked right after repeater.DataBind and the state of the check boxes is correct. This is the last line in the page load event. Using fiddler I have verified that the rendered HTML is not correct. So it seems that the problem is somewhere in the render.
This is as far as I've been able to take this. The application is mission critical, yet this bug has existed for a very long time. Obviously the state of this checkbox wasn't that important, but due to evolving business requirements it is becoming an issue.
No searches come up with any bugs. I can post the code, but it is extremely long since it is part of a large applicaon, so I have not.
It appears that viewstate is being loaded between Page_Load and LoadComplete. Checking the values after databinding and LoadComplete shows this. What would cause viewstate to load at the wrong time like this. Feels like a bug. It only affects one page in the applicaon. I know that viewstate is populated after init and that all controls should be loaded during OnInit, but I don't want viewstate so it is ok that this doesn't function.
It has nothing to do with the type of control. I just exchanged the asp:checkbox for a htmlinputcheckbox and the behavior persisted.
EDIT: Would control state have anything to do with this? It can't be disabled so far as I know.
After removing the asp:checkbox for an HtmlInputCheckBox and suffering the same problem. I determined that the probelm is with the check box in particular and exchanged it for an asp:ImageButton with fake check box image.
I believe, though I do not know for sure, that the check box state is a part of conrol state and not view state. Seems like a Microsoft Bug to me, but perhaps that is the way this control was designed.

Pattern for Spring-MVC stateful interaction

Today I was doing this thing with Spring:
Have a page with a form and a chance to choose one item related to the form.
If you push "Choose item" the app will save somehow what you typed in the form, go to another page, let you choose the thing.
When you are back to the form it's filled with what you wrote before going to the other page, plus the item chosen.
Seems easy, but you have to take into account that for some stupid reason the user could open the page where you choose the item (maybe because of a bookmark, or because he pressed the back button 10 times to play). You know what I mean. I tried many ways, mainly based on HttpSession... I don't like any of those. None of them seems elegant. I was even thinking of using a hidden form in the other page, but given that it is not unique to this "flow" (I mean you can go to the item choose page from others as well), I will have to worry about conflicts and so on.
So what would be the preferred way for you? Suggestions?
Go around the problem instead of solving it. You can use a modal javascript div popup where the user can pick the item she wants. The contents of this div can be loaded via ajax (separate Spring MVC controller called with Http GET). Once the selection has been made, you close the popup (hide the div) and copy the value into the original form. Done.
No need to store the state anywhere.
I suggest Spring Web Flow.
Spring Web Flow compliments the Spring MVC.
Here is link to Spring Web Flow Demo