jQWidgets Forums

jQuery UI Widgets Forums Navigation Tabs Catch Tabs Exception | If Invalid Structure

Tagged: 

This topic contains 1 reply, has 2 voices, and was last updated by  Peter Stoev 11 years, 9 months ago.

Viewing 2 posts - 1 through 2 (of 2 total)
  • Author

  • rskbuvan
    Spectator

    Hi,

    I’ve a requirement where, I prepare the list of tabs (i.e. li ) and respective content (i.e. div ) during page ready based on the User Login in my application.

    For Example: If the user doesn’t have any access to tabs, I will not get any or

    iteration as below,

    <s:iterator value="#session.user_menu.mandateSpecificMenus"	var="manSpecMenu">
    <s:iterator value="menuHeaderList" var="menuHeader">
    <s:url id='menuHeaderUrl' value='%{url}' includeParams="none" />
    <ul class="tabsList">
    <s:iterator value="menuNodeList" var="menuNode" status="iteratorStatus">
    <s:url id='menuNodeUrl' value='%{url}' includeParams="none" />
    <li name="${titleKey}" pageurl="${menuNodeUrl}" >
    <s:text name="%{titleKey}" />
    </li>
    </s:iterator>
    </ul>
    <s:iterator value="menuNodeList" var="menuNode" status="iteratorStatus">
    <div class="contentContainer">
    <div id="${titleKey}">
    <![CDATA[&nbsp;]]>
    </div>
    </div>
    </s:iterator>
    </s:iterator>
    </s:iterator>

    In that above scenario, I’m getting the Error: Invalid Structure!, ofcourse I know that, the jqxTabs requires the proper HTML structure.

    Here I need to catch, if there is a invalid structure, I want to create one dummy tab and content saying “Because of this bla bla bla”.

    Hope the issue is explained clearly.

    I look for a solution.

    Thanks & Cheers,
    \_rssb


    Peter Stoev
    Keymaster

    Hi rskbuvan,

    If you want to catch the exception thrown by jqxTabs, do its initialization in a Try..Catch block and in the Catch add dynamically a structure for 1 Tab and initialize the widget again.

    Best Regards,
    Peter Stoev

    jQWidgets Team
    http://www.jqwidgets.com

Viewing 2 posts - 1 through 2 (of 2 total)

You must be logged in to reply to this topic.