Placing string item as a list option

hi forum users i want to place the string item code which retrives server info as a list option but i do not know how to go abt it can anyone help thanks .
/*if (infopool.containsKey("ServerInfo")) {//server info
               res.removeCommand(Contents.ok);
               infopool.remove("ServerInfo");
               if (Datas.server_services.size() > 0) {
                    res.append(new util.CustomStringItem("Server Services:", res.getWidth()));
                    Vector serv = Datas.server_services;
                    for (int k=0;k<serv.size();k++) {
                         String lab = ((StringItem)serv.elementAt(k)).getLabel();
                         String name = ((StringItem)serv.elementAt(k)).getText();
                         res.append(new StringItem(lab+" ",name));
               else
                    res.append(new StringItem("Server Info", " not available"));               
          else{*/
thank you .

hi forum users i want to place the string item code which retrives server info as a list option but i do not know how to go abt it can anyone help thanks .
/*if (infopool.containsKey("ServerInfo")) {//server info
               res.removeCommand(Contents.ok);
               infopool.remove("ServerInfo");
               if (Datas.server_services.size() > 0) {
                    res.append(new util.CustomStringItem("Server Services:", res.getWidth()));
                    Vector serv = Datas.server_services;
                    for (int k=0;k<serv.size();k++) {
                         String lab = ((StringItem)serv.elementAt(k)).getLabel();
                         String name = ((StringItem)serv.elementAt(k)).getText();
                         res.append(new StringItem(lab+" ",name));
               else
                    res.append(new StringItem("Server Info", " not available"));               
          else{*/
thank you .

Similar Messages

  • Running OS X 10.9 but when trying to list an item to sell on ebay it say=Sorry. Your browser doesn't support the popular listing options selling form. If you'd like to try it, please try using Internet Explorer 6 or higher, or Firefox 1.5 or higher. Help

    I am running OS X 10.9
    but when trying to list an item to sell on ebay it say=  Sorry. Your browser doesn't support the popular listing options selling form. If you'd like to try it, please try using Internet Explorer 6 or higher, or Firefox 1.5 or higher.
    Help please so I can continue my sad life

    Tried to see if it is looking for flash and it is disabled or not installed by default; java (not being installed and best to turn it off normally), browser agent to report it as something else.
    Opera comes the closest I've read to spoofing a site telling it is IE but you have to do so per site. Also OmniWeb.

  • SharePoint Btach Process with List string items into list

    Hi 
    I have a List<string> with 8000 elements.
    I need to take 1000 everytime and run the batch process to insert data into list.
    I cant apply all 8000 items in one shot.
    Can you please suggest me that how  i can query List<string> and execute.
    Thanks
    Siddartha

    You need to use Skip and Take methods of your object collection.
    Example:
    list.Skip(1000).Take(1000)
    This would skip the first 1000 and take the next 1000.
    You'd just need to increase the amount skipped with each call
    List<string> list = new List<string>();
    //Code to get 8000 elements
    for (int index = 0; index < 8; index++)
    List<string> batchList = GetBatch(index, list);
    //Code to insert data into list
    And here is the GetBatch method...
    public List<string> GetBatch(int pageNumber, List<string> list)
    return list.Skip(pageNumber * 1000).Take(1000);
    I found the answer
    here.

  • Hide "more" button in a list view, only works for first item in the list

    I have the following code in a list view that outputs several dozen items in a web app.  The code only works for the first item, how can I make it loop through and execute the test for each item in the list view?  The {tag_hide more button} is a checkmark field that yields a numeric 1" if checked otherwise yields a numeric "0".
    <div id="more-option">
            <p class="right"><a href="{tag_itemurl_nolink}" class="btn btn-small btn-very-subtle">More &rarr;</a></p>
          </div>
          <div class="more-selection" style="display: none;">{tag_hide more button}</div>
          <script>
    if ($(".more-selection").text() == "1") {
        $("#more-option").hide();
    </script>

    What's the URL for the site where you are using this?  Offhand, it looks like it should work with your first example so you are either placing the script before those elements are loaded or you might try wrapping your current javascript inside the:
    $(document).ready(function() {
    --- your existing javascript here
    This make sure the code runs once all the html is loaded on the page.  Without seeing a URL and debugging with the js console in Chrome I can't give you a solid answer.
    But, I do know that you can probably do this with a lot less markup.  Once we figure out what the actual problem is I have a better solution mocked up for you on jsfiddle.
    When looking at my HTML code on jsfiddle, please realize I setup some dummy HTML and removed your tags and added actual values which would be output by your tags.  The main thing I did was remove the whole div.more-selection and instead, added a "data-is-selected" attribute on your div.more-option element.  Then, in my javascript for each div.my-option element on the page, we loop through them, find the value of that data attribute and hide that div if it's less than 1 (or 0).
    Here's the fiddle for you to look at:  http://jsfiddle.net/thetrickster/Mfmdu/
    You'll see in the end result that only two divs show up, both of those divs have data-is-selected="1".
    You can try pasting the javascript code near the closing </body> tag on your page and make sure to wrap my js inside a <script> tag, obviously.  My way is neater on the markup side.  If you can't get it to work it's likely a jquery conflict issue.  My version is using the $(document).ready() method to make sure all the code is loaded before it runs.
    Best,
    Chris

  • Finding a position of an item in a list.

    What i am looking to do is find the position of an item in a list. for instance if my list contains [a, b, c, d, e] and on my command line i put a f d, i want it to return a value of 3 for the position of the 'd' in my list. Could anyone please advise the best way to complete this? I think i am having the problem of it recognizing the 'd'. I would appreciate any help. Here is a piece of my code.
    import java.io.InputStreamReader;
    import java.util.LinkedList;
    import java.util.Scanner;
    public class LinknedList {
         public static void main(String args[]) {
              Scanner scanner = new Scanner(new InputStreamReader(System.in));
              // Setting up the link list of strings
              LinkedList<String> list = new LinkedList<String>();
              // MyLinkedList myList = new MyLinkedList();
              while (scanner.hasNext()) {
                   char option = scanner.next().charAt(0);
                   option = Character.toLowerCase(option);
                   switch (option) {
                   // inserts to end of list
                   case 'i':
                        if (scanner.hasNext()) {
                             String value = scanner.next();
                             list.addLast(value);
                             // myList.addLast(value);
                        } else {
                             System.out.println("ERROR: Unexpected end of input \"a\"");
                        break;
                   case 'r':
                        if (!list.isEmpty()) {
                             System.out.println("Removed: " + list.removeFirst());
                        } else {
                             System.out.println("ERROR: List was empty");
                        break;
                   case 'p':
                        System.out.println(list.toString());
                        break;
                   case 'a':
                        if (scanner.hasNext()) {
                             String value = scanner.next();
                             list.add(0, value);
                        } else {
                             System.out.println("ERROR: Unexpected end of input \"a\"");
                        break;
                   case 'd':
                        list.clear();
                        System.out.println("Your list has been deleted.");
                        break;
                   case 's':
                        int num = list.size();
                        if (num == 0) {
                             System.out
                                       .println("The list does not have any items in it.");
                        } else
                             System.out.println("Your list is " + num + " items long.");
                        break;
                   case 'f':
                        // need to find the position of an letter on the command line
                        break;
                   default:
                        System.out.println("Not an option: " + option);
                        break;
                   System.out.println("Java: " + list.toString());
                   System.out.println("Mine: ");
    }

    What i am doing is building a Linked List. It will have a standard input. you have multiple commands. i, a, d, p, s, f. i will insert, a will add, d will delete, p will print, s will display amount of items on the list and f will set the position in the list. For example. if i type:
    a john
    the result will be:
    [john]
    a paul
    the result will be:
    [jon, paul]
    Lets say i have the list with the items [jon, paul, ringo, geroge] in it and i choose:
    f paul
    a stuart
    the result will be:
    [jon, paul, stuart, ringo, george]
    I want the f switch statement to make a new point in the list where the new item will be added.

  • How to make JComboBox display an item not in list?

    hi,
    i'd like a gui component which is basically a jcombobox that presents a list A,B,C,D.
    The combobox is paired with another gui component which allows choosing sets of items. A etc.. represent preselected sets of items, so the user can click on A and a particular set would be selected.
    My problem is what to have the JComboBox do when the user selects a set of items that is not in the preselected defaults list. It would be nice to have the JComboBox just say "Other" at the top or something, but I can't figure out a way of doing this without putting the String "Other" in the list of items..
    does anyone have any idea of how to approach this? (I looked at making the JComboBox editable but this seems a little complicated?)
    thanks,
    asjf

    Your best option and cleanest design is to have a
    dummy data item in your list for "none of the above". thanks for the reply - this is what I'm doing at the moment. The problem is that I'm expecting testers to legitimately complain that selecting "None of the above" doesn't do anything, and doesn't really make sense ( it could make a random selection :o) )
    i think i agree that adding functionality to do this "properly" is likely to be more work/pain than its worth..
    Only an editable combobox can display something not in the list.this might help - if I could block mouse clicks to the editable area, and write to it programmatically but think this is probably quite difficult (?)
    asjf

  • How to display two-lines strings item

    Hi,
    How can I display list of two-line string items? Each Item in the list should have a phone number and a time. It should look similar to the "dialled numbers" display where each item has an image, and two-line string.
    Is it possible doing it with the high-level API or should I go low-level?
    Thanks in advance
    Imzadi

    use: list.setFitPolicy(Choice.TEXT_WRAP_ON)

  • How do we control who can approve items in a list?

    We are building a referral bonus list that needs to go through 4 levels of approval before being paid out.  I've created the workflow, but I can't figure out how to control who is allowed to approve it.  For example, it would be bad if an employee
    can enter the item, and then approve it as the Manager, Director and VP so that Finance gets notified and puts it on his check.
    How can I set it so that only management-level personnel are able to approve/reject specific items within the list?
    John

    Hi John,
    If you are using a custom list as referral bonus list, you can use the PowerShell to enable the option "Create items and edit items that were created by the user" (you
    can check if you need to set "Read items that were created by the user" ), then all users could only edit his own created items, then you grant "Manage lists" permission
    to Manager,Director and VP on this custom list and they will be able to view and edit all items.
    http://www.hersheytech.com/Blog/SharePoint/tabid/197/entryid/28/Default.aspx
    If you want only Manager, Director and VP to be able to approve/reject the Approval Workflow task items, you need to grant them Contribute permissions or higher on Workflow Tasks list, and remove all others' Contribute permissions.
    http://sharepoint.stackexchange.com/questions/35619/what-type-of-permission-user-needs-in-order-to-approve-workflow-task
    Thanks
    Daniel Yang
    TechNet Community Support

  • Retrieve all items in a list by caml query then write it to a word file page by page

    Dears,
    Greetings
    I have some code which will retrieve all items of a list with caml query.
    Now i want to generate a word file with all these retrieved data. I am using foreach here to get all the items in a SPListItemCollection. Now my question is how i can write all the retrieved items inside the word file?
    see the below code which is writing only the last row item of the SPListItemCollection inside word file. I want to write all the retrieved rows inside this word file.
    SPQuery qry = new SPQuery();
    qry.Query = "<Where><Eq><FieldRef Name='Department' /><Value Type='Text'>HR DEPARTMENT</Value></Eq></Where>";
    SPListItemCollection listItems = KPILIst.GetItems(qry);
    foreach (SPListItem item in listItems)
    lblBadgeNo.Text = item["Badge No"].ToString();
    lblName.Text = item["Name"].ToString();
    lblPosition.Text = item["Position"].ToString();
    lblDept.Text = item["Department"].ToString();
    lblHireDate.Text = item["Hire Date"].ToString();
    lblGrade.Text = item["Grade"].ToString();
    lblCurStatus.Text = item["Status"].ToString();
    string FinalOut = "";
    FinalOut = "<table cellpadding=0 cellspacing=0><tr><td style='height:30px;'></td></tr><tr><td style='height:22px;'></td></tr>";
    FinalOut = FinalOut + "<tr><td style='text-align:justify;font-size:22px;'>" + lblBadgeNo.Text + "</td></tr>";
    FinalOut = FinalOut + "<tr><td style='text-align:justify;font-size:22px;'>" + lblName.Text + "</td></tr>";
    FinalOut = FinalOut + "<tr><td style='text-align:justify;font-size:22px;'>" + lblDept.Text + "</td></tr>";
    FinalOut = FinalOut + "<tr><td style='text-align:justify;font-size:22px;'>" + lblHireDate.Text + "</td></tr>";
    FinalOut = FinalOut + "</table>";
    System.Text.StringBuilder strBody = new System.Text.StringBuilder("");
    strBody.Append("<html " + "xmlns:o='urn:schemas-microsoft-com:office:office' " + "xmlns:w='urn:schemas-microsoft-com:office:word'" + "xmlns='http://www.w3.org/TR/REC-html40'>" + "<head><title>EPCCO : HR Comapny Letter</title>");
    strBody.Append("<!--[if gte mso 9]>" + "<xml>" + "<w:WordDocument>" + "<w:View>Print</w:View>" + "<w:Zoom>90</w:Zoom>" + "<w:DoNotOptimizeForBrowser/>" + "</w:WordDocument>" + "</xml>" + "<![endif]-->");
    strBody.Append("<style>" + "<!-- /* Style Definitions */" + "@page Section1" + " {size:8.5in 11.0in; " + " margin:1.0in 1.25in 1.0in 1.25in ; " + " mso-header-margin:.5in; " + " mso-footer-margin:.5in; mso-paper-source:0;}" + " div.Section1" + " {page:Section1;}" + "-->" + "</style></head>");
    strBody.Append("<body dir=rtl lang=EN-US style='tab-interval:.15in'>" + "<div class=Section1>" + FinalOut.ToString() + "</div></body></html>");
    Response.AppendHeader("Content-Type", "application/msword");
    Response.AppendHeader("Content-disposition", "attachment; filename=Eval_" + lblBadgeNo.Text + ".doc");
    Response.Write(strBody);
    Regards
    Shaji
    I am new to SharePoint

    Hello,
    you can try with OpenXML SDK to create word file. I found one link for your reference:
    http://sharepointplace.blogspot.in/2009/12/programmatically-creating-word.html
    Another way is , use Microsoft Word Object Library.
    http://social.msdn.microsoft.com/Forums/vstudio/en-US/5b82c0b5-ecaf-40f2-a68a-c7c17c85414f/create-word-documents-by-c?forum=csharpgeneral
    Hope it could help
    Hemendra:Yesterday is just a memory,Tomorrow we may never see
    Please remember to mark the replies as answers if they help and unmark them if they provide no help

  • Can a Link be attached to a select list option?

    Here is some code for a select list that pulls its data from a database:
    <select name = "sid" height = "1"class="dropit" >
    <?PHP while ($row = $result ->fetch_assoc())  {   ;
        echo '<option value='. ($row['id']);
        if (!(strcmp($row['id'], $row['id']))) {echo "selected=\"selected\" ";}
         ?>><?php echo $row['type']?>
    <?PHP } ?>   
    </select>
    This works fine with a form. It is fast, and you can jump to an option just by typing its first letter.
    I would like to code it so that the options have a link to another page attached to them without the need for a form.
    It would show the selected item, and next to it would be a link attached to the word "Update"
    The link would be similar to this: <a href="update.php?id=<?php echo $row['id']; ?>">Update</a>
    It is quite easy to do in a table, with the <a ref in one td and the name field in another like so:
    <table>
    <?php while($row = $result->fetch_assoc()) { ?>
      <tr>
        <td><?php echo $row['id']; ?></td>
        <td><?php echo $row['type']; ?></td>
        <td><a href="update.php?id=<?php echo $row['id']; ?>">EDIT</a></td>
       </tr>
      <?php } ?>
    </table>
    but it does not allow key navigation, and as I have a growing list of over 6000 items,it is becoming painfully slow to use.
    Is it possible to include a URL within the option,
    Or allow the option to be selected with the URL alongside it within the select list?
    Its part of a management system that I am updating.
    For searches on the live web I am able to filter the results in a better way, using a word search system..
    All help appreciated.
    Howard Walker

    Thanks Bregent. I never studied Jump Menus before today.
    A jump menu works to a degree, but unless I have made a coding error, it is not possible to jump to an item in the list by hitting a letter key while the list is active.
    Here is my code using a database table with an id and a single field:
    <script type="text/javascript">
    function MM_jumpMenuGo(objId,targ,restore){ //v9.0
      var selObj = null;  with (document) {
      if (getElementById) selObj = getElementById(objId);
      if (selObj) eval(targ+".location='"+selObj.options[selObj.selectedIndex].value+"'");
      if (restore) selObj.selectedIndex=0; }
    </script>
    <form name="form" id="form">
      <select name="jumpMenu" id="jumpMenu">
                 <?PHP while ($row = $result ->fetch_assoc())  { ;?>
                  <option value=<?PHP echo"update2.php?id=".$row['id'] ?> ><?PHP echo $row["id"]." - ";?><?PHP echo $row["field_value"];?></option>
               <?PHP }   ?>
      </select>
      <input type="button" name="go_button" id= "go_button" value="Go" onClick="MM_jumpMenuGo('jumpMenu','parent',1)">
       </form>
    Unless every option has a different link, I can see little use for it.
    Seems little different to a standard form with a drop down menu and a GO button, and that does not need any javascript!
    It does give a workable example of how to populate a jump menu from a database, which I was unable to find on the web.
    Comments welcome.
    Howard

  • How to Update multiple items in other list using event handler?

    Hi All,
    If i update a item in a list, then i should update multiple items in another list need to be update. How to achive using event receivers?

    Hi Sam,
    According to your description, my understanding is that you want to update multiple items in another list when updated a list item.
    In the event receiver, you can update the multiple item using Client Object Model.
    Here is a code snippet for your reference:
    public override void ItemUpdated(SPItemEventProperties properties)
    string siteUrl = "http://sp2013sps/sites/test/";
    ClientContext clientContext = new ClientContext(siteUrl);
    List oList = clientContext.Web.Lists.GetByTitle("another list name");
    ListItem oListItem = oList.GetItemById(1);
    oListItem["Title"] = "Hello World Updated!";
    oListItem.Update();
    clientContext.ExecuteQuery();
    Best regards,<o:p></o:p>
    Zhengyu Guo
    Zhengyu Guo
    TechNet Community Support

  • HT1368 Wish list option not appearing on my iPhone 5 with iOS 7

    Wish list not appearing on my iOS 7

    Are you trying to view or add to your wish list ? If adding to it, what are you trying to add (if it's a free item then you won't get the add to wish list option) ?

  • String item problem

    I use mobility pack visual designer.
    When I create a string item in visual screen designer it looks like that:
    Title
    <text>
    but after i run my app it looks different
    Title <text>
    Why there's no line break?
    When I try to add the line break manually it doesn�t work because screen designer property editor adds to the code \\n when I put \n
    so generated code looks like that
    stringItem1 = new StringItem("stringItem1\\n", "<Enter Text>");  and I cannot edit it manually because generated code is blocked by net beans
    I can initialize my stringItem object one again
    stringItem2 = new StringItem("stringItem2\n", "<Enter Text>");  but I thing that�s very stupid to reinitialize an object twice
    And the line break after title doesn't solve my problem because if the title is too long the device will automatically brake the line and I�ll get this
    A long long title........
    <text>
    one empty line because of that break
    Any ideas?
    I don�t want to use textField because when you set it to uneditable its color becomes gray.

    Check the actual URL up in the location bar. Your comma may actually be dropping out there, because it isn't encoded such that in value commas can be differentiated from delimiters, so the fields aren't lining up in the URL properly.
    When you go to a page that takes in parameters for assignment in the link, it has 2 fields. The first is the comma separated list of the item names on the page to assign, which wouldn't contain commas in their names. The other field in the URL is a comma separated list of values to be assigned to the previous list. Since these values aren't encoded, the comma in the value is picked up as delimiter and not a part of the value. I have an example I can load up to apex.oracle.com if you need.
    -Richard
    Edited by: rwendel on Aug 13, 2009 11:51 AM

  • Open tabbed panels from dropdown list option value

    I have about 10 tabbed panels on my page.
    I created a dropdown list, <option value></option value>.
    I need to open the specific panel when an option is selected from the dropdown list.  I know how to open tabbed panels by URL, a button, and a link on the same page.  But how do i open a tabbed panel from a dropdown list.  The <option value> in IE does not allow for onclick events in IE. 

    Yes and I have been trying to find that.  Right now I have it setup where the onchange event is "location = this.options[this.selectedIndex].value;">
    and then I have each<option> in the dropdown list with teh value=http://URL.com?tab=3#tabbedpanels1.
    It works but it isn't as dynamic as I would like.  When i select each option in the dropdown, it refreshes the page and opens the correct tabbed panel. Then the dropdown list is reset to the default value because the page refreshed.  I wanted to do this without the page refreshing, that way the dropdown list item remains at what I selected to open the tabbedpanel. and plus, I didn't want the page to refresh everytime but to just open the tabbedpanel the same way as if i made a button to open it.

  • Error: List View Threshold. The number of items in this list exceeds the list view threshold, which is 5000 items.

    Hi, i had created a SharePoint List in cloud ( office 365) using List Template.
    List template contains 12000 items taken as template from SharePoint on Premise.
    I am getting this error message, in SharePoint Online (Office 365)
    The number of items in this list exceeds the list view threshold, which is 5000 items. Tasks that cause excessive server load (such as those involving all list items) are currently prohibited.
    How to resolve it, to get data in my SharePoint list, any help will be appreciated.

    With O365 lists over 5k items are now officially supported but they will have limited behaviour due to the threshold. There are no workarounds or options to increase the threshold either temporarily, for specific users or for the list itself as you have
    with on-prem.
    You'll need to remove enough items to get it below the threshold limit, add indexed columns to support indexed views, then re-add the items again. This article is for 2010 but the section around indexed columns and views is still accurate:
    https://technet.microsoft.com/en-us/library/cc262813(v=office.14).aspx
    It may be possible to add the indexes on your on-prem list where you can increase/avoid the threshold, then re-export the list. That would rely upon the list creation script adding indexes before it uploads items but it's a logical assumption.

Maybe you are looking for

  • I tried to access my website, but Firefox threw the error: 403 Forbidden, you don't have the permissions to view.

    My website - Mousenstein.com - is under construction w/Dreamweaver + Flash. I uploaded my files to my server. I opened Firefox and entered the URL: http://www.mousenstein.com The error "403 Forbidden" appeared, and ... You do not have the permissions

  • Screen enhancement through enhancement framework

    Hi to all  experts, I have question can screen enhancements can be done using enhancement framework technology in ECC 6.0 Any link will help ALready searched in SCN couldnt find anything

  • Live Cycle Interview...

    Hi All, I have an interview for Adobe Live cycle developer position.... though i have some hands on experience in developing forms, i was wondering if there is any material which has some common interview Question. I really appreciate if someone can

  • Create user defined type under SQL type

    Hello guys, I have a table PART_NEEDED and a table function which returns table of PART_NEEDED%ROWTYPE. This works fine but if I try to create new user defined type with with the same attributes as PART_NEEDED and pipe the rows into table of that typ

  • Mathematic / Scientific language for keyboard?

    I'm a engineering student, and I am looking for a mathematic/scientific language for my keyboard.  This would make texting and sharing various formulas a lot easier to send and more importantly, clearer to the recipient. Is there one available?