How i can set dropDown item to 6th item from java code ?

Hi
Thank you for reading my post.
how i can set dropDown item to 6th item from java code ?
i have the value field of database and i can use it to set selected item of DropDown.
so : can i use value field to set the selected item ?
Thank u.

Hi,
Please go through the following thread which discusses about setting teh selected item for a dropdown:
http://swforum.sun.com/jive/thread.jspa?forumID=123&threadID=50697
Hope it helps
Cheers
Giri

Similar Messages

  • How I can set my default browser mozilla firefox from the command line in Windows 7?

    I need to set my default browser mozilla firefox from the command line, ie without using the GUI.

    '''-setDefaultBrowser''' is the correct command - you need the two capital letters.
    Why Firefox 17.0.1? You would be missing a number of important security updates. Firefox 17.0.'''9''' is the current ESR release version.

  • How to launch and play a song in wmp from java code

    Hi,
    I have this code. It launches wmp but it doesnt play the song. Thanks
    String wmplayer = "C:\\Program Files\\Windows Media Player\\wmplayer.exe /prefetch:6 /Play ";
    try{
    Runtime.getRuntime().exec( wmplayer + "C:\\Program Files\\Windows Media Player\\CashRegister.wav" );
    }catch( Exception e ){
    System.out.println(e);
    }

    I wonder what exec does if the path to the program or the parameters have spaces in them?
    Try getting it to work from the command line before trying to get exec() to run it.
    Put quotes around "Program Files" and such

  • How to kill a system process from java code.

    Hi,
    i need to kill or remove windows system process like cmd.exe from java code.
    like removing it from end process in task mgr.
    i tried below code but its not removed.
    is there a better way we can do this.
    killing a system process from java code will create any issues?
       public static void main(String[] args) throws Exception {
       String[] cmd = { "cmd.exe" };
       Process p = Runtime.getRuntime().exec(cmd);
       p.destroy();
    any suggestions or ideas are really appreciated.
    thanks.

    Hi  jtahlborn, mohan
    yes the process is created from my java code. 
    in my code iam creating a process like below and if it is running for a long i need to kill it from java.
    For that " Runtime.getRuntime().exec("taskkill /F /PID " +  7408); " is working fine.
    7408 is my process id in taskmgr created from java and iam manually passing the PID it to kill it.
    But i need to get the PID from java code.
    Thanks for your suggestions.
    Sample Code:
    public static void main(String args[])
            try {
              Process process = Runtime.getRuntime().exec(new String[]{"cmd.exe","/c","start"});        
              Field f = process.getClass().getDeclaredField( "handle");
              f.setAccessible( true);         
              long procHandle = f.getLong( process);
              System.out.println( "prochandle: " + procHandle );
              //Runtime.getRuntime().exec("taskkill /F /PID " +  procHandle);
            } catch( Exception e) {
              e.printStackTrace();

  • How i can set the selected item of a dropDown component from java code

    Hi
    Thank you for reading my post
    How i can set the slected item of a DropDown component from backing beans java code ?
    it is binded with a database , so one field determine its display and one other field determine its value , I want to set the selected item of this combobox
    In back code i have both value and display values to use them .
    can some one give me some help ?
    Thanks ,

    See code sample 3 at http://developers.sun.com/prodtech/javatools/jscreator/learning/tutorials/2/helloweb.html
    See also, the selection components row in the table under http://developers.sun.com/prodtech/javatools/jscreator/learning/tutorials/2/helloweb.html
    It says
    One way to preselect items is to call setSelectedValue(Object[]) or setSelectedValue(Object) from the prerender() method. You pass in the return values of the items that you want preselected. Be sure to verify that getSelected() returns null before setting the default options, or you will overwrite the user's selections on a post-back.

  • I have family plan of 5 iphones and all them have the same apple id, the q. is how I can set each one with their own apple id? please advise...

    I have family plan of 5 iphones and all them have the same apple id, the q. is how I can set each one with their own apple id? please advise...

    See How to Stop Sharing an Apple ID.
    (Note that I am affiliated with that site, and some pages contain ads).

  • How I can set the Non-standard option of -Xmxn of jvm

    Hi there,
    Can any one tell me how I can set the Non-standard option of -Xmxn of jvm (setp by step).Iam using Sun's jvm(jdk1.2.2).Iam facing a error(java.lang .OutOfMemory).I want to set the maximum size of the memory allocation pool.Any help will be highly appreciated.
    Thanks for ur valuable Time
    Bikash

    you can use the following sample options to specify memory size.
    EX:java -Xms128mb -Xmx512mb myClassFile

  • How i can set size of editor at runtime?

    dear all,
    How i can set size of editor at runtime?
    The size of editor is good when I run form on windowX but so small on web . why? have any body call tell me how i can do?
    thank for advance

    Hi there,
    You can use the builtin EDIT_TEXTITEM.
    You can pass x-pos, y-pos, width and height as parameters to that.
    Hope this helps

  • How i can set break point in standard sap modulepool

    how i can set breakpoint in standard sap modulepool

    If you know the program name, it is no different from normal setting of break point.
    It will have a break point button in the abap editor.
    Place the cursor on the line and set the break point.
    Then run the transaction in another session.
    Or type /h from the transaction itsefl to start the debugging.
    see the wiki faqs section for debuging
    https://www.sdn.sap.com/irj/sdn/wiki?path=/display/home/abap+debugger&
    Regards,
    Ravi

  • How I can set the spelling language in Pages for iPad?

    how I can set the spelling language in Pages for iPad? may for german...

    how I can set the spelling check to other language in Papers/iPad?
    The only choices you have in the iPad itself are to change the keyboard or change the user interface language. If that doesn't do what you want, probably best ask the people who make Papers.

  • Hi there, I want to know how I can set a password before I can purchase anything so I don't accidentally purchase something. Any suggestions?

    Hi there, I want to know how I can set a password before I can purchase anything so I don't accidentally purchase something. Any suggestions? Thanks

    Settings > iTunes & App Stores > Apple ID ...
    Sign in, and, if you like, change your password there by clicking your Apple ID again after signin.

  • I don't see the AirPlay button on the bottom right of my iTunes (v 10.6.3) window. Does anyone know why and how I can set it up? Thanks!

    I don't see the AirPlay button on the bottom right of my iTunes (v 10.6.3) window. Does anyone know why and how I can set it up? Thanks!

    You do not have to have an Apple TV, but you should have an AirPlay capable speaker on your network.

  • How I can set Leopard to use the color management mixture that Tiger uses?

    I have recently bought a new Mac with Leopard installed. My old Mac is running Tiger. Unfortunately the color management default settings in Leopard are different than in Tiger, so this is completely messing up my calibration. Can somebody please tell me how I can set Leopard to use whatever color management mixture that Tiger uses? - Thanks.

    I already have set FF to No Proxy. This made FF work again, but not any of my other internet programs, programs that don't have the option to set to no proxy, they rely on the system settings. So I need to know how to reset my system settings back to their default values. This will allow all my net progs to access the net again, including FF using the Use System Settings option. Since FF has an option to use system settings, this is a somewhat FF related question. I need to get all my net programs working again, not just FF! And, if my system settings are restored, FF will work using the system settings, and all my other progs will work too.

  • When I open a new tab I'd like it to open in my home page (my favourite search engine). Any suggestions how I can set this up, please?

    When I open a new tab I'd like it to open in my home page (my favourite search engine). Any suggestions how I can set this up, please?

    Found the answer in another thread discussing the same problem. Hit Ctrl and click the Home icon at the same time. Works great!

  • I have just got the new iPod touch. Everything is working except my iMessage and I don't know how I can set it up.

    I have just got the new iPod touch. Everything is working except my iMessage and I don't know how I can set it up.

    Illaass
    Gave my grandsons iPods for Xmas. Looks like one of them downloaded an app (text+) and must/may have deleated on hisiPod the iMessage app that was included on both with both iPods.
    I want to ditch this new app (text+) and return iMessage to his phone as they both are wifi only and iMessaget is what they should both use. Ialso have a iPad (wifi only) and a iphone (both on iOS5) and a MacBook on 10.7.2
    Any help as to how to do this (I would prefer not to due a full restore to the affected iPod if possible)

Maybe you are looking for