You need to sign in to do that
Don't have an account?
Shree K
Page unable to rerender when fields in the fieldset made required on the VF Page
Hi,
Based on the picklist values its asssigned fieldsets has to be displayed on the visualforce page,where the fields in the fieldset are required fields,so when i made them required either by using the flag required="{!OR(f.DBRequired, f.required)}" or <apex:inputField value="{!Dom[f]}" required="{!i.DBRequired}", my page is not rerendering untill i fill the fields and click on save button it is not allowing me to select another value even if i select another option its related fieldset is not being displayed onthe page.on the other hand if remove those dbrequired/required parameters everything works fine but the fields in the fieldset are acting as, not required.
help will be appreciated in resolving this problem.
All that i need is when a picklist value is selected a fieldset assigned to it should be displayed and the fields should be madatory fields for the user
if there there any change of selection it has to do the same thing as it did for the previous selection.
Note: I trying to do this on a Webform for a custom object,not using any particular pageblock.
For Eg:
<apex:selectOption itemLabel="Bio" itemValue="Bio"></apex:selectOption>
<apex:selectOption itemLabel="Pharma" itemValue="Pharma"></apex:selectOption>
<apex:outputPanel id="fieldSet">
<apex:repeat value="{!$ObjectType.Domain_Obj__c.FieldSets[RequestValue]}" var="f">
<apex:outputText value="*" style="float:left; position:relative; color:red;" rendered="{!OR(f.DBRequired, f.required)}"/>
<div class="row margin">
<div class="small-12 columns">
<legend> {!f.label}</legend>
<br/>
<apex:inputField value="{!Myextn[f]}"/>
<br/>
</div>
</div>
</apex:repeat>
</apex:outputPanel>
Thanks
CkRdy
Based on the picklist values its asssigned fieldsets has to be displayed on the visualforce page,where the fields in the fieldset are required fields,so when i made them required either by using the flag required="{!OR(f.DBRequired, f.required)}" or <apex:inputField value="{!Dom[f]}" required="{!i.DBRequired}", my page is not rerendering untill i fill the fields and click on save button it is not allowing me to select another value even if i select another option its related fieldset is not being displayed onthe page.on the other hand if remove those dbrequired/required parameters everything works fine but the fields in the fieldset are acting as, not required.
help will be appreciated in resolving this problem.
All that i need is when a picklist value is selected a fieldset assigned to it should be displayed and the fields should be madatory fields for the user
if there there any change of selection it has to do the same thing as it did for the previous selection.
Note: I trying to do this on a Webform for a custom object,not using any particular pageblock.
For Eg:
<apex:selectOption itemLabel="Bio" itemValue="Bio"></apex:selectOption>
<apex:selectOption itemLabel="Pharma" itemValue="Pharma"></apex:selectOption>
<apex:outputPanel id="fieldSet">
<apex:repeat value="{!$ObjectType.Domain_Obj__c.FieldSets[RequestValue]}" var="f">
<apex:outputText value="*" style="float:left; position:relative; color:red;" rendered="{!OR(f.DBRequired, f.required)}"/>
<div class="row margin">
<div class="small-12 columns">
<legend> {!f.label}</legend>
<br/>
<apex:inputField value="{!Myextn[f]}"/>
<br/>
</div>
</div>
</apex:repeat>
</apex:outputPanel>
Thanks
CkRdy
All Answers
If that doesn't work, could you try posting the entirety of your VF page, along with the controller? When doing so, please utilize the code format button (< >). Thanks!