{"id":349,"date":"2011-01-20T23:07:00","date_gmt":"2011-01-20T23:07:00","guid":{"rendered":"http:\/\/www.javacodegeeks.com\/2012\/10\/advanced-smartgwt-tutorial-part-2.html"},"modified":"2012-10-21T19:32:58","modified_gmt":"2012-10-21T19:32:58","slug":"advanced-smartgwt-tutorial-part-2","status":"publish","type":"post","link":"https:\/\/www.javacodegeeks.com\/2011\/01\/advanced-smartgwt-tutorial-part-2.html","title":{"rendered":"Advanced SmartGWT Tutorial, Part 2"},"content":{"rendered":"<p>This is the second part of my tutorial regarding rapid UI development with <a href=\"http:\/\/www.javacodegeeks.com\/?tag=smartgwt\">SmartGWT<\/a>. In the <a href=\"http:\/\/www.javacodegeeks.com\/2011\/01\/advanced-smartgwt-tutorial-part-1.html\">first part of the tutorial<\/a>, we created the basic interface layout and added some basic components. It is now time to take it up a notch and use the real power of <a href=\"http:\/\/code.google.com\/p\/smartgwt\/\">SmartGWT<\/a>.<\/p>\n<p>Before we proceed, let&#8217;s remember how the UI we have created so far looks like:<\/p>\n<p><a href=\"http:\/\/3.bp.blogspot.com\/_piNjpdpJZXA\/TTMCXSlwYFI\/AAAAAAAAASM\/ODf1hZgy9yA\/s1600\/00-ui-skeleton.png\"><img decoding=\"async\" alt=\"\" border=\"0\" src=\"http:\/\/3.bp.blogspot.com\/_piNjpdpJZXA\/TTMCXSlwYFI\/AAAAAAAAASM\/ODf1hZgy9yA\/s320\/00-ui-skeleton.png\" style=\"cursor: pointer;height: 158px;margin: 0px auto 10px;text-align: center;width: 320px\" \/><\/a><\/p>\n<p>After we have completed this tutorial, here is what the UI will have transformed into:<\/p>\n<p><a href=\"http:\/\/3.bp.blogspot.com\/_piNjpdpJZXA\/TTMCpV_gNhI\/AAAAAAAAASU\/wS3JAByKSxk\/s1600\/06-whole-ui.png\"><img decoding=\"async\" alt=\"\" border=\"0\" src=\"http:\/\/3.bp.blogspot.com\/_piNjpdpJZXA\/TTMCpV_gNhI\/AAAAAAAAASU\/wS3JAByKSxk\/s320\/06-whole-ui.png\" style=\"cursor: pointer;height: 156px;margin: 0px auto 10px;text-align: center;width: 320px\" \/><\/a><\/p>\n<p>We will have to revisit some of the existing classes in order to define additional functionally to them. Let&#8217;s start with the NavigationArea class. There we used the <a href=\"http:\/\/www.smartclient.com\/smartgwt\/javadoc\/com\/smartgwt\/client\/widgets\/layout\/SectionStack.html\">SectionStack<\/a> class for the creation of an accordion. However, each of the stack sections contained just a plain label. We are going to add something more useful, navigation wise. We will use a tree for the navigation pane, where each leaf will essentially represent an action. For this, we are going to extend the <a href=\"http:\/\/www.smartclient.com\/smartgwt\/javadoc\/com\/smartgwt\/client\/widgets\/tree\/TreeGrid.html\">TreeGrid<\/a> class by defining specific characteristics to out implementation. Hence, here is the \u201cNavigationTreeGrid\u201d class:<\/p>\n<pre class=\"brush:java\">package com.javacodegeeks.smartgwt.appui.client.ui.widgets;\r\n\r\nimport com.smartgwt.client.types.SelectionStyle;\r\nimport com.smartgwt.client.types.TreeModelType;\r\nimport com.smartgwt.client.util.SC;\r\nimport com.smartgwt.client.widgets.tree.Tree;\r\nimport com.smartgwt.client.widgets.tree.TreeGrid;\r\nimport com.smartgwt.client.widgets.tree.TreeNode;\r\nimport com.smartgwt.client.widgets.tree.events.NodeClickEvent;\r\nimport com.smartgwt.client.widgets.tree.events.NodeClickHandler;\r\n\r\npublic class NavigationTreeGrid extends TreeGrid {\r\n    \r\n    public NavigationTreeGrid() {\r\n        \r\n        setNodeIcon(\"arrow_down.png\");  \r\n        setFolderIcon(\"arrow_up.png\");  \r\n        setShowOpenIcons(false);\r\n        setShowDropIcons(false);\r\n        setShowSelectedStyle(true);  \r\n        setShowPartialSelection(true);  \r\n        setCascadeSelection(false);\r\n        setCanSort(false);\r\n        setShowConnectors(true);\r\n        setShowHeader(false);\r\n        setLoadDataOnDemand(false);\r\n        setSelectionType(SelectionStyle.SINGLE);\r\n        \r\n        Tree data = new Tree();\r\n        data.setModelType(TreeModelType.CHILDREN);\r\n        \r\n        data.setRoot(\r\n                new TreeNode(\"root\", \r\n                        new TreeNode(\"File\",\r\n                                new TreeNode(\"FileChild\")), \r\n                        new TreeNode(\"Edit\",\r\n                                new TreeNode(\"EditChild\",\r\n                                        new TreeNode(\"EditGrandChild\"))), \r\n                        new TreeNode(\"Window\"))\r\n        );\r\n\r\n        setData(data);\r\n        \r\n        addNodeClickHandler(new NodeClickHandler() {            \r\n            @Override\r\n            public void onNodeClick(NodeClickEvent event) {\r\n                String name = event.getNode().getName();\r\n                SC.say(\"Node Clicked: \" + name);\r\n            }\r\n        });\r\n        \r\n    }\r\n\r\n}\r\n<\/pre>\n<p>We first define some attributes for our tree, the more important being: <\/p>\n<ul>\n<li><a href=\"http:\/\/www.smartclient.com\/smartgwt\/javadoc\/com\/smartgwt\/client\/widgets\/tree\/TreeGrid.html#setShowConnectors%28java.lang.Boolean%29\">setShowConnectors<\/a>: Defines whether connector lines should be shown, illustrating the tree&#8217;s hierarchy.<\/li>\n<li><a href=\"http:\/\/www.smartclient.com\/smartgwt\/javadoc\/com\/smartgwt\/client\/widgets\/tree\/TreeGrid.html#setClosedIconSuffix%28java.lang.String%29\">setClosedIconSuffix<\/a>: This suffix is appended to the provided icon name and defaults to \u201cclosed\u201d, so you should better use a custom value and override that.<\/li>\n<li><a href=\"http:\/\/www.smartclient.com\/smartgwt\/javadoc\/com\/smartgwt\/client\/widgets\/grid\/ListGrid.html#setSelectionType%28com.smartgwt.client.types.SelectionStyle%29\">setSelectionType<\/a>: Defines a grid&#8217;s clickable-selection behavior, i.e. whether multiple items can be selected at a given time.<\/li>\n<\/ul>\n<p>Additionally, the <a href=\"http:\/\/www.smartclient.com\/smartgwt\/javadoc\/com\/smartgwt\/client\/widgets\/tree\/TreeGrid.html#setNodeIcon%28java.lang.String%29\">setNodeIcon<\/a> and <a href=\"http:\/\/www.smartclient.com\/smartgwt\/javadoc\/com\/smartgwt\/client\/widgets\/tree\/TreeGrid.html#setFolderIcon%28java.lang.String%29\">setFolderIcon<\/a> methods are used for setting the appropriate icon to each node, depending on whether it is a parent or leaf node.<\/p>\n<p>Next we create a <a href=\"http:\/\/www.smartclient.com\/smartgwt\/javadoc\/com\/smartgwt\/client\/widgets\/tree\/Tree.html\">Tree<\/a> instance, which is essentially a data model that represents a set of objects linked into a hierarchy. Each tree node is implemented via the <a href=\"http:\/\/www.smartclient.com\/smartgwt\/javadoc\/com\/smartgwt\/client\/widgets\/tree\/TreeNode.html\">TreeNode<\/a> class and we set the root node by using the <a href=\"http:\/\/www.smartclient.com\/smartgwt\/javadoc\/com\/smartgwt\/client\/widgets\/tree\/Tree.html#setRoot%28com.smartgwt.client.widgets.tree.TreeNode%29\">setRoot<\/a> method. Note that each node can be <a href=\"http:\/\/www.smartclient.com\/smartgwt\/javadoc\/com\/smartgwt\/client\/widgets\/tree\/TreeNode.html#TreeNode%28java.lang.String,%20com.smartgwt.client.widgets.tree.TreeNode...%29\">constructed<\/a> by using a name and an array of objects, thus by adopting a recursive approach we can create the whole tree in one line. Then, we feed the <a href=\"http:\/\/www.smartclient.com\/smartgwt\/javadoc\/com\/smartgwt\/client\/widgets\/tree\/TreeGrid.html\">TreeGrid<\/a> with the data from our <a href=\"http:\/\/www.smartclient.com\/smartgwt\/javadoc\/com\/smartgwt\/client\/widgets\/tree\/Tree.html\">Tree<\/a> using the <a href=\"http:\/\/www.smartclient.com\/smartgwt\/javadoc\/com\/smartgwt\/client\/widgets\/tree\/TreeGrid.html#setData%28com.smartgwt.client.widgets.tree.Tree%29\">setData<\/a> method. Finally, we register a handler for the node click events and implement the <a href=\"http:\/\/www.smartclient.com\/smartgwt\/javadoc\/com\/smartgwt\/client\/widgets\/tree\/events\/NodeClickHandler.html\">NodeClickHandler<\/a> interface by creating a pop-up window showing the name of the node.<div style=\"display:inline-block; margin: 15px 0;\"> <div id=\"adngin-JavaCodeGeeks_incontent_video-0\" style=\"display:inline-block;\"><\/div> <\/div><\/p>\n<p>In order to use our newly created tree, we return to our \u201cNavigationArea\u201d class and change the following lines:<\/p>\n<pre class=\"brush:java\">...\r\nSectionStackSection section1 = new SectionStackSection(\"Section 1\");\r\nsection1.setExpanded(true);\r\nfinal NavigationTreeGrid navigationTreeGrid = new NavigationTreeGrid();\r\nnavigationTreeGrid.setHeight100();\r\nsection1.addItem(navigationTreeGrid);\r\n...\r\n<\/pre>\n<p>Let&#8217;s see how this is changes our interface in the navigation area:<\/p>\n<p><a href=\"http:\/\/4.bp.blogspot.com\/_piNjpdpJZXA\/TTMAKiAMr4I\/AAAAAAAAARc\/14HyT8cGaZ4\/s1600\/01-navigation-tree.png\"><img decoding=\"async\" alt=\"\" border=\"0\" src=\"http:\/\/4.bp.blogspot.com\/_piNjpdpJZXA\/TTMAKiAMr4I\/AAAAAAAAARc\/14HyT8cGaZ4\/s320\/01-navigation-tree.png\" style=\"cursor: pointer;height: 198px;margin: 0px auto 10px;text-align: center;width: 242px\" \/><\/a><\/p>\n<p>When one of the nodes is clicked, a window with the relevant name appears:<\/p>\n<p><a href=\"http:\/\/1.bp.blogspot.com\/_piNjpdpJZXA\/TTMAROFnrWI\/AAAAAAAAARk\/LriN8INlA88\/s1600\/02-window.png\"><img decoding=\"async\" alt=\"\" border=\"0\" src=\"http:\/\/1.bp.blogspot.com\/_piNjpdpJZXA\/TTMAROFnrWI\/AAAAAAAAARk\/LriN8INlA88\/s320\/02-window.png\" style=\"cursor: pointer;height: 95px;margin: 0px auto 10px;text-align: center;width: 320px\" \/><\/a><\/p>\n<p>The next step is to populate the main area which is now pretty much empty. We are going to use tabs for that purpose. The use of tabs is highly preferred since it is very efficient regarding the screen real-estate. By stacking tabs, the user can simultaneously have a lot of panels open and navigate to the preferred one just by clicking on it.<\/p>\n<p>In SmartGWT, the use of tabs is accommodated by the <a href=\"http:\/\/www.smartclient.com\/smartgwt\/javadoc\/com\/smartgwt\/client\/widgets\/tab\/Tab.html\">Tab<\/a> class. In order to render tabs however, those must be grouped in a <a href=\"http:\/\/www.smartclient.com\/smartgwt\/javadoc\/com\/smartgwt\/client\/widgets\/tab\/TabSet.html\">TabSet<\/a>, which allows components on several panes to share the same space. The tabs at the top can be selected by the user to show each pane.<\/p>\n<p>We are now going to revisit the \u201cMainArea\u201d class and add three different tab panes in it. The first one will just hold arbitrary HTML elements, the second will have a menu attached to it and the third will hold a custom vertical accordion. Let&#8217;s see how this is done:<\/p>\n<pre class=\"brush:java\">package com.javacodegeeks.smartgwt.appui.client.ui;\r\n\r\nimport com.javacodegeeks.smartgwt.appui.client.ui.widgets.CustomAccordion;\r\nimport com.smartgwt.client.types.Overflow;\r\nimport com.smartgwt.client.types.Side;\r\nimport com.smartgwt.client.widgets.Canvas;\r\nimport com.smartgwt.client.widgets.HTMLFlow;\r\nimport com.smartgwt.client.widgets.layout.VLayout;\r\nimport com.smartgwt.client.widgets.menu.Menu;\r\nimport com.smartgwt.client.widgets.menu.MenuItem;\r\nimport com.smartgwt.client.widgets.tab.Tab;\r\nimport com.smartgwt.client.widgets.tab.TabSet;\r\nimport com.smartgwt.client.widgets.toolbar.ToolStrip;\r\nimport com.smartgwt.client.widgets.toolbar.ToolStripButton;\r\nimport com.smartgwt.client.widgets.toolbar.ToolStripMenuButton;\r\n\r\npublic class MainArea extends VLayout {\r\n\r\n    final TabSet topTabSet = new TabSet();\r\n\r\n    public MainArea() {\r\n        \r\n        super();\r\n        this.setOverflow(Overflow.HIDDEN);\r\n        \r\n        topTabSet.setTabBarPosition(Side.TOP);  \r\n        topTabSet.setTabBarAlign(Side.LEFT);\r\n        \r\n        ToolStrip toolStrip = new ToolStrip();\r\n        toolStrip.setWidth100();\r\n        \r\n        ToolStripButton iconButton = new ToolStripButton();\r\n        iconButton.setTitle(\"MyButton\");\r\n        toolStrip.addButton(iconButton);        \r\n        \r\n        MenuItem[] itemArray = new MenuItem[4];\r\n\r\n        itemArray[0] = new MenuItem(\"MenuItem1\");\r\n        Menu menu1 = new Menu();\r\n        menu1.setData(new MenuItem(\"SubMenuItem11\"), new MenuItem(\"SubMenuItem12\"));\r\n        itemArray[0].setSubmenu(menu1);\r\n\r\n        itemArray[1] = new MenuItem(\"MenuItem2\");\r\n        Menu menu2 = new Menu();\r\n        menu2.setData(new MenuItem(\"SubMenuItem21\"), new MenuItem(\"SubMenuItem22\"));\r\n        itemArray[1].setSubmenu(menu2);\r\n        \r\n        Menu parentMenu = new Menu();  \r\n        parentMenu.setCanSelectParentItems(true);  \r\n        parentMenu.setData(itemArray);\r\n        \r\n        ToolStripMenuButton menuButton = \r\n             new ToolStripMenuButton(\"Menu\", parentMenu);\r\n        toolStrip.addMenuButton(menuButton);\r\n        \r\n        VLayout hlayout = new VLayout();\r\n        hlayout.addMember(toolStrip);\r\n        hlayout.addMember(new HTMLFlow(\"Tab3\"));\r\n        \r\n        addTabToTopTabset(\"Tab1\", new HTMLFlow(\"Tab1\"), true);\r\n        addTabToTopTabset(\"Tab2\", hlayout, true);        \r\n        addTabToTopTabset(\"Tab3\", new CustomAccordion(), true);\r\n        \r\n        this.addMember(topTabSet);\r\n        \r\n    }\r\n    \r\n    private void addTabToTopTabset(String title, Canvas pane, boolean closable) {\r\n        Tab tab = createTab(title, pane, closable);\r\n        topTabSet.addTab(tab);\r\n        topTabSet.selectTab(tab);\r\n    }\r\n    \r\n    private Tab createTab(String title, Canvas pane, boolean closable) {\r\n        Tab tab = new Tab(title);\r\n        tab.setCanClose(closable);\r\n        tab.setPane(pane);\r\n        return tab;\r\n    }\r\n    \r\n}\r\n<\/pre>\n<p>Things to note here. First, we use a <a href=\"http:\/\/www.smartclient.com\/smartgwt\/javadoc\/com\/smartgwt\/client\/widgets\/toolbar\/ToolStrip.html\">ToolStrip<\/a>, which is actually a strip to which various widgets (buttons, menus etc.) can be attached. Specific classes can only be added to a tool strip. For example, if you want to add a button, you have to create a <a href=\"http:\/\/www.smartclient.com\/smartgwt\/javadoc\/com\/smartgwt\/client\/widgets\/toolbar\/ToolStripButton.html\">ToolStripButton<\/a> instance. Similarly, a whole <a href=\"http:\/\/www.smartclient.com\/smartgwt\/javadoc\/com\/smartgwt\/client\/widgets\/menu\/Menu.html\">Menu<\/a> can be attached to it. After we create an instance of the menu class, we use the <a href=\"http:\/\/www.smartclient.com\/smartgwt\/javadoc\/com\/smartgwt\/client\/widgets\/menu\/MenuItem.html\">MenuItem<\/a> class to add components to it. Finally, the menu is encapsulated to a <a href=\"http:\/\/www.smartclient.com\/smartgwt\/javadoc\/com\/smartgwt\/client\/widgets\/toolbar\/ToolStripMenuButton.html\">ToolStripMenuButton<\/a> and then it is finally added to the tool strip.<\/p>\n<p>Regarding tabs, the API is very simple. We use the <a href=\"http:\/\/www.smartclient.com\/smartgwt\/javadoc\/com\/smartgwt\/client\/widgets\/tab\/TabSet.html#addTab%28com.smartgwt.client.widgets.tab.Tab%29\">addTab<\/a> method of the <a href=\"http:\/\/www.smartclient.com\/smartgwt\/javadoc\/com\/smartgwt\/client\/widgets\/tab\/TabSet.html\">TabSet<\/a> class to add new tabs and the <a href=\"http:\/\/www.smartclient.com\/smartgwt\/javadoc\/com\/smartgwt\/client\/widgets\/tab\/TabSet.html#selectTab%28int%29\">selectTab<\/a> method in order to select a specific tab. On the tab itself, we can use the <a href=\"http:\/\/www.smartclient.com\/smartgwt\/javadoc\/com\/smartgwt\/client\/widgets\/tab\/Tab.html#setPane%28com.smartgwt.client.widgets.Canvas%29\">setPane<\/a> method to specify the pane associated with the specific tab. To determine whether the tab should provide an icon for closing itself, the <a href=\"http:\/\/www.smartclient.com\/smartgwt\/javadoc\/com\/smartgwt\/client\/widgets\/tab\/Tab.html#setCanClose%28java.lang.Boolean%29\">setCanClose<\/a> method is used.<\/p>\n<p>Finally, lets see the \u201cCustomAccordion\u201d class which is basically a vertical accordion.<\/p>\n<pre class=\"brush:java\">package com.javacodegeeks.smartgwt.appui.client.ui.widgets;\r\n\r\nimport com.smartgwt.client.types.Overflow;\r\nimport com.smartgwt.client.types.VisibilityMode;\r\nimport com.smartgwt.client.widgets.HTMLFlow;\r\nimport com.smartgwt.client.widgets.layout.SectionStack;\r\nimport com.smartgwt.client.widgets.layout.SectionStackSection;\r\n\r\npublic class CustomAccordion extends SectionStack {\r\n \r\n public CustomAccordion() {\r\n  \r\n     this.setWidth100();\r\n     this.setVisibilityMode(VisibilityMode.MUTEX);\r\n     this.setShowExpandControls(false);\r\n     this.setAnimateSections(true);\r\n     \r\n     SectionStackSection section1 = new SectionStackSection(\"TabSection1\"); \r\n     section1.setExpanded(true); \r\n     HTMLFlow htmlFlow1 = new HTMLFlow();  \r\n     htmlFlow1.setOverflow(Overflow.AUTO);  \r\n     htmlFlow1.setPadding(10);  \r\n     htmlFlow1.setContents(\"TabSection1\");     \r\n     section1.addItem(htmlFlow1);\r\n     \r\n     SectionStackSection section2 = new SectionStackSection(\"TabSection2\");  \r\n     section2.setExpanded(false);  \r\n     HTMLFlow htmlFlow2 = new HTMLFlow();  \r\n     htmlFlow2.setOverflow(Overflow.AUTO);  \r\n     htmlFlow2.setPadding(10);  \r\n     htmlFlow2.setContents(\"TabSection2\");  \r\n     section2.addItem(htmlFlow2);\r\n     \r\n     SectionStackSection section3 = new SectionStackSection(\"TabSection3\");  \r\n     section3.setExpanded(false);\r\n     HTMLFlow htmlFlow3 = new HTMLFlow();  \r\n     htmlFlow3.setOverflow(Overflow.AUTO);  \r\n     htmlFlow3.setPadding(10);  \r\n     htmlFlow3.setContents(\"TabSection3\");    \r\n     section3.addItem(htmlFlow3);\r\n     \r\n     this.addSection(section1);  \r\n     this.addSection(section2);  \r\n     this.addSection(section3);\r\n  \r\n }\r\n\r\n}\r\n<\/pre>\n<p>Nothing we haven&#8217;t seen before, we use the <a href=\"http:\/\/www.smartclient.com\/smartgwt\/javadoc\/com\/smartgwt\/client\/widgets\/layout\/SectionStack.html\">SectionStack<\/a> class to create the accordion and add <a href=\"http:\/\/www.smartclient.com\/smartgwt\/javadoc\/com\/smartgwt\/client\/widgets\/layout\/SectionStackSection.html\">SectionStackSection<\/a>s to it. The <a href=\"http:\/\/www.smartclient.com\/smartgwt\/javadoc\/com\/smartgwt\/client\/widgets\/HTMLFlow.html\">HTMLFlow<\/a> class is used for displaying HTML content that should expand to its natural size without scrolling.<\/p>\n<p>Launch the Eclipse configuration and point the browser to the provided URL:<\/p>\n<p><a href=\"http:\/\/127.0.0.1:8888\/AwesomeSmartGWTUIProject.html?gwt.codesvr=127.0.0.1:9997\">http:\/\/127.0.0.1:8888\/AwesomeSmartGWTUIProject.html?gwt.codesvr=127.0.0.1:9997<\/a><\/p>\n<p>Let&#8217;s now see how each of the tab looks like:<\/p>\n<p>* Tab1: Very plain and simple.<\/p>\n<p><a href=\"http:\/\/1.bp.blogspot.com\/_piNjpdpJZXA\/TTMBZKev0mI\/AAAAAAAAARs\/8AKGJeokh94\/s1600\/03-tab1.png\"><img decoding=\"async\" alt=\"\" border=\"0\" src=\"http:\/\/1.bp.blogspot.com\/_piNjpdpJZXA\/TTMBZKev0mI\/AAAAAAAAARs\/8AKGJeokh94\/s320\/03-tab1.png\" style=\"cursor: pointer;height: 115px;margin: 0px auto 10px;text-align: center;width: 320px\" \/><\/a><\/p>\n<p>* Tab2: This tab contains a tool strip with a button and a menu attached to it.<\/p>\n<p><a href=\"http:\/\/3.bp.blogspot.com\/_piNjpdpJZXA\/TTMBe4MK8GI\/AAAAAAAAAR0\/0gTobCyIbg4\/s1600\/04-tab2.png\"><img decoding=\"async\" alt=\"\" border=\"0\" src=\"http:\/\/3.bp.blogspot.com\/_piNjpdpJZXA\/TTMBe4MK8GI\/AAAAAAAAAR0\/0gTobCyIbg4\/s320\/04-tab2.png\" style=\"cursor: pointer;height: 115px;margin: 0px auto 10px;text-align: center;width: 320px\" \/><\/a><\/p>\n<p>*Tab3: This tab encloses a vertical accordion with three separate sections.<\/p>\n<p><a href=\"http:\/\/1.bp.blogspot.com\/_piNjpdpJZXA\/TTMBlnX1iLI\/AAAAAAAAAR8\/2PrBU9O2zXA\/s1600\/05-tab3.png\"><img decoding=\"async\" alt=\"\" border=\"0\" src=\"http:\/\/1.bp.blogspot.com\/_piNjpdpJZXA\/TTMBlnX1iLI\/AAAAAAAAAR8\/2PrBU9O2zXA\/s320\/05-tab3.png\" style=\"cursor: pointer;height: 153px;margin: 0px auto 10px;text-align: center;width: 320px\" \/><\/a><\/p>\n<p>And this is what the whole user interface looks like:<\/p>\n<p><a href=\"http:\/\/2.bp.blogspot.com\/_piNjpdpJZXA\/TTMBtPwINYI\/AAAAAAAAASE\/y9mIhiKj8rA\/s1600\/06-whole-ui.png\"><img decoding=\"async\" alt=\"\" border=\"0\" src=\"http:\/\/2.bp.blogspot.com\/_piNjpdpJZXA\/TTMBtPwINYI\/AAAAAAAAASE\/y9mIhiKj8rA\/s320\/06-whole-ui.png\" style=\"cursor: pointer;height: 156px;margin: 0px auto 10px;text-align: center;width: 320px\" \/><\/a><\/p>\n<p>We have come to the end of this tutorial, so let&#8217;s revisit what we have done. First, we created the main layout of the UI by defining specific areas and adding the corresponding sub-layouts. Each sub-layout was processed separately. For the header area, we added the application&#8217;s logo on the left side and the logged in user&#8217;s name on the right. For the navigation area, we used an accordion which enclosed a tree in one of its sections. The tree can have an arbitrary number of children, grandchildren etc., but you should not go overboard with it. Finally, for the main layout, we used tabs in order to exploit the screen area to its fullest. Three predefined tabs were created, each one containing various widgets. Note that the navigation pane should be linked to the main area. This can be accomplished by creating a new tab whenever the user clicks on one of the tree leafs.<\/p>\n<p>That&#8217;s all guys. You can find <a href=\"http:\/\/dl.dropbox.com\/u\/7215751\/JavaCodeGeeks\/SmartGWTAdvancedTutorialPart2\/AwesomeSmartGWTUIProject_Part2.zip\">here<\/a> the final Eclipse project created. If you enjoyed this, don&#8217;t forget to share! Cheers!<\/p>\n<div style=\"margin: 0px\"><strong><i>Related Articles :<\/i><\/strong><\/div>\n<ul>\n<li><a href=\"http:\/\/www.javacodegeeks.com\/2011\/01\/advanced-smartgwt-tutorial-part-1.html\">Advanced SmartGWT Tutorial, Part 1<\/a><\/li>\n<li><a href=\"http:\/\/www.javacodegeeks.com\/2010\/06\/getting-started-smartgwt-gwt-interfaces.html\">Getting Started with SmartGWT for awesome GWT interfaces<\/a><\/li>\n<li><a href=\"http:\/\/www.javacodegeeks.com\/2010\/07\/add-json-gwt-application.html\">Add JSON capabilities into your GWT application<\/a><\/li>\n<li><a href=\"http:\/\/www.javacodegeeks.com\/2010\/07\/building-your-own-gwt-spring-manen.html\">Building your own GWT Spring Maven Archetype<\/a><\/li>\n<li><a href=\"http:\/\/www.javacodegeeks.com\/2010\/06\/add-captcha-gwt-application.html\">Adding CAPTCHA to your GWT application<\/a><\/li>\n<li><a href=\"http:\/\/www.javacodegeeks.com\/2010\/06\/gwt-spring-and-hibernate-enter-world-of.html\">GWT Spring and Hibernate enter the world of Data Grids<\/a><\/li>\n<\/ul>\n","protected":false},"excerpt":{"rendered":"<p>This is the second part of my tutorial regarding rapid UI development with SmartGWT. In the first part of the tutorial, we created the basic interface layout and added some basic components. It is now time to take it up a notch and use the real power of SmartGWT. Before we proceed, let&#8217;s remember how &hellip;<\/p>\n","protected":false},"author":3,"featured_media":125,"comment_status":"open","ping_status":"closed","sticky":false,"template":"","format":"standard","meta":{"footnotes":""},"categories":[8],"tags":[27,62],"class_list":["post-349","post","type-post","status-publish","format-standard","has-post-thumbnail","hentry","category-enterprise-java","tag-google-gwt","tag-smartgwt"],"yoast_head":"<!-- This site is optimized with the Yoast SEO plugin v27.5 - https:\/\/yoast.com\/product\/yoast-seo-wordpress\/ -->\n<title>Advanced SmartGWT Tutorial, Part 2 - Java Code Geeks<\/title>\n<meta name=\"description\" content=\"This is the second part of my tutorial regarding rapid UI development with SmartGWT. In the first part of the tutorial, we created the basic interface\" \/>\n<meta name=\"robots\" content=\"index, follow, max-snippet:-1, max-image-preview:large, max-video-preview:-1\" \/>\n<link rel=\"canonical\" href=\"https:\/\/www.javacodegeeks.com\/2011\/01\/advanced-smartgwt-tutorial-part-2.html\" \/>\n<meta property=\"og:locale\" content=\"en_US\" \/>\n<meta property=\"og:type\" content=\"article\" \/>\n<meta property=\"og:title\" content=\"Advanced SmartGWT Tutorial, Part 2 - Java Code Geeks\" \/>\n<meta property=\"og:description\" content=\"This is the second part of my tutorial regarding rapid UI development with SmartGWT. In the first part of the tutorial, we created the basic interface\" \/>\n<meta property=\"og:url\" content=\"https:\/\/www.javacodegeeks.com\/2011\/01\/advanced-smartgwt-tutorial-part-2.html\" \/>\n<meta property=\"og:site_name\" content=\"Java Code Geeks\" \/>\n<meta property=\"article:publisher\" content=\"https:\/\/www.facebook.com\/javacodegeeks\" \/>\n<meta property=\"article:published_time\" content=\"2011-01-20T23:07:00+00:00\" \/>\n<meta property=\"article:modified_time\" content=\"2012-10-21T19:32:58+00:00\" \/>\n<meta property=\"og:image\" content=\"https:\/\/www.javacodegeeks.com\/wp-content\/uploads\/2012\/10\/google-gwt-logo.jpg\" \/>\n\t<meta property=\"og:image:width\" content=\"150\" \/>\n\t<meta property=\"og:image:height\" content=\"150\" \/>\n\t<meta property=\"og:image:type\" content=\"image\/jpeg\" \/>\n<meta name=\"author\" content=\"Ilias Tsagklis\" \/>\n<meta name=\"twitter:card\" content=\"summary_large_image\" \/>\n<meta name=\"twitter:creator\" content=\"@javacodegeeks\" \/>\n<meta name=\"twitter:site\" content=\"@javacodegeeks\" \/>\n<meta name=\"twitter:label1\" content=\"Written by\" \/>\n\t<meta name=\"twitter:data1\" content=\"Ilias Tsagklis\" \/>\n\t<meta name=\"twitter:label2\" content=\"Est. reading time\" \/>\n\t<meta name=\"twitter:data2\" content=\"8 minutes\" \/>\n<script type=\"application\/ld+json\" class=\"yoast-schema-graph\">{\"@context\":\"https:\\\/\\\/schema.org\",\"@graph\":[{\"@type\":\"Article\",\"@id\":\"https:\\\/\\\/www.javacodegeeks.com\\\/2011\\\/01\\\/advanced-smartgwt-tutorial-part-2.html#article\",\"isPartOf\":{\"@id\":\"https:\\\/\\\/www.javacodegeeks.com\\\/2011\\\/01\\\/advanced-smartgwt-tutorial-part-2.html\"},\"author\":{\"name\":\"Ilias Tsagklis\",\"@id\":\"https:\\\/\\\/www.javacodegeeks.com\\\/#\\\/schema\\\/person\\\/9a83496b285d30c61e8a674625c1350e\"},\"headline\":\"Advanced SmartGWT Tutorial, Part 2\",\"datePublished\":\"2011-01-20T23:07:00+00:00\",\"dateModified\":\"2012-10-21T19:32:58+00:00\",\"mainEntityOfPage\":{\"@id\":\"https:\\\/\\\/www.javacodegeeks.com\\\/2011\\\/01\\\/advanced-smartgwt-tutorial-part-2.html\"},\"wordCount\":1112,\"commentCount\":2,\"publisher\":{\"@id\":\"https:\\\/\\\/www.javacodegeeks.com\\\/#organization\"},\"image\":{\"@id\":\"https:\\\/\\\/www.javacodegeeks.com\\\/2011\\\/01\\\/advanced-smartgwt-tutorial-part-2.html#primaryimage\"},\"thumbnailUrl\":\"https:\\\/\\\/www.javacodegeeks.com\\\/wp-content\\\/uploads\\\/2012\\\/10\\\/google-gwt-logo.jpg\",\"keywords\":[\"Google GWT\",\"SmartGWT\"],\"articleSection\":[\"Enterprise Java\"],\"inLanguage\":\"en-US\",\"potentialAction\":[{\"@type\":\"CommentAction\",\"name\":\"Comment\",\"target\":[\"https:\\\/\\\/www.javacodegeeks.com\\\/2011\\\/01\\\/advanced-smartgwt-tutorial-part-2.html#respond\"]}]},{\"@type\":\"WebPage\",\"@id\":\"https:\\\/\\\/www.javacodegeeks.com\\\/2011\\\/01\\\/advanced-smartgwt-tutorial-part-2.html\",\"url\":\"https:\\\/\\\/www.javacodegeeks.com\\\/2011\\\/01\\\/advanced-smartgwt-tutorial-part-2.html\",\"name\":\"Advanced SmartGWT Tutorial, Part 2 - Java Code Geeks\",\"isPartOf\":{\"@id\":\"https:\\\/\\\/www.javacodegeeks.com\\\/#website\"},\"primaryImageOfPage\":{\"@id\":\"https:\\\/\\\/www.javacodegeeks.com\\\/2011\\\/01\\\/advanced-smartgwt-tutorial-part-2.html#primaryimage\"},\"image\":{\"@id\":\"https:\\\/\\\/www.javacodegeeks.com\\\/2011\\\/01\\\/advanced-smartgwt-tutorial-part-2.html#primaryimage\"},\"thumbnailUrl\":\"https:\\\/\\\/www.javacodegeeks.com\\\/wp-content\\\/uploads\\\/2012\\\/10\\\/google-gwt-logo.jpg\",\"datePublished\":\"2011-01-20T23:07:00+00:00\",\"dateModified\":\"2012-10-21T19:32:58+00:00\",\"description\":\"This is the second part of my tutorial regarding rapid UI development with SmartGWT. In the first part of the tutorial, we created the basic interface\",\"breadcrumb\":{\"@id\":\"https:\\\/\\\/www.javacodegeeks.com\\\/2011\\\/01\\\/advanced-smartgwt-tutorial-part-2.html#breadcrumb\"},\"inLanguage\":\"en-US\",\"potentialAction\":[{\"@type\":\"ReadAction\",\"target\":[\"https:\\\/\\\/www.javacodegeeks.com\\\/2011\\\/01\\\/advanced-smartgwt-tutorial-part-2.html\"]}]},{\"@type\":\"ImageObject\",\"inLanguage\":\"en-US\",\"@id\":\"https:\\\/\\\/www.javacodegeeks.com\\\/2011\\\/01\\\/advanced-smartgwt-tutorial-part-2.html#primaryimage\",\"url\":\"https:\\\/\\\/www.javacodegeeks.com\\\/wp-content\\\/uploads\\\/2012\\\/10\\\/google-gwt-logo.jpg\",\"contentUrl\":\"https:\\\/\\\/www.javacodegeeks.com\\\/wp-content\\\/uploads\\\/2012\\\/10\\\/google-gwt-logo.jpg\",\"width\":150,\"height\":150},{\"@type\":\"BreadcrumbList\",\"@id\":\"https:\\\/\\\/www.javacodegeeks.com\\\/2011\\\/01\\\/advanced-smartgwt-tutorial-part-2.html#breadcrumb\",\"itemListElement\":[{\"@type\":\"ListItem\",\"position\":1,\"name\":\"Home\",\"item\":\"https:\\\/\\\/www.javacodegeeks.com\\\/\"},{\"@type\":\"ListItem\",\"position\":2,\"name\":\"Java\",\"item\":\"https:\\\/\\\/www.javacodegeeks.com\\\/category\\\/java\"},{\"@type\":\"ListItem\",\"position\":3,\"name\":\"Enterprise Java\",\"item\":\"https:\\\/\\\/www.javacodegeeks.com\\\/category\\\/java\\\/enterprise-java\"},{\"@type\":\"ListItem\",\"position\":4,\"name\":\"Advanced SmartGWT Tutorial, Part 2\"}]},{\"@type\":\"WebSite\",\"@id\":\"https:\\\/\\\/www.javacodegeeks.com\\\/#website\",\"url\":\"https:\\\/\\\/www.javacodegeeks.com\\\/\",\"name\":\"Java Code Geeks\",\"description\":\"Java Developers Resource Center\",\"publisher\":{\"@id\":\"https:\\\/\\\/www.javacodegeeks.com\\\/#organization\"},\"alternateName\":\"JCG\",\"potentialAction\":[{\"@type\":\"SearchAction\",\"target\":{\"@type\":\"EntryPoint\",\"urlTemplate\":\"https:\\\/\\\/www.javacodegeeks.com\\\/?s={search_term_string}\"},\"query-input\":{\"@type\":\"PropertyValueSpecification\",\"valueRequired\":true,\"valueName\":\"search_term_string\"}}],\"inLanguage\":\"en-US\"},{\"@type\":\"Organization\",\"@id\":\"https:\\\/\\\/www.javacodegeeks.com\\\/#organization\",\"name\":\"Exelixis Media P.C.\",\"url\":\"https:\\\/\\\/www.javacodegeeks.com\\\/\",\"logo\":{\"@type\":\"ImageObject\",\"inLanguage\":\"en-US\",\"@id\":\"https:\\\/\\\/www.javacodegeeks.com\\\/#\\\/schema\\\/logo\\\/image\\\/\",\"url\":\"https:\\\/\\\/www.javacodegeeks.com\\\/wp-content\\\/uploads\\\/2022\\\/06\\\/exelixis-logo.png\",\"contentUrl\":\"https:\\\/\\\/www.javacodegeeks.com\\\/wp-content\\\/uploads\\\/2022\\\/06\\\/exelixis-logo.png\",\"width\":864,\"height\":246,\"caption\":\"Exelixis Media P.C.\"},\"image\":{\"@id\":\"https:\\\/\\\/www.javacodegeeks.com\\\/#\\\/schema\\\/logo\\\/image\\\/\"},\"sameAs\":[\"https:\\\/\\\/www.facebook.com\\\/javacodegeeks\",\"https:\\\/\\\/x.com\\\/javacodegeeks\"]},{\"@type\":\"Person\",\"@id\":\"https:\\\/\\\/www.javacodegeeks.com\\\/#\\\/schema\\\/person\\\/9a83496b285d30c61e8a674625c1350e\",\"name\":\"Ilias Tsagklis\",\"image\":{\"@type\":\"ImageObject\",\"inLanguage\":\"en-US\",\"@id\":\"https:\\\/\\\/secure.gravatar.com\\\/avatar\\\/43505f28bb49f6e290c24be0b209ccc1af350f0f6587025ffd4847ef44bf6b78?s=96&d=mm&r=g\",\"url\":\"https:\\\/\\\/secure.gravatar.com\\\/avatar\\\/43505f28bb49f6e290c24be0b209ccc1af350f0f6587025ffd4847ef44bf6b78?s=96&d=mm&r=g\",\"contentUrl\":\"https:\\\/\\\/secure.gravatar.com\\\/avatar\\\/43505f28bb49f6e290c24be0b209ccc1af350f0f6587025ffd4847ef44bf6b78?s=96&d=mm&r=g\",\"caption\":\"Ilias Tsagklis\"},\"description\":\"Ilias is a software developer turned online entrepreneur. He is co-founder and Executive Editor at Java Code Geeks.\",\"sameAs\":[\"http:\\\/\\\/www.iliastsagklis.com\\\/\",\"https:\\\/\\\/www.linkedin.com\\\/in\\\/iliastsagklis\"],\"url\":\"https:\\\/\\\/www.javacodegeeks.com\\\/author\\\/ilias-tsagklis\"}]}<\/script>\n<!-- \/ Yoast SEO plugin. -->","yoast_head_json":{"title":"Advanced SmartGWT Tutorial, Part 2 - Java Code Geeks","description":"This is the second part of my tutorial regarding rapid UI development with SmartGWT. In the first part of the tutorial, we created the basic interface","robots":{"index":"index","follow":"follow","max-snippet":"max-snippet:-1","max-image-preview":"max-image-preview:large","max-video-preview":"max-video-preview:-1"},"canonical":"https:\/\/www.javacodegeeks.com\/2011\/01\/advanced-smartgwt-tutorial-part-2.html","og_locale":"en_US","og_type":"article","og_title":"Advanced SmartGWT Tutorial, Part 2 - Java Code Geeks","og_description":"This is the second part of my tutorial regarding rapid UI development with SmartGWT. In the first part of the tutorial, we created the basic interface","og_url":"https:\/\/www.javacodegeeks.com\/2011\/01\/advanced-smartgwt-tutorial-part-2.html","og_site_name":"Java Code Geeks","article_publisher":"https:\/\/www.facebook.com\/javacodegeeks","article_published_time":"2011-01-20T23:07:00+00:00","article_modified_time":"2012-10-21T19:32:58+00:00","og_image":[{"width":150,"height":150,"url":"https:\/\/www.javacodegeeks.com\/wp-content\/uploads\/2012\/10\/google-gwt-logo.jpg","type":"image\/jpeg"}],"author":"Ilias Tsagklis","twitter_card":"summary_large_image","twitter_creator":"@javacodegeeks","twitter_site":"@javacodegeeks","twitter_misc":{"Written by":"Ilias Tsagklis","Est. reading time":"8 minutes"},"schema":{"@context":"https:\/\/schema.org","@graph":[{"@type":"Article","@id":"https:\/\/www.javacodegeeks.com\/2011\/01\/advanced-smartgwt-tutorial-part-2.html#article","isPartOf":{"@id":"https:\/\/www.javacodegeeks.com\/2011\/01\/advanced-smartgwt-tutorial-part-2.html"},"author":{"name":"Ilias Tsagklis","@id":"https:\/\/www.javacodegeeks.com\/#\/schema\/person\/9a83496b285d30c61e8a674625c1350e"},"headline":"Advanced SmartGWT Tutorial, Part 2","datePublished":"2011-01-20T23:07:00+00:00","dateModified":"2012-10-21T19:32:58+00:00","mainEntityOfPage":{"@id":"https:\/\/www.javacodegeeks.com\/2011\/01\/advanced-smartgwt-tutorial-part-2.html"},"wordCount":1112,"commentCount":2,"publisher":{"@id":"https:\/\/www.javacodegeeks.com\/#organization"},"image":{"@id":"https:\/\/www.javacodegeeks.com\/2011\/01\/advanced-smartgwt-tutorial-part-2.html#primaryimage"},"thumbnailUrl":"https:\/\/www.javacodegeeks.com\/wp-content\/uploads\/2012\/10\/google-gwt-logo.jpg","keywords":["Google GWT","SmartGWT"],"articleSection":["Enterprise Java"],"inLanguage":"en-US","potentialAction":[{"@type":"CommentAction","name":"Comment","target":["https:\/\/www.javacodegeeks.com\/2011\/01\/advanced-smartgwt-tutorial-part-2.html#respond"]}]},{"@type":"WebPage","@id":"https:\/\/www.javacodegeeks.com\/2011\/01\/advanced-smartgwt-tutorial-part-2.html","url":"https:\/\/www.javacodegeeks.com\/2011\/01\/advanced-smartgwt-tutorial-part-2.html","name":"Advanced SmartGWT Tutorial, Part 2 - Java Code Geeks","isPartOf":{"@id":"https:\/\/www.javacodegeeks.com\/#website"},"primaryImageOfPage":{"@id":"https:\/\/www.javacodegeeks.com\/2011\/01\/advanced-smartgwt-tutorial-part-2.html#primaryimage"},"image":{"@id":"https:\/\/www.javacodegeeks.com\/2011\/01\/advanced-smartgwt-tutorial-part-2.html#primaryimage"},"thumbnailUrl":"https:\/\/www.javacodegeeks.com\/wp-content\/uploads\/2012\/10\/google-gwt-logo.jpg","datePublished":"2011-01-20T23:07:00+00:00","dateModified":"2012-10-21T19:32:58+00:00","description":"This is the second part of my tutorial regarding rapid UI development with SmartGWT. In the first part of the tutorial, we created the basic interface","breadcrumb":{"@id":"https:\/\/www.javacodegeeks.com\/2011\/01\/advanced-smartgwt-tutorial-part-2.html#breadcrumb"},"inLanguage":"en-US","potentialAction":[{"@type":"ReadAction","target":["https:\/\/www.javacodegeeks.com\/2011\/01\/advanced-smartgwt-tutorial-part-2.html"]}]},{"@type":"ImageObject","inLanguage":"en-US","@id":"https:\/\/www.javacodegeeks.com\/2011\/01\/advanced-smartgwt-tutorial-part-2.html#primaryimage","url":"https:\/\/www.javacodegeeks.com\/wp-content\/uploads\/2012\/10\/google-gwt-logo.jpg","contentUrl":"https:\/\/www.javacodegeeks.com\/wp-content\/uploads\/2012\/10\/google-gwt-logo.jpg","width":150,"height":150},{"@type":"BreadcrumbList","@id":"https:\/\/www.javacodegeeks.com\/2011\/01\/advanced-smartgwt-tutorial-part-2.html#breadcrumb","itemListElement":[{"@type":"ListItem","position":1,"name":"Home","item":"https:\/\/www.javacodegeeks.com\/"},{"@type":"ListItem","position":2,"name":"Java","item":"https:\/\/www.javacodegeeks.com\/category\/java"},{"@type":"ListItem","position":3,"name":"Enterprise Java","item":"https:\/\/www.javacodegeeks.com\/category\/java\/enterprise-java"},{"@type":"ListItem","position":4,"name":"Advanced SmartGWT Tutorial, Part 2"}]},{"@type":"WebSite","@id":"https:\/\/www.javacodegeeks.com\/#website","url":"https:\/\/www.javacodegeeks.com\/","name":"Java Code Geeks","description":"Java Developers Resource Center","publisher":{"@id":"https:\/\/www.javacodegeeks.com\/#organization"},"alternateName":"JCG","potentialAction":[{"@type":"SearchAction","target":{"@type":"EntryPoint","urlTemplate":"https:\/\/www.javacodegeeks.com\/?s={search_term_string}"},"query-input":{"@type":"PropertyValueSpecification","valueRequired":true,"valueName":"search_term_string"}}],"inLanguage":"en-US"},{"@type":"Organization","@id":"https:\/\/www.javacodegeeks.com\/#organization","name":"Exelixis Media P.C.","url":"https:\/\/www.javacodegeeks.com\/","logo":{"@type":"ImageObject","inLanguage":"en-US","@id":"https:\/\/www.javacodegeeks.com\/#\/schema\/logo\/image\/","url":"https:\/\/www.javacodegeeks.com\/wp-content\/uploads\/2022\/06\/exelixis-logo.png","contentUrl":"https:\/\/www.javacodegeeks.com\/wp-content\/uploads\/2022\/06\/exelixis-logo.png","width":864,"height":246,"caption":"Exelixis Media P.C."},"image":{"@id":"https:\/\/www.javacodegeeks.com\/#\/schema\/logo\/image\/"},"sameAs":["https:\/\/www.facebook.com\/javacodegeeks","https:\/\/x.com\/javacodegeeks"]},{"@type":"Person","@id":"https:\/\/www.javacodegeeks.com\/#\/schema\/person\/9a83496b285d30c61e8a674625c1350e","name":"Ilias Tsagklis","image":{"@type":"ImageObject","inLanguage":"en-US","@id":"https:\/\/secure.gravatar.com\/avatar\/43505f28bb49f6e290c24be0b209ccc1af350f0f6587025ffd4847ef44bf6b78?s=96&d=mm&r=g","url":"https:\/\/secure.gravatar.com\/avatar\/43505f28bb49f6e290c24be0b209ccc1af350f0f6587025ffd4847ef44bf6b78?s=96&d=mm&r=g","contentUrl":"https:\/\/secure.gravatar.com\/avatar\/43505f28bb49f6e290c24be0b209ccc1af350f0f6587025ffd4847ef44bf6b78?s=96&d=mm&r=g","caption":"Ilias Tsagklis"},"description":"Ilias is a software developer turned online entrepreneur. He is co-founder and Executive Editor at Java Code Geeks.","sameAs":["http:\/\/www.iliastsagklis.com\/","https:\/\/www.linkedin.com\/in\/iliastsagklis"],"url":"https:\/\/www.javacodegeeks.com\/author\/ilias-tsagklis"}]}},"_links":{"self":[{"href":"https:\/\/www.javacodegeeks.com\/wp-json\/wp\/v2\/posts\/349","targetHints":{"allow":["GET"]}}],"collection":[{"href":"https:\/\/www.javacodegeeks.com\/wp-json\/wp\/v2\/posts"}],"about":[{"href":"https:\/\/www.javacodegeeks.com\/wp-json\/wp\/v2\/types\/post"}],"author":[{"embeddable":true,"href":"https:\/\/www.javacodegeeks.com\/wp-json\/wp\/v2\/users\/3"}],"replies":[{"embeddable":true,"href":"https:\/\/www.javacodegeeks.com\/wp-json\/wp\/v2\/comments?post=349"}],"version-history":[{"count":0,"href":"https:\/\/www.javacodegeeks.com\/wp-json\/wp\/v2\/posts\/349\/revisions"}],"wp:featuredmedia":[{"embeddable":true,"href":"https:\/\/www.javacodegeeks.com\/wp-json\/wp\/v2\/media\/125"}],"wp:attachment":[{"href":"https:\/\/www.javacodegeeks.com\/wp-json\/wp\/v2\/media?parent=349"}],"wp:term":[{"taxonomy":"category","embeddable":true,"href":"https:\/\/www.javacodegeeks.com\/wp-json\/wp\/v2\/categories?post=349"},{"taxonomy":"post_tag","embeddable":true,"href":"https:\/\/www.javacodegeeks.com\/wp-json\/wp\/v2\/tags?post=349"}],"curies":[{"name":"wp","href":"https:\/\/api.w.org\/{rel}","templated":true}]}}