써먹는 웹개발

[Websquare] 그리드 내에 출력시 하드코딩한 SelectBox의 값을 못 찾을때 해결방법 본문

Client/Websquare

[Websquare] 그리드 내에 출력시 하드코딩한 SelectBox의 값을 못 찾을때 해결방법

kmhan 2019. 11. 6. 18:03


728x90
반응형

※ Websquare 2.0 기준입니다.

 

문제의 소스

<w2:column id="TEST" inputType="select" style="height:20px;" width="30">
 <w2:choices>

  <w2:item>

   <w2:label>

       아침

   </w2:label> 
   <w2:value>

        10

   </w2:label>

  </w2:item>

  <w2:item>

   <w2:label>

      점심

   </w2:label> 
   <w2:value>

      20

   </w2:label>

  </w2:item>

  <w2:item>

   <w2:label>

     저녁

   </w2:label> 
   <w2:value>

     30

   </w2:label>

  </w2:item>

 </w2:choise>

</w2:column>

 

원인 : 조회한 데이터는 10인데 소스상의 selectbox 값은 개행이 되서 '\n10\n' 이런식으로 되니까 일치가 안된것임

 

해결방법

 

<w2:column id="TEST" inputType="select" style="height:20px;" width="30"> 
 <w2:choices>

  <w2:item>

   <w2:label>아침</w2:label> 
   <w2:value>10</w2:label>

  </w2:item>

  <w2:item>

   <w2:label>점심</w2:label> 
   <w2:value>20</w2:label>

  </w2:item>

  <w2:item>

   <w2:label>저녁</w2:label> 
   <w2:value>30</w2:label>

  </w2:item>

 </w2:choise>

</w2:column>

728x90
반응형


Comments