• ashokkumar.rr
  • NEWBIE
  • 0 Points
  • Member since 2011

  • Chatter
    Feed
  • 0
    Best Answers
  • 0
    Likes Received
  • 0
    Likes Given
  • 3
    Questions
  • 3
    Replies

Hi ,

          I am using the code to implement the dynamic tab .

but  i am facing  strange issue.. when add the check box  to the tab with checked state will creating the VF  page .. we are not able to

change state the check box.. its not capturing the unchecked state...

 

this work fine when  we remove the custom tab control.

 

http://208.74.204.95/t5/Visualforce-Development/Moderators-VF-experts-A-bug-with-repeat-tabs-full-code-to/td-p/81010 

 

 

Thanks

ashok    

Hi guys,

I'm experiencing some unexpected behavior when trying to use the apex:repeat function to render tabs....

Basically it seems that tabs cannot be created on demand?  My controller is definitely returning data... as the second page block in my sample will show... repeat works - just the tabs are not rendered..

I'm sure any of you guys can see where I was going with this - and I guess I can achieve a similar result by dropping down to boring old html - just trying to use the standard components (as per best practice)

Any assistance greatly appreciated - as the purist coder me is seriously disturbed at the moment...

here is my 'simplified' and easily testable page & controller

Code: VF PAGE
<apex:page controller="clsRecordType">
    <apex:pageBlock >
        <apex:tabPanel id="theTabPanel">
            <apex:tab label="Account Types"/>
            <apex:repeat value="{!RecordTypes}" var="types">
                <apex:tab label="{!types.Name}"/>     
            </apex:repeat>
        </apex:tabPanel>
    </apex:pageBlock>

    <apex:pageBlock >
        <apex:repeat value="{!RecordTypes}" var="types">
            {!types.Name}<br/>       
        </apex:repeat>
    </apex:pageBlock>
</apex:page>


and the controller

Code:
public class clsRecordType {

    list<RecordType> lrecordtypes;

    public list<RecordType> getRecordTypes() {
        if(lrecordtypes==null) lrecordtypes = [Select Name, Id, Description From RecordType  where SobjectType = 'Account' and IsActive=True];
        return lrecordtypes;
        }
   }



Hi

 

   I implemnted pagination accordingt to below url

    http://forceguru.blogspot.com/2011/04/pagination-in-salesforce.html

 

   http://blog.jeffdouglas.com/2009/07/14/visualforce-page-with-pagination/

 

One thing I noticed is the checkboxes don’t maintain state if you check one, go to the next page, then go back. I think it’s due to line 20 in your controller, as it recreates the List of wrapper objects with each page.

 

  Can One has solu to fix this issue...

 

Thanks

ashok

Hi

 

   I implemnted pagination accordingt to below url

    http://forceguru.blogspot.com/2011/04/pagination-in-salesforce.html

 

   http://blog.jeffdouglas.com/2009/07/14/visualforce-page-with-pagination/

 

One thing I noticed is the checkboxes don’t maintain state if you check one, go to the next page, then go back. I think it’s due to line 20 in your controller, as it recreates the List of wrapper objects with each page.

 

  Can One has solu to fix this issue...

 

Thanks

ashok

I have a requirement where i need to create a page having many tabs as well as tabPanels. The number of tabs to be displayed is decided at run time. i tried using tabPanel inside repeat but it renders tabPanels again and again but not the tabs. Is there any way to do this using visualforce?

 

for eg: say i have three tabPanels:

 

tabPanel 1 :

 

tab1 tab2 tab3

this contains three tabs(say)

 

tabPanel 2 :

tab 1 tab 2

this contains two tabs(say)

 

etc.

 

again when next time i render the page, tabPanel 1 may have 4 tabs and also the page may have an added, tabPanel with multiple tabs.

 

 

Any Suggestion will be appreciated.

 

Thanks in advance.

  • June 08, 2010
  • Like
  • 0
Hi guys,

I'm experiencing some unexpected behavior when trying to use the apex:repeat function to render tabs....

Basically it seems that tabs cannot be created on demand?  My controller is definitely returning data... as the second page block in my sample will show... repeat works - just the tabs are not rendered..

I'm sure any of you guys can see where I was going with this - and I guess I can achieve a similar result by dropping down to boring old html - just trying to use the standard components (as per best practice)

Any assistance greatly appreciated - as the purist coder me is seriously disturbed at the moment...

here is my 'simplified' and easily testable page & controller

Code: VF PAGE
<apex:page controller="clsRecordType">
    <apex:pageBlock >
        <apex:tabPanel id="theTabPanel">
            <apex:tab label="Account Types"/>
            <apex:repeat value="{!RecordTypes}" var="types">
                <apex:tab label="{!types.Name}"/>     
            </apex:repeat>
        </apex:tabPanel>
    </apex:pageBlock>

    <apex:pageBlock >
        <apex:repeat value="{!RecordTypes}" var="types">
            {!types.Name}<br/>       
        </apex:repeat>
    </apex:pageBlock>
</apex:page>

and the controller

Code:
public class clsRecordType {

    list<RecordType> lrecordtypes;

    public list<RecordType> getRecordTypes() {
        if(lrecordtypes==null) lrecordtypes = [Select Name, Id, Description From RecordType  where SobjectType = 'Account' and IsActive=True];
        return lrecordtypes;
        }
   }