function readOnly(count){ }
Starting November 20, the site will be set to read-only. On December 4, 2023,
forum discussions will move to the Trailblazer Community.
+ Start a Discussion
hkp716hkp716 

My fieldset doesn't rerender

Hey everyone,

 

I'm trying to render my fieldset when I click on a select option in my "choosen sku value" select list.  

 

here is the fieldset i want to rerender:

 

<apex:outputPanel id="details">
<apex:pageBlockSection columns="1">
<apex:repeat value="{!$ObjectType.product2.FieldSets.product_field_set}" var="g">
<apex:inputfield value="{!product2[g]}"/>

</apex:repeat>

 

Thanks in advance for the help...

 

hkp716

 

 

VF:

<apex:page standardController="product2" extensions="brands1,plist1,vp1,floordisplay"> <!-- sidebar="false" -->
<apex:form >

<apex:actionRegion >
<apex:actionFunction name="UpdateProductList" rerender="ProductList,details"/>
<apex:pageBlock title="Floor plan details" mode="edit" id="temptable">
<apex:pageBlockSection columns="1">
</apex:pageBlockSection>
</apex:pageBlock>
<apex:pageBlock title="Add models" mode="edit" id="ptable">
<apex:pageBlockSection columns="1">
<apex:inputField value="{!prodObject.Brand__c}">
<apex:actionSupport event="onchange" reRender="ptable"/>
</apex:inputField>
<apex:inputField value="{!prodObject.Product_Line__c}" >
<apex:actionSupport event="onchange" reRender="ptable"/>
</apex:inputField>
<apex:inputField value="{!prodObject.Sub_Product_Line__c}" onchange="UpdateProductList();" >
<apex:actionSupport event="onchange" reRender="ptable"/>
</apex:inputField>
</apex:pageBlockSection>

<apex:pageBlockSection >
<apex:pageBlockSectionItem >
<apex:outputPanel id="ProductList">
<br>SKU Name:</br>
<apex:selectList value="{!skuname}" size="4" multiselect="true"> <!-- multiselect="true" -->
<apex:selectOptions value="{!skuNames}"/>
</apex:selectList><p/>
</apex:outputPanel>
</apex:pageBlockSectionItem>
<apex:pageBlockSectionItem >
<apex:inputCheckbox rendered="{!b}"></apex:inputCheckbox><apex:inputText rendered="{!b}"/>
</apex:pageBlockSectionItem>
<apex:pageBlockSectionItem >
<apex:commandButton value=" ADD SKU " action="{!displaySkuValue}"/>
</apex:pageBlockSectionItem>

</apex:pageBlockSection>
</apex:pageBlock>

<apex:pageBlock title="Add additional details to models" mode="edit">

<apex:pageBlockSection columns="1">
<apex:pageBlockSectionItem ></apex:pageBlockSectionItem>
<br>Choosen SKU:</br>
<apex:pageBlockSectionItem ></apex:pageBlockSectionItem>
<apex:pageBlockSectionItem >
<apex:selectList value="{!choosenSkuValues}" size="4" multiselect="false">
<apex:selectOptions value="{!remainingSkuValues}"/>
</apex:selectList><p/>
</apex:pageBlockSectionItem>
</apex:pageBlockSection>

<apex:outputPanel id="details">
<apex:pageBlockSection columns="1">
<apex:repeat value="{!$ObjectType.product2.FieldSets.product_field_set}" var="g">
<apex:inputfield value="{!product2[g]}"/>

</apex:repeat>

<apex:repeat value="{!fields}" var="f">
<apex:inputField value="{!fpdisplay[f.fieldPath]}" required="{!OR(f.required, f.dbrequired)}"/>
</apex:repeat>
</apex:pageBlockSection>
</apex:outputPanel>
</apex:pageBlock>
</apex:actionRegion>
</apex:form>
</apex:page>

jd123jd123

Hello

 

try the below code if it is not working please let me know 

 

<apex:page standardController="product2" extensions="brands1,plist1,vp1,floordisplay"> <!-- sidebar="false" -->
<apex:form >

<apex:actionRegion >
<apex:actionFunction name="UpdateProductList" rerender="ProductList,details"/>
<apex:pageBlock title="Floor plan details" mode="edit" id="temptable">
<apex:pageBlockSection columns="1">
</apex:pageBlockSection>
</apex:pageBlock>

<apex:outputpanel id="ptable">

<apex:pageBlock title="Add models" mode="edit" >
<apex:pageBlockSection columns="1">
<apex:inputField value="{!prodObject.Brand__c}">
<apex:actionSupport event="onchange" reRender="ptable"/>
</apex:inputField>
<apex:inputField value="{!prodObject.Product_Line__c}" >
<apex:actionSupport event="onchange" reRender="ptable"/>
</apex:inputField>
<apex:inputField value="{!prodObject.Sub_Product_Line__c}" onchange="UpdateProductList();" >
<apex:actionSupport event="onchange" reRender="ptable"/>
</apex:inputField>
</apex:pageBlockSection>

<apex:pageBlockSection >
<apex:pageBlockSectionItem >
<apex:outputPanel id="ProductList">
<br>SKU Name:</br>
<apex:selectList value="{!skuname}" size="4" multiselect="true"> <!-- multiselect="true" -->
<apex:selectOptions value="{!skuNames}"/>
</apex:selectList><p/>
</apex:outputPanel>
</apex:pageBlockSectionItem>
<apex:pageBlockSectionItem >
<apex:inputCheckbox rendered="{!b}"></apex:inputCheckbox><apex:inputText rendered="{!b}"/>
</apex:pageBlockSectionItem>
<apex:pageBlockSectionItem >
<apex:commandButton value=" ADD SKU " action="{!displaySkuValue}"/>
</apex:pageBlockSectionItem>

</apex:pageBlockSection>

</apex:outputpanel>
</apex:pageBlock>

<apex:pageBlock title="Add additional details to models" mode="edit">

<apex:pageBlockSection columns="1">
<apex:pageBlockSectionItem ></apex:pageBlockSectionItem>
<br>Choosen SKU:</br>
<apex:pageBlockSectionItem ></apex:pageBlockSectionItem>
<apex:pageBlockSectionItem >
<apex:selectList value="{!choosenSkuValues}" size="4" multiselect="false">
<apex:selectOptions value="{!remainingSkuValues}"/>
</apex:selectList><p/>
</apex:pageBlockSectionItem>
</apex:pageBlockSection>

<apex:outputPanel id="details">
<apex:pageBlockSection columns="1">
<apex:repeat value="{!$ObjectType.product2.FieldSets.product_field_set}" var="g">
<apex:inputfield value="{!product2[g]}"/>

</apex:repeat>

<apex:repeat value="{!fields}" var="f">
<apex:inputField value="{!fpdisplay[f.fieldPath]}" required="{!OR(f.required, f.dbrequired)}"/>
</apex:repeat>
</apex:pageBlockSection>
</apex:outputPanel>
</apex:pageBlock>
</apex:actionRegion>
</apex:form>
</apex:page>

hkp716hkp716

I just tried the code but it still doesnt work.

 

hkp716