5 Replies Latest reply: Jan 23, 2013 10:49 AM by User268653 RSS

    using af:tree inside template page

    User268653
      hi every body

      jdeveloper 11.1.2.3

      when i drag any viewobject from datacontrol inside pagetemplate and run application the page did not show and data in the table and show access denied.

      thanks
      maher

      Edited by: 842127 on Jan 22, 2013 3:54 AM
        • 1. Re: using af:tree inside template page
          Frank Nimphius-Oracle
          Hi,

          ensure the template has a Pagedef file created after you dragged the View Object. Also, if the template resides in an external project (e.g. imported through ADF library to the application), ensure the template data control definition is imported with it

          Frank
          • 2. Re: using af:tree inside template page
            User268653
            hi
            yes my template has a Pagedef file ,because it is already contain a binding method from datacontrol.
            my template does not resides in an external project.

            Thanks
            maher

            Edited by: 842127 on Jan 22, 2013 7:47 PM
            • 3. Re: using af:tree inside template page
              User268653
              any help please.
              • 4. Re: using af:tree inside template page
                User268653
                here the code of pageTemplate source and pagedef file :
                <?xml version='1.0' encoding='UTF-8'?>
                <jsp:root xmlns:jsp="http://java.sun.com/JSP/Page" version="2.1"
                          xmlns:f="http://java.sun.com/jsf/core"
                          xmlns:h="http://java.sun.com/jsf/html"
                          xmlns:af="http://xmlns.oracle.com/adf/faces/rich">
                  <jsp:directive.page contentType="text/html;charset=UTF-8"/>
                  <af:pageTemplateDef var="attrs">
                    <af:xmlContent>
                      <component xmlns="http://xmlns.oracle.com/adf/faces/rich/component">
                        <display-name>MasterPageTemp</display-name>
                        <facet>
                          <facet-name>Bodyfacet</facet-name>
                        </facet>
                        <attribute>
                          <attribute-name>PageTitle</attribute-name>
                          <attribute-class>java.lang.String</attribute-class>
                        </attribute>
                      </component>
                    </af:xmlContent>
                    <af:panelSplitter splitterPosition="50" orientation="vertical" id="pt_ps1">
                      <f:facet name="first">
                        <af:image id="pt_i1" source="/Images/qassam.jpg"
                                  inlineStyle="width:200px; height:200.0px; background-repeat:no-repeat;"/>
                      </f:facet>
                      <f:facet name="second">
                        <af:panelSplitter splitterPosition="50" orientation="vertical"
                                          positionedFromEnd="true" id="pt_ps2"
                                          dimensionsFrom="auto">
                          <f:facet name="first">
                            <af:decorativeBox theme="dark" id="pt_db1" dimensionsFrom="auto">
                              <f:facet name="center">
                                <af:panelSplitter splitterPosition="100" id="pt_ps3"
                                                  dimensionsFrom="auto">
                                  <f:facet name="first">
                                    <af:panelGroupLayout layout="scroll" id="pt_pgl2">
                                      <af:table value="#{bindings.WebItemMaster.collectionModel}" var="row"
                                                rows="#{bindings.WebItemMaster.rangeSize}"
                                                emptyText="#{bindings.WebItemMaster.viewable ? 'No data to display.' : 'Access Denied.'}"
                                                fetchSize="#{bindings.WebItemMaster.rangeSize}" rowBandingInterval="0"
                                                selectedRowKeys="#{bindings.WebItemMaster.collectionModel.selectedRow}"
                                                selectionListener="#{bindings.WebItemMaster.collectionModel.makeCurrent}"
                                                rowSelection="single" id="pt_t1">
                                        <af:column sortProperty="#{bindings.WebItemMaster.hints.ItemNo.name}" sortable="false"
                                                   headerText="#{bindings.WebItemMaster.hints.ItemNo.label}" id="pt_c1">
                                          <af:outputText value="#{row.ItemNo}" id="pt_ot1">
                                            <af:convertNumber groupingUsed="false"
                                                              pattern="#{bindings.WebItemMaster.hints.ItemNo.format}"/>
                                          </af:outputText>
                                        </af:column>
                                        <af:column sortProperty="#{bindings.WebItemMaster.hints.ItemName.name}" sortable="false"
                                                   headerText="#{bindings.WebItemMaster.hints.ItemName.label}" id="pt_c2">
                                          <af:outputText value="#{row.ItemName}" id="pt_ot2"/>
                                        </af:column>
                                        <af:column sortProperty="#{bindings.WebItemMaster.hints.ItemType.name}" sortable="false"
                                                   headerText="#{bindings.WebItemMaster.hints.ItemType.label}" id="pt_c3">
                                          <af:outputText value="#{row.ItemType}" id="pt_ot3"/>
                                        </af:column>
                                        <af:column sortProperty="#{bindings.WebItemMaster.hints.PageName.name}" sortable="false"
                                                   headerText="#{bindings.WebItemMaster.hints.PageName.label}" id="pt_c4">
                                          <af:outputText value="#{row.PageName}" id="pt_ot4"/>
                                        </af:column>
                                        <af:column sortProperty="#{bindings.WebItemMaster.hints.IconFileName.name}" sortable="false"
                                                   headerText="#{bindings.WebItemMaster.hints.IconFileName.label}" id="pt_c5">
                                          <af:outputText value="#{row.IconFileName}" id="pt_ot5"/>
                                        </af:column>
                                      </af:table>
                                    </af:panelGroupLayout>
                                  </f:facet>
                                  <f:facet name="second">
                                    <af:decorativeBox theme="medium" id="pt_db2"
                                                      dimensionsFrom="auto"
                                                      centerLandmark="main">
                                      <f:facet name="center">
                                        <af:panelGroupLayout layout="scroll" id="pt_pgl3">
                                          <af:facetRef facetName="Bodyfacet"/>
                                          
                                        </af:panelGroupLayout>
                                      </f:facet>
                                    </af:decorativeBox>
                                  </f:facet>
                                </af:panelSplitter>
                              </f:facet>
                            </af:decorativeBox>
                          </f:facet>
                          <f:facet name="second">
                            <af:panelGroupLayout layout="horizontal"
                                                 
                                                 id="pt_pgl1">
                              <af:poll id="pt_p1"
                                       pollListener="#{ManagedBean.ChkNotification}"
                                       interval="-1"/>
                              <af:outputFormatted value="#{bindings.returnNotification.inputValue}"
                                                  id="pt_of2" 
                                                 partialTriggers="pt_p1"/>
                              
                            </af:panelGroupLayout>
                          </f:facet>
                        </af:panelSplitter>
                      </f:facet>
                    </af:panelSplitter>
                  </af:pageTemplateDef>
                </jsp:root>
                <?xml version="1.0" encoding="UTF-8" ?>
                <pageDefinition xmlns="http://xmlns.oracle.com/adfm/uimodel"
                                version="11.1.1.61.92" id="MasterPageTempPageDef"
                                Package="Pages.PageTemplate">
                  <parameters/>
                  <executables>
                    <variableIterator id="variables">
                      <variable Type="java.lang.String" Name="ChkUserNewNotification_return"
                                IsQueriable="false" IsUpdateable="0"
                                DefaultValue="${bindings.ChkUserNewNotification.result}"/>
                    </variableIterator>
                    <iterator Binds="WebItemMaster" RangeSize="25" DataControl="PersonAMDataControl" id="WebItemMasterIterator"/>
                  </executables>
                  <bindings>
                    <methodAction id="ChkUserNewNotification"
                                  InstanceName="PersonAMDataControl.dataProvider"
                                  DataControl="PersonAMDataControl" RequiresUpdateModel="true"
                                  Action="invokeMethod" MethodName="ChkUserNewNotification"
                                  IsViewObjectMethod="false"
                                  ReturnName="data.PersonAMDataControl.methodResults.ChkUserNewNotification_PersonAMDataControl_dataProvider_ChkUserNewNotification_result"/>
                    <attributeValues IterBinding="variables" id="returnNotification">
                      <AttrNames>
                        <Item Value="ChkUserNewNotification_return"/>
                      </AttrNames>
                    </attributeValues>
                    <tree IterBinding="WebItemMasterIterator" id="WebItemMaster">
                      <nodeDefinition DefName="personmodel.views.viewsRo.WebItemMasterRo" Name="WebItemMaster0">
                        <AttrNames>
                          <Item Value="ItemNo"/>
                          <Item Value="ItemName"/>
                          <Item Value="ItemType"/>
                          <Item Value="PageName"/>
                          <Item Value="IconFileName"/>
                        </AttrNames>
                      </nodeDefinition>
                    </tree>
                  </bindings>
                </pageDefinition>
                Edited by: 842127 on Jan 22, 2013 11:18 PM
                • 5. Re: using af:tree inside template page
                  User268653
                  thanks for all.

                  i solve my problem.