Backbone & Marionette - Data didn't show in Region when I click to back or forward from Address Bar - marionette

I run my App in first time, data have show to Region. Then, I click to view detail data, the detail page have show data to Region.
But when I click "back" to previous page, the data haven't show to Region, and I click to "forward" to go detail page, the data haven't show to Region too.
Although, I debug in chrome, my data have parse and return to Model.
Help me pls!!!!

Verify that the backbone.history is started.
MyApp.on("initialize:after", function(){
Backbone.history.start();
});

Related

APEX: Charts in Tabs Container not visible

I have in APEX a 'Static content' region. This has the template 'Tabs container'. As subregions (or 'tabs' as it is called within this template) I have multiple charts. The problem is that just the chart of the active tab is displayed correctly. When selecting another tab, the chart within the selected tab is not display. I have to resize the browser window, then the chart is displayed.
I'm using the default APEX Theme (42) without changes.
Is this an APEX bug or am I doing something wrong? If this is bug, is there a workaround?
Link to question in Oracle Community Forum: https://community.oracle.com/thread/3947770?sr=inbox&ru=289068
Thanks for your answers,
Peter
I solved this error by the following two steps:
Replace the Tab Container region with a Region Display Selector region. This region is like a tab menu. All regions that should be shown in the tab menu need to have the flag 'Region Display Selector'. All the regions that are handled by the Region Display Selector should be on the same hierarchical level as the Region Display Selector.
The main error still exists but for Region Display Selectors, APEX fires an event for which you can write a handler:
$(document).ready(function() {
$('.apex-rds').data('onRegionChange', function(mode, activeTab) {
$(window).trigger("apexwindowresized");
});
});
The handler fires an event that the browser window size has been changed on which the charts automatically act and redraw everything.
This should also work for the Crousel Container. A big thanks goes to this blog entry: https://apexplained.wordpress.com/2016/05/02/working-with-region-display-selectors-in-apex-5-0/

ion-nav-back-button not firing state controller

So, I am using ui-router for my app's routing. There is a scenario, I clicked like button on the item detail page. Then I hit back button, it goes back to the main page, it is a list of items. The item has a likes counter. But I found the counter did not increase because back button did not fire the controller for main page.
I want to understand how can I fire the controller while clicking back button.
You should isolate your data in a provider to manage the data sync between your views. If all of the data is contained in a service, you can update it from one view, and it will always be synced with the other.
In both of the controllers, require 'ItemRepository' which will provide the data to the views.

Setting anchor on page on refresh/pageload

I have a page that contains an area about halfway down the page that filters properties (custom post type) by Price, Bedrooms, and Sq Ft. The filter works fine, however upon filtering the properties (by clicking any of the filters), the page refreshes back to the top of the page, causing the user to have to scroll down the page to see the filtered results. I am wondering how I would go about attaching an anchor to those links so the page refreshes to the filtered posts area of that page so the user does not have to scroll down again. Would this be done by firing an event via JS or how exactly would this be done?
Ive attached my link below. All and any insight is much appreciated!
Scroll down to "View Quick Move in Homes" to view properties and filters - http://www.daybreakutah.com/find-a-home/
1) Give an id to the tag you want to scroll down to:
<h2 id="filter1">
2) In your hrefs, add #filter1 (or whatever you called it) to the end of the URL:
<a href="http://www.daybreakutah.com/find-a-home/#filter1">

MVC3 Navigation, browser positionin g

I have a C#.NET MVC3 web app. I have a View that has a List of Models. This list can be long, requiring the user to scroll down on the View. When selecting one of the models in the View to Edit, the user is taken to the Edit View. After submitting the Edit View, the user is redirected back to the List View. However, the List View is now displaying back at the top of the list. How can I redirect the user back to the same position in the List View where they clicked the Edit button?
You would probably be better suited using a modal popup dialog to edit the data, rather than navigating to another page.
While it's possible to do what you want, it's a pain. You would have to get the scroll location via javascript, save it to a hidden field, post that to your edit page, along with record number and anything else, then re-post it back to your original page when you return, then read the post value and scroll to it via javascript.
All that is avoided if you just use a modal edit dialog, then when the dialog goes away the page is still in the same place.

Hide (minimize) JQgrid details on page load

probably a simple question, but how can i get a JQgrid to load minimized. When you hit the little arrow at the top right of the grid, it only shows the grid title. I would like a grid on my page to be like this as the page loads, and when the user hits the button it shows the grid data again
Cheers
Luke
When you're configuring the grid, try setting the hiddengrid to true. See this page for the various options.

Resources