This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
public class EmailValidatorSample { | |
private Canvas drawForm() { | |
TextItem email = new TextItem("email"); | |
email.setWidth("*"); | |
email.setValidators(emailValidator()); | |
} | |
private RegExpValidator emailValidator() { | |
return new RegExpValidator("^([a-zA-Z0-9_.\\-+])+@(([a-zA-Z0-9\\-])+\\.)+[a-zA-Z0-9]{2,4}$"); |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
BigDecimal one = BigDecimal.ONE; | |
BigDecimal zero = BigDecimal.ZERO; | |
// 같으면 참 | |
if (one.compareTo(zero) == 0) { | |
// one이랑 zero가 같음 | |
} | |
// 크면 참 |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Date a, b; // assume these are set to something | |
Date d; // the date in question | |
return a.compareTo(d) * d.compareTo(b) > 0; |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
// ListGrid의 Record checkbox에 대한 설정을 변경한다. | |
// setAttribute("canSelect", false or true); | |
// 레코드의 checkbox를 보이거나 보이지 않게 설정한다. | |
Record [] records = ListGrid.getRecords(); | |
for (Record record : records) { | |
record.setAttribute("canSelect", false); | |
} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
UPDATE table_name SET clob_column = clob_column || CHR(10) || 'append' WHERE id_column = 1 |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
UPDATE table_name SET clob_column = clob_column + 'append' WHERE id_column = 1 |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
tree.addRecordClickHandler(new RecordClickHandler() { | |
@Override | |
public void onRecordClick(RecordClickEvent event) { | |
TreeNode node = tree.getSelectRecord(); | |
if (tree.getTree().isFolder(node)) { | |
// 폴더 | |
} else { | |
// 폴더아님 | |
} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
btnClear.addClickHandler(new ClickHandler() { | |
@Override | |
public void onClick(ClickEvent event) { | |
listGrid.setData(new Record[]{}); | |
} | |
}); |
OlderNewer