How to Include Images in a Hierarchy Viewer

Using ADF Hierarchy Viewer Components 29-25 ■ initialBehavior: Specify how the search panel is initially displayed. Valid values are initCollapsed for initially collapsed, initExpanded for initially expanded, or hidden for completely hidden from view. 3. Optionally, add a f:facet with a value of name=end to specify a component that will launch an advanced search outside of the hierarchy viewer component. This facet should contain only a single component, for example af:commandLink, to launch a comprehensive search of a data set. For more information, see Section 12.4, Using the query Component.

4. In the Structure window, right-click the dvt:search node and choose insert inside

dvt:search dvt:searchResults. 5. In the Property Inspector, set the following attributes to configure the display of the search results: ■ value: Specify the search results data model. This must be an instance of oracle.adf.view.faces.bi.model.DataModel. ■ var: Enter the name of the EL variable used to reference each element of the hierarchy viewer collection. Once this component has completed rendering, this variable is removed, or reverted back, to its previous value. ■ varStatus: Enter the name of the EL variable used to reference the varStatus information. Once this component has completed rendering, this variable is removed, or reverted back, to its previous value. ■ resultListener: Specify a reference to an action listener that will be called after a row in the search results is selected. ■ emptyText: Specify the text to display when no results are returned. ■ fetchSize: Specify the number of result rows to fetch at a time.

6. In the Structure window, right-click the dvt:searchResults node and select insert

inside dvt:searchResults , then select ADF Faces, then select af:setPropertyListener . 7. In the Property Inspector, set the following attributes to map the search results node from the results model to the corresponding hierarchy viewer model: ■ from: Specify the source of the value, a constant or an EL expression. ■ to: Specify the target of the value. ■ type: Choose action as the value.

8. In the Structure window, right-click the dvt:searchResults node and choose insert

inside dvt:searchResults

f:facet with a value of name=content. 9.

In the Structure window, right-click the f:facet content node and do the following to specify the components to stamp out the search results: ■ Insert an ADF Faces af:panelGroupLayout element to wrap the output of the search results. ■ Insert the ADF Faces output components to display the search results. For example: af:outputText value={resultRow.Lastname} id=ot1 inlineStyle=color:blue; af:outputText value={resultRow.Firstname} id=ot2 Each stamped row references the current row using the var attribute of the dvt:searchResults tag. 29-26 Web User Interface Developers Guide for Oracle Application Development Framework Example 29–5 shows sample code for configuring search in a hierarchy viewer. Example 29–5 Sample Hierarchy Viewer Search Code dvt:hierarchyViewer dvt:search id=searchId value={bindings.lastNameParam.inputValue} actionListener={bindings.ExecuteWithParams1.execute} f:facet name=end af:commandLink text=Advanced af:showPopupBehavior popupId=::mypop triggerType=action af:commandLink f:facet dvt:searchResults id=searchResultId emptyText={bindings.searchResult1.viewable ? No match. : Access Denied.} fetchSize=25 value={bindings.searchResult1.collectionModel} resultListener={bindings.ExecuteWithParams.execute} var=resultRow af:setPropertyListener from={resultRow.Id} to={bindings.employeeId.inputValue} type=action f:facet name=content af:panelGroupLayout inlineStyle=width:110px;height:20px; af:outputText value={resultRow.Lastname} id=ot1 inlineStyle=color:blue; af:outputText value={resultRow.Firstname} id=ot2 af:panelGroupLayout f:facet dvt:searchResults dvt:search dvt:hierarchyViewer

29.8.2 What You May Need to Know About Configuring Search in a Hierarchy Viewer

Search in a hierarchy viewer is based on the searchable attributes or columns of the data collection that is the basis of the hierarchy viewer data model. Using a query results collection defined in data controls in Oracle ADF, JDeveloper makes this a declarative task. For more information, see the How to Create a Databound Search in a Hierarchy Viewer section in the Oracle Fusion Middleware Fusion Developers Guide for Oracle Application Development Framework.