2016-10-13 2 views

답변

0
 //define style class in skins file 
      .style1 { background-color:green; } 
      .style2 { background-color:red;} 
      .style3 { background-color:yellow; } 
      .style4 { background-color:blue;} 

    public long getCountRows(){ 
    ViewObjectImpl vo = getTourHeaderEOView_hdr(); 
    return vo.getEstimatedRowCount(); 
} 
+0

impl 클래스의 getcountrows 메소드 – keval

+0

두 개의 대답이 첨부되어 있습니다. 실수로 나는 불완전한 답변을 게시했습니다. – keval

0
private String styleForCell; //class variable 

public String getStyleForCell() { 


    OperationBinding ob2 = (OperationBinding)getBindings().get("getCountRows"); 
    int row = (Integer)ob2.execute(); 

    for(int i = 1;i <= row;i=i+4) { 
     return "style1"; 
    } 
    for(int i = 2;i <= row;i=i+4) { 
     return "style2"; 
    } 
    for(int i = 3;i <= row;i=i+4) { 
     return "style3"; 
    } 
    for(int i = 4;i <= row;i=i+4) { 
     return "style4"; 
    } 

    return null; 
} 
public void setStyleForCell(String aStyleForCell) 
{ 
    this.styleForCell = aStyleForCell; 
} 

// 이제 styleclass 속성 테이블에서 전단 페이지를 통해이 방식 (= "# {backinbean.styleforcell styleclass 전화 } "