Announcement

Collapse
No announcement yet.
X
  • Filter
  • Time
Clear All
new posts

    Moving charts to a different window

    I am in need of creating a button to popup an already generated chart to a new window(and toggle it back to it's original position), without losing the actual screen interactions between the chart and the rest of my application.

    I took a look at the new Cross-Window feature, but it doesn't seem to be what I am looking for(http://smartclient.com/#portalCrossWindowDrag). So I would like to know if you can give me an insight about which features should help me with that, if any.

    Thanks

    #2
    Just to confirm - you are talking about a new browser window or tab, not just a SmartClient Window component?

    If so, what you are basically doing is starting a new application that consists only of this one FacetChart. So you just need a new .html or .jsp file that has just the code for a FacetChart, and takes a URL parameter in order to know what chart data to load (or any other similar mechanism that can pass the information along to a separate application - server-side session state for example).

    Comment


      #3
      Hi, just to provide some more clarity on what we are trying to do here. Yes, we are opening a new browser window. We have certain charts that show up inside our application. The charts are associated with a grid and the chart data refreshes every time the grid data refreshes.

      We want to give a user the ability to click a "Pop out" button that will remove that chart from the layout inside the app and move the chart to a new window so the user can drag it to a different monitor if they wish. We would want this chart in the new window to continue to refresh as the data in the associated grid changes so we need to figure out how to communicate across the windows. Any suggestions on best practices for doing this? I'm guessing we want to give the new window a name when create it and use that to ensure that grid updates successfully refresh the chart data as well?

      Comment


        #4
        There's a few approaches:

        1. just have the chart periodically refresh itself

        2. use Real-Time Messaging to connect the chart to the server, and send messages from the main page to the server when the chart needs to refresh, then push it out to the chart through Messaging

        3. communicate across the frame boundary by retaining a reference to the browser Window you opened and making JavaScript calls. This is fraught with peril because it's an area where browsers have lots of bugs and the bugs are ever changing. The best advice we can offer here is to never pass anything other than a String across the frame boundary; if you need to pass anything more complicated, serialize it to JSON and de-serialize within the other window.

        Comment

        Working...
        X