You need to sign in to do that
Don't have an account?
src0010
Difference between apex:pageBlock and apex:repeat?
Just curious (being new to VisualForce dev), but can anyone explain to me the difference between:
apex:pageBlock
and
apex:repeat
Both seem to iterate over data in the same method? Thanks in advance!
pageBlock doesn't iterate over data. It is used to make a new section on the page where you can put a title. Take a look at tihs:
http://www.salesforce.com/us/developer/docs/pages/Content/pages_quick_start_component_library.htm
There is a PageBlockTable which iterates over data to create rows in a table. You may be confusing it with that?
apex:repeat lets you repeat any block of html or visualforce code. PlageBlockTable is just used to make tables where repeat can be used for just about anything you want to repeat.
All Answers
pageBlock doesn't iterate over data. It is used to make a new section on the page where you can put a title. Take a look at tihs:
http://www.salesforce.com/us/developer/docs/pages/Content/pages_quick_start_component_library.htm
There is a PageBlockTable which iterates over data to create rows in a table. You may be confusing it with that?
apex:repeat lets you repeat any block of html or visualforce code. PlageBlockTable is just used to make tables where repeat can be used for just about anything you want to repeat.
Yes, Sorry I was confusing 'pageBlock' and 'pageBlockTable'. Thanks for the explanation and link...makes sense!