Please disable your adblock and script blockers to view this page

Search this blog

Showing posts with label showDetailItem. Show all posts
Showing posts with label showDetailItem. Show all posts

Monday 16 April 2018

Increase Icon size of af:panelSpringBoard using ADF Skin


ADF Faces af:panelSpringBoard component shows af:showDetailItem in a fancy view using icons as the notation of showDetailItem

From Oracle Docs

The panelSpringboard control can be used to display a group of contents that belongs to a showDetailItem. An icon strip with icons representing the showDetailItem children along with the item's contents are displayed when in strip mode, and a grid of icons with no contents shown is displayed in grid mode. When the user selects an icon while the panelSpringboard is in strip mode, the panelSpringboard discloses the associated showDetailItem. When the user selects an icon while the panelSpringboard is in grid mode, this automatically causes the panelSpringboard to display in strip mode. Typically you would put one or more showDetailItem components inside of the panelSpringboard but you may also alternatively place a facetRef, group, iterator, or switcher inside of the panelSpringboard as long as these wrappers provide showDetailItem components as a result of their execution

I have added a panel springboard on the page and by default, it looks like this


Wednesday 17 June 2015

Insert and show whitespace in ADF Faces Components (panelBox, showDetailItem etc)

This post is about a small trick
How to show whitespace in ADF Faces component properly ?
Recently i found a question on OTN about this
 How can I and spaces in the text property of a showDetailItem?
so thought to document it here for future reference

There is one more post about showing whitespace , check it
Showing white-spaces properly in ADF table column- 11g & 12c

Sometimes we need to insert some whitespace in between of some text as panelBox name, tab name in showDetailItem etc
In this case space appears in page editor but it doesn't appear on page and you can not put spacer at these points because there is only one component



Suppose you have a panelBox and requirement is to show Oracle    ADF as it's header text . In this case providing space in propertyInspector doesn't work , HTML entity for space   also doesn't work because of no DOCTYPE declaration

See here i added normal spaces in property of panelBox


 But is doesn't work :(

Now what to do ?
After lots of hit and tries finally i found that it work with equivalent entity number for  
and this magic number is  -  
So tried this -


 <af:panelBox text="Oracle&#160;&#160;&#160;&#160;&#160;&#160;&#160;ADF" id="pb1">
                    <f:facet name="toolbar"/>
                </af:panelBox>

and output is

This is the small trick , sometimes you may need this :)
Cheers, Happy Learning :)

Monday 23 June 2014

Navigating to (open) specific tab in af:panelTabbed programmatically -Oracle ADF

Hello All,
This post is about a development requirement - how to move (navigate or open) to a specific tab in panel tabbed  in Oracle ADF?
Suppose i have to open second tab of af:panelTabbed on a button click, so see how to do this using ADF Faces
  • Create a Fusion Web application and a page to drop panel tabbed and a button


  • now bind panel tabbed and it's showDetailItem to managed bean, in order to use disclosed property and to get client id
  • See the code to open (disclose) a specific tab of af:panelTabbed
        //Binding of Panel Tabbed
        private RichPanelTabbed panelTabBind;
    
        public void setPanelTabBind(RichPanelTabbed panelTabBind) {
            this.panelTabBind = panelTabBind;
        }
    
        public RichPanelTabbed getPanelTabBind() {
            return panelTabBind;
        }
    
        /**
         * @Method to disclose (open) specific tab
         * Pass the binding of af:showDetailItem that you want to open
         */
        public void setDisclosedFirstTab(RichShowDetailItem tabBind) {
            RichPanelTabbed richPanelTabbed = getPanelTabBind();
            for (UIComponent child : richPanelTabbed.getChildren()) {
                RichShowDetailItem sdi = (RichShowDetailItem) child;
                if (sdi.getClientId().equals(tabBind.getClientId())) {
                    sdi.setDisclosed(true);
                } else {
                    sdi.setDisclosed(false);
                }
            }
            AdfFacesContext.getCurrentInstance().addPartialTarget(panelTabBind);
        }
    

  • Now see the code written on button action- here i have checked that which tab is currently disclosed? and based on that i have passed next tab binding to this method



  •     /**Method to be called on Navigate Button
         * @param actionEvent
         */
        public void naviGateButtonAction(ActionEvent actionEvent) {
            if (firstTabBind.isDisclosed()) {
                setDisclosedFirstTab(secTabBind);
            } else if (secTabBind.isDisclosed()) {
                setDisclosedFirstTab(thirdTabBind);
            } else {
                setDisclosedFirstTab(firstTabBind);
            }
        }
    

  • now run your page and see navigation in af:panelTabbed

 Cheers Happy Learning :) Sample ADF Application