static S hselect_allowEmpty(Map map, O... params) { new StringBuilder buf; buf.append("<option></option>\n"); if (nempty(map)) for (O key : keys(map)) { O value = map.get(key); buf.append(tag("option", htmlencode(str(or(value, ""))), value := str(key))).append("\n"); } ret tag("select", buf, params) + "\n"; }
Began life as a copy of #1007620
download show line numbers debug dex old transpilations
Travelled to 13 computer(s): aoiabmzegqzx, bhatertpkbcr, cbybwowwnfue, cfunsshuasjs, gwrvuhgaqvyk, ishqpsrjomds, lpdgvwnxivlt, mqqgnosmbjvj, pyentgdyhuwx, pzhvpgtvlbxg, tslmcundralx, tvejysmllsmz, vouqrxazstgt
No comments. add comment
| Snippet ID: | #1007635 | 
| Snippet name: | hselect_allowEmpty - HTML <select> tag from map - OLD - use hselect instead | 
| Eternal ID of this version: | #1007635/2 | 
| Text MD5: | 6cbbf006373267d5c91f830cc2fd8d7d | 
| Author: | stefan | 
| Category: | javax / html | 
| Type: | JavaX fragment (include) | 
| Public (visible to everyone): | Yes | 
| Archived (hidden from active list): | No | 
| Created/modified: | 2017-03-30 12:27:08 | 
| Source code size: | 336 bytes / 9 lines | 
| Pitched / IR pitched: | No / No | 
| Views / Downloads: | 657 / 701 | 
| Version history: | 1 change(s) | 
| Referenced in: | [show references] |