• Application Layout Control issues with titleBarTabs

    By Roy H Rumaner 1 decade ago

    Can you tell me why the source as viewed in IE 8 (below) is not the same as the source in the actual XPage?

    There is no onClick on the first tab and where there is an onClick, the javascript and the label do not match









    Also, how do I set the selected/unselected background colors in my example

    • You cannot use SSJS this way

      By Philippe Riand 1 decade ago

      The onClick property is for client side JS, and not SSJS. This means that your SSJS is executed when the page is rendered, and then the generated client attribute is the result if your formula, like sessionScope.put("selectedCenter","Ft. Pierce")

      To execute SSJS on the onclick event, you should do 2 things:
      1- Set the submit value of the label node to a unique value
      2- Add on onclick event handler to the application layout object, and add your SSJS there. In your code, you can then check the submitted value to know which node was clicked
      There are a few examples of this in the demo DB

      Again, this is because the nodes are not components and can't have an server event handler assigned to them. Also, the nodes can be generated dynamically, like from a Domino view