기본 콘텐츠로 건너뛰기

개발 공부 - w2ui form fields

용어 뜻:
w2form.fields

필드 오브젝트의 배열이다.
object, default = []

필드는 이러한 구조를 가진다
field : {
name: '', //필드명이다, input이나 select명과 일치해야 한다.
type: null, //타입 종류이다. (w2field 객체와 같은 타입이다)
options: {}, //필드의 추가 옵션이 필요하면 적어준다.
required: false, //required 하든 not이든 
html: { // auto generation의 정보이다. (generateHtml을 보면 되나 봄)
caption: '', //필드의 caption이다.
attr: '', //input이나 select 컨트롤의 어트리뷰트(속성)이다.
text: '', //컨트롤 오른쪽에 나오는 텍스트이다.
span: undefined, //span의 개수이다. class="w2ui-span{span}"이라고 추가되어져야 한다.
page: undefined //폼 안에 tab가 있으면 페이지 넘버를 표시해준다.
}
}

$().w2field({}) 에서 사용되는 타입들이다.
text
textarea
email
pass
password
int
float
money
currency (alias for money)
percent
hex
alphanumeric
color
date
time
list
combo
enum
file
select
radio
checkbox
toggle

1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
If your HTML template is defined as :
    <div class="w2ui-page page-0">
      <div class="w2ui-field w2ui-required">
         <label>First Name</label>
         <div><input name="first_name" type="text" /></div>
      </div>
      <div class="w2ui-field w2ui-required">
         <label>Last Name</label>
         <div><input name="last_name" type="text" /></div>
      </div>
      <div class="w2ui-field">
         <label>Comments</label>
         <div><input name="field_textarea" type="text" /></div>
      </div>
    </div>
    <div class="w2ui-buttons">
        <button name="reset" class="btn ">reset</button>
        <button name="save" class="btn btn-green">save</button>
    </div>
  
 
 
And you have a container:
     <div id="form" style="width: 500px; height; 300px"></div>
 
 
 
The form definition will be:
    $('#form').w2form({ 
        name   : 'form',
        fields : [
            { name'first_name', type: 'text' },
            { name'last_name', type: 'text' },
            { name'field_textarea', type: 'text' }
            ],
        actions : {
            "reset"function () {
                this.clear();
            },
            "save"function () {
                this.save();
            }
        }
    });
     
 
cs



출처:

댓글

이 블로그의 인기 게시물

Ebook - 전자책 drm 상관 없이 pdf로 만들기

yes24와 교보문고에서 ebook을 구매 해야 했는데 너무 불편하고, 필기가 매우 화날 정도로 안 좋아서 원시적으로 사용하기로 했다. 1. 목적 : ebook에서 필기 및 사용이 불편하여 pdf로 변환  2. 용도 : 개인 사용 목적이며 화질이 다소 저하되어도 필기만 용이하면 상관 없음 3. 방법 1) 휴대폰 및 카메라로 동영상을 촬영했다. DRM 때문에 프로그램으로는 촬영이 안 되는 것을 확인했다. 2) 마우스 클릭 해주는 매크로를 사용했다. (1) key_macro.exe > https://blog.daum.net/pg365/250 듀얼 모니터에서 위치 이탈 현상이 있긴 해도 괜찮았다. (2) AutoClick.exe > http://bestsoftwarecenter.blogspot.com/2011/02/autoclick-22.html 이 걸로 잘 사용했다. 3초마다 한 번 클릭하도록 사용했다. 3) 동영상을 이미지로 변경해주는 프로그램을 사용했다. Free Video to JPG Converter > https://free-video-to-jpg-converter.kr.uptodown.com/windows 일 하면서 듀얼 모니터에 켜 놨는데 속도가 괜찮았다. * Every frame 으로 사용해야 한다. 4) 중복 사진 제거해주는 프로그램을 사용했다. VlsiPics  > http://www.visipics.info/index.php?title=Main_Page 생각보다 느리니 퇴근시에 걸어놓고 가면 된다. 한번 play가 끝나면 Auto-select 하고 Delete 하면 된다. 5) 이미지를 일괄 Crop 작업 해주는 프로그램을 사용했다. JPEGCrops > https://jpegcrops.softonic.kr/ * https://joker1209.tistory.com/11 도 참고했다. View -> Large 로 크게 본 뒤, Edit -> Syncronize Crops 로 일괄 동일하게 적용하는 방식을 사

개발 공부 - json JSONObject 사용 시 백슬래시(\), 원화 표시(\) 제거 및 치환

import org.json.simple.JSONObject; String dataString = new String(authData.toJSONString()); dataString = dataString.replaceAll("\\\\", ""); String 으로 안 바뀌는 가 싶어서 String 으로 변환 해 주고 작업 하였다. 사실 toJSONString 해도 정상 동작 해야 하는데 이유를 잘 모르겠음. 그리고 나서 다시 이클립스 구동 하니 toString 도 먹은 걸로 봐서 이상하다고 생각! String dataString = authData.toString(); dataString = dataString.replaceAll("\\\\", ""); 어쨌든 백 슬래시 제거를 해줘야 하는데 \\ 도 아니고 \\\\를 해야 변환이 가능했다는 결말이었습니다. 참고 : https://stackoverflow.com/questions/15450519/why-does-string-replace-not-work/15450539 test =test.replace("KP", "");  replace 후에 담아 주지 않으면 적용이 안 됩니다!

개발 공부 - OracleXETNSListener 서비스가 로컬 컴퓨터에서 시작했다가 중지되었습니다.

여러 가지 요인이 있지만 PC 이름 변경시 OracleXETNSListener 서비스 시작이 불가능합니다. 고치는 법은 C:\oraclexe\app\oracle\product\11.2.0\server\network\ADMIN 와 같은 설치 경로에서 listener.ora와 tnsnames.ora 의 pc명을 바꾼 PC명으로 바꿔주면 됩니다. 그래도 안 된다면 cmd 창에서 services.msc 를 입력 후 OracleXETNSListener 서비스를 시작 시키면 됩니다. 오류명: OracleXETNSListener 서비스가 로컬 컴퓨터에서 시작했다가 중지되었습니다. 일부 서비스는 다른 서비스 또는 프로그램에서 사용되지 않으면 자동으로 중지됩니다. 참고한 사이트들 1. http://blog.naver.com/visioner7/120165951652 2. http://database.sarang.net/?inc=read&aid=6819&criteria=oracle&subcrit=&id=&limit=20&keyword=ora-12560&page=5 이런 걸 보면 오라클은 앙칼진 시골 아가씨야