Use of the rerender control and rendered control in SF: salesforce

Source: Internet
Author: User

Rerender:

Purpose: Partial refresh

The value of this attribute is the component ID, which can be one or more IDs. Multiple IDs are separated by commas.

Rendered:

Purpose: You can control whether a widget is displayed on a page.

The value of this attribute is a Boolean value. If it is true, the control is displayed on the page. Otherwise, it is not displayed on the page.


Combination of rerender and rendered:

You cannot write the rerender and rendered attributes in a control. Place the control that is not displayed in the control that is refreshed locally.


Eg:

<Apex: Form>

<Apex: pageblock Title = "condition">

<Apex: pageblocksection columns = "2">

<Apex: outputpanel Title = "Account">

<Apex: outputlabel value = "account:"> </Apex: outputlabel>

<Apex: selectlist value = "{! Optionacc} "size =" 1 "style =" width: 230px ">

<Apex: selectoptions value = "{! Optionacclist} "> </Apex: selectoptions>

<Apex: actionsupport event = "onchange" Action = "{! Searchaccopplist} "rerender =" oppid, contentid "/>

</Apex: selectlist>

</Apex: outputpanel>

<Apex: outputpanel Title = "opportunity" id = "oppid">

<Apex: outputlabel value = "opportunity:"> </Apex: outputlabel>

<Apex: selectlist value = "{! Optionopp} "size =" 1 "style =" width: 230px ">

<Apex: selectoptions value = "{! Optionopplist} "> </Apex: selectoptions>

<Apex: actionsupport event = "onchange" Action = "{! Searchoppcontentlist} "rerender =" contentid "/>

</Apex: selectlist>

</Apex: outputpanel>

</Apex: pageblocksection>

</Apex: pageblock>

<Apex: outputpanel id = "contentid">

<Apex: pageblock Title = "content" rendered = "{! Showcontentversion} ">

......



This article is from the "prodigal_k" blog, please be sure to keep this source http://919637235.blog.51cto.com/7344598/1529929

Contact Us

The content source of this page is from Internet, which doesn't represent Alibaba Cloud's opinion; products and services mentioned on that page don't have any relationship with Alibaba Cloud. If the content of the page makes you feel confusing, please write us an email, we will handle the problem within 5 days after receiving your email.

If you find any instances of plagiarism from the community, please send an email to: info-contact@alibabacloud.com and provide relevant evidence. A staff member will contact you within 5 working days.

A Free Trial That Lets You Build Big!

Start building with 50+ products and up to 12 months usage for Elastic Compute Service

  • Sales Support

    1 on 1 presale consultation

  • After-Sales Support

    24/7 Technical Support 6 Free Tickets per Quarter Faster Response

  • Alibaba Cloud offers highly flexible support services tailored to meet your exact needs.