Can't define generics for a method

I have a class with the following method:
public <E extends T> E getTopSelected(Class<E> cls)
I'd like to call getTopSelected(null). However, this causes the error:
type parameters of <E>E cannot be determined; no unique maximal instance exists for type variable E with upper bounds T,T
I know that I'd like E in this case to be JPanel. Is there a way to call this method so that it knows that E should be interpreted as JPanel while still passing 'null' to the method?
Mark McKay
http://www.kitfox.com

Short Answer - NO
long answer - assuming that this null stuff is a sort of default implementation then it might be useful to introduce an overloaded method with no arguments,
public JPanel getTopSelected() { ... }BUT you'd need to know at the call site whether you had null or not so you could call the right method.
Bruce

Similar Messages

  • Can we define users for both studio and integrator server

    Can someone please let me know how can we define users for both studio and integrator server so that the user can be used to view UI page but not modify it.I want to define user in studio which will access the Page but not modify it. And the user in integrator server should be able to view scheduled jobs.
    Thanks a lot.
    Regards,
    Amrit

    Amrit,
    Both Studio and Integrator Server support LDAP. See http://docs.oracle.com/cd/E35976_01/studio.240/eid_studio_users/toc.htm#Integrating%20with%20an%20LDAP%20System%20to%20Manage%20Users for details about implementing LDAP in Studio. For Integrator Server, see "LDAP Authentication", p. 38 (document pagination; p. 44 pdf file pagination) in the Integrator Server Guide (http://docs.oracle.com/cd/E35976_01/integrator.240/DataIntegratorServer.pdf).
    RLJII

  • XAML: Can we define style for nested elements?

    Can we define a style that will target "all TextBlock elements inside Border elements of style XXX"?
    I have a style <Style TargetType="Border" x:Key="XXX"> and I want all TextBlocks inside Borders with style XXX to have red Foreground.
    In CSS it would look like this:
    <html>
    <head>
    <style>
        p { color: red; }
        p.XXX { color: green; }
        p.XXX span { color: blue; }
    </style>
    </head>
    <body>
        <p>red text</p>
        <p class="XXX">green text</p>
        <p class="XXX">green text <span>and blue text</span></p>
    </body>
    </html>

    Hi Michael,
    I've moved this to a more topical forum for you.
    Xaml styles do not cascade like CSS does. 
    --Rob

  • BEx Analyser: How can I define colours for different levels of a hierarchy?

    Hi everyone,
    I have a report in BEx Anaylser that includes a hiearchy of 9 levels.
    For a better overview, I want to define different colours for the cells of each level. In this way, the user should be able to see which numbers belong to which hierarchy level. How can I do this?
    Best regards
    Daniel

    Dear Anujit,
    Thanks for your answer.
    Seriously? I cannot do this with BEx Analyzer other than using Excel VBA macro?
    Cheers, Daniel

  • Can we define path for a bean out side work space?

    <bean id="HSBCMarketsReports"
                   class="HSBCMarketsReportsConfiguration">
                   <property name="reports">
                        <map>
                        <entry key="PinnacleReportsConfig" value="PinnacleReportsConfig.xml"/>
                        <entry key="PinnacleReportsData" value="PinnacleDummyData.xml"/>
                        </map>
                   </property>
         </bean>it works well but when make the same as
    <bean id="HSBCMarketsReports"
                   class="HSBCMarketsReportsConfiguration">
                   <property name="reports">
                        <map>
                        <entry key="PinnacleReportsConfig" value="PinnacleReportsConfig.xml"/>
                        <entry key="PinnacleReportsData" value="C:\PinnacleDummyData.xml"/>
                        </map>
                   </property>
         </bean>
    it says C:\PinnacleDummyData.xml not found i work space , how to make it look for the file out side work space (particularly given location)

    LoveOpensource wrote:
    <bean id="HSBCMarketsReports"
                   class="HSBCMarketsReportsConfiguration">
                   <property name="reports">
                        <map>
                        <entry key="PinnacleReportsConfig" value="PinnacleReportsConfig.xml"/>
                        <entry key="PinnacleReportsData" value="PinnacleDummyData.xml"/>
                        </map>
                   </property>
         </bean>it works well but when make the same as
    <bean id="HSBCMarketsReports"
                   class="HSBCMarketsReportsConfiguration">
                   <property name="reports">
                        <map>
                        <entry key="PinnacleReportsConfig" value="PinnacleReportsConfig.xml"/>
                        <entry key="PinnacleReportsData" value="C:\PinnacleDummyData.xml"/>
                        </map>
                   </property>
         </bean>
    it says C:\PinnacleDummyData.xml not found i work space , how to make it look for the file out side work space (particularly given location)Why dont you include the xml file in your workspace/web application?
    All these are custom tags, right? So somewhere in the code for the custom tags, it would load the xml file for parsing.
    There are different ways to load a file. The first is to use the absolute path (not recommended) and anyways I dont think your application does it that way because then your file would have been loaded even if it's outside the web application folder.
    The better approach is to load the file as a resource stream.
    The ServletContext object has a method getResourceAsStream() to load files from the web application path. But then the xml file has to be inside the web application and if this is indeed how your tags have been coded, you have no other option but to include the xml file in your web application.
    There is another way - to use the ClassLoader's getResourceAsStream() method. The ClassLoader looks up the classpath variable to search for files. In this case, you need to add your xml file location (c:/dir or whatever) to the application server's classpath. Look up in the startup scripts for your application.
    As I said, it all depends upon the tag code that looks up the xml file and whether you can tweak it.
    cheers,
    ram.

  • How Can I define itab for VBFA in SD_SALES_DOCUMENT_PREFETCH??

    Hi Experts,
    Am using FM of SD_SALES_DOCUMENT_PREFETCH to pull the data, like,
    CALL FUNCTION 'SD_SALES_DOCUMENT_PREFETCH'
        EXPORTING
          i_sales_view  = wa_view
          i_memory_read = 'A'
        TABLES
          i_vbak_keytab = t_vbeln
          fxvbak        = t_vbak
          fxvbap        = t_vbap
          fxvbep        = t_vbep
          FXVBFA        = t_vbfa.
    DATA: wa_view TYPE order_view,
          t_vbeln TYPE TABLE OF sales_key,
          t_vbak TYPE TABLE OF vbak with header line,
          t_vbap TYPE TABLE OF vbapvb with header line,
          t_vbep TYPE TABLE OF vbepvb with header line,
          t_vbfa TYPE TABLE OF VBFA with header line,
          t_vbfa_pgi TYPE TABLE OF VBFA with header line.
    Am geeting DUMP, coz of  t_vbfa_pgi TYPE TABLE OF VBFA with header line.
    so, pls, let me know that,
    I tried also like,
          t_vbfa_pgi TYPE TABLE OF VBFAvb with header line.
          t_vbfa_pgi TYPE TABLE OF V45I_VBFA_TABL with header line.
          t_vbfa_pgi TYPE TABLE OF V45I_VBFA with header line.
    BUT NO USE!!!!!!!
    1) How I hv to define the t_vbfa in my prog.
    thanq

    Hi Srinivas,
    Try this
      DATA t_vbfa TYPE v45i_vbfa_tabl WITH HEADER LINE.
    Also check FM BAPISDORDER_GETDETAILEDLIST for the declaration.
    Hope this helps
    Thanks
    Lakshman

  • A "stillborn" thread - can someone define it for me?

    I've never come across this terminology before - anyone know what it means?

    I don't recall hearing the term before either, but my guess is it would be an instantiated Thread instance which never had the start() method called.

  • KM Search: How can I define a query for the user who currently logged on?

    Hello,
    I want to use the KM Search iView to display all documents from the currently logged on user in a certain sort order. The result should be some kind of report for the user...
    In the search option I can define a default sort order. And I can also define it for a special user with cm_modifiedby(value=username)
    But how can I define the predefined property value generically for the current user?
    I tried to insert following values in the parameter Predefined Properties of the search option:
    Predefined Properties (csv): cm_modifiedby(value=<user.id>)
    Predefined Properties (csv): cm_modifiedby(value=%user.id%) -> like in the predefined properties
    Predefined Properties (csv): cm_modifiedby(value=$sap_user) -> like in the xml forms builder
    But non of these 3 parameters worked. Has anybody an idea what the right variable is?
    Thanks a lot.
    Best regards
    Nicole

    Hi Nicole,
    1. First of all you need to use "<User.UserID>" to get the currently logged on user.
    2. You need to create an AppIntegrator iView (so based on com.sap.portal.appintegrator.sap.Generic) in order to be able to use this dynamical parameter. The parameter "URL template" should look like:
    <Request.Protocol>://<Request.Server>/irj/servlet/prt/portal/prtroot/com.sap.km.cm.basicsearch?layoutSetMode=exclusive&ResourceListType=com.sapportals.wcm.SearchResultList&SearchType=quick&rndLayoutSet=SearchResultLayoutSet&SearchCompsName=UISearchComponents&QueryString=*&SelectedCustomProps=cm_modifiedby(value=<User.UserID>)
    Best regards,
    Robert

  • How to define ranges for a keyfigure

    Hi Frnds,
    I have two keyfigures for employee experience. One for present company experience and the second for previouse experience. And I have created a calculated keyfigure for calculating the total employee experience by adding the those two keyfigures.
    Here I want to design a query using the range values for that calculated keyfiger values. And for that range i want to display count i.e the no. of employees.
    for eg:
    range   | TotalYrsof exp
    <1       |  10
    1-2      |  20
    3-5      |  30
    6-10    |   40
    So anybody pls help me in this problem.
    Here How can I define ranges for that calculated keyfigure?
    Is there any other way to define ranges?
    Thanks in advance,
    Sridhar

    Hi,
    Create a Cal.Keyfigure on Total Exp. and use that for another cal keyfigure
    Example for  <1
    Total Exp <1
    for 1-2
    Total Exp >=1 AND Total Exp <=2
    for 3-5
    Total Exp >=3 AND Total Exp <=5
    and so on...
    Thanks,

  • Can't define PVE Uplink with srw224g4

    Hi,
    I tried to  setup sample usage of PVE with Linksys  SRW224G4 withot success. I successfully set PVE g1 for ports 1 to 5 but I can't setup uplink port for this PVE group. I can't find place where can define PVE mapping an PVE upllink in web view. When I googled about this  I find that in "Port config" section in firmware version befor 1.2.2 have "pve mapping", but there is not such link. How can i define Uplink for particular PVE group in firmware version before 1.2.2?
    Thanks in advance

    Huh,
    Even though i am using older software here, it seems straight forward.
    Can I humbly suggest, that you contact the SBSC  to get some phone help, if this switch is still under phone support warranty.
    http://www.cisco.com/en/US/support/tsd_cisco_small_business_support_center_contacts.html
    regards Dave

  • "In transit to final destination" - Can anyone define?

    I ordered my 21.5" iMac on the 10th and as of today, my order status reads: "In transit to final destination. Carrier details will be updated shortly"
    Can anyone define that for me and roughly where in the process it is?

    Your question could be easily answered by Apple, you can find the phone number for the online store in the upper left corner of the store's home page. I suspect the information means it's in transit to the final destination which means once it arrives there (which  is probably a local distribution facility) it will go out for delivery to you. However to be sure you need to call Apple. Then  you will see the status change again. We know you're excited to receive your new iMac however this is a technical forum.

  • Can I define a constructor for a Custom Component?

    I have a custom component which I instantiate through ActionScript.  For the sake of clean code, I would like to be able to assign the variables through the constructor like any other class:
    var myComp:CustomComponent = new CustomComponent(arg1, arg2, ...);
    However, when I try to write a constructor in the Script block for the component, it gives me a compile error telling me that I have multiple constructors:
    //In Script tag//
    public function CustomeComponent(arg1, arg2 ...):void { ... }
    Are we not able to define constructors for Custom Components?

    If this post helps, please mark it as such.
    If you create an array variable in your MXML component, and then set it with myVar="[val1, val2, val3]" in the opening tag of your component, then you basically have a constructor in MXML.
    You can use the [Bindable] metadata tag in three places:
    Before a public class definition.
    The [Bindable] metadata tag makes usable as the source of a binding expression all public properties that you defined as variables, and all public properties that are defined by using both a setter and a getter method. In this case, [Bindable] takes no parameters, as the following example shows:
    [Bindable]
    public class TextAreaFontControl extends TextArea {}
    The Flex compiler automatically generates an event named propertyChange, of type PropertyChangeEvent, for all public properties so that the properties can be used as the source of a data binding expression.
    If the property value remains the same on a write, Flex does not dispatch the event or update the property, where not the same translates to the following test:
    (oldValue !== value)
    That means if a property contains a reference to an object, and that reference is modified to reference a different but equivalent object, the binding is triggered. If the property is not modified, but the object that it points to changes internally, the binding is not triggered.
    Note: When you use the [Bindable] metadata tag before a public class definition, it only applies to public properties; it does not apply to private or protected properties, or to properties defined in any other namespace. You must insert the [Bindable] metadata tag before a nonpublic property to make it usable as the source for a data binding expression.
    Before a public, protected, or private property defined as a variable to make that specific property support binding.
    The tag can have the following forms:
    [Bindable]
    public var foo:String;
    The Flex compiler automatically generates an event named propertyChange, of type PropertyChangeEvent, for the property. If the property value remains the same on a write, Flex does not dispatch the event or update the property.
    You can also specify the event name, as the following example shows:
    [Bindable(event="fooChanged")]
    public var foo:String;
    In this case, you are responsible for generating and dispatching the event, typically as part of some other method of your class. You can specify a [Bindable] tag that includes the event specification if you want to name the event, even when you already specified the [Bindable] tag at the class level.
    Before a public, protected, or private property defined by a getter or setter method.
    You must define both a setter and a getter method to use the [Bindable] tag with the property. If you define just a setter method, you create a write-only property that you cannot use as the source of a data-binding expression. If you define just a getter method, you create a read-only property that you can use as the source of a data-binding expression without inserting the [Bindable] metadata tag. This is similar to the way that you can use a variable, defined by using the const keyword, as the source for a data binding expression.
    The tag can have the following forms:
    As far as binding, you can add the [Bindable] tag before the class declaration to make bindable all public properties defined as variables, and all public properties defined by using both a setter and a getter method.

  • ADFBC Where to define labels for custom Application Module method arguments

    I was wondering if there was a "good place" to define these labels in ADF Business Components. I can just change them for the UI for my current project, but I thinking there might be a better way.
    Thanks,
    Brian

    Hi,
    I think you can't in BC, but you can in ADF. If you drag a method onto the client then it creates a method binding with argument itemes below. In addition, look in the executable section, it creates variables for each. This is where you can define labels so that they can be translated
    Frank

  • HT5622 Hi, can you help me for my payment account? It's always show " Your payment method was declined..." How can I fix it? There's only 3 to choose fpr Visa, Master Card and Amex.. But doesn't have "None".. I can't download any apps from app store :(

    Hi, can you help me for my payment account? It's always show " Your payment method was declined..." How can I fix it? There's only 3 to choose fpr Visa, Master Card and Amex.. But doesn't have "None".. I can't download any apps from app store

    http://support.apple.com/kb/ht1918

  • I am part of a family sharing setup.  Can I have my own payment method so the organizer does not get charged for my purchases?

    I am part of a family sharing setup.  Can I have my own payment method so the organizer does not get charged for my purchases?  If so, how do I set this up?

    Yes.  Just redeem gift cards so that your own account always has a sufficient credit balance.  Here is how it works:
    Family purchases and payments
    After you set up your family, any time a family member initiates a new purchase it will be billed directly to your account unless that family member has gift or store credit. First, their store credit will be used to pay the partial or total bill. The remainder will bill to the family organizer's card.

Maybe you are looking for

  • Oracle JHeadstart 10g Production!

    Oracle announces that Oracle JHeadstart 10g release 9.0.4 is now production. Main new features are: - generation support for Struts and JSP's, - the new JHeadstart Project Set Up wizard - automatic creation of initial JHeadstart Application Structure

  • JAVA Browser Plugin for Mozilla on Linux Debian

    Hi! I run a Mozilla Firefox (iceWeasel) on a DEBIAN. It does NOT display german or french special characters like "Umlaute öäüÄÖÜß" and alike properly. The text is displayed within an Applet from a 3rd Party, so i can only change the text which is di

  • URL for WSDL only shows web service information page

    Using tomcat6 and jwsdp 2.0. After requesting the WSDL, I instead get the Web Service information page which shows this in a table form: Web Services, Port Name, Status, Information etc. Why doesn't it give me back the WSDL instead?

  • Safari is crashing within a few seconds of loading it

    Safari was working fine today and all of a sudden it crashed and everytime i open it, it will crash within 15 sexonds. I can use my yahoo homepage for about 15 seconds until it freezes up and crashes. can anyone help me? Process: Safari [453] Path: /

  • DAX - wrong count on date filter?

    Hi All, Tabular model, AdventureWorksDW2012 db. trying to get count of products shipped on last date. As a test I've modified couple of rows in [FactInternetSales] table: Created a measure to get last ship date: LastShipDate:=MAX('Internet Sales'[Shi