Topic
  • 2 replies
  • Latest Post - ‏2012-12-19T14:25:23Z by SystemAdmin
SystemAdmin
SystemAdmin
30895 Posts

Pinned topic Portal SPI layout model controller insert not working

‏2012-12-19T13:42:35Z |
I'm trying to use the Java SPI's to move a portlet from one layout node to another using the LayoutModelController

e.g. a portlet definition node moved to a different LayoutNode using layoutmodelcontroller.confirmInsert(portlet, fromcontainer, tocontainer)

This returns true and there are no errors however the layout model isn't being updated.
Is there anything else I need to do and are the nodes I'm using correct? e.g. the objectid for the portlet is a PORTLET_DEFINITION and the containers are NAVIGATION_NODE
Updated on 2012-12-19T14:25:23Z at 2012-12-19T14:25:23Z by SystemAdmin
  • Mark_Winton
    Mark_Winton
    110 Posts

    Re: Portal SPI layout model controller insert not working

    ‏2012-12-19T14:02:19Z  
    From the javadoc:

    confirmInsert: Indicates if the specified node may be inserted into the location specified by a parent node and a next node.
    Returns: true if the node may be inserted, false otherwise

    From this I'd read that it's only checking that the node can be inserted, not that it has been inserted; there's a separate "insert" method inherited by LayoutModelController which looks like it performs the actual insertion - it's got the same arguments as confirmInsert, so should hopefully be a simple enough code change to try out.
  • SystemAdmin
    SystemAdmin
    30895 Posts

    Re: Portal SPI layout model controller insert not working

    ‏2012-12-19T14:25:23Z  
    From the javadoc:

    confirmInsert: Indicates if the specified node may be inserted into the location specified by a parent node and a next node.
    Returns: true if the node may be inserted, false otherwise

    From this I'd read that it's only checking that the node can be inserted, not that it has been inserted; there's a separate "insert" method inherited by LayoutModelController which looks like it performs the actual insertion - it's got the same arguments as confirmInsert, so should hopefully be a simple enough code change to try out.
    Thanks for the quick reply and apologies I should've said that I'd tried that too...

    However it looks like I needed to republish from RAD during the debug session
    thanks, all good!