You need to sign in to do that
Don't have an account?
Richa K
Splitting one column into multiple
Hi everyone,
I have a normal pageblock table in my page. It shows data in a single column. I also do have checkbox bound to them.
For eg : original OP :
[]A
[]B
[]C
[]E
[] F
And desired one is :
[]A []B [] C
[]E []F
Thanx and eagards,
Shailesh Patil
There's probably a few ways to do this, the way I'd approach it is to put the items into a wrapper class that contains up to three instances of your object.
e.g. controller
Page:
Not compiled, but hopefully you get the drift.
Can you show me another way?
I reckon this could be achieved with dynamic visualforce bindings, storing the information in maps containing lists. It would end up being a much more complex solution to maintain though. Wrapper classes is always my preferred solution.
I think you need to increment idx....right?
Regards,
Lakshman
Correct. First typo of many no doubt!
Hi Bob
Could you please share the total code to split the one column into 3 columns (As mentioned above)?
I don't have any code that does it via dynamic bindings I'm afraid. As I mentioned above, I always use wrapper classes unless I have no option, as it makes it easier for those that come after me to maintain.
Hi Bob,
Thanx a lot. That worked !
Now can you guide me on another issue?
How can I pass the checkbox values and update the corresponding variable in the class? Note that one can select multiple checkboxes.
You don't need to do anything further to update the value in the class, as the checkbox is part of the viewstate.
I wrote a blog post on this a while ago - that should give you the details:
http://bobbuzzard.blogspot.com/2011/03/persisting-list-edits-in-visualforce.html