• charris
  • NEWBIE
  • 0 Points
  • Member since 2009

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

Questions regarding visualforce. I post a thread on the discussion board but do not get good feedback.

I have a multipicklist custom field which has ten values and  I want to display this custom field as checkboxes on the VF page. Now I use apex:selectCheckboxes tag, but the result is all the ten checkboxes are in one line(I don’t find any attribute on this tag to limit the numbers per line). Is there any way to display only three checkboxes in each line?

Now:

box 1 box 2 box 3 box 4 … box 10

I want:

box 1 box 2 box 3

box 4 box 5 box 6

…..

box 10

 

Another question is that currently I am using tabpanel and each panel is a Visualforce page. So when I click the panel, I want to go to a different vf page.  I try to add javascript code 'windon.location = PAGEURL' in onclick event, but it does not seem to work. Can you give me some suggestions? Thanks!

We want to create something that mimics the behavior of the checkboxes in the listview and related list, but for items that are not child records of the page's primaray object. (We'll be using this to provide the user with a list of child items they could add). What's the best way to do this?

  1. Can one embed a dataTable or columns within the selectCheckbox tags?
  2. Can one bind an InputCheckbox to an iterative component within a dataTable?
Thanks.
  • October 01, 2008
  • Like
  • 0
Does anyone know the best way to get checkboxes in a data table-like format?

The end result should be a 'related list' like structure, but with a checkbox in the left-most column.
I've tried "apex:selectCheckboxes" but need to display more than just a label.

And I've tried "apex:pageBlockTable" with an inputCheckbox in the first column, but I don't know how to get the controller to recognize which rows were checked and which not...

Can you help?

Thanks
  • September 08, 2008
  • Like
  • 0
My VisualForce page includes the following checkboxes:

<apex:pageBlockSection columns="4">
    <apex:selectCheckBoxes value="{!SelectedThings}" layout="pageDirection">
        <apex:selectOptions value="{!AllThings}" />
    </apex:selectCheckBoxes>            
</apex:pageBlockSection>

They all display in a single column. If I remove the layout attribute, they all display on a single line (wrapped to new lines if necessary). I'd rather they displayed in rows and columns, so that if there were 12 checkboxes, they'd display in 3 rows with 4 columns of checkboxes. Is there any way to do that?

Thanks,

Jeri