1 | static S hselect_allowEmpty(Map map, O... params) { |
2 | new StringBuilder buf; |
3 | buf.append("<option></option>\n"); |
4 | if (nempty(map)) for (O key : keys(map)) { |
5 | O value = map.get(key); |
6 | buf.append(tag("option", htmlencode(str(or(value, ""))), value := str(key))).append("\n"); |
7 | } |
8 | ret tag("select", buf, params) + "\n"; |
9 | } |
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: | 446 / 483 |
Version history: | 1 change(s) |
Referenced in: | [show references] |