[phpwebapp-commits] CVS: web_app/webobjects/listbox listbox.html,1.1.1.1,1.1.1.1.2.1 listbox.txt,1.3
Brought to you by:
dashohoxha
From: Dashamir H. <das...@us...> - 2004-10-04 09:09:46
|
Update of /cvsroot/phpwebapp/web_app/webobjects/listbox In directory sc8-pr-cvs1.sourceforge.net:/tmp/cvs-serv5614/webobjects/listbox Modified Files: Tag: phpwebapp-1_0 listbox.html listbox.txt Log Message: All the changes that are done after release 1.0 (but without the XML parser and XHML template requirement) are placed in the branch phpwebapp-1_0, so that old applications can get them, without having to modify their templates. Index: listbox.html =================================================================== RCS file: /cvsroot/phpwebapp/web_app/webobjects/listbox/listbox.html,v retrieving revision 1.1.1.1 retrieving revision 1.1.1.1.2.1 diff -C2 -d -r1.1.1.1 -r1.1.1.1.2.1 *** listbox.html 21 Feb 2003 08:17:06 -0000 1.1.1.1 --- listbox.html 4 Oct 2004 09:09:33 -0000 1.1.1.1.2.1 *************** *** 1,16 **** <WebClass ID="listbox"> ! <Parameter name="rs" default="{{obj_id}}" /> ! <Parameter name="onchange" default="return false;" /> ! <Parameter name="width" default="" /> - <select name="{{obj_name}}" onchange="{{onchange}}"> - <Repeat rs="{{rs}}"> - <Var name="selected">('{{id}}'=='{{{{obj_name}}}}' ? "selected" : "")</Var> - <option value="{{id}}" {{selected}}>{{label}}</option> - </Repeat> - <If condition="'{{width}}'<>''"> - <Var name="selected">('{{{{obj_name}}}}'=='' ? "selected" : "")</Var> - <option value="" {{selected}}>{{width}}</option> - </If> - </select> </WebClass> --- 1,18 ---- <WebClass ID="listbox"> ! <Parameter name="rs" default="{{obj_id}}" /> ! <Parameter name="value" default="{{{{obj_name}}}}" /> ! <Parameter name="onchange" default="return false;" /> ! <Parameter name="width" default="" /> ! ! <select name="{{obj_name}}" onchange="{{onchange}}"> ! <Repeat rs="{{rs}}"> ! <Var name="selected">('{{id}}'=='{{value}}' ? "selected" : "")</Var> ! <option value="{{id}}" {{selected}}>{{label}}</option> ! </Repeat> ! <If condition="'{{width}}'<>''"> ! <Var name="selected">('{{value}}'=='' ? "selected" : "")</Var> ! <option value="" {{selected}}>{{width}}</option> ! </If> ! </select> </WebClass> Index: listbox.txt =================================================================== RCS file: /cvsroot/phpwebapp/web_app/webobjects/listbox/listbox.txt,v retrieving revision 1.3 retrieving revision 1.3.2.1 diff -C2 -d -r1.3 -r1.3.2.1 *** listbox.txt 16 Jul 2003 09:27:59 -0000 1.3 --- listbox.txt 4 Oct 2004 09:09:33 -0000 1.3.2.1 *************** *** 18,25 **** --- 18,35 ---- <Include SRC="{{LISTBOX_PATH}}listbox.html" /> <WebObject Class="listbox" Name="country" + value = "selected_value" rs = "rs_id" onchange = "alert(this.options[this.selectedIndex].text)" width = "---------------" /> + The attribute "value" is optional. It has the value of the selected item + (the item with id equal to this value is the one that will be selected). + It can be a variable, like this: value="{{var_name}}", in this case the + value of this variable is used. If it is not given, then its default + value is '{{{{obj_name}}}}' (in the example above, it would be '{{country}}', + since the name of the object is 'country'; this means that the value of + the variable {{country}} will determine which item will be displayed as + selected). + The attribute "rs" is optional. Its default value (if not specified) is {{obj_id}} (in the example above, it would be 'listbox::country'). |