Hi Dunith,

Thanks for the workaround, it seems like this would be the last resort
since there are no any other nice way to do it with carbon. I hope this
should work in IE since it has basic javascript operations, will test it
and let you know.

I have done slight modification to the above code piece in order get rid of
showing the blank page in the management console (the dummy page we are
does not have anything, so i have redirected it to console index page for
now)

    var executionUrl = window.location.origin +
"/carbon/execution-manager/domains_ajaxprocessor.jsp";
    var consoleUrl = window.location.origin + "/carbon/admin/index.jsp";
    var win = window.open(executionUrl, '_blank');
    win.focus();
    window.location.href = consoleUrl;

Regards,

On Wed, May 27, 2015 at 5:47 PM, Dunith Dhanushka <[email protected]> wrote:

> Hi Tharik,
>
> AFAIK there's no straightforward method available in Carbon UI for this.
> But you can try following approach.
>
> 1. Create a JSP file inside your UI component. Let's say dummy.jsp.
> 2. In the component.xml file, set
> *<link>../execution-manager/dummy.jsp</link>*
> 3. Add following content into dummy.jsp file
>
> <script type="text/javascript">
>     jQuery(document).ready(function(){
>         var url = window.location.origin + "/{your_link_here}";
>         var win = window.open(url, '_blank');
>         win.focus();
>     });
> </script>
>
>
> Please note that I didn't test this code with IE.
>
> Regards,
> Dunith
>
> On Wed, May 27, 2015 at 12:11 PM, Tharik Kanaka <[email protected]> wrote:
>
>> Hi All,
>>
>> I have written an UI component for WSO2 CEP which needs to be opened
>> separately in a new tab. At the moment for hyperlink in the management
>> console will be like below which will be created based on the link i have
>> specified on component.xml.
>>
>> <a
>> href="../execution-manager/domains_ajaxprocessor.jsp?region=region1&amp;item=executionmgt_menu"
>> class="menu-default" style="background-image:
>> url(../execution-manager/images/icon.png);">Execution Manager</a>
>>
>> In HTML in order to make a hyper link open in new tab we need to add
>> target="_blank" attribute. Is there any method to add that attribute
>> from the carbon component or is there any alternative way to open in new
>> tab?
>>
>> Thanks,
>> --
>>
>> *Tharik Kanaka* | Associate Software Engineer
>>
>> WSO2, Inc |#20, Palm Grove, Colombo 03, Sri Lanka
>>
>> Email: [email protected] | Web: www.wso2.com
>>
>> _______________________________________________
>> Dev mailing list
>> [email protected]
>> http://wso2.org/cgi-bin/mailman/listinfo/dev
>>
>>
>
>
> --
> Regards,
>
> Dunith Dhanushka,
> Senior Software Engineer - BAM,
> WSO2 Inc,
>
> Mobile - +94 71 8615744
> Blog - dunithd.wordpress.com <http://blog.dunith.com>
> Twitter - @dunithd <http://twitter.com/dunithd>
>



-- 

*Tharik Kanaka*

WSO2, Inc |#20, Palm Grove, Colombo 03, Sri Lanka

Email: [email protected] | Web: www.wso2.com
_______________________________________________
Dev mailing list
[email protected]
http://wso2.org/cgi-bin/mailman/listinfo/dev

Reply via email to