(아직?). 그럼 어떻게 해결할 수 있을까요? 정말로 한 페이지에이 편집 기능이 있어야하는 경우가 아니라면 : 나는 그렇지 않습니다. 만약 당신이 (그리고 나는 절대적으로해야 함을 의미한다) 자바 스크립트와 관련된 바이올린이있을 것이다. 나의 조언 : 2 개의 보고서를 작성하고 수정 링크를 제공하십시오. 이것은 표준 기능입니다. 물론 여러 번 편집 할 필요는 없지만 이후에 유지 관리하는 것이 가장 쉽습니다. 관습은 나중에 다시 숙고 할 것이므로 고려 가치가 있습니다.
정말 필요하다면 SQL을 사용하는 것이 가장 편한 방법이라고 생각합니다. 이중화를 사용하는 노동 조합을 사용하거나 일부 "의사 (pseudo)"열 (두 열이 특정 값 사이에 있는지 확인하기위한 몇 가지 방법이 필요하기 때문에 ...)으로 주문하는 일은 없습니다.
Example with the EMP table
지역 소스 :
select
"ROWID",
"EMPNO",
"ENAME",
"JOB",
"DEPTNO"
from "EMP"
where "DEPTNO" IN (10, 20)
order by "DEPTNO"
DEPTNO는 숨겨진 항목입니다. 다음 처리는 행의 특정 순서에 따라 다르므로 순서는 매우 중요합니다. 열 머리글 정렬을 해제합니다 (보고서 특성의 열 정렬 확인란).
자바 스크립트 : 내가 JS 주석에 명시처럼
function bind_for_changes(){
//since emp is sorted by deptno, i can loop over the elements in this way
//i also have deptno as a hidden item in the report, so that i can check its value
//since this hidden item is the 4th editable item, its id will be f04_####
//be sure to check the source output if you want to be sure.
//for each input item with name f04 (deptno), do:
//check if its value differs from our stored value.
// if it does, but our var is still -1, then it is only the first record. Do nothing.
// if it does and the var is not -1, then there is a difference between deptnos.
// for example, 10 -> 20.
// this change will be detected on the first row of deptno=20. So the splitter row
// needs to be before this one.
// The input item sits in a TD, the TD in a TR. We need to add a TR element BEFORE
// the current one, so we get the TR and add a new one before it, with a TD in it.
// note the colspan=3, which is the amount of displayed columns. If not sure, check the DOM.
// Or, provide 3 TDs
var deptno = -1;
$("input[name='f04']").each(function(){
if(deptno != $(this).val()){
if(deptno == -1){
deptno = $(this).val(); //first time, first record
//dont change anything
} else {
//a change between deptno's. Add a row after the current one
deptno = $(this).val();
var tr = $(this).parent().parent();
var newtr = $("<tr class='highlight-row'><td colspan=3 class='data'>In between rows!</td></tr>");
tr.before(newtr);
};
};
});
};
는 메모를 수행하면 페이지가 생성됩니다 무엇을 알고 있어야는/DOM을 알고/소스를 읽을 수 있습니다. 더 많거나 적은 편집 가능한 열은 코드를 망칠 수 있습니다. ID와 입력의 이름
<tr class="highlight-row">
<td headers="EMPNO" class="data">7782</td>
<td headers="ENAME" class="data">
<label for="f02_0003" class="hideMeButHearMe">Ename</label>
<input type="text" name="f02" size="12" maxlength="2000" value="CLARK" id="f02_0003" />
</td>
<td headers="JOB" class="data">
<label for="f03_0003" class="hideMeButHearMe">Job</label>
<input type="text" name="f03" size="9" maxlength="2000" value="MANAGER" id="f03_0003" />
<input type="hidden" name="f01" value="" id="f01_0003" />
<input type="hidden" name="f04" value="10" id="f04_0003" />
<input type="hidden" id="fcs_0003" name="fcs" value="3C09CABCBA62BE1A064146D162012CEF">
<input type="hidden" id="frowid_0003" name="frowid" value="AAuDjIABFAAAACTAAC" />
<input type="hidden" id="fcud_0003" name="fcud" value="U" />
</td>
</tr>
를 적어 둡니다, 또한 그들이 어디에 ':
예를 들어, 내 페이지에서 당신은 무엇 중요한 것은 보고서의 행의 구조, 소스를 볼 때 다시 배치. 또한
는 정점 4.1 (나는 믿는다) 때문에, 열 특성에서이 번역 될 수
<input type="hidden" name="fmap" value="CHECK$01" id="fmap_001" />
<input type="hidden" name="fhdr" value="Select Row" id="fhdr_001" />
<input type="hidden" name="fmap" value="ENAME" id="fmap_002" />
<input type="hidden" name="fhdr" value="Ename" id="fhdr_002" />
<input type="hidden" name="fmap" value="JOB" id="fmap_003" />
<input type="hidden" name="fhdr" value="Job" id="fhdr_003" />
<input type="hidden" name="fmap" value="DEPTNO" id="fmap_004" />
<input type="hidden" name="fhdr" value="Deptno" id="fhdr_004" />
테이블 요소 후 맵핑있다. 하지만 항상 조심하고 더블 체크하십시오. 결코 아프지 않으며 출력 코드를 알아야합니다.
그러나이 모든 소리가 너무 진보/어렵다면, 그걸로 끝나지 마십시오! 나중에 후회하게 될 것입니다. 표준 기능을 다음과 같이 사용하십시오 : 단일 레코드 양식 페이지에 대한 편집 링크가있는 일반 보고서 2 개! 하지만 필자가 원한다면 이것이 가장 깨끗한 길이라고 생각합니다. 당신은 당신이하고있는 것을 알 필요가 있습니다.
예 한 페이지에 2 개의 표 형식을 사용할 수 없으므로 직접 작성하는 것이 유일한 방법입니다. (다시 성가신 일입니다) 감사합니다. 내 아이디어가 절대적으로 필요한 것이 아닌 한 표준 기능을 통합하려고합니다. – Janani
np - 대답이 도움이 되었다면 받아 들여 자신을 (그리고 나) 어떤 담당자로 적립;) – Tom