Whenever a JWL get action is run against the component parent panel (for example, as the result of a button click), the client requests the alternative content for the panel and if it is available, it replaces the existing panel content with new content. The page containing the panel is not replaced by the get, instead, this tag allows part of the page to be replaced. The revised content is retrieved from the same JSP from which the original content came. Both the server lifecycle copy of the page and the client-side page are kept in sync. The new page content is retrieved using a post HTTP request operation (as opposed to ajaxRefreshRequest which does the same operation using a get HTTP request. The contents of the form containing the panel is posted as part of the request so that the values in the form are available to the server code calculating the new content to put in the panel.
<factory> <faces-context-factory> com.ibm.faces.context.AjaxFacesContextFactory </faces-context-factory> <render-kit-factory> com.ibm.faces.renderkit.AjaxRenderKitFactory </render-kit-factory> </factory>
<h:panelGroup id="panel1"> <hx:ajaxRefreshSubmit onerror="return doError(this, event);"/> </h:panelGroup>
<h:outputText id="otext2" escape="false" rendered='#{pc_JWL30.aBean.aString1 != null && pc_JWL30.aBean.aString1 != ""}' value='You typed:<b> #{pc_JWL30.aBean.aString1}</b> ' />
<h:form id="panel1"> <h:inputText styleClass="inputText" id="text0" value="#{pc_JWL30.aBean.aString1}"/> <h:panelGroup id="panel1"> ...
<hx:commandExButton type="button" value="Enter" id="button1"> <hx:behavior event="onclick" behaviorAction="get;stop" targetAction="panel1"/> </hx:commandExButton>
The Properties view for a component shows the most common set of attributes you can set on a component, and, depending on the component, you might also see options for adding controls, actions, or other components. To open the Properties view, click
.The common attributes for the Update Content component are listed in the table below.
The All Attributes view shows a table
of all the attributes you can set on a component, which includes those attributes
you can access from the Properties view. To switch to the All Attributes view,
click the All Attributes icon in the upper right
corner of the Properties view.
Attribute name |
Description |
---|---|
binding |
An expression that binds the component's instance (usually a user interface component) to a bean property (usually in the backing file). |
id |
Assigns a name to a component. Should be a unique name within a JSP. |
inProgress |
Attribute is not yet available. |
rendered |
Can be set to true or false:
|
target |
Assigns the target frame within a frameset that a page
should be loaded into when the hyperlink is clicked:
|
title |
Specifies the title text, shown in browser as a tooltip at runtime. Used by a browser as the alternative text of a component if the alternative text is not specified. |
oncomplete |
If a request succeeds, after the content of the panel is replaced, this JavaScript™ is executed. The function has no meaningful arguments. |
onerror |
If provided, a JavaScript function to be executed when onblur fires and the field value fails validation. The function is executed before the action is executed. If the function returns false, the action is not run and processing of the event is halted (if the DOM halts it). |
onstart |
When the behavior starts executing, this JavaScript function is executed. It has no meaningful arguments. If it returns false execution is halted. This function can be used (in conjunction with oncomplete to customize what is displayed while the request is in progress. |