jdeveloper - Oracle ADF : Tabbed Pane - Showing always first tab when redirected to it -


we developing web application using oracle adf. in have page tabbedpane show below

enter image description here

in above picture have 2 tabs account payable , accounts receivable. each tab having green , red image(this commandimage). when user clicks image means red or green navigated page. in page have provided button called back. tabbedpane , page(second page) .jsff , dropped region. our problem when user clicks button in page showing first tab though clicked button in second tab.

so need achieve following.

if user clicks red or green image in first tab , when clicks button has redirected first tab.

if user clicks red or green image in second tab , when clicks button has redirected second tab.

how achieve this. please help. in advance.

presuming having backing bean on session scope - mybean :

<af:paneltabbed id="pt1">   <af:showdetailitem disclosurelistener="#{mybean.tabselected}" text="accounts payable" disclosed="#{mybean.selectedtab == "sdi1"}" id="sdi1"/>   <af:showdetailitem #{mybean.tabselected} text="accounts receivable" disclosed="#{mybean.selectedtab == "sdi2"}" id="sdi2"/> </af:paneltabbed> 

and bean should have :

public mybean {  private string tabselected; //make sure add getter , setter too!!!      public void tabselected(disclosureevent disclosureevent) {       if (disclosureevent.isexpanded()) {         uicomponent uicomp = (uicomponent)disclosureevent.getsource();         tabselected = uicomp.getid();       }    } } 

your backing bean can have pageflowscope well, if both pages part of same bounded task flow.

more details, here:

https://docs.oracle.com/middleware/1212/adf/troaf/tagdoc/af_showdetailitem.html

http://adfhowto.blogspot.co.uk/2011/05/when-disclosurelistener-of-paneltabbeds.html


Comments

Popular posts from this blog

google chrome - Developer tools - How to inspect the elements which are added momentarily (by JQuery)? -

angularjs - Showing an empty as first option in select tag -

php - Cloud9 cloud IDE and CakePHP -