2012-11-16 3 views
2

apex 4.0을 사용하고 미리 만든 보고서, HTML, jQuery JavaScript 및 CSS를 사용하여 지역에 보고서를 작성했으며 오라클 데이터베이스.apex에서이 코드를 사용하여 oracle에서 데이터베이스를 연결하는 방법

Oracle 데이터베이스에서이 코드의 데이터를 검색하려면 어떻게합니까?

<a class="offline-button" href="../index.html">Back</a> 
<script src="#WORKSPACE_IMAGES#people.js" type="text/javascript"></script> 

    <div id="example" class="k-content"> 
     <div id="clientsDb"> 

      <div id="grid" style="height: 380px"></div> 

     </div> 

     <style scoped> 
      #clientsDb { 
       width: 692px; 
       height: 413px; 
       margin: 30px auto; 
       padding: 51px 4px 0 4px; 
       background: url(#WORKSPACE_IMAGES#clientsDb.png) no-repeat 0 0; 
      } 
     </style> 
     <script> 
      $(document).ready(function() { 
       $("#grid").kendoGrid({ 
        dataSource: { 
         data: createRandomData(50), 
         pageSize: 10 
        }, 
        groupable: true, 
        sortable: true, 
        pageable: { 
         refresh: true, 
         pageSizes: true 
        }, 
        columns: [ { 
          field: "FirstName", 
          width: 90, 
          title: "First Name" 
         } , { 
          field: "LastName", 
          width: 90, 
          title: "Last Name" 
         } , { 
          width: 100, 
          field: "City" 
         } , { 
          field: "Title" 
         } , { 
          field: "BirthDate", 
          title: "Birth Date", 
          template: '#= kendo.toString(BirthDate,"dd MMMM yyyy") #' 
         } , { 
          width: 50, 
          field: "Age" 
         } 
        ] 
       }); 
      }); 
     </script> 
    </div> 
+0

당신이 정점 알고 계십니까? 이 코드 발췌 부분이 지역에 넣은 HTML 인 경우에도 여전히 양식 태그에 래핑됩니다. 이 코드에는 "kendoGrid"도 포함되어 있습니다. 나는 그것을 알기 위해 그것을 몰랐다. 만약 당신이 이것을 사용하려고한다면, 아마도 당신의 게시물에이를 언급해야 할 것이다. 이러한 문서에서 달성하고자하는 솔루션은 다소 복잡해 보입니다. 웹 서비스가 필요하거나 페이징 같은 것을 처리 할 수있는 능력이있는 최소한의 아약스 프로세스가 필요합니다. 당신이 필요로하는 것과 함정이있는 함정을 분명히하십시오. – Tom

답변

0

가이 작업을 수행 할 수 있지만 귀하의 게시물이 낮은 정보가 있기 때문에, 나는 대부분

"당신은 어떻게 오라클 데이터베이스에서 데이터를 가져 오지 수"입니다 귀하의 질문에 대답하려고하는 다른 방법

<script language="JavaScript1.1" type="text/javascript"> 

function getYourDataTableList (narrowText, empSelect) //getYourDataTableList should be the table you would like to retrive 

{ 

    var empSelectObj = document.getElementFirstName(FirstName); 

    var ajaxRequest = new htmldb_Get(null,&APP_ID.,'APPLICATION_PROCESS=getYourDataTableList ,0); 

    ajaxRequest.add('P1_FirstName_NARROW',narrowText.value); 

    ajaxResult = ajaxRequest.get(); 

    if(ajaxResult) 

    { 

     empSelectObj.options.length = 0; 

     var empArray = ajaxResult.split("~empsep~"); 

     for(var i=0; i < empArray.length; i++) { 

     var colArray = empArray[i].split("~colsep~"); 

     empSelectObj.options[i] = new Option(colArray[1], colArray[0]); 

     } 

    } 

    else 

    { 

     empSelectObj.options.length = 0; 

    } 

    ajaxRequest = null; 

} 

</script> 

- 코드 테스터되지 않으며 당신이 예를 따르는 것이 좋습니다 완벽하게 작동 될 것입니다
http://www.dba-oracle.com/t_html_db_apex_ajax_application_express.htm


iFrame을 사용하는 경우 다음과 같은 문제가 발생할 수도 있습니다. iframe src가 visualforce 페이지와 다른 서버 인 경우 브라우저에서 자바 스크립트가 크로스 사이트로 간주되는 콘텐츠에 액세스하는 것을 허용하지 않습니다 스크립팅 공격)
소스 :. http://boards.developerforce.com/t5/Apex-Code-Development/How-we-get-the-iframe-data-in-apex-page-using-javascript/td-p/446781

관련 문제