Skip to content
This repository has been archived by the owner on Jan 21, 2024. It is now read-only.

NavBar component navBarBeforeLinks / navBarAfterLinks #83

Open
paulswithers opened this issue Aug 9, 2017 · 0 comments
Open

NavBar component navBarBeforeLinks / navBarAfterLinks #83

paulswithers opened this issue Aug 9, 2017 · 0 comments

Comments

@paulswithers
Copy link
Contributor

There are a couple of issues here with regard to integration with the TreeNode complex types.

  1. With the before / after links contain
    xe:basicContainerNode...
    xe:pageTreeNodexe:pageTreeNode
    xe:basicContainerNode...
    xe:pageTreeNodexe:pageTreeNode
    The first level displays as a drop-down with nodes displaying. The container node on the drop-down displays with " >" against it, implying there's a submenu, but the sub-menu doesn't appear to the right of the container node. NavRenderer.writePopupImage checks if tree.getDepth()==2 and adds the caret. But .renderEntryItemLinkAttributes only writes attributes for "data-toggle" and "href" if getDepth <= 2. I'm guessing this should be <= 3?
    image

  2. basicLeafNodes can have a "submitValue" property which maps to context.getSubmittedValue() in the onItemClick eventHandler. But there are no events on the Events tab of the pretty panels. The only way to add that eventHandler is to manually add to the source. I'm not sure where that's configured.

Related to that is that the NavbarRenderer class only expects links as children. So the renderChildren method throws an error when it encounters the eventHandler, writing "Exception occured while rendering Navbar children" to the server console. If the decision is to allow an eventHandler to be added, a check on whether the child is an instanceof com.ibm.xsp.component.xp.XspEventHandler avoids the error, as below.

image

Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
None yet
Projects
None yet
Development

No branches or pull requests

1 participant