0

Drastically updated code/this question after getting more understanding. I think it would be best to use a checkbox for this field rather than radio button, and the issue seems to be dependent on the field in a way I cannot understand.

I have a field on cs (case, created in controller) that takes a boolean value. It is a checkbox. I have the following...

<apex:pageblockSectionItem>
                <apex:inputCheckbox value=" 
                {!cs.thisProduct}"/>
                </apex:pageblockSectionItem>

When I changed it from determining the value to cs.someOtherField, it shows up! Great. But when I change it back to thisProduct, it doesn't show at all. This page is public on a Site, and for testing, I've made this field viewable by all profiles. Why is it disappearing?

Other fields on this page map to the 'cs' case object fine, and I tried making a product = {get;set} variable for this and doing cs.thisProduct = product in the controller, no luck. How should I go about this?

Sorry if this is changed too much for 1 post; I'm just figuring out better practice as I go

  • Please include the controller code populating these properties. Because both sections are rendering, the issue probably is not the Boolean but something to do with the select options or with what sounds like a partial page rerender. – David Reed Apr 2 '18 at 21:21
  • Cleaned it up a bit -- found out more about how the options are set b/w VF and the controller.... – Natalie Paige Apr 2 '18 at 22:31
  • For what it's worth, without the text there or anything, the page still looks like it makes room for the radio field by itself when I add it and remove it and watch the link next to it shift around...but it doesn't show... – Natalie Paige Apr 2 '18 at 22:32
  • What does the cs and its corresponding property/method controllerVal from {!cs.controllerVal} look like? Try adding debug statements to controllerVal to show if it is being called. – Daniel Ballinger Apr 2 '18 at 23:39
  • This is definitely not the issue. cs.controllerVal just refers to an object's field (a Case) that is going to take the value of the radio button (checked or unchecked) and the radio button's appearance doesn't depend on this part...nothing is being "invoked" by that, it's just saying "this is what the value of the button will be". – Natalie Paige Apr 3 '18 at 15:44
-1

It was permissions! After I tested it with other fields and it worked, I figured it had to do with that, but this page is public and I didn't know about the guest access permissions. Thank you to all who contributed!!!

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service, privacy policy and cookie policy

Not the answer you're looking for? Browse other questions tagged or ask your own question.