• 고객센터
  • 교육
  • 매뉴얼
  • 데모
  • 제품소개
조회 수 : 2228
2011.10.19 (17:07:22)
게시판을 이용해 주셔서 감사합니다.
다음양식에 맞게 입력해주세요.

* 고객시스템명 : 중소기업진흥공단
* GAUCE 버전 : 4.0
* WAS 종류(WebLogic 등등) : 웹로직 8.1
* DB 종류 : 오라클
* 문의 유형(질문/요청/참조) : 그리드에 고정이미지 넣는거예요~
* 내용 :



참고문서대로 해봤는데 이미지가 안나와서요~ 뭐가 빠진게 있나요?
소스는 그닥 복잡하진 않던데 왜 안나오는지 모르겠네요 ^^




jsp파일은 대략
----------------------------------- jsp -------------------------------------
//그리드부분
action = "/GauceChannelSVL2?cmd=sbc2.common.CM_SELECT_Cmd&proc=SELECT_IPE";
        param =
                "&IS_COUNT=" + "1" +
                "&IS_DATASET1=" + "oITEM_LIST_GDS" +
                "&IS_PATH1=" + "sbc2/fs/FS_COMM.xml" +
                "&IS_SQL1=" + "select_item_list" +
                "&IS_CONDITION1=" + "<%=qName%>";
        oITEM_LIST_GDS.DataID = action + param;
        oITEM_LIST_GDS.Reset();

//이미지부분        
action = "/GauceChannelSVL2?cmd=sbc2.common.CM_SELECT_Cmd&proc=SELECT_IPE_IMAGE";
        param = "&IS_DATASET=" + "gauce_ImgDataSet";
        gauce_ImgDataSet.DataID = action + param;
          gauce_ImgDataSet.reset();
.
.
.
<comment id = "_NSID_"><object id="oITEM_LIST_GRID" classid="clsid:1F57AEAD-DB12-11D2-A4F9-00608CEBEE49" width="100%" style="position:relative"><!-- style="position:relative" -->
<param name="DataID" value="oITEM_LIST_GDS">
<param name="ImgDataID" value="gauce_ImgDataSet">
<Param Name="SortView" value="right">
<param name="IndWidth" value='0'>
<param name="ColSelect" value=false>
<param name="TitleHeight"        value="27">
<param name="RowHeight"        value="25">
<param name="ColSizing" value="true">
<param name="BorderStyle" value="0">
<param name="ViewSummary" value="0">
<param name="Format" value='
<C>id="Count", name="No", align="center",        value="{CurRow}", SumText="수" ,sort="false",HeadFontStyle="bold"</C>
<C>id="GAT", name="GAT", align="center", Cursor=Hand, HeadFontStyle="bold", imgcol="true",imgfitstyle=1</C>
<C>id="itemCheck", name="선택", align="center", EditStyle=CheckBox, HeadFontStyle="bold"</C>
<C>id="CASE_NUM", name="케이스", align="center", Cursor=Hand, sort=true, HeadFontStyle="bold"</C>
<C>id="CASE_DESC", name="업무명", sort=true, Cursor=Hand, HeadFontStyle="bold"</C>
<C>id="last_user_nm", name="처리자", align="center", Cursor=Hand, sort=true, HeadFontStyle="bold"</C>
<C>id="STEPDESCT", name="처리단계", Cursor=Hand, sort=true, HeadFontStyle="bold"</C>
<C>id="work_desc", name="업무설명", Cursor=Hand, sort=true, Color=@ACOLOR02, HeadFontStyle="bold"</C>
<C>id="deadline", name="처리기한",align="center", sort=true, Color=@ACOLOR01, HeadFontStyle="bold"</C>
'>
</object></comment><script>_ws_(_NSID_);</script>
------------------------------------------------------------------ jsp ------------------
--- GAT에 이미지를 넣으려고 합니다 -----------------
콤포넌트 선언했습니다.

-------------- 그리드데이터셋 담는부분 ----------------
GauceDataSet dsList = new GauceDataSet(IS_DATASET);
res.enableFirstRow(dsList);

for(int j = 1 ; j <= rs.getColumnCount() ; j++) {
String column_name = rs.getColumnLabel(j);
String column_type = rs.getColumnTypeName(j);
int column_size = rs.getColumnDisplaySize(j);
if(column_name.equals("itemCheck")) {
dsList.addDataColumn(new GauceDataColumn("itemCheck",     GauceDataColumn.TB_INT, 1));
}else if(column_name.equals("GAT")) {
dsList.addDataColumn(new GauceDataColumn("GAT",     GauceDataColumn.TB_STRING, 10));
}else if(column_type.equals("VARCHAR2")||column_type.equals("DATE")) {        
dsList.addDataColumn(new GauceDataColumn(column_name, GauceDataColumn.TB_STRING, column_size+100));
}else if(column_type.equals("NUMBER")) {
dsList.addDataColumn(new GauceDataColumn(column_name, GauceDataColumn.TB_DECIMAL, column_size, 5));
} else {
dsList.addDataColumn(new GauceDataColumn(column_name, GauceDataColumn.TB_STRING, column_size+100));
}
}
while(rs.next()) {
GauceDataRow row = dsList.newDataRow();
for(int j = 0 ; j < rs.getColumnCount() ; j++) {
row.setString(j, rs.getString(rs.getColumnLabel(j+1)));
}
dsList.addDataRow(row);                
}
-------------------------------- 끝 -------------------------

----------------------------- 이미지데이터셋 담는부분 -------------------------

GauceResponse res = service.getGauceResponse();
GauceDataSet ds = new GauceDataSet(IS_DATASET);
res.enableFirstRow(ds);
                
//이미지를 저장할 컬럼 BLOB타입으로 선언해주어야 한다.
        ds.addDataColumn(new GauceDataColumn("img",GauceDataColumn.TB_BLOB));                
        ds.addDataColumn(new GauceDataColumn("img_id",GauceDataColumn.TB_STRING));
                ds.addDataColumn(new GauceDataColumn("img_size",GauceDataColumn.TB_INT));
                
                String imgDir = "C:/workspace/sbc_fs/webApp/image2/";
                
                // 이미지 리스트
                String[] imgList = new String[] {
                        "icon_m.gif"
                };
                
                //이미지 ID(Key) 리스트 [외부 데이터셋의 컬럼값과 매칭되는 이미지 구분자]
                String[] imgIdList = new String[] {
                        "GAT"
                };
                for ( int i=0; i<imgList.length; i++ ) {
                        f = new File(imgDir + imgList[i]);
                        fis = new FileInputStream(f);
                        GauceDataRow row = ds.newDataRow();
                        row.addColumnValue(fis);                        
// 이미지를 담을 컬럼에 FileInputStream을 넣어 준다.
                        row.addColumnValue(imgIdList[i]);        // 이미지를 구분하는 값
                        row.addColumnValue(f.length());                // 이미지의 SIZE
                        ds.addDataRow(row);
                }
                ds.flush();
        res.flush();
        res.commit();
        res.close();
---------------------------------- 끝 -------------------------------

이런데요... 맞게 한거 같은데.. 어디 빠진곳이 있나욤?
확인 좀 부탁드릴께요~ ^^
수고하세요~

연락주시면 더 감사하구요~

010 4047 9576 유다성 입니다. ^^
 
Tag List
XE Login