Problem with option

This is cut out from the tutorial for listBox Components. Java Studio Creator is showing that there is no Option(string, string) constructor. Can someone help me here?
// Initialize the property values and add some choices to the listOptions property to get started.
listOptions = new com.sun.web.ui.model.Option[] {
new Option("choice1", "My Choice 1"),
new Option("choice2", "My Choice 2"),
new Option("choice3", "My Choice 3")};
choices = new String[] {};
Oma

Hmmm....I know that constructor exists because I use it!
Are you sure that you imported the right thing?
In other words, make sure that you do this:
import com.sun.web.ui.model.Option;
My guess is that there is some other type of "Option" that it is looking at.
As an alternative, you can fully qualify the option (new com.sun.web.ui.model.Option("choice1", "My Choice 1"); )

Similar Messages

  • Problem with option buttons

    Hi!
    We have a problem with Option buttons.
    Example: We create a new document , then we add a group of Option buttons, so far no problem,  but we can't have different description on each button. Say we create four option buttons, option 1, option 2, option 3 and option 4. They are now grouped together so that we can only choose one option, but we also want to have different descriptions on the tooltip when the user hovers over. But when we set for example "Option 1" as a description on the first button, all buttons get the same description, what is wrong!
    Dan

    A field's Tooltip entry is a "child" of the field's Name (in the General tab of the field's Properties dialog).
    So, all fields of the same Name will have the same Tooltip.
    Perhaps this is the problem?
    Be well...

  • Problem with optional attribute caching on a custom tag

    Hello,
    I've created a tag by extending TagSupport. I have one attribute that is optional. I'm having a problem with this attribute since the tag is cached. If the value is not specified in the tag, it is always using the previous value from the past request.
    I understand why this is happening, but I wonder if there is anyway to reset this value besides doing it at the end of the doStartTag or in the doEndTag methods? I simply want it to be an empty string if it is not in the request.
    Thanks,
    Tim

    Thats abit overkill in my opinion.Probably yes, but its a cleaner option. In case your doEndTag handles custom exceptions, you would anyhow need to put this code in a finally block, right ?
    public int doEndTag() throws JspException {
    try {
    call some methods that throws other checked exceptions;
    }catch(Exception1 e){
    throw JspException(e);
    }catch(Exception2 e){
    //log and ignore
    }finally{
    //clean up here
    return an int;
    Having said that, different containers implement the spec a bit differently. For example, in our project, we use weblogic and for wl, we put our clean up code in the release() method which according to the spec, needs to be called only before gc. Weblogic implementation is a bit different - its called after doEnd() for every use of the tag.
    This is from jsp spec regarding tag life cycle especially with reuse
    Some setters may be called again before a tag handler is reused. For
    instance, setParent() is called if it�s reused within the same page but at a dif-ferent
    level, setPageContext() is called if it�s used in another page, and
    attribute setters are called if the values differ or are expressed as request-time
    attribute values.
    �Check the TryCatchFinally interface for additional details related to exception handling and resource management.
    cheers,
    ram.
    }

  • Have a problem with Optional JDBC package

    I downloaded and compiled optional package (JSR-169). I can't just add this jar to my NetBeans project because I will have an exception:
    java.lang.SecurityException: Prohibited package name: java.sql
    at sun.misc.Launcher$AppClassLoader.handlePackage(Launcher.java:472)
    at sun.misc.Launcher$AppClassLoader.defineClassPrivate(Launcher.java:516)
    at sun.misc.Launcher$AppClassLoader.access$500(Launcher.java:325)
    at sun.misc.Launcher$4.run(Launcher.java:546)
    I add this jar to my emulator and I have an exception:
    java.lang.NoClassDefFoundError: java.sql.SQLException
    at java.lang.Class.getMethod0(Native Method)
    at java.lang.Class.getMethod(Class.java:958)
    at sun.misc.CVM.runMain(CVM.java:460).
    What should I do to add this jar to my netbeans project?

    I solved this problem
    If you or someone already have problems whit that, try don't generate the .jar separated and then use in your application project...
    you must compile the classes you have downloaded TOGETHER with you own working project classes.
    this works fine for me..
    best regards!

  • Problem with option: enable this distribution point for prestaged content

    Hi, for past few days I have been focused on application deployment with SCCM 2012 R2 (I am learning SCCM 2012 R2 reading books, watching video trainings . . .). Having followed allong book Mastering System Center 2012 R2 Configuration Manager I also did
    deployment of Microsoft Office 2013, Adobe Reader 11, Foxit Reader 4.2 and Notepad ++ to test collection containing one Windows 7 computer. In one of examples prestaged content file is created for Foxit Reader application. In order to do so, if I am
    right, option Enable this distribution point for prestaged content
    has to be checked on distribution point and I did that.
    Problem is that I noticed deployment of any application to test collection failed every time - system waits for prestaged content file if this option is selected. Then I have to delete deployment of given application, application itself, deselect option
    Enable this distribution point for prestaged content and create app, distribute it to DP and deploy to test collection - then everything works well.
    To make things worse, having deselect option Enable this distribution point for prestaged content (I did it yesterday and I checked that several times) this morning I checked again and this option is selected again. What might be the cause
    of this behaviour? I expected this option to be deselected - this is weird to say at least.
     

    When you enable the option "Enable this distribution
    point for prestaged content" on a DP, it causes newly created applications/packages to default to "Manually copy the content in this package to the distribution point"... This would then cause the deployments on the clients to remain
    at 'waiting for content' - unless if you manually prestage the content, as this option requires it.
    If you enable the option "Enable this distribution
    point for prestaged content" on the DP, but want to automatically have CM distribute the content, then configure the app/package to do so,
    before distributing the content: Distribution Settings tab > Prestaged distribution point settings > Automatically download content when packages are assign to distribution points.

  • Problem with Option GlobeTrotter Express HSUPA

    Hi all!
    I hawe following problem. Yesterday i purchased а Option GlobeTrotter Express HSUPA ExpressCard whis no lock to any carrier. I install GlobeTrotter Connect from ZeroCD and try to connect to the internet (i'm using Kyivstar). The initialization of the Express card was sucssess. But when i try connect to the internet i hawe next error: Connection could be established. Please verify your network settings. Please, help me configure network settings correctly.

    I find the solution my self. I try to connect whith access point which was not connected on my number. When i change APN a connect to the nitwork without any problem.

  • Photoshop CS5 Performance Problems with Optional Extension Plug-ins Installed

    If you installed any of the Optional Extension Plug-ins in Photoshop CS5 (they aren't a part of a default installation of Photoshop CS5) - we determined that some users have had serious performance issues due way these Optional Extension Plug-ins were installed on Mac systems.
    We have created the following knowledge base document to help users determine if they are affected by the use of these plug-ins. The document contains instructions on how to remove the plug-ins and restore your Photoshop prefs:
    http://kb2.adobe.com/cps/889/cpsid_88974.html
    Note: It's important to both remove the plug-ins and restore your Photoshop prefs in order to get back to a 'good' state.

    I would try here:
    http://www.ononesoftware.com/support/

  • Problems with option-shift-k what should create the Apple logo

    Using the above mentioned keyboard shortcut I used to be able to create the original Apple logo in any text application. Since a few days I have lost this capability and I don't know in which font this logo lives. Apple Hotline couldn't fix the problem. Any suggestions?
    How can I reinstall all original fonts from the installation DVD. I am using 10.4.9 on a MBP but original installation DVD is 10.4.8

    Hi.
    Your Input Source must have been somehow switched from U.S. to U.S. Extended. Check for it in International.
    In Character Palette you'll find  in Glyph Catalog (View Glyph), font Lucida Grande.
    Good Luck.
    MacMini G4 1.25GHz 1GB   Mac OS X (10.4.9)  

  • Problem with *Optional Library Subscription Tile URL*

    hi
    i want to put a this banner in library view in my app
    in which format it can be? i tried *.html and *.png formats. no results..
    any examples?
    hope for help
    thanx

    ok
    i want a banner _at the top of library view_ , as described in help.
    (http://help.adobe.com/en_US/digitalpubsuite/using/WS67cb9e293e2f1f60c5dd08612e5ea7d27f-7ff f.html#WS9293e1fb3b977c5c-3de2b57512f0e8b6756-7fff)

  • Problems with Designer

    Hello!, I have problems with option Capture Design
    of.. Forms, because i lost some properties of the forms as relations and the way i show the items in Layout Editor from Forms. I have Forms 6.0.8.25.2 and Designer 6.5.95.4.8 installed.
    Thanks a lot..

    On the menu bar of Design Editor of the Server Model Diagram, you need to click on Edit, Requery All. Otherwise, the Diagrammer will crash and exit.
    This applies to all diagrammers in Designer 9i. If you have change a lot of objects in a diagrammer, you need to click on Edit, Requery All so that it will commit all changes to the Repository and free the Temporary Tables.

  • Downloading a file would bring up an option to open the file or save it - for some reason now it just downloads straight to the download folder. Why? Problem with Firefox or something else?

    Downloading a file would normally bring up an option to open the file with the appropriate program or save it - for some reason now it just downloads straight to the download folder. Why? Problem with Firefox or something else? It's very frustrating - sometimes you want the file opened first so it can be discarded or saved to a different location.

    Hey. that's great! Thanks for posting back with the outcome.

  • I have been a loyal customer for years and have a hot spot because internet options are very limited in our rural area.  I have stayed with 10G since the beginning.  Most months I don't use the 10G.  Verizon has no problem with me paying for Data I don't

    I have been a loyal customer for years and have a hot spot because internet options are very limited in our rural area.  I have stayed with 10G since the beginning.  Most months I don't use the 10G.  Verizon has no problem with me paying for Data I don't use.  This month my daughter comes home from College and she accidentally uses 24G.....14 over get blind sided with $140.00 in overages.  I called Verizon today......stopped in to the store today......My neighbor told me they waved charges for her one time.  Lots of charges.....But I'm am getting no help.  Not even an offer of a payment plan to help me out.  I went back just 6 months and I have over paid for 19G.....Seems like they would like to help out their loyal customers!!!!     Does anybody have any suggestions on how to deal with them?   We are not wealthy....or I would just pay this and walk away......

    There is a big misconception in what customers believe a cell carrier is obligated to do.
    You pay a set price to use up to that amount of xx data. It makes no difference if you use it to the paid limit or way under. Its like peace of mind when you don't have to worry about a data counter.
    Your daughter used the data, your plan is quite clear of what overage charges are. Why should or would Verizon wireless just forgive the charges because you are a customer? Your daughter used the data, get the money from her. That is the responsible thing to do.
    There is no "I have been a loyal customer so please remove the $120, or $250, or $2,000.00 since I did not mean to use it"
    Your electric company, or gas company or any other company does not remove valid charges. Why should Verizon wireless?
    Just pay the invoice and don't think you are being mistreated because Verizon is a business and not a charity.
    Good Luck

  • Problem with H and Option key on a macbook keyboard

    I have a problem with my macbook keyboard, any time i tried to use the "h" or "option" keys i get the TM symbol.
    All other keys works perfect
    i don't know what happend?
    Thanks

    To access NTFS Windows from your MAC OS via Bootcamp, use this software:
    http://www.paragon-software.com/home/ntfs-mac/
    To access Mac from your Windows via Bootcamp, use this software:
    http://www.mediafour.com/products/macdrive/bootcamp/

  • Problem with replies in Maverick's mail.  Originating emails send fine.  When replying to an email (various addresses) the reply is hung up and can not be sent.  Option becomes put in draft, delete, etc.  Any suggestions would be helpful

    Problem with replies in Maverick's mail.  Originating emails send fine.  When replying to an email (various addresses) the reply is hung up and can not be sent.  Option becomes put in draft, delete, etc.  Any suggestions would be helpful.  Mid 2013 iMac.

    I don't know how rare this is.  I went a week or so without a problem, and now it's starting to recur.  Also, in some instances, an email will look unsent (remain in the outbox on the Treo), but it has been sent, and recipients are replying while I'm trying to figure out what is going on.  Further, it will send the same email over and over during this madness.
    This is a show stopper.  If there isn't a software fix soon, I may chuck this phone in the garbage.
    Post relates to: Treo 800w (Sprint)
    UPDATE:  The problem comes and goes.  The next day, no changes to the treo, everything workeds.  Now i'm suspecting the sprint server, and how it/the phone responds from failing to send while roaming.  I've since turned off roaming, and haven't had a problem for several days.
    Message Edited by slrichardson on 12-22-2008 01:12 PM

  • Problem with combo in js IE - new Option(t,v) not working

    hello! Did somene had experience some problems with
    adding new options in select object (combo box) in javascript? I can change text or value property, delete option by setting it to null, but when I want to add new, there is a problem!?
    why this code doesn't work?
    <script>
    ref = window.document.frmExample["cbo1"];
    alert(ref.length);
    ref.options[ref.length] = new Option("text'","value1");
    alert(ref.length);
    </script>
    interesting thing is that this works in Netscape (6), but it is not working in IE(5.5), and this is my first and last example where Netscape is 'better'...
    Can someone help, please?
    regards...
    Vlada

    you are right, it works in the 'mother' page, but if I want to add some options from popup window (window.open...), and when I accessing combo throught opener propery, than I have problem, because it is not working!?
    code sample...
    ... 'mother' page function ...
    function fAdd(){
    var popupW;
    popupW = window.open("page.html","name",attr);
    if (!popupW.opener)
    popupW.opener = window;
    ... popup window function...
    function fClick(){
    var opt;
    var ref = window.opener.document.frmExample1["cbo1"];
    alert(ref.length);
    opt = "new";
    ref.options[ref.length] = new Option(opt,opt);
    window.close();
    I get alert with the number ofoptions in combo, so ref is OK. I can delete some of them, change, but not to add new! Then I get Error message.
    any sugestion!? Strange, but it works in Netscape ...

Maybe you are looking for

  • Ipod Not recognized 3rd generation

    Ok so yesterday i had an ipod nano that wa snew and i had already had itunes downloaded on the computer. I found out that itunes could not recognize the drive and i had to reformat and update my ipod to get it to recognize. Well it worked. The proble

  • Bookmarks in an Interactive PDF

    When I export a large book from CS6 to an interactive PDF, the bookmarks are jumbled. Many are missing the chapter heading so the levels within those chapters are thrown off and some chapter heading appear as a lower level at the end of the previous

  • Issue with finder screen sharing.

          My iOS development partner and I are currently having issues with screen sharing through the finder.  Prior to installing OSX Mavericks there was no issue with adding each other as users to each others computer, but after the install is when th

  • Dynamic PDF's for Mobile Devices

    I have been converting my company's forms to dynamic pdf format using ES4 to facilitate completion and submission by our highly dispersed workforce.  These forms are unfortunately not accessible on the mobile devices our field employees typically use

  • Activate an Aggregation Level in Production

    Hi, Can anyone please assist me in activating an aggregation level in Production? Some of our aggregation levels are inactive and we can't transport them at the moment as we are busy with an upgrade in development. Your help would really be appreciat