Populate html:select with List of Strings

Hello everyone,
I need to populate an html:select with a List of Strings. The list I receive is not composed of objects, only Strings. I want each of these Strings to be an option of the select.
I've tried this way:
                <html:select property="tamanho" >
                   <html:options collection="gradeTamanho"/>
                </html:select>Didn't work. Does anyone know how?
thanks

Does anyone know how to do this? There has to be someway that I can populate an Option List with a list of contentIDs in a folder. Maybe using CMIS?

Similar Messages

  • html:select with horizontal scroll bar

    I created list with fixed width, some records are long, I need a horizontal scrollbar to to view whole records. I use IE. How can I do this?
    Please help.
    piece of code..
                                                      <html:select property="pickedColSelect" style="width: 100%;"
                                                           multiple="true" size="10" ondblclick="examineColumnsPreRemove(myActionForm.pickedColSelect,false);
                                                                copyTextAndValueToSelectMenu(pickedColSelect, availColSelect, true, false,0, allowEdits);
                                                                     putFieldsInHidden(pickedColSelect, adHocReportForm.selectedColumnsString);
                                                                          return true;">
                                                           <html:optionsCollection name="adHocReportForm"
    Thanks in advance..

    See custom select tags in Coldtags suite:
    http://www.servletsuite.com/jsp.htm

  • Using html:select with mutiple

    hy, guys!I need some help:I am developing a form were I use a heml:select wich have to use the mutiple selecting function( the user could select more then one option)it looks like this:
    <html:select property="sectors" multiple="true" size="3" ><html:option value="1">1</html:option><html:option value="2">2</html:option><html:option value="3">3</html:option></html:select>
    but when I try to test on the action, getting from the form-bean and printing to test, for example:
    SelectForm f=(SelectForm)form;
    System.out.println(f.getSectors());
    it only prints one of the selected options!!!that means it�s not getting all that is needed!!!what should I do?

    It doesn't print out all the values because it returns an Array of String objects by default. You need to have getter/setter methods in your FormBean that return String arrays and take String arrays as argument respectively.
    Hope that helps.
    Regards
    Hari

  • Populate html combo with database

    Hi all, I´m trying to use that example of Multi-select-Combobox , but i must populate the options of the combo with the database select result, not static values,..
    that is the code for the options i´m using at the moment:
    <div class="examples">
    <label class="examples">Second Example of MultiSelect (with width options)</label>
    <select id="methods" name="methods" multiple="multiple" size="4" title="Four" class="arc90_multiselect fieldwidth-20em valuewidth-600px">
         <option value="flex">OPTION1</option>
         <option value="ajax">OPTION2</option>
         <option value="iframes">OPTION3</option>
    </select>
    </div>     
    how can I populate this with my table values?
    that is the site where i get the multiselect - if anyone need it. http://lab.arc90.com/tools/multiselect/
    tnks for help.

    <!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">
    <html xmlns="http://www.w3.org/1999/xhtml">
    <head>
    <meta name="generator" content="HTML Tidy for Java (vers. 26 Sep 2004), see www.w3.org" />
    <title></title>
    <title>arc90 lab | tools: MultiSelect</title>
    <style type="text/css">
    /*<![CDATA[*/
                            @import "http://lab.arc90.com/tools/c/css/tool_global.css";     /* Style for this page */
                            .a9multiselect {
                                    width: 9.9em;
                                    font-family: Arial, Helvetica, sans-serif;
                                    position: relative;
                                    height: 22px;
                                    padding: 0;
                                    margin: -.05em 0 1em 0;
                                    border: 0;
                            .a9multiselect .expcol-click, .a9multiselect .expcol-click-open {
                                    background-color: #fff;
                                    border: 1px solid #999;
                                    padding: 0;
                                    margin: 0;
                                    cursor: default;
                                    min-width: 9.8em;
                            .a9multiselect div.expcol-click {
                                    position: absolute;
                                    z-index: 104;
                                    height: 20px;
                            .a9multiselect div.expcol-click-open {
                                    border-bottom: 1px solid #fff;
                            .a9multiselect .title {
                                    font-size: .8em;
                                    height: 1.3em;
                                    line-height: 1.2em;
                                    overflow: hidden;
                                    padding: .3em 1.1em .1em .5em;
                                    background: white url(images/multiselect.gif) no-repeat top right;
                            .a9multiselect .title:hover {
                                    background: white url(images/multiselect-hover.gif) no-repeat top right;
                            .expcol-body {
                                    position: absolute;
                                    z-index: 106;
                                    min-height: 1em;
                                    background: #e9f3f8;
                                    padding: .1em;
                                    display: block;
                                    font-size: 75%;
                                    display: none;
                                    margin-top: -1px;
                                    border: 1px solid #999;
                            .expcol-body ul {
                                    overflow: auto;
                                    min-height: 1em;
                                    min-width: 20em;
                                    margin: 0;
                                    padding: 0;
                            .expcol-body li { margin: 0 0 .2em 0; list-style:none; }
                            .expcol-body li:hover {
                                    background: #ddd;
                            .arc90_multiselect {
                                    width: 12.5em;
                                    height: 1.35em;
                                    visibility: hidden;
                            .a9selectall {
                                    border-bottom: 1px solid #ccc;
                            /* Styles for page layout */
                            DIV.examples {
                                    margin: 0 0 2em 0;
                                    width: 17em;
                                    border: 1px solid #e9e9e9;
                                    padding: .3em;
                            DIV.examples LABEL.examples {
                                    display: block;
                                    margin: 0 0 .2em 0;
                    /*]]>*/
    </style>
    </head>
    <body>That is the .js file: ---------------------------------------------------------
    var a$ = {}; // arc90 namespace functions
    a$.c = 0;
    a$.openSelect = null;
    a$.NO_SELECTION     = 'No selection';
    a$.SELECTED          = 'Options selected';
    a$.SELECT_ALL     = 'Select All';
    a$.SelectAllMin     = 6;
    a$.WhenToUse     = 'class'; // class: based on class arc90_multiselect existing | multiple: based on multiple attributte exists | all: both single and multiple
    a$.msSeparator     = '|';
    a$.appName = navigator.appVersion.toLowerCase();
    a$.isIE = document.all && a$.appName.indexOf('msie') >= 0;
    a$.isSafari = a$.appName.indexOf('safari') >= 0;
    a$.msBodyTimer = null;
    a$.multiSelectCreate = function(o) {
    // can be called directly with the id or object passed in as the first argument
    //  or if a$.WhenToUse is set to class or multiple
         var S = null;
         if (o != null)
              S = [a$.isString(o)? a$.e(o): o];
         else
              S = document.getElementsByTagName('select');
         for (var i = 0, l = 1; i < l; i++) { //S.length
              var s = S;
              if (s != null && ((a$.WhenToUse == 'class' && s.className.indexOf('arc90_multiselect') >= 0) || (a$.WhenToUse == 'multiple' && s.multiple) || (a$.WhenToUse == 'all'))) {
                   var title = s.title, id = s.id, name = s.name;
                   var div = a$.newNode('div', 'a9multiselect-'+ id, 'a9multiselect');
                   var span = a$.newNode('div', 'a9multiselect-'+ id +'-title', 'title');
                   span.setAttribute('title', title);
                   var expcol = a$.newNode('div', 'a9multiselect-click-'+ id, 'expcol-click', '', span, div);
                   var ul = a$.newNode('ul');
                   if (a$.isIE)
                        ul.style.width = '20em';
                   var expbody = a$.newNode('div', 'a9multiselect-body-'+ id, 'expcol-body', '', ul);
                   expbody.style.display = 'none';
                   // Timer Events to auto-close the drop-down when not being used
                   a$.newEvent(div, 'mouseout', function(event) { a$.msBodyTimer = setTimeout('a$.closeSelect("'+ id +'")', 1500); });
                   a$.newEvent(div, 'mouseover', function(event) { clearTimeout(a$.msBodyTimer); a$.msBodyTimer = null; });
                   a$.newEvent(expbody, 'mouseout', function(event) { a$.msBodyTimer = setTimeout('a$.closeSelect("'+ id +'")', 1500); });
                   a$.newEvent(expbody, 'mouseover', function(event) { clearTimeout(a$.msBodyTimer); a$.msBodyTimer = null; });
                   a$.newEvent(ul, 'mouseout', function(event) { clearTimeout(a$.msBodyTimer); a$.msBodyTimer = null; });
                   a$.newEvent(ul, 'mouseover', function(event) { clearTimeout(a$.msBodyTimer); a$.msBodyTimer = null; });
                   if (a$.isIE)
                        var hidden = a$.newNode('<input type="hidden" name="'+ name +'" title="'+ title +'" />', name, '', '', null, div);
                   else {
                        var hidden = a$.newNode('input', name, '', '', null, div);
                        hidden.setAttribute('type', 'hidden');
                        hidden.setAttribute('name', name);
                        hidden.setAttribute('title', title);
                   // insert select all option
                   var m = s.options.length;
                   if (s.multiple && m >= a$.SelectAllMin) {
                        var alli = a$.newNode('li', 'a9selectall-'+ id, 'a9selectall', '', null, ul);
                        if (a$.isIE) {
                             var allbx = a$.newNode('<input type="checkbox" name="a$-'+ a$.c +'" id="a$-'+ a$.c +'" alt="'+ id +'" />', 'a$-'+ (a$.c++), '', '', null, alli);
                             var allbl = a$.newNode('<label for="'+ allbx.id +'" />', '', '', a$.SELECT_ALL, null, alli);
                        } else {
                             var allbx = a$.newNode('input', 'a$-'+ a$.c++, '', '', null, alli);
                             allbx.setAttribute('type', 'checkbox');
                             allbx.setAttribute('alt', id);     
                             var allbl = a$.newNode('label', '', '', a$.SELECT_ALL, null, alli);
                             allbl.setAttribute('for', allbx.id);
                        // call to function to get every checkbox under 'a9multiselect-'+ id a$.T('input', a$.e('a9multiselect-'+ id))
                        eval("a$.newEvent(allbx, 'click', function () { a$.selectAll(a$.e('"+ allbx.id +"')); a$.chk(a$.e('"+ allbx.id +"')); });");
                   var sel = 0;
                   for (var j = 0; j < m; j++) {
                        var value = s.options[j].value, text = s.options[j].text;
                        var li = a$.newNode('li', 'a9-li-'+ a$.c, '', '', null, ul);
                        var d = a$.newNode('div', '', '', '', null, li);
                        var chkType = s.multiple? 'checkbox': 'radio';
                        if (a$.isIE) {
                             var checked = '', onclick = '';
                             if (s.options[j].selected == true) {
                                  checked = ' checked="checked"';
                                  // needed to allow checked entries to be imeadiately activated, but won't work when actually clicked
                                  onclick = " onclick=\"a$.multiSelect(this, '"+ value +"', 'a9multiselect-"+ id +"');\"";
                                  sel++;
                             var chkbx = a$.newNode('<input title="'+ s.options[j].text +'" name="a9multiselect-options-'+ id +'" alt="'+ id +'" type="'+ chkType +'"'+ checked + onclick +' value="'+ value +'" />', 'a$-'+ a$.c++, '_a9checkbox', '', null, li);
                        } else {
                             var chkbx = a$.newNode('input', 'a$-'+ a$.c++, '_a9checkbox', '', null, li);
                             chkbx.setAttribute('type', chkType);
                             chkbx.setAttribute('value', value);
                             chkbx.setAttribute('alt', id);
                             chkbx.setAttribute('title', s.options[j].text);
                             chkbx.setAttribute('name', 'a9multiselect-options-'+ id);
                             if (s.options[j].selected == true) {
                                  chkbx.checked = true;
                                  // needed to allow checked entries to be imeadiately activated, but won't work when actually clicked
                                  chkbx.onclick = "a$.multiSelect(this, '"+ value +"', 'a9multiselect-"+ id +"');";
                                  sel++;
                        a$.newEvent(chkbx, 'click', function(event) {
                             a$.cancelbubble(event); // cancel so li event doesn't get activated
                             if (a$.isIE) // IE has trouble with 'this' being used here
                                  var t = a$.e(document.activeElement.id);
                             else
                                  var t = this;
                             a$.multiSelect(t, t.value, 'a9multiselect-'+ t.alt);
                             a$.chk(t);
                             // uncheck the select all
                             allbx = a$.t('input', a$.e('a9selectall-'+ t.alt));
                             if (allbx) a$.chk(allbx, (allbx.checked = false));
                        a$.newEvent(li, 'click', function() {
                             var t = a$.e('a$-'+ this.id.slice('a9-li-'.length));
                             t.checked = !t.checked;
                             a$.multiSelect(t, t.title, 'a9multiselect-'+ t.alt);
                             a$.chk(t);
                        if (a$.isIE)
                             var label = a$.newNode('<label onclick="a$.cancelbubble(event);" for="'+ chkbx.id +'" />', '', '', text, null, li);
                        else {
                             var label = a$.newNode('label', '', '', text, null, li);
                             label.setAttribute('for', chkbx.id);
                             a$.newEvent(label, 'click', function(event) { a$.cancelbubble(event); }); // cancel so li event doesn't get activated
                        // Hide Radio Buttons for Firefox
                        if (chkType == 'radio' && !a$.isIE) {
                             chkbx.style.visibility = 'hidden';
                             label.style.marginLeft = '-18px';
                   if (sel == m && allbx != null)
                        allbx.setAttribute('checked', true);
                   else if (sel == 0)
                        span.innerHTML = a$.NO_SELECTION;
                   var bs = a$.node_before(s);
                   bs.appendChild(div);
                   bs.appendChild(expbody);
                   // check the className of s to look for fieldwidth- and valuewidth-
                   // if a value is specified without format it's default is pixels
                   // options are value: dynamic, 30, 30px, 30em, etc...
                   // dynamic will only have a min-width value set
                   // if valuewidth is missing, then it's min-width is set to fieldswidths (either default or specified using a$.getStyle)
                   var fieldwidth = s.className.toLowerCase().indexOf('fieldwidth-');
                   var valuewidth = s.className.toLowerCase().indexOf('valuewidth-');
                   if (fieldwidth >= 0) {
                        var q = s.className.slice(fieldwidth);
                        fieldwidth = (q.slice(0, q.indexOf(' ') < 0? q.length: q.indexOf(' '))).slice('fieldwidth-'.length);
                        fieldwidth = parseFloat(fieldwidth) == fieldwidth? fieldwidth+'px': fieldwidth;
                   } else fieldwidth = '';
                   if (valuewidth >= 0) {
                        var q = s.className.slice(valuewidth);
                        valuewidth = (q.slice(0, q.indexOf(' ') < 0? q.length: q.indexOf(' '))).slice('valuewidth-'.length);
                        valuewidth = parseFloat(valuewidth) == valuewidth? valuewidth+'px': valuewidth;
                   } else valuewidth = '';
                   if (fieldwidth != 'dynamic') {
                        expcol.style.width = fieldwidth;
                        div.style.width = fieldwidth;
                   if (valuewidth != 'dynamic')
                        expbody.style.width = valuewidth;
                   expbody.style.minWidth = a$.getStyle(expcol, 'width');
                   if (a$.isIE || a$.isSafari)
                        expbody.style.marginTop = '-1.4em';
                   // remove original select
                   s.parentNode.removeChild(s);
                   // when done perform prep functions
                   a$.expcol(div);
                   a$.multiSelectPrep(div);
    a$.selectAll = function(o) {
         var I = a$.T('input', a$.e('a9multiselect-body-'+ o.getAttribute('alt')));
         for (var i = 0, m = I.length; i < m; i++) {
              var c = I[i];
              if (c.type == 'checkbox' && c.className == '_a9checkbox') {
                   c.checked = o.checked;
                   a$.multiSelect(c.id, c.value, 'a9multiselect-'+ c.getAttribute('alt'));
                   a$.chk(c);
    a$.multiSelect = function(chk, value, parent) {
         var pid = parent.slice('a9multiselect-'.length);
         var to = a$.e(pid);
         chk = a$.isString(chk)? a$.e(chk): chk;
         if (chk.checked) {
              chk.type == 'checkbox'? to.value += a$.msSeparator + value: to.value = value;
         } else
              eval("to.value = to.value.replace(/"+ value +"/g, '');");
         var title = a$.e(parent+'-title');
         // cleans up clogged pipes
         to.value = to.value.replace(/\|{3}/g, a$.msSeparator);
         to.value = to.value.replace(/\|{2}/g, a$.msSeparator);
         to.value = to.value.replace(/^\|(.*)/g, '$1');
         to.value = to.value.replace(/(.*)\|$/g, '$1');
         var cbs = a$.T('input', a$.e('a9multiselect-body-'+ pid)), x = '', v = a$.NO_SELECTION;
         var vals = '', c = 0;
         for (var i = 0, l = cbs.length; i < l; i++)
              if (cbs[i].className == '_a9checkbox' && cbs[i].checked) {
                   vals += cbs[i].title +' | ';
                   c++;
                   if (x == 0) {
                        v = cbs[i].title;
                   } else {
                        v = (x+1) +' '+ a$.SELECTED;
                   x++;
         vals = c > 1? vals.slice(0, vals.length-3): v;
         title.innerHTML = v;
         t = a$.e(pid).title;
         title.title = t == ''? vals: t +' : '+ vals;
    a$.multiSelectPrep = function(parent) {
         if (parent == null) parent = document;
         var pid = parent.id.slice('a9multiselect-'.length);
         var P = a$.T('input', a$.e('a9multiselect-body-'+ pid)), toObj = a$.e(parent.id.slice('a9multiselect-'.length)), to = toObj.value, newto = '';
         for (var i = 0, l = P.length; i < l; i++) {
              if (P[i].type != null && P[i].className == '_a9checkbox') {
                   a$.chk(P[i], false);
                   if (P[i].checked == true) {
                        a$.chk(P[i]);
                        // autoselect and populate the value for default checked items
                        var val = P[i].value;
                        a$.multiSelect(P[i], val, parent.id);
         if (to != '') { // remove any duplicates when reloading with firefox
              to = to.split(a$.msSeparator).sort();
              for (var i = 1, l = to.length; i < l; i++)
                   if (to[i] == to[i-1])
                        to[i-1] = null;
              to = to.toString().replace(/,,/g, ',').replace(/,/g, a$.msSeparator);
              toObj.value = to.indexOf(a$.msSeparator) == 0? to.slice(1): to.length > 1 && to.lastIndexOf(a$.msSeparator) == to.length-1? to.slice(0, to.length-1): to;
    a$.chk = function(c, force) {
         var n = a$.node_after(c);
         if (n != null && n.style) {
              if ((force != null && force) || c.checked) {
                   n.style.fontWeight = 'bold';
                   if (c.type == 'radio') {
                        var R = c.form[c.name];
                        for (var i = 0, l = R.length; i < l; i++) {
                             var r = R[i];
                             if (r.id != c.id)
                                  a$.node_after(r).style.fontWeight = 'normal';
                        a$.expcolclick('a9multiselect-click-'+ c.alt);
              } else {
                   n.style.fontWeight = 'normal';
    a$.closeSelect = function(id) {
         clearTimeout(a$.msBodyTimer);
         a$.msBodyTimer = null;
         var obj = a$.e('a9multiselect-body-'+ id);
         var vis = a$.getStyle(obj, 'display');
         if (vis == 'block') {
              //obj.style.display = 'none';
              a$.expcolclick(a$.e('a9multiselect-click-'+ id));
    a$.is_ignorable = function(nod) {
    return (nod.nodeType == 8) || // A comment node
    ((nod.nodeType == 3) && !(/[^\t\n\r ]/.test(nod.data))); // a text node, all ws
    a$.node_before = function(sib) {
         if (a$.isString(sib))
              sib = a$.e(sib);
         while ((sib = sib.previousSibling)) {
              if (!a$.is_ignorable(sib)) return sib;
         return null;
    a$.node_after = function(sib) {
         while (sib != null && (sib = sib.nextSibling)) {
              if (!a$.is_ignorable(sib)) return sib;
         return null;
    a$.expcol = function(parent) {
         var x = a$.T("div", parent);
         for (var i = 0, l = x.length; i < l; i++)
              if (x[i].className.indexOf("-click") >= 0) x[i].onclick = a$.expcolclick;
    a$.expcolclick = function(o, force) {
         var c = null;
         if (a$.isIE)
              var t = this.id? this: a$.isString(o)? a$.e(o): o;
         else
              var t = this.toString().toLowerCase().indexOf('element') >= 0? this: a$.isString(o)? a$.e(o): o;
         c = a$.e('a9multiselect-body-'+ t.id.slice('a9multiselect-click-'.length));
         c.style.position = 'absolute';
         if (c != null && c.style && c.style.display != "block") {
              if (t.className.indexOf("-open") > 0) return;
              t.className = t.className +"-open";
              c.style.display = "block";
              if (force == null || force == false) {
                   if (a$.openSelect && a$.openSelect.id != t.id)
                        a$.expcolclick(a$.openSelect, true);
                   a$.openSelect = t;
         } else if (c != null && c.style) {
              t.className = t.className.substr(0, t.className.length-5);
              c.style.display = "none";
              if (force == null || force == false) {
                   a$.openSelect = null;
    a$.isString = function(o) { return (typeof(o) == "string"); }
         tp: type (eg 'div')
         id: id
         cs: class OR style (if a : exists it is a style (color: pink; display: block;), not a class)
         tx: text to display inside the node
         cd: any child node with which to place inside
         p: parent node to attach to
    a$.newNode = function(tp, id, cs, tx, cd, p) {
         var node = document.createElement(tp);
         if (tx != null && tx != '')
              node.appendChild(document.createTextNode(tx));
         if (id != null && id != '')
              node.id = id;
         if (cs != null && cs != '' && cs.indexOf(':') < 0)
              node.className = cs;
    // inline styles removed to limit code to this specific task
    //     else if (cs != null && cs != '' && cs.indexOf(':') > 0)
    //          a$.setStyles(node, cs);
         if (cd != null)
              node.appendChild(cd);
         if (p != null && p != '')
              (a$.isString(p)? a$.e(p): p).appendChild(node);
         return node;
    // specific element via id
    a$.e = function(id, source) {
         if (source != null)
              return source.getElementById(id);
         return document.getElementById(id);
    // all elements with tag
    a$.T = function(tag, source) {
         if (source != null)
              return source.getElementsByTagName(tag);
         return document.getElementsByTagName(tag);
    // the first element with tag
    a$.t = function(tag, source) {
         if (source != null)
              var T = source.getElementsByTagName(tag);     
         else T = document.getElementsByTagName(tag);
         if (T.length > 0)
              return T[0];
    // all elements with class
    a$.C = function(classname, source) {
         if (source != null)
              return source.getElementsByClassName(classname);
         return document.getElementsByClassName(classname);
    a$.getStyle = function(obj, styleIE, styleMoz) {
         if (styleMoz == null) styleMoz = styleIE;
         if (a$.isString(obj)) obj = a$.e(obj);
         var s = '';
         if (window.getComputedStyle)
              s = document.defaultView.getComputedStyle(obj, null).getPropertyValue(styleMoz);
         else if (obj.currentStyle)
              s = obj.currentStyle[styleIE];
         if (s == 'auto')
              switch (styleIE) {
              case 'top':          return obj.offsetTop;          break;
              case 'left':     return obj.offsetLeft;          break;
              case 'width':     return obj.offsetWidth;          break;
              case 'height':     return obj.offsetHeight;     break;
         else
              return s;
    a$.newEvent = function(e, meth, func, cap) {
         if (a$.isString(e))     e = a$.e(e);
         if (e.addEventListener){
              e.addEventListener(meth, func, cap);
         return true;
         }     else if (e.attachEvent)
              return e.attachEvent("on"+ meth, func);
         return false;
    // Start things off
    a$.newEvent(window, 'load', function () {
         var x = a$.T('select');
         for (var i = 0, l = x.length; i < l; i++) {
              a$.multiSelectCreate(x[i]);
    a$.cancelbubble = function(e) {
         if (a$.isIE) e = event;
         if (e) e.cancelBubble = true;
    function noop() {
         return null;     
    Edited by: brugo on 07/12/2009 10:47
    Edited by: brugo on 07/12/2009 10:49
    Edited by: brugo on 07/12/2009 10:50
    Edited by: brugo on 07/12/2009 10:51
    Edited by: brugo on 07/12/2009 11:03

  • Populate values selects with select one choice

    How I can to create in Java??

    use a managed bean property of type ArrayList<SelectItem> and generate accessors. The reference it from f:selectItems in the selectOneChoice
    Frank

  • Trying to dynamically populate html:options

    I am using iframe.
    on the first frame the user inputs letters and the database is searched for anything that starts with those letters.
    <html:text property="usersInput"/>
    <html:submit value="search" onclick="middle.document.forms[0].property='list'"/>
    the second frame "middle" is suppose to display the results of the search.
    html:select property="list">
    <html:options property="list"/>
    </html:select>
    of course with this code the second frame "middle" gives an err msg, because list is null.
    Is there anyway to get around this so that initially the select list that appears on the pages is empty and then when the search is done (button is clicked) the list will populate with the results?

    I guess there must be something wrong with my question :( no one is helping me. Well let me ask this...
    With formbeans and iframes...
    Is the information process while in the <html:form>...</html:form> or once it leaves the form? because now I'm doing the search in one frame and then onclick="..." I'm calling another frame to display the results of the search using <html:select><html:options>...</html:select>, but I keep getting an err msg "null pointer".
    It seems like the information from the first iframe, either has not been "processed" or got "deleted" by the formbean, when the second frame tries to access it.
    Can someone please give me an idea of what's going on. I'VE HIT A WALL!!!!

  • How to load data into html:select using Struts ?

    How to load data into <html:select> using Struts ?
    I can not load an array or collection (static or dynamic data) into drop down list control by <html:select /> Struts.
    please use:
    <html:select >
    <html:options />
    </html:select >
    Please help me. please detail it. thanks a lot.
    Message was edited by:
    tranminhman

    In order to load a collection or array of data you can use <html:select> with <html: options collection="" name=""/>
    here collection attribute refers to the Arraylist or Array of data and name is the name of the Form bean.
    Hope this helps...
    Chaitanya V

  • Multi-select list to select with in clause

    I have a multi-select list that the user can select from. P200_NODE_SELECTION.
    I take the value(s) of that list and parse them out in a process using this code:
    declare
    l_selected HTMLDB_APPLICATION_GLOBAL.VC_ARR2;
    v_char varchar2(2000);
    begin
    l_selected:=HTMLDB_UTIL.STRING_TO_TABLE(to_char(:P200_NODE_SELECTION) );
    for i in 1..l_selected.count
    loop
    if i=1
    then
    :P200_LIST_OF_NODES:=to_char(l_selected(i) );
    else
    :P200_LIST_OF_NODES:=to_char(:P200_LIST_OF_NODES)||','||to_char(l_selected(i) );
    end if;
    end loop;
    end;
    This PL/SQL is trying to create the in-list string to be used in as the LOV to populate another select list. The LOV query for the second multi-select list looks like this:
    select instance_name DISP, instance_id RET
    from instance
    where to_char(node_id) in (:P200_LIST_OF_NODES)
    I've tried this a couple of different ways. Without the to_char in the where clause (a terrible thing to do to a query I know) I get a numeric conversion error.
    When I do it with the to_char, it works if I select one record in the multi-select list, but if there are more than one then the in list fails.
    I'm sure there must be a better way to do this (or at least a way that works!).... anyone want to help me here?

    Robert - Try  where instr(','||:P200_LIST_OF_NODES||',',','||to_char(node_id)||',') > 0...and do get rid of all those to_chars in the process.
    Scott

  • URGENT-CREATE A HTML FILE WITH AN STRING INPUT FROM THE RUNNING JSP

    I am designing a web page where the user enters a page after entering his/her login and password.The User should now be provided with a display page containing the servers that he has permissions for access.The servers that he has permissions are maintained in a database(a normal text file in UNIX).
    Till now the program has been complete for displaying the servers that are available to him.
    I need to create a HTML form containing these servers names in a check box so that when the user clicks thcheck box against the server name it should go to the server and get the password for the required server.
    THe intention from me is to create a HTML file that dynamically takes values from the running JSP means the server names as a string value to its input and then i can continue
    Please guide me in creating a HTML form based on the string output from the running JSP
    FileInputStream fs = new FileInputStream("/root/Auth_Application/User_Access_List");
    DataInputStream in1 = new DataInputStream(fs);
    int fl=0;
    while (in1.available() !=0)
    String str1=in1.readLine();
    StringTokenizer st1 = new StringTokenizer(str1);
    String usernam=st1.nextToken();
    if (usernam.equals(uname))
    String ip=st1.nextToken();
    String host=st1.nextToken();
    fl=1;
    out.println("<tr><td>                                                                                              "+ host + "</td><td> " + ip +"</td></tr>");
    if (fl == 0)
    out.println("YOU HAVE NO SEVRER IN YOUR PROFILE !");
    in1.close();
    The host string here is the server name
    the ip is the ip address of the server
    Need to input these values to another HTML page that contains the check box list of the servers .
    once these are clicked i think i can pass on this to another JSP and retreive passwords
    Please guide me in this

    FileInputStream fs = new FileInputStream("/root/Auth_Application/User_Access_List");
                                    DataInputStream in1 = new DataInputStream(fs);
                                    int fl=0;
                                    while (in1.available() !=0)
                                    String str1=in1.readLine();
                                    StringTokenizer st1 = new StringTokenizer(str1);
                                    String usernam=st1.nextToken();
                                    if (usernam.equals(uname))
                                    String ip=st1.nextToken();
                                    String host=st1.nextToken();
                                    fl=1;
                                    out.println("<tr><td>                                                                                              "+ host + "</td><td>          " + ip +"</td></tr>");
                                    if (fl == 0)
                                    out.println("YOU HAVE NO SERVER IN YOUR PROFILE !");
                                    in1.close();I feel sorry for the inconvenience that is caused as i am new to using these forums.
    I have here used a simple program to retreive the names of the servers that the users have acess to..
    I have here read the servername and server ip stored from a file in UNIX in the running JSP.Now i need to pass these string variables to HTML file and display it in a Check box format.the strings host and ip have to be passed to the input of the HTML file so that they can further be processed once they are clicked using another JSP.
    Can anybody please help me in Passing these strings from the running JSP and display it in a check box format

  • How to populate a sharepoint 2010 list from the active directory. How to populate a sharepoint 2010 list with all sharepoint user profiles

    How to populate a sharepoint 2010 from the active directory.
    I want a list of all the computers in the active directory,
    another one with all users.
    I want also to populate a sharepoint 2010 list from the sharepoint user profiles.
    Thanks
    sz

    While
    the contacts list is usually filled out for contacts that are outside the company, there are times when you would use a contacts list to store internal and external resources.  Wouldn’t it be nice if you didn’t have to re-type your internal contacts’
    information that are already in the system?  Now you can with a little InfoPath customization on the contacts list. 
    Here’s our plan:
    Create the contacts list, and open in InfoPath
    Create a data connection to the User Profile web service
    Customize the form adding some text, a people picker and a button
    Create InfoPath rules that will populate the contact fields from the user fields in the User Profile store
    Let’s get going!  Before we begin, make sure you have InfoPath 2010 installed locally on your computer.  I also want to give credit Laura
    Rogers and Darvish Shadravan’s book Using
    Microsoft InfoPath 2010 with Microsoft SharePoint 2010 Step by Step.  I know it looks like a lot of steps, but it’s easy once you get the hang of it.
    So obviously we need a contacts list.  If you don’t already have one, go to the SharePoint site where it will live, and create a contacts list.
    From the list, click the List tab on the ribbon, then click Customize form:
    So now we have our form open in InfoPath 2010.  Let’s add our elements to the form. 
    Above all the fields, let’s add some text instructing users what to do with the the field we’re about to add (.e.g To enter an existing user’s information, choose the user below).
    Insert a people picker control by clicking the Person/Group Picker control in the Controls section of the ribbon.  This will add a column to the contacts list called group.
    Below the people picker, insert a button control from the same section of the ribbon as above.  With the button still highlighted, click the Control Tools|Properties tab on the ribbon. 
    Then in the Label box, change the text to something more appropriate to our task (e.g. Click here to load user data!).
    You can drag the button control a little larger to account for the text.
    We should end up with something like this:
    Before we can populate the fields with user data, we need to create a connection to the User Profile Service.
    Add a data connection to the User Profile Service
    Click the Data tab on the ribbon, and click the option From Web Service, and From SOAP Web Service.
    For the location, enter the URL of your SharePoint site in the following format – http://<site url>/_vti_bin/UserProfileService.asmx?WSDL.  Click Next.
    Note - for the URL, it can be any SharePoint site URL, not just to the site where your list is.
    For the operation, choose GetUserProfileByName.  Click Next.
    Click Next on the next two screens.
    On the final screen, uncheck the box for “Automatically retrieve data when form is opened”. This is because we are going to retrieve the data when the button is clicked, also for performance reasons.
    Now we need to wire up the actions on our button to populate the fields with the information for the user in the people picker control.
    Tell the form to read the user from the people picker control
    Click the Home tab on the ribbon.
    Click the button control we created, and under the Rules section of the ribbon, click Manage Rules. Notice the pane appear on the far right.
    In the Rules pane, click New –> Action. Change the name to something like “Query and load user data”.
    Leave the condition to default (none – rule runs when button is clicked).
    Click the Add button next to “Run these actions:”, and choose “Set a field’s value”.
    For Field, click the button on the right to load the select a field dialog.  Click the Show advanced view on the bottom.  At the top, click the drop down and choose the GetUserProfileByName
    (Secondary) option.  Expand myFields and queryFields to the last option and highlightAccountName.  Click ok. 
    For Value, click the formula icon. On the formula screen, click the Insert Field or Group button. Again click the show advanced view link, but this time leave the data
    connection as Main. Expand dataFields, then mySharePointListItem_RW.  At the bottom you should see a folder called group (the people picker control we just added to the form).  Expand this, then pc:Person,
    and highlightAccountId.  Click Ok twice to get back to the Rules pane.
    If we didn’t do this and just queried the user profile service, it would load the data of the currently logged in user.  So we need to tell the form what user to load the data for.  We take the AccountID field from the people
    picker control and inject into the AccountName query field of the User Profile Service data connection. 
    Load the user profile service information for the chosen user
    Click the Add button next to “Run these actions:”, and choose Query for data.
    In the popup, for Data connection, click the one we created earlier – GetUserProfileByName and clickOk.
    We’re closing in on our goal.  Let’s see our progress.  We should see something like this:
    Now that we have the user’s data read into the form, we can populate the fields in the contact form.  The number of steps to complete will depend on how many fields you want to populate.  We need to add an action step for
    each field.  I’ll show you one example and then you will just repeat the steps for the other fields.  Let’s update the Job Title field.
    Populate the contact form fields with existing user’s data
    Click the Add button next to “Run these actions:”, and choose “Set a field’s value”.
    For Field, click the button on the right to load the select a field dialog.  Highlight the field Job Title.
    For Value, click the formula icon. On the formula screen, click the Insert Field or Group button.  Click the Show advanced view on the bottom. At the top, click the
    drop down and choose theGetUserProfileByName (Secondary) option.  Expand the fields all the way down until you see the Value field.  Highlight it but don’t click ok, but click the Filter
    Data button, then Add. 
    For the first dropdown that says Value, choose Select a field or group.   The value field will be highlighted, but click the field Name field
    under PropertyData.  Click Ok. 
    In the blank field after “is equal to”, click in the box and choose Type text.  Then type the text Title. 
    Click ok until you get back to the Manage Rules pane.  The last previous screen will look like this.
    We’re going to update common fields that are in the user’s profile, and likely from Active Directory.  You can update fields like first and last name, company, mobile and work phone number, etc.  For the other fields, the
    steps are the same except the Field you choose to update from the form, and the very last step where you enter the text will change.  Here’s what the rules look like when we’re done:
    We’re all done, good work!  You can preview the form and try it now.  Click Ctrl+Shift+B to preview the form.  Once you’re satisfied, you can publish the form back to the library.  Click File –> Quick
    Publish.  Once it’s done, you will get confirmation:
    Now open your form in SharePoint.  From the contact list, click Add new item.  Type in a name, and click the button and watch the magic happen!

  • Table - populate one table with data from the list of another table

    Hello All,
    I am a newbie in Swing and am a book and few tutorials old.
    I am trying to achieve the following:
    (1) I populate Table1 (a JTable) with a list of data - each row consists of several columns. And I have a Table2 (also JTable) that is in the beginning empty.
    Both the tables (Table1 and Table2) are showed in the window.
    (2) Lets say, there's a button (JButton) in between the two tables.
    Now if I Select a row from Table1 and press the button, this row will be sent/copied to Table2.
    And this way I can choose different rows and pass the data to Table2.
    I have manages to make Table1 and put data in it ... but for the rest, I don't know where and how to begin.
    Would appreciate some ideas and tips.
    Thank you.

    Since you are using a button to start the copy process you don't need to worry about a ListSelectionListener or a MouseListener. You need to create a button with an ActionListener that does the following:
    a) Create an Array based on the size of the number of columns in the table
    b) get the index of the selected row
    c) populate the Array with data from the TableModel by using the table.getModel().getValueAt(...) method for each
    d) Now you can add the row of data to the other JTable by updating its model.
    DefaultTableModel model2 = (DefaultTableModel)table2.getMode();
    model.addRow( theArray );

  • Populate Text Box with mulitple selctions from list box

    Hello,
    I am new to LiveCycle and searched the forums for an answer as to how to populate multiple selections from a list box to a text field.
    I added to the calculate field of the text field the following: TextField14.rawValue = ListBox1.rawValue
    Is there a way I can modify this so that the items from the listbox populate the text field so that the values show up side by side (i.e. California, Connecticut, New York) instead of top-down?
    Joe

    I would use the following JS code in the 'exit' event of the List box
    var
    ListValue = this.rawValue;ListValue
    = replaceAll(ListValue, "\n", " ,");TextField1.rawValue
    = ListValue; 
    function replaceAll(oldStr,findStr, repStr) { 
         var srchNdx = 0; // srchNdx will keep track of where in the whole line  
         // of oldStr are we searching.
         var newStr = ""; // newStr will hold the altered version of oldStr. 
         while (oldStr.indexOf(findStr,srchNdx) != -1)
              // As long as there are strings to replace, this loop 
              // will run.  
              newStr
    += oldStr.substring(srchNdx,oldStr.indexOf(findStr,srchNdx));
              // Put it all the unaltered text from one findStr to 
              // the next findStr into newStr. 
              newStr
    += repStr;
              // Instead of putting the old string, put in the 
              // new string instead.  
              srchNdx
    = (oldStr.indexOf(findStr,srchNdx) + findStr.length);
              // Now jump to the next chunk of text till the next findStr.  
         newStr
    += oldStr.substring(srchNdx,oldStr.length);
         // Put whatever's left into newStr.
         return newStr;
    Good Luck,

  • Problem with html:select or html:options tags using struts,jsp and tomcat

    Hi
    I'm updating a Struts-Project to a new layout and therefore rework all jsp Sites.
    I'm also using a new Folder-Structure and update therefore my struts-config file.
    My Problem now is:
    Till now, we had a select-field with a code like this:
    < html:form action="/timetableAction" method="POST">
    < table width="53%" border="0">
    < tr>
    < td>< html:radio property="dauer" value="semester"
    /></ td>
    < html:select property="semester" size="1">
    < htmlptions name="semesterList" />
    </ html:select>
    </ html:form>
    The problem now is, that whenever I use any <html:xy> tag, the tomcat server I use can not show the page, he shows just the headers of the template, but not the
    content.-jsp-File where the form would be in. He stops right in the middle of the html page, when he notices the <html:xy> tags.
    And the funny thing is, that he has no problem to show a page when there is a <html:errors> within it? Why could this be? the struts-html.tld File is well included and teh Tomcat Server shows no exceptions.
    Waiting for you answers and thanks

    Thank you, I already got the answer in another forum

  • How to populate table rows with selected listbox items?

    Hello,
    I am trying to populate a table with selected listbox items. Each item should be a new row in the table. The picture below is the listbox and table I am using. I need to get the selected name to populate the Attendee column of the table when the user clicks the Add button. How do you do this with mutltiple attendees selected?
    Thank you,
    Angie

    So you're considering the fact the if the user clicks the button twice, the name will appear twice and you don't want this, right?
    Then you must check if any value is the same than the one you are about to add in the row..
    for (var i = 0 ; i < ListBox1.length; i++){
         if (ListBox1.getItemState(i) == true){
              for (var x = 0 ; x < Table1._Row1.count; x++){
                   var boNewAttendee = true;
                   var strAttendee = Table1.resolveNode("Row1[" + x.toString() + "]").txtAttendee;
                   var newAttendee = ListBox1.getDisplayItem(i);
                   if (strAttendee.rawValue == newAttendee){
                        boNewAttendee = false;
                        break;
              if (boNewAttendee){
                   txtAttendee.rawValue = ListBox1.getDisplayItem(i);

  • How to auto populate a column/SharePoint list with Current Date?

    I have a SharePoint list and I created a column called ‘CurrDate’. 
    I need this column to;
     Display the current      date,
    Auto populate all rows with the current date in the      SharePoint list
    Dynamically update with the current date
    I first tried creating the column using the default SharePoint interface Date Time but it’s not doing any of the steps listed above:
    I even tried entering =[Today] in the Calculated Value field. 
    Still nothing…
    So, I’m sure you will toss out a code snippet to make this work, which is great. 
    However, I’m a total noob with SPD, where the heck do I insert this snippet?
    Always in need of help.

    Hi ,
    I understand that you want to add a column  to a list to hold current date. Here is a workaround:
    Add a single line of text column to the list. Name the list as Today.
    Add a calculated column to the list. Use the [Today] as the formula. Set the calculated column to be Date and Time type.
    Delete the Today column from the list.
    Thanks,
    Entan Ming
    TechNet Subscriber Support in forum
    If you have any feedback on our support, please [email protected]
    Entan Ming
    TechNet Community Support

Maybe you are looking for

  • IMac G5 and OS 10.4.6

    Are there any obvious issues with the new update and an iMac G5? I haven't seen many in this forum. PS My first post!! iMac G5 2.0   Mac OS X (10.4.6)  

  • V$BGPROCESS and V$SESSION

    This is on 10g. V$BGPROCESS displays information about background processes V$SESSION has some rows representing background processes. What is the difference between two ? Am I correct in understanding that ; v$bgprocess contains total allocated proc

  • Beginner help with splash of color in a black and white photo

    Hi there.  I just perchased the Photoshop Elements 7.  I have a picture of my niece who has beautiful blue eyes and I want to make it black and white and them leave her eyes there beautiful blue??  Can anyone give me step by step instructions on how

  • Oracle DIS SCCM Install

    Hi, I need some help with Oracle Desktop Integration Suit. I´m trying to install the software, using Microsoft SCCM 2007, on Windows 7 clients. I created a unattended program, using a msi file, with /I /q parameters and the common directory. The inst

  • Nokia n95 no route tracking?

    Hi. Nokia n95 announces route tracking...but i dont have it. Just global position in the map. To have route tracking i need to buy a licence? regards