Hello Niveathika,

I started working on this. I will update this thread once the documentation
is complete.

Best Regards,
Rukshani.

On Thu, Jul 5, 2018 at 4:05 PM, Niveathika Rajendran <[email protected]>
wrote:

> Hi Thirasu,
>
> The above information is still not added to the docs.
>
> The functionality behind this is to create a WebSocket connection to the
> data-provider endpoint with a required configuration. The
> documentation @Sajith pointed out has the details on various data provider
> endpoints and the configurations.
>
> You have to do the following steps,
> 1. Access data provider configurations in widgetConf.json file [1]
> 2. Use the base widget API to create WebSocket connection. For this, you
> can use the following APIs,
>
>    - Subscribe to the endpoint:
>       - syntax : super.getWidgetChannelManager().subscribeWidget(<Widget
>       id>, <Call back method to handle data>, <data provider configs>)
>       - Example:
>       -
>
>       super.getWidgetChannelManager()
>           .subscribeWidget(this.props.id, this.handleDataReceived, 
> dataProviderConfigs));
>
>
>
>    - Unsubscribe to the endpoint
>       - syntax: super.getWidgetChannelManager().unsubscribeWidget(<Widget
>       ID>);
>       - Example:
>       -
>
>       super.getWidgetChannelManager().unsubscribeWidget(this.props.id);
>
>
>
> @Nisala Nanayakkara <[email protected]> Please add anything I have missed.
>
> @Rukshani Weerasinha <[email protected]> Shall we add the above to the
> documentation, as this will be a blocker to anyone writing custom widgets.
>
> [1] mail thread : [SP] [Solutions] Data provider configurations in
> solution widgets
>
> Best Regards,
> *Niveathika Rajendran,*
> *Software Engineer.*
> *Mobile : +94 077 903 7536*
>
>
>
>
>
> On Thu, Jul 5, 2018 at 3:01 PM Thisaru Guruge <[email protected]> wrote:
>
>> Hi Sajith,
>>
>> Thank you for the reply, but I was trying to create a custom widget, not
>> from the Wizard.
>>
>> On Thu, Jul 5, 2018 at 1:08 PM Sajith Perera <[email protected]> wrote:
>>
>>> Hi,
>>>
>>> Please have a look on the sample doc: https://docs.wso2.com/
>>> display/SP4xx/Generating+Widgets
>>>
>>> Regards,
>>> SajithD
>>>
>>> On Thu, Jul 5, 2018 at 10:56 AM, Thisaru Guruge <[email protected]>
>>> wrote:
>>>
>>>> Hi,
>>>>
>>>> I am looking for a way to retrieve data from a RDBMS to show them in a
>>>> widget in SP dashboard.
>>>>
>>>> I found an example from this link
>>>> <https://github.com/wso2/product-sp/tree/master/modules/solutions/message-tracer/widgets/OpenTracingSearch>
>>>>  thanks
>>>> to Nisala, and followed it. But widget is not showing the data.
>>>>
>>>> Is there any documentation where I can refer about this ?
>>>>
>>>> --
>>>> Thanks and Best Regards,
>>>> Thisaru Guruge
>>>> Software Engineer
>>>> Mobile: +94 71 720 9720
>>>>
>>>>
>>>> WSO2 Inc.: http://www.wso2.com
>>>>
>>>>
>>>>
>>>
>>>
>>> --
>>> <http://wso2.com/signature>
>>> Sajith Dimal
>>> Software Engineer
>>> Email : [email protected]
>>> Mobile : +94783101496
>>> WSO2 Inc. | http://wso2.com
>>> lean.enterprise.middleware
>>>
>>
>>
>> --
>> Thanks and Best Regards,
>> Thisaru Guruge
>> Software Engineer
>> Mobile: +94 71 720 9720
>>
>>
>> WSO2 Inc.: http://www.wso2.com
>>
>>
>>


-- 
Rukshani Weerasinha

WSO2 Inc.
Web:http://wso2.com
Mobile: 0777 683 738
_______________________________________________
Dev mailing list
[email protected]
http://wso2.org/cgi-bin/mailman/listinfo/dev

Reply via email to