I have an APEX page with a few fields and some buttons. Initially, the first field (a lookup field) is the only one that is shown. I would like to be able to show the other fields once the user has selected a value from the lookup window.
Currently, I am using rendered={!isFieldSet == true}
in the fields I want to hide until later, but I am unable to update this value and get the fields to appear. I am currently using a javascript onchange
method to call the controller method to set the isFieldSet
value. But when I examine the property from javascript, it does not see the change to the isFieldSet
, I guess because the page has not been reloaded? I am wondering what the standard way to get this sort of thing to work is. Currently I am trying to reload the page using url arguments, but the lookup field value is not coming through to the backend.
Here is some code for reference.
<apex:inputField value="{!objectReference.propertyName}" required="true" onchange="actionpropertyValueChanged();">
Here is the code for hiding a section:
<apex:pageBlockSectionItem rendered="{!isFieldSet == true}" id="daySelectorBlock">
...
</apex:pageBlockSectionItem>