Hi,

Please note that we have added another shindig feature in order to provide
ability to get tenant domain, hostname and port within a gadget. You can
get the tenant domain by requiring identity feature and hostname, port by
requiring server feature as below.

*To get tenant domain*

Require identity feature - <Require feature="wso2-gadgets-identity" />
Then,
                var tenantDomain;

wso2.gadgets.identity.getTenantDomain(function(tenantDomain){
                    this.tenantDomain = tenantDomain;
                });

*To get hostname and port*

Require identity feature - <Require feature="wso2-gadgets-server" />
Then,
                var hostname;
                wso2.gadgets.server.getTenantDomain(function(hostname){
                    this.hostname = hostname;
                });

                var port;

wso2.gadgets.server.getTenantDomain("{protocol}",function(port){
                    this.port = port;
                });

Please note that you have to give appropriate protocol as "http" or "https"
in order to get relevant port.

Thanks,
Nisala

-- 
*Nisala Niroshana Nanayakkara,*
Software Engineer
Mobile:(+94)717600022
WSO2 Inc., http://wso2.com/
_______________________________________________
Dev mailing list
[email protected]
http://wso2.org/cgi-bin/mailman/listinfo/dev

Reply via email to