Thanks all for the input. I will try the gadget state API approach and will
update.

On Fri, Aug 19, 2016 at 11:52 AM, Lasantha Samarakoon <[email protected]>
wrote:

> Hi Kalpa,
>
> ​You can use the gadget state API to store the date picker state in the
> URL hash. This has been implemented in order to facilitate dashboard
> sharing (i.e. A person can drill down into some level and share it, so the
> others can directly see that level instead of drilling down again.)
>
> But I am not sure regarding you can maintain the URL hash while moving to
> another page via the dashboard menu.  If it is not, then it'll be a kind of
> improvement which we need to provide :)
>
>
> Regards,
>
> *Lasantha Samarakoon* | Software Engineer
> WSO2, Inc.
> #20, Palm Grove, Colombo 03, Sri Lanka
> Mobile: +94 (71) 214 1576
> Email:  [email protected]
> Web:    www.wso2.com
>
> lean . enterprise . middleware
>
> On Fri, Aug 19, 2016 at 10:07 AM, Tanya Madurapperuma <[email protected]>
> wrote:
>
>> 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 <[email protected]>
>> 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/ap
>>> ps/portal/theme/templates/dashboard.jag#L29
>>>
>>> On Thu, Aug 18, 2016 at 5:34 PM, Kalpa Welivitigoda <[email protected]>
>>> 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: [email protected]
>>>> Mobile: +94776509215
>>>>
>>>> [image: http://wso2.com/signature] <http://wso2.com/signature>
>>>>
>>>> _______________________________________________
>>>> Dev mailing list
>>>> [email protected]
>>>> 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
>> [email protected]
>> http://wso2.org/cgi-bin/mailman/listinfo/dev
>>
>>
>
> _______________________________________________
> Dev mailing list
> [email protected]
> http://wso2.org/cgi-bin/mailman/listinfo/dev
>
>


-- 
Best Regards,

Kalpa Welivitigoda
Senior Software Engineer, WSO2 Inc. http://wso2.com
Email: [email protected]
Mobile: +94776509215

[image: http://wso2.com/signature] <http://wso2.com/signature>
_______________________________________________
Dev mailing list
[email protected]
http://wso2.org/cgi-bin/mailman/listinfo/dev

Reply via email to