Facebook
From Scorching Frog, 7 Years ago, written in Plain Text.
Embed
Download Paste or View Raw
Hits: 260
  1. <?xml version='1.0' encoding='UTF-8'?>
  2. <jsp:root xmlns:jsp="http://java.sun.com/JSP/Page" version="2.1" xmlns:f="http://java.sun.com/jsf/core"
  3.           xmlns:af="http://xmlns.oracle.com/adf/faces/rich" xmlns:h="http://java.sun.com/jsf/html">
  4.     <jsp:directive.page contentType="text/html;charset=UTF-8"/>
  5.     <f:view>
  6.         <af:document title="untitled1.jspx" id="d1">
  7.             <af:messages id="m1"/>  
  8.            <af:resource type="javascript">
  9.     function copyFromTo(evt) {
  10.         fromValue = evt.getSource().getProperty('fromValue');
  11.         fromIndex = evt.getSource().getProperty('fromIndex');
  12.         // iterator ID, then fromIndex, then inputText ID
  13.         id = 'i1:'+fromIndex+':it1';
  14.         inputComponent = AdfPage.PAGE.findComponentByAbsoluteId(id);
  15.         inputComponent.setValue(fromValue+ ' ,information');
  16.         alert(fromIndex);
  17.     }  
  18.   </af:resource>
  19.  
  20.  
  21.   <af:form id="f1">
  22.     <af:panelStretchLayout id="psl1">
  23.       <f:facet name="center">
  24.         <af:iterator id="i1" value="#{bindings.State.inputValue}" var="row" varStatus="rowStatus">
  25.           <af:panelGroupLayout id="pgl1" layout="horizontal">
  26.             <af:selectBooleanCheckbox label="Copy" id="sbc1">
  27.               <af:clientAttribute name="fromValue" value="#{row}"/>
  28.               <af:clientAttribute name="fromIndex" value="#{rowStatus.index}"/>
  29.               <af:clientListener method="copyFromTo" type="click"/>
  30.             </af:selectBooleanCheckbox>
  31.             <af:spacer width="10" height="10" id="s1"/>
  32.             <af:outputText value="#{row}" id="ot1"/>
  33.             <af:spacer width="10" height="10" id="s2"/>
  34.             <af:inputText label="Label 1" id="it1"  value="#{bindings.State.inputValue}" clientComponent="true"/>
  35.           </af:panelGroupLayout>
  36.          
  37.          
  38.         </af:iterator>
  39.         <!-- id="af_one_column_stretched"   -->
  40.       </f:facet>
  41.     </af:panelStretchLayout>
  42.   </af:form>
  43.  
  44.         </af:document>
  45.     </f:view>
  46. </jsp:root>
  47.