EGL Development User Group

EGL Development User Group

EGL Development User Group

The EGL Development User Group is dedicated to sharing news, knowledge, and insights regarding the EGL language and Business Developer product. Consisting of IBMers, HCL, and users, this community collaborates to advance the EGL ecosystem.

 View Only
  • 1.  Disable click event on DojoTitlePane's title

    Posted Tue April 07, 2015 08:18 AM

    Hello, 

    I want to create a box with a title like  DojoTitlePane but without click event on the title .I don't want the contents of dojoTitlePane to be hidden.

    How is this possible?

    Thanks

    michaeldefox


  • 2.  Re: Disable click event on DojoTitlePane's title

    Posted Thu April 09, 2015 04:06 AM

    Another way maybe is to create a title pane similar to dojoTitlePane using just boxes with a title. Can anyone help me with the design?

     

    Thanks

    michaeldefox


  • 3.  Re: Disable click event on DojoTitlePane's title

    Posted Thu April 09, 2015 04:31 AM

    I quickly scrambed something together:

     

    package com.molcy.egl.generalwidgets;import com.ibm.egl.rui.widgets.Div;import egl.ui.rui.Widget;handler testTP type RUIWidget {        targetWidget = alles,                 onConstructionFunction = start,                 cssFile="css/mol_widgets.css",                 @VEWidget{                         category = "Custom",                        container = @VEContainer{}                 }        }        //-------------------------------------------------        // Events        //-------------------------------------------------                //-------------------------------------------------        // Vars        //-------------------------------------------------        title String{@EglProperty};        //-------------------------------------------------        // UI        //-------------------------------------------------        alles Div{                children = [                        headerDiv,                         contentDiv                ]        };                headerDiv Div{                       backgroundColor = "grey"        };        contentDiv Div{                borderStyle = "solid",                 borderwidth = 1,                 bordercolor = "grey"        };        //-------------------------------------------------        // Functions        //-------------------------------------------------        function start()        end             function appendChild(newChild Widget in)  {@Override}                contentDiv.appendChild(newChild);         end        function setChildren(children Widget[] in) {@Override}                contentDiv.setChildren(children);         end        function getChildren() returns(Widget[]) {@Override}                return (contentDiv.getChildren());         end                        function removeChild(child Widget in) {@Override}                contentDiv.removeChild(child);         end                                //-------------------------------------------------        // Getters & Setters        //-------------------------------------------------                // title        function getTitle() returns (String)                return (title);        end        function setTitle(value String in)                title = value;                headerDiv.innerText = title;         end                     end

     

    Bram_Callewaert


  • 4.  Re: Disable click event on DojoTitlePane's title

    Posted Thu April 09, 2015 05:55 AM

    Nice solution!Now that I have created  a new widget I could change the view of headerDiv or the  contentDiv  through div code  in the widget's file or in css file?

    Now for example I'm trying to set padding: 10px; for innerContent of the headerDiv  which is for the title. 

    michaeldefox


  • 5.  Re: Disable click event on DojoTitlePane's title

    Posted Thu April 09, 2015 06:22 AM

    you can set it in the widget's file as it is now.

    If you add a headeclass property on the widget, and create a setter class that puts the headerclass value in the headerdiv's class property, you can set the headerclass externally.

    Bram_Callewaert


  • 6.  Re: Disable click event on DojoTitlePane's title

    Posted Thu April 09, 2015 08:54 AM

    Hi,

    you could use an Accordion Container like this:

     

    package test;

    // RUI Handler

    import com.ibm.egl.rui.widgets.GridLayout;
    import widgets.testTP;
    import com.ibm.egl.rui.widgets.GridLayoutData;
    import dojo.widgets.DojoAccordionContainer;
    import dojo.widgets.DojoContentPane;

    //
    //
    handler test type RUIhandler {initialUI = [ AccordionContainer ],onConstructionFunction = start, cssFile="css/frommclient.css", title="test"}
        
        
        AccordionContainer DojoAccordionContainer{ layoutData = new GridLayoutData{ row = 1, column = 1 },
            width = "165", height = "400", duration = 500, //onTabSelected ::= TabSelected,
            children = [
                new DojoContentPane { title = "Topic 1", children = [
                ] }
            ]
        };

        
        function start()
        end    
    end
     

    Marcel-D