2

I have a standard field called Product Brief Number ({!Product_Brief__c.Name}). This field is Auto Number, after saving it will generate a number. I want show this field when some after click on the save button. Otherwise my page will break.

 <apex:outputText value="{!Product_Brief__c.Name}"></apex:outputText> <apex:pageblockButtons > <apex:commandButton value="Save" action="{!save}"/> <apex:commandButton value="Print" onclick="window.print();"/> <apex:commandButton value="Cancel" action="{!Cancel}"/> </apex:pageblockButtons> 

Any one have any suggestions How to do that? Thanks

1 Answer 1

1

Use rendered attribute in your outputText to show and hide your field.

<apex:outputText value="{!Product_Brief__c.Name}" rendered="{!IF(Product_Brief__c != NULL && Product_Brief__c.Name != NULL,true,false)}"> </apex:outputText> 

Provide a id to outputText and rerender this id in your commandbutton

<apex:commandButton value="Save" action="{!save}" rerender="outputTextId"/> 

Hope it helps.

1
  • Thanks for the help, but i don't think this is going to work. Coz I already using rerender properties in my page. If i add above part it will break my page. Thanks again Commented Jul 20, 2015 at 17:38

You must log in to answer this question.

Start asking to get answers

Find the answer to your question by asking.

Ask question

Explore related questions

See similar questions with these tags.