WebSphere Application Server & Liberty

WebSphere Application Server & Liberty

Join this online group to communicate across IBM product users and experts by sharing advice and best practices with peers and staying up to date regarding product enhancements.

 View Only
  • 1.  Accelerator customization for Notebook Kit

    Posted 12/22/11 02:22 AM

    we have requirement to create bundles using Notebook kit where we need to extend the panel to accommodate custom table entries apart from the OOTB.


    So, the question is that we could envision that the command ProductNotebookUpdate being invoked upon submission, however to customize or extend the behaviour with our new command we have been struck up on the approach to be followed. Because, we could see an entry into the struts-config file and no entry found into the command registration table. This actually leaves clueless to move further.


    Appreciate your help!



  • 2.  Accelerator customization for Notebook Kit

    Posted 01/18/12 09:04 AM

    Hi Ranga,



    It is true that entry for ProductNotebookUpdate command does not exist in CMDREG table. But it is not necessary too. You will find an entry for ProductNotebookUpdate action in struts-config.xml file.The command called for this action is
    "com.ibm.commerce.tools.catalog.commands.ProductNotebookUpdate".
    If you will open this command you will find IBM has defined the default class name which will be called against the interface.
    (public static final String defaultCommandClassName =
    "com.ibm.commerce.tools.catalog.commands.
    ProductNotebookUpdateCmdImpl";)

    Now if you want to extend this class then you have to give an entry in CMDREG table. Here you can specify your custom class name which will extend IBM class.CMDREG entry will be:
    (insert into cmdreg (storeent_id, interfacename, description,classname,properties, lastupdate, target) values
    (0,'com.ibm.commerce.tools.catalog.commands.
    ProductNotebookUpdateCmd', null,'Path of Custom
    Implementation class', null, null, 'Local');)

    Preference is always given to CMDREG table entry. And if nothing is found in this table then the there is a search in struts-config-ext.xml file. If entry is not found then there is a search in struts-config.xml file.

    If you are not providing any entry in CMDREG table then you can also provide an entry in struts-config-ext.xml file. Entry will be something like:
    (
    action  parameter="Path of Custom Interface Name"  path="/ProductNotebookUpdate" type="com.ibm.commerce.struts.BaseAction           
    ).
    In this case you will have to write custom class name which will implement the interface provided in the struts-config-ext.xml file.

    Thanks
    Vikas Kumar Singh