Skip to Content
avatar image
Former Member

Table Popin For Model Node

Hi Experts

Im doing a application in which i need to implement the Table Popin for the model Node.

I dont no about the TablePopin so please some one guide me .

Thanks& Regards

Asif

Add comment
10|10000 characters needed characters exceeded

  • Follow
  • Get RSS Feed

3 Answers

  • avatar image
    Former Member
    Sep 13, 2008 at 07:00 AM

    Thanks For the Reply

    But i have a problem while creating with ModelNode because ModelNode wont give accessibilty to add

    additional attributes.so how should i add the addtional attributes say 1.selectedpopin and Cellvariant.

    Thanks & Regards

    Asif

    Add comment
    10|10000 characters needed characters exceeded

    • Former Member Former Member

      Hi Armin

      The Things Are not working fine .i have created a value node with structure binding of type modelnode.

      in that value node i have created the node with cardinality 1:1 and singletone=false.in that i have defined value attribute called selectedPopin and i have binded it to the Table selected popin.

      could you please send the code.and one more thing on selecting the second row the first popin should get hide.

      Thanks&Regards

      Asif

  • avatar image
    Former Member
    Sep 12, 2008 at 08:28 AM

    Hi,

    Check the following links for implementing Table Popin in WDjava hope this will help

    Table Popin with TablePopinToggleCell variant

    https://www.sdn.sap.com/irj/sdn/wiki?path=/display/wdjava/how%2bto%2bimplement%2btablepopin

    Siddharth

    Add comment
    10|10000 characters needed characters exceeded

    • Former Member

      Hi,

      1).Create two value attribute like columnpopin and _tablepopin of type string.

      2)Right click on table and choose inser popin.

      3)Right click on table and insert colum,then right click on newly created column and select insertcellvarient and then TablePopinToggleCell.fill the properties of TablePopinToggleCell there is varient key property write varient.

      4)Bind the newly created column selectedcellvarient property to the value attribute columnpopin.

      5)Bind the table selectedPopin property to the value attribute tablepopin.

      6)create action on popin action propert onclose,with parameter like row of java native type of your tablenode elementlike(com.sap.assi3.wdp.IPrivateAssi3View.ITableElement)

      7)writ the following code in wdmodify

      
       public static void wdDoModifyView(IPrivateAssi3View wdThis, IPrivateAssi3View.IContextNode wdContext, com.sap.tc.webdynpro.progmodel.api.IWDView view, boolean firstTime)
        {
      
      IWDTablePopin tablePopin = (IWDTablePopin) view.getElement("Popin");
      //		   Popin1 is the ID for the table popin.
                tablePopin.mappingOfOnClose().addSourceMapping("nodeElement", "row");
      
      }
      
      
      

      8)write code in onactionclose.

      public void onActionclosepopin(com.sap.tc.webdynpro.progmodel.api.IWDCustomEvent wdEvent, com.sap.assi3.wdp.IPrivateAssi3View.ITableElement row )
        {
          //@@begin onActionclosepopin(ServerEvent)
      	row.setTablepopin("");
          //@@end
        }
      

      9)and in wddoinit()

      tab.setColumpopin("variant");

  • avatar image
    Former Member
    Sep 12, 2008 at 09:07 AM

    hi

    Follwing are the steps to implement table popin

    Also see the link which was sent by siddharth which also have screen shots

    1) Create 2 string attributes in the table source node (let's call it "Items") - one for the Selected popin - "SelectedPopin1",

    another for selected cell variant - "SelectedCellVariant1".

    2) On the Table I right-click and select "Insert Popin"

    Remember id of the popin, you will need it. Let's call it "Popin1".

    3)On the new Popin ("Popin1"), I right-click and select "Insert Textbar". I link the "Textbar" text property to a context value in my table's source node. Let it be popinText

    4)On the Table (which already has 3 data columns), I select "Insert Column"

    5)I rename this column to "Toggle" and move it to the top of the column list. Bind selectedCellVariant property of the column to Items.SelectedCellVariant1

    6) In the "Toggle" column I right-click, choose "Insert CellVariant" and select "TablePopinToggleCell"

    Assign to the variantKey of the TablePopinToggleCell some value, for example - "variant1"

    7)Bind selectedPopin property of the table to "Items.SelectedPopin1" attribute

    8) Add action ShowPopin in the onAction event

    Add the following code to the wdDoModifyView function:

    if (firstTime)

    {

    IWDTablePopinToggleCell myTablePopinToggleCell = (IWDTablePopinToggleCell) view.getElement("TablePopinToggleCell1");

    myTablePopinToggleCell.mappingOfOnToggle().addSourceMapping("nodeElement", "element1");

    }

    "TablePopinToggleCell1" is the ID of the TablePopinToggleCell.

    The parameter nodeElement of the type IWDNodeElement can be used for all events. The parameter nodeElement references to the corresponding node element in the context to

    which the UI element is assigned. - this is from SAP WebDynpro documentation.

    Add parameter "element" of type IPrivate<viewName>.I<nodeName>Element to the onActionShowPopin action

    For example for the veiw "IPrivateTablePopinView" with the context node "Items" the parameter "element" should be of type IPrivateTablePopinView.IItemsElement

    9) Assign onActionShowPopin action to the event "onToggle" of the TablePopinToggleCell.

    public void onActionshowPopin(com.sap.tc.webdynpro.progmodel.api.IWDCustomEvent wdEvent, in.mobileone.www.comp.wdp.IPrivateTablePopinCompView.IItemsElement element1 )

    {

    //@@begin onActionshowPopin(ServerEvent)

    for (int i =0; i < wdContext.nodeItems().size(); i++) {

    IItemsElement itemelement = (IItemsElement)wdContext.nodeItems().getElementAt(i);

    // wdComponentAPI.getMessageManager().reportWarning("when the toggleis clicked "+itemelement);

    // wdComponentAPI.getMessageManager().reportWarning(""+element1);

    //

    if(itemelement.equals(element1)){

    itemelement.setSelectedPopin1("Popin1");

    itemelement.setPopintext(i + "row popin Text is displayed ");

    }

    else {

    itemelement.setSelectedPopin1("");

    }

    }

    //@@end

    }

    10)Add the Following Code in wdinit() method

    for (int i =0; i < wdContext.nodeItems().size(); i++) {

    IItemsElement element = (IItemsElement) wdContext.nodeItems().getElementAt(i);

    element.setSelectedPopin1("");

    element.setSelectedCellVariant1("variant1");

    }

    11) To Colse the Popin

    Declare an action for example OnActionClose and bind it to the EventonClose of a Popin

    Add following code in OnActionClose()

    for (int i =0; i < wdContext.nodeItems().size(); i++) {

    IItemsElement itemelement = (IItemsElement)wdContext.nodeItems().getElementAt(i);

    itemelement.setSelectedPopin1("");

    }

    11)As usual Bind the Table With data .....

    Regards

    Madhavi

    Add comment
    10|10000 characters needed characters exceeded