Can't you use the gadget state api to achieve your requirement? Please
refer to gadget-state.zip at [1] for reference.

[1]
https://github.com/wso2/product-ds/blob/master/modules/integration/tests-ui-integration/tests-ui/src/test/resources/gadgets

Thanks,
Tanya

On Fri, Aug 19, 2016 at 8:56 AM, Megala Uthayakumar <meg...@wso2.com> wrote:

> Hi Kalpa,
>
> I hope you are using carbon-dashboards  v2.0.0 [1] . In that version, when
> rendering the pages in view mode, we are manually appending all the query
> parameters from landing page[2] to other pages as well, because of that
> only you were able to get the same query parameters in other pages as well
> after reloading. But with the v2.0.1, we have already removed appending all
> the query parameters manually. So even that will not work in future
> versions. Is it possible to achieve this without appending the parameters
> to URL itself?
>
> [1] https://github.com/wso2/analytics-http/blob/master/pom.xml#L486
> [2] https://github.com/wso2/carbon-dashboards/blob/v2.0.0/
> apps/portal/theme/templates/dashboard.jag#L29
>
> On Thu, Aug 18, 2016 at 5:34 PM, Kalpa Welivitigoda <kal...@wso2.com>
> wrote:
>
>> Hi dev,
>>
>> I am working on http analytics dashboard, there we have a date time
>> picker gadget. Once a date time range is selected, the gadget publishes
>> those information to a topic so that other gadgets in the same page can
>> update accordingly.
>>
>> I have several pages, I am trying to preserve the date time selection
>> from one page to another.
>>
>> The approach I am trying is to update the url parameters (start_time and
>> end_time) when a date time selection is made. I am using
>> *window.parent.history.**pushState* for this purpose. This works fine.
>> But when I navigate to another page, these URL parameters are lost. If I
>> set the URL parameters and reload the page, they are preserved in the other
>> pages as well. I am looking for a way to accomplish this without reloading
>> the page.
>>
>> Have we come across a similar requirement before?
>>
>>
>> --
>> Best Regards,
>>
>> Kalpa Welivitigoda
>> Senior Software Engineer, WSO2 Inc. http://wso2.com
>> Email: kal...@wso2.com
>> Mobile: +94776509215
>>
>> [image: http://wso2.com/signature] <http://wso2.com/signature>
>>
>> _______________________________________________
>> Dev mailing list
>> Dev@wso2.org
>> http://wso2.org/cgi-bin/mailman/listinfo/dev
>>
>>
>
>
> --
> Megala Uthayakumar
>
> Software Engineer
> Mobile : 0779967122
>



-- 
Tanya Madurapperuma

Senior Software Engineer,
WSO2 Inc. : wso2.com
Mobile : +94718184439
Blog : http://tanyamadurapperuma.blogspot.com
_______________________________________________
Dev mailing list
Dev@wso2.org
http://wso2.org/cgi-bin/mailman/listinfo/dev

Reply via email to