Howto dynamic enum

I'm trying to dynamically define / create a 1.5 enum. My current approach is writing my newly created enum to disk and then reading it back in with a URLClassloader.loadClass method. My first problem was a class not found exception until I pre-defined the enum. This predefined version is empty. It has no fields. I get past the not found problem, but the enum read in does not replace the empty enum. I seem to have a fundamental misunderstanding about loading class files dynamically.
Does anyone know how to dynamically define 1.5 enums?

I seem to have a fundamental misunderstanding about loading class files dynamically.Possibly also about what an enum is for.
I agree with the earlier poster - you need to explain why you're doing this; it's not clear to me what you're trying to do, since the immediate interpretations wouldn't have much point to them.

Similar Messages

  • Howto dynamicly bind XML element to a TextInput using BindingUtils?

    The question is: Howto dynamicly bind XML element to a
    TextInput component using BindingUtils?
    Now I use following codes:
    <!--
    [Bindable] private var xml: XML =
    <item><label>list1</label></item>;
    // initialize code for application's initialize event
    private function init(): void {
    BindingUtils.bindProperty(txtDemo, "text", xml, "label");
    //click event
    private function test(): void {
    xml.label = "something";
    // txtDemo.executeBindings(); //---- no use anymore
    -->
    <mx:TextInput id="txtDemo"/>
    <mx:Button label="Test" click="test()"/>
    My really idea is when bindable xml property is changed, then
    the textinput will be updated as hoped. However, no update happens
    to me when I click the Test button.
    But, if I make codes like that:
    <mx: TextInput id="txtDemo" text="{xml.label}"/>
    the text will updated when xml changs.
    So, what happened, I indeed need the dynamicly bind to the
    textinput compont.
    Help me. thanks.

    You could use an ObjectProxy since all subproperties will
    then be bindable:
    private var _xml:XML =
    <item><label>list1</label></item>;
    private var _opXML:ObjectProxy = new ObjectProxy(_xml);
    then in your init() function you declare _opXML as the host
    object with the bindable property "label"...
    // initialize code for application's initialize event
    public function init(): void {
    BindingUtils.bindProperty(txtDemo, "text", _opXML, "label");
    //click event
    private function test(): void {
    _opXML.label = "something";
    You'll notice that if you check your original _xml.label
    property with ChangeWatcher.canWatch(), it returns false. But if
    you create a dedicated object with a property that can be declared
    as bindable, canWatch() returns true. You'd probably be best off to
    write a lightweight class that can act as your model if you want to
    work with dynamic XML binding using Actionscript. This will allow
    you to use a bindable getter and setter that will give you the
    dynamic functionality you're looking for.
    Hope that helps.

  • Dynamic enum instantiation and access

    Here's what I would like to do, but I'm not sure if/how it can be done.
    Given a set of enum's e1, e2, e3;
    1. Specify at runtime the enum I'm interested in as a string "e1".
    2. Dynamically create an object of that type.
    3. Access the values() method at runtime to see what the constants of e1 are.
    I can get this far:
    String className = new String("e1");
    Class c = Class.forName(className);
    Object o = c.newInstance();Step #3 is the issue. I don't know how to cast the object in order to get access to the values() method. The Enum class does not include that method. Anyone know what does that I can cast my object to?
    Thanks,
    Mark

    import java.util.EnumSet;
    * @since October 10, 2006, 12:41 PM
    * @author Ian Schneider
    public enum DynamicEnumAccess {
        A,B,C,D,E,F,G;
        public static void main(String[] args) throws Exception {
            Class<? extends Enum> e = (Class<? extends Enum>) Class.forName("DynamicEnumAccess");
            EnumSet allOf = EnumSet.allOf(e);
            System.out.println(allOf);
    }

  • Howto pass dynamic jsp:param value to applet

    Hi.
    I have a JSP page with 3 to 4 links... and an applet with jsp:plugin .
    So i want to pass the URL behind the link to the applet as a Request Param..
    My JSP code looks like
    <a link href="www.google.com">Google</a>
    <a link href="www.oracle.com">Oracle</a>
    <a link href="www.gmail.com">Gmail</a>
    <jsp:plugin type="applet"
                                code="MyApplet"
                                height="0" codebase="../../jars/" width="0"
                                name="MyApplet"
                                align="bottom">
                            <jsp:params>
                                    <jsp:param name="applicationURL"
                                               value="this should be the "/>
                            </jsp:params>
                            <jsp:fallback>
                                    <p>This feature should run on applet supported
                                       browser.</p>
                            </jsp:fallback>
                    </jsp:plugin>and my applet code looks like
    init()
              String appURL = getParameter("applicationURL");
                    System.out.println(appURL);
              }I have a similar thread in Java forums... Howto pass dynamic jsp:param value to applet
    Thanks,
    Murali.

    My JSP code looks like
    <jsp:plugin type="applet"
                                code="MyApplet"
                                height="0" codebase="../../jars/" width="0"
                                name="MyApplet"
                                align="bottom">
                            <jsp:params>
                                    <jsp:param name="applicationURL"
                                               value="applicationURL"/>
                            </jsp:params>
                            <jsp:fallback>
                                    <p>This feature should run on applet supported
                                       browser.</p>
                            </jsp:fallback>
                    </jsp:plugin>and my applet code looks like
    init()
              String appURL = getParameter("applicationURL");
                    System.out.println(appURL);
              }Now i want to have links on JSP pages clicking on which corresponsing url will be displayed in applet.
    Edited by: 635237 on Jan 24, 2011 10:44 AM
    Edited by: 635237 on Jan 24, 2011 10:45 AM

  • Howto create a dynamic link with current domain

    We need to create a dynamic link on a html page in the portal.
    The link should contain a dynamic part containing the domain where the CLIENT is in. It should look like this : http://mytool.windowsdomain.corp/tool where "windowsdomain.corp" is dynamic. Where could we get this information from?
    Thanks!
    Matthias

    Hi Matthias,
    you could paste something like this in a Custom JSP Component:
    <script type="text/javascript">
         function getServerURL() {
              return top.document.location.protocol+"//"+top.document.location.host;
         function redirect(uri) {
              try {     
                   top.location.href=uri;
              } catch (e) {
                //unfortunately this is not triggered in IE - only in mozilla
                   alert("No valid Redirection-URL could be generated. Please contact your Administrator.");
        redirect(getServerURL()+'/tool'+top.document.location.search);
    </script>
    Best Reagrds, Thomas

  • Howto create a ValidateSet with dynamic (runtime) values?

    Hi Scripting Guys!
    I want to use the auto complete feature in my function for a specific parameter using a "dynamic" validate set (Similar to the Get-Service function and the Name parameter). 
    For example, instead of this:
    function Test-Function
    Param
    [ValidateSet("Folder1", "Folder2", "Folder3")]
    $Param1
    I want to get the validate set populated by a function like all Folders from the C drive :
    function Test-Function
    Param
    [ValidateSet(ls c:\ -Directory | select -ExpandProperty Name)]
    $Param1
    Any suggestions?
    Thanks,
    Martin

    Funny you should ask. Martin Schvartzman has recently posted an example of exactly
    how to use dynamic validate set.
    Sam Boutros, Senior Consultant, Software Logic, KOP, PA http://superwidgets.wordpress.com (Please take a moment to Vote as Helpful and/or Mark as Answer, where applicable)

  • Howto instantiate a dynamic SUBclass with parametized Constructor

    Hi again folks; whoever followed from previous thread; thanks.
    As DrClap said, this is trivial, but so far I have problems. The key question is in the red comments.
    package ezDBpkg;
    import java.lang.reflect.*;
    import java.sql.*;
    public class TestDBC implements DbContrlr {
      private DbContStorage pMyStorage = new DbContStorage();
      Constructor ceo = buildGlobalEOconstructor();
      private Constructor buildGlobalEOconstructor(){
        Class[] params = new Class[2];
        params[0] = DbContrlr.class;
        params[1] = String.class;
        Constructor co=null;
        try{
          Class cl = Class.forName("EO");
          co = cl.getConstructor(params);
        }catch (ClassNotFoundException cnfEX) {cnfEX.printStackTrace();
        }catch (NoSuchMethodException nsmEX) {nsmEX.printStackTrace();
        return co;
    //The key question is in the following method:
    //How do I instantiate a new class whose name is inside the newDynamicEoSubclass string,
    //which is always a subclass of my EO class.
      public void manufactureDynamicEO(String newDynamicEoSubclass, String id){
        EO eo=null;
        try{
          eo = ceo.newInstance(new Object[] {this,id});  //this line needs to be corrected to do the trick.
        }catch (InvocationTargetException itEX) {itEX.printStackTrace();
        }catch (IllegalAccessException iaEX) {iaEX.printStackTrace();
        }catch (InstantiationException iEX) {iEX.printStackTrace();
        registerEO((EO)eo);
      public void registerEO(EO eo){
        pMyStorage.mStoreEo(eo);
    }Thank you all much;
    -nat

    Ok, how about this:
    public class ClassAController {
    public static final ClassA instantiateClassAobject(String className) {
    ClassA result = null;
    Class theClass = Class.forName(className); // catch exceptions
    // Make sure that the class is a subclass of ClassA
    if (ClassA.class.isAssignableFrom(theClass)) {
    // use newInstance for default constructor, otherwise use
    // theClass.getConstructor(Class[]) to get the one you want
    Object obj = theClass.newInstance(); // catch exceptions
    // add obj into my library of ClassA objects
    result = (ClassA) obj; // The type's assignable so this cast is OK
    } // endif
    return result;
    } // instantiateClassAobject()
    This assumes that the other developer using your package actually calls instantiateClassAobject() rather than invoking his own constructor.
    Wouldn't it be better to simply add some code into the default constructor of ClassA?
    If you declare ClassA like this:
    public class ClassA {
    public ClassA() {
    super();
    // add this into my library of ClassA objects...
    Because ClassA has only the default constructor, you know that it will be invoked by everything that is an instance of ClassA or any of its subclasses. The invocation may be implicit, but it occurs.

  • Howto: display dynamic form on tree selection (jdev 11gR1)

    Heya,
    another question by myself, hoping for an advice.
    I finally made a tree including different types of "objects" into one tree (based on ADF BC). Simple example use case used in this post: displaying employee hierarchy PLUS assigned projects per employee.
    So my current problem is: what is the "way to go" to change the form in the "content" facet (made a simple splitter layout with tree in left facet and "content" in right facet) AND binding the data to it? Clicking on an employee would open the employee form and load data for selected employee into it, but clicking on a project would open the project form and loading data for selected project into it. I have all data available in the tree application module and the decision "what to display" is based on one of the attributes.
    All tutorials I found so far for master/detail are kinda "static" (linking employee tree to employee form) and I can't figure out how to do want I want to do.
    Is this possible going the declarative way? If yes, how? Or do I have to code something? If yes, how? No need for actual code, just need a hint what to look for.. feeling lost atm.
    Any help is highly appreciated. :)

    Hi,
    here's how you do it
    1. Create a iterator binding for the project ViewObject (choose a ViewObject instance that is not dependent to the employees ViewObject you use as the tree top level)
    2. In the binding editor, expand the Data Source entry (below the rule attribute configuration) and create an EL expression that references the iterator bindingyou created
    This ensures that selecting an emplloyee is synchronized with the Employee iterator used to build the top level nodes and the selected project is synchronized with the project iterator node.
    3. Add a switcher component to switch between the employee and the project edit form
    4. Create a facet in the af:switcher that has the name of the full employee view object e.g. adf.mysample.EmployeesView
    5. Create a facet in the af:switcher for the full name of the Project VO
    6. Drag and drop the EmployeeView entry from the data Controls palette as a form into the Employees facet
    7. Do the same for the Projects (make sure you use the Projects VO that is not depedent)
    Set the default value of the switcher too point to the facet that should be shown by default. The value of the switcher set to an EL that points to a managed bean method or memory attribute. Upon selecting a node (you can use the tree node selection listener) you access the selected tree node. The selection listener code woud look as shown below
      //tree reference can be obtained from the selectionListener event (Source) or from a JSF component binding property reference
      //example uses the latter
      RichTree tree = this.getTree1();
      //get selected row keys. This could be a single entry or
      //multiple entries dependent on whether the tree is
      //configured for multi row selection or single row selection
      RowKeySet rks = tree.getSelectedRowKeys();
      Iterator rksIterator = rks.iterator();
      //assuming single select use case. Otherwise, this is where you
      //need to add iteration over the entries in the multi select use case
      if (rksIterator.hasNext()){
        //a key is a list object that containe the node path information for the
        //selected node
        List key = (List)rksIterator.next();
        //determine the selected node. Note that the tree binding is an instance of
        //JUCtrlHierBinding
        JUCtrlHierBinding treeBinding = null;
        //We can get the binding information without using EL in our Java, which you always should
        //try to do. Using EL in Java is good to use, but only second best as a solution
        treeBinding = (JUCtrlHierBinding) ((CollectionModel)tree.getValue()).getWrappedData();
        //the row data is represented by the JUCtrlHierNodeBinding class at runtime. We get the node value
        //from the tree binding at runtime     
        JUCtrlHierNodeBinding nodeBinding = treeBinding.findNodeByKeyPath(key);
            //the JUCtrlHierNodeBinding object allows you to access the row data, so if all you want is to
        //get the selected row data, then you are done already. However, in many cases you need to further
        //distinguish the node, which is what we can do using the HierTypeBinding
        String nodeStuctureDefname = nodeBinding.getHierTypeBinding().getStructureDefName();
       //determine the selected node by the ViewObject name and package
       String employeesDef = "adf.mysample.EmployeesView";
       String projectDef = "adf.mysample.ProjectsView";
      if (nodeStuctureDefname.equalsIgnoreCase(empoyeesDef)){
         // change value reference used in af:switcher and partially refresh the af:switcher component to show the edit form
         // e.g. change the value of the refrenced memory attribute or managed bean variable
       else if (nodeStuctureDefname.equalsIgnoreCase(projectDefDef)){
         // change value reference used in af:switcher and partially refresh the af:switcher component to show the edit form
         // e.g. change the value of the refrenced memory attribute or managed bean variable
       else{
        //what the heck did the user click on? Ask him ;-)
       }Frank

  • Questions about example "Dynamic JDBC Credentials for Model 1 and Model 2"

    Hello,
    i am trying to set up dynamic JDBC authentication in my ADF BC application - i want that it'll work like in Forms - a dababase user with the proper priveleges can log into my ADF BC application using his database login and password, and work with application.
    I've read the paper "How To Support Dynamic JDBC Credentials" at
    http://www.oracle.com/technology/products/jdev/howtos/10g/dynamicjdbchowto.html
    and test the very useful example, created by Steve Muench, which i've got from
    http://radio.weblogs.com/0118231/stories/2004/09/23/notYetDocumentedAdfSampleApplications.html#14
    The example works, but when i'm transfer its realisation in my application - it doesnt work the right way. The problems is the following:
    1. I can connect and work successfully only under the owner of the schema - the username and password of which i've wrote in the "jbo.server.internal_connection" string of the AM configuration.
    2. When i'm connecting under other users, which have all the rights to work with the db objects, used by application, i got the main page with the "Access Denied" message - as i have no priveleges to the tables.
    3. The big surprise is that if i am entering the fake username and password - the random letter combination - then i am getting the same behavior as in p.2 - the main page with the "Access Denied" message!
    And the last question is:
    4. Is it possible to set up the dynamic jdbc authentication using the build-in JDeveloper functions - i mean not to use that additional code, not override the ADF Binding Filter, and so on, but set up the similar behaviour (users log in using their db names and passwords) in several minutes following the standart documentation?
    Thanks in advance!

    One more question:
    I have 2 independent Application Modules in my application - to make the 2 transactions independent one form another, when working with different parts of project - and while using dinamic JDBC authentification, the user connects only in the first AM under the username he's entered, but the 2nd AM works under the predefined earlier (during development) connection for that AM.
    How can i make the 2nd AM to be connected under the logging in user (same as the 1rst AM)?

  • How to - Build a report based on dynamic query

    I am using this how to and find out that there is an syntax error on this example, where the and should be where. I got an SQL parsing error when I followed this example until I debugged with the debug while on this page. Has any one using this how to and have the same problem?
    if :p600_show != 'ALL' then
    q:=q||'and p.category = :p600_show';
    end if;
    declare
    q varchar2(4000);
    begin
    q:=' select p.category, ';
    q:=q||' p.product_name, ';
    q:=q||' i.quantity, ';
    q:=q||' i.unit_price ';
    q:=q||' from demo_product_info p, ';
    q:=q||' demo_order_items i ';
    q:=q||' where p.product_id = i.product_id ';
    if :p600_show != 'ALL' then
    q:=q||'and p.category = :p600_show';
    end if;
    return q;
    end;

    [regarding bind variables]
    Well, from what I saw in
    http://www.oracle.com/technology/products/database/htmldb/howtos/dynamic_report-1.6.htm
    the dynamic SQL is constructed by doing concatenation of user input and SQL keywords
    'select col1,col2 from table where co1='||:P1_COL1
    So, this is going to flood the shared pool with unique SQL statements with different values of :P1_COL1 and also subject to SQL injection, isnt it? You obviously disagree and I am happy to be proven wrong, please do so?
    To avoid having to deal with SQL parsing errors, you
    could put a condition on the region so that it
    doesn't render (parse) whenever any elements of
    session state are not sufficiently populated to allow
    the formation of a valid SQL query that would be
    parseable without errors.Thats exactly what I want to do, but didnt know what condition that would be? I didnt see any condition saying "Session state not initialized" or something like that.
    Thanks

  • With dynamic CreateViewObject How To "Navigate N rows at a time using DataTags" fails

    I have worked with the example on this link:
    http://otn.oracle.com/docs/products/jdev/howtos/jsp/traverse_n.ht
    ml
    It works fine in case I am using the View Object created in the
    Package as the example is using.
    However, this sample does not navigate; through record as
    expected and keep displaying same records, when I create dynamic
    view using CreateViewObject tag like this:
    <jbo:CreateViewObject appid="TravelPkgModule" name="test">
    select vc_comp_code,vc_voucher_no from hd_travel_voucher
    </jbo:CreateViewObject
    Help me in navigating with dynamic view objects.

    moreover,
    suppose total records in a set are = 100
    and range size = 10
    on first click on next set, records from 1 to 10 are displayed.
    on second click on next set, records from 11 to 20 are displayed.
    on third or N'th click on next set, records from 11 to 20 are
    displayed and not from 21 onwards are displayed.
    Code attached.
    <%@ page errorPage="errorpage.jsp"
    contentType="text/html;charset=WINDOWS-1252"
    import="java.util.*,java.text.*" %>
    <%@ page contentType="text/html;charset=WINDOWS-1252"%>
    <HTML>
    <BODY>
    <%@ taglib uri="/webapp/DataTags.tld" prefix="jbo" %>
    <jbo:ApplicationModule
    configname="TravelPkg.TravelPkgModule.TravelPkgModuleLocal"
    id="TravelPkgModule" username="ebiz" password="ebiz" />
    <jbo:DataSource id="Qvoucher" appid="TravelPkgModule"
    viewobject="HdTravelVoucherView" rangesize="2">
    </jbo:DataSource>
    <%
    %>
    Next Set
    Previous Set
    <table border="1">
    <%
    oracle.jbo.RowSet rs = Qvoucher.getRowSet(); // see if we have
    a navigation command
    if(request.getParameter("nav") != null)
         String sNavigation = request.getParameter("nav");
    if(sNavigation.equalsIgnoreCase("nextset"))
         %>kiran = <%     
         rs.scrollRange(rs.getRangeSize());
    else
         rs.scrollRange(-rs.getRangeSize());
    oracle.jbo.Row rows[] = rs.getAllRowsInRange();
    for(int i = 0; i < rows.length; i++)
         rs.setCurrentRow(rows);%>
         <tr><td>
         <jbo:ShowValue datasource="Qvoucher"
    dataitem="VcEmpCode"></jbo:ShowValue></td>
         <td><jbo:ShowValue datasource="Qvoucher"
    dataitem="VcVoucherNo"></jbo:ShowValue></td>
    <% }%>
    LENGHT = <%=rows.length%>
    </table></BODY></HTML>
    <jbo:ReleasePageResources releasemode="Reserved" />

  • How to create a dynamic mapping of columnar at the Runtime using ADF or JSF

    How to create a dynamic GUI at the Runtime using ADF or JSF in JDeveloper 11g.
    What I am trying to build is to allow the user to map one column to another at the run time.
    Say the column A has rows 1 to 10, and column B has rows 1 to 15.
    1. Allow the user to map rows of the two tables
    2. An dhte rows of the two columns are dynamically generated at the run time.
    Any help wil be appreciated.....
    Thnaks

    Oracle supports feedback form metalink was; "What you exactly want to approach is not possible in Htmldb"
    I can guess that it is not
    exactly possible since I looked at the forums and documantation etc. but
    couldnt find anything similar than this link; "http://www.oracle.com/technology/products/database/htmldb/howtos/tabular_form.h
    t". But this is a very common need and I thought that there must be at least a workaround?
    How can I talk or write to Html Db development team about this since any ideas, this is very important item in a critial project?
    I will be able to satisfy the need in a functional way if I could make the
    select lists in the tabular form dynamic with the noz_id;
    SELECT vozellik "Özellik",
    htmldb_item.select_list_from_query(2, t2.nozellik_deger, 'select vdeger
    a,vdeger b from tozellik_deger where noz_id = 10') "Select List",
    htmldb_item.text(3, NULL, t2.vcihaz_oz_deger) "Free Text"
    FROM vcihaz_grup_ozellik t1, tcihaz_oz t2
    WHERE t1.noz_id = t2.noz_id
    AND t2.ncihaz_id = 191
    AND t1.ngrup_id = 5
    But what I exactly need i something like this dynamic query;
    SELECT
    vozellik "Özellik",
    CASE
    WHEN (t2.nozellik_deger IS NULL AND t2.vcihaz_oz_deger IS NOT NULL) THEN
    'HTMLDB_ITEM.freetext(' || rownum || ', NULL) ' || vozellik
    WHEN (t2.nozellik_deger IS NOT NULL AND t2.vcihaz_oz_deger IS NULL) THEN
    'HTMLDB_ITEM.select_list_from_query(' || rownum ||
    ', NULL, ''select vdeger a,vdeger b from tozellik_deger where noz_id = ' ||
    t1.noz_id || ''' ) ' || vozellik
    END AS "Değer"
    FROM vcihaz_grup_ozellik t1, tcihaz_oz t2
    WHERE t1.noz_id = t2.noz_id
    AND t2.ncihaz_id = 191
    AND t1.ngrup_id = 5
    Thank you very much,
    Best regards.
    H.Tonguc

  • HOWTO: Low DPC latencies ( 100 us) on bootcamped Macbooks (Pro)

    Here is a small HOWTO for getting the lowest possible DPC latencies (<100 us) on bootcamped Macbooks Pro (late 2008):
    Disclaimer: I did all tests on my late 2008 Macbook Pro Unibody 2.8 GHz model with NVidia chipset and graphic. Most of the following suggestions should apply to standard Macbook models and likely older generation as well.
    First of all Intel Speedstep can lead to dropouts and higher DPC latencies on small load! Unfortunately all tools that are supposed to manually switch Speedstep off don't seem to run on the late Macbooks (Pro) while on OS X you can use "Coolbook".
    Your only way to make sure your processor is clocked high enough and not dynamically switching is to put up a constant load (like running your DAW pretty hot or running Prime95 at "Idle/Lowest" process Priority in the background). I will keep investigating if I can find a tool to switch Speedstep off.
    Most importantly (to get rid of really bad DPC latency spikes):
    Kill the process "KBDMGR.EXE"!
    That's Apple's driver for controlling brightness and keyboard lighting via the function keys and setting tap options for the trackpad. It seems to have broken multithreading!
    You can also change the CPU affinity of KBDMGR.EXE to CPU1 (not CPU0!) which will help decreasing DPC Latencies alot, but there will still be Audio dropouts.
    Here's a small toolkit I put together that allows you to conviniently enable/disable Apple's "Boot Camp" tray application (KBDMGR.EXE) via an icon link and/or keyboard shortcut. Optionally it will switch the function of the F-Keys automatically for you depending on whether Boot Camp is loaded or not.
    Furthermore it automatically turns Boot Camp's CPU priority to "Idle" and CPU affinity to CPU1 in order to turn down the bug induced DPC Latencies and prevent dropouts with Windows sounds and Media Player playback. Professional Audio users will find that only turning off Boot Camp will allow low audio latency usage. Installation instructions are included in the README.TXT for your convinience.
    Boot CampED download page
    Direct Download:
    Boot CampED.zip - 3.3 kb
    Turn off the Broadcom 802.11N WLAN driver via Device-Manager or update to the latest drivers via Microsoft Update Catalog.
    Like on OS X the Airport module can lead to audio dropouts. The DPC Latencies produced by the Broadcom driver are less regular than the KBDMGR thing, alot higher in value. Best thing is to try for your own needs.
    Update:Meanwhile a new Broadcom drivers was published via Microsoft's Update Catalog named "Broadcom - Network - Broadcom 4322AG 802.11a/b/g/draft-n Wi-Fi Adapter " (4322 is the chip used). This one comes with both low DPC latencies and finally the ability to use the full rate upto 300 mbit/s. Go get it! For safety you might still want to turn WLAN off during critical audio work though.
    Change the graphic-card driver to "Standard VGA Driver" via Device-Manager or use RIVATUNER to enforce a fixed clock-rate and performance mode.
    Update:The dynamic clock-rate switching happening with NVidia drivers in order to save power and keep temperatures low leads to extreme DPC spikes for each switch and constantly high DPC latencies when it settles in low performance 2D mode. RIVATUNER's "Enforce Performance Mode" option can be used to set the card to a fixed clock-rate. I recommend using "Low Power 3D" for audio work.
    User of XP might think that they don't need this, but be aware that on XP the NVidia driver keeps running at highest clock-rates in "Performance 3D Mode" all the time. Via RIVATUNER you can switch to "Low Power 3D".
    Turn off the ACPI compliant Battery driver via Device-Manager
    This driver polls the battery for its current load status and produces a small, single, short spike exactly every 15 seconds. In my own tests I found that it doesn't seem to affect low latency audio performance. Furthermore turning it off will remove monitoring of your current battery status. But if you are running on power-chord anyway and want to make absolutely sure you can turn it off.
    All other devices don't add much if anything to DPC latencies, but can savely be turned off if you don't need them (like Nvidia LAN, Bluetooth, Onboard High Definition Audio).
    Attention: Removing the Battery while the power chord is connected results in permanently reduced CPU clock (downto the lowest clock setting possible). According to Apple this is done to prevent overloading the power-supply during heavy load as it needs the assistance of the battery from time to time.

    I'd like to underline that these are workaround. Now that the Broadcom drivers are fixed it is up to Apple to fix KBDMGR and to get the NVidia drivers fixed!
    Furthermore it seems as if only Vista 32-bit and OS X are heavily affected by Intel Speedstep, Vista 64-bit and Windows 7 (32/64) work alot better in this regard. XP is a mixed bag.
    Here are some screenshots to prove that the workarounds do help:
    DPC Latency before applying the workarounds:
    DPC Latency Vista 64-bit (Idle, Speedstep enabled) after applying the workarounds:
    DPC Latency Windows 7 64-bit (Idle: Speedstep enabled) after applying the workarounds:
    As you can see Vista's DPCs run well below 100 us once everything is optimized, Windows 7 is a bit worse, XP is even better. But practically you get the same results when using all three for professional Audio work.
    Message was edited by: T1mur

  • Two EO questions (dynamic attrs and validation)

    Hello all (I really hope Steve M gets to see this),
    I am re-visiting an old project (fantasy) of mine to implement spell checking of certain fields in an Entity Object, The concept is that I will implement the spell checking in an overriden validateEntity method. The way I would like this to work is for spelling errors to be reported to the user when they try to commit; if the user commits again without making any changes, I will assume they want to ignore the spelling errors and will allow the Entity to commit. In order to implement this in a really cooI and generic way, Ineed to be able to do a couple of things that have really stumped me.
    The first is in relation to entity validation. The doc states that any EO is assumed to be valid after it is read from the database. Is there any way that I can alter this behaviour so that the EO needs to be re-validated even if it has just been read from the database? Extra credit if this can be done in such a fashion as to not cause the EO's data to be re-posted to the database if the user doesn't make any changes. I have tried over-riding lots of things in the EntityImpl and EntityDefImpl, but I cannot find the right place to do this.
    The second thing I would like to do is to add dynamic attributes to an EO instance. The reason I want to do this is so that I can add the spell check code in a generic framework extension class and not have to modify each EO for this behaviour. The attribute I want to add is used to track whether spell checking has already been done on the EO row. I cannot use a java class member variable, as the same instance of the java class is not necessarily used across different web requests - in fact, I have found that the same instance is rarely-to-never re-used in my testing. I can make this work by adding a transient attribute to the EO itself, but this defeats my goal of a generic implementation. I have found some methods in EntityImpl (setDynamicAttributeValue and getDynamicAttributeValue), but they don't appear to do what I want. I've also played around a bit with the EntityDefImpl, but no luck there either.
    I do promise to post a blog entry detailing how to do this if this pans out. We have looked at some nice JavaScript-based spell checkers that work well (give suggestions in a pop-up window), but we would like multiple fields on a web page to be spell-checked, and this is difficult to do with those spell-checkers (particularly when you have an af:table with varying number rows).
    Any assistance is appreciated,
    John

    Your mechanism to manage css style classes is a good approach; I have used that many times. I do wonder why the style classes were implemented as a list, instead of a set, but there may be good use cases for using a list.
    In some cases you can also consider using CSS PsuedoClasses, which were introduced in JavaFX 8. These are a bit easier to use, especially if you have only two options. But a use case might look like:
    public class Message {
        public enum Status { NORMAL, WARNING, CRITICAL }
        private final ObjectProperty<Status> status = new SimpleObjectProperty<>(Status.NORMAL);
        private final StringProperty message = new SimpleStringProperty();
        // constructor, getters, setters, and property accessors....
    public Label createLabel(Message message) {
        PseudoClass warning = PseudoClass.getPseudoClass("warning");
        PseudoClass critical = PseudoClass.getPseudoClass("critical");
        Label label = new Label();
        label.textProperty().bind(message.messageProperty());
        message.statusProperty().addListener((obs, oldStatus, newStatus) -> {
            label.pseudoClassStateChanged(warning, newStatus == Message.Status.WARNING);
            label.pseudoClassStateChanged(critical, newStatus == Message.Status.CRITICAL);
        return label ;
    And then your css looks like
    .label:warning {
        -fx-text-fill: orange ;
    .label:critical {
        -fx-text-fill: red ;

  • How to add values dynamically for custom property during design time?

    I am trying to create a user control with custom properties. I have a property named Server.
    And Values for this property is system dependent. I have the code that can generate the values and is working fine.
    During the design time, when I include this control in my application, and type the property name, I want Visual Studio to prompt for the values. Like it
    does for Alignment property for some controls shows Left, Right, Center.. during design time.
    If the Values are static, I can use an enum and it works fine. I need help with dynamic values.

    You can't, afaik.
    It's either an enum or you don't get that functionality of values.
    There is no right left centre, "Towards the top right but just off centre" - which I just thought of... option for example.
    Hope that helps.
    Recent Technet articles: Property List Editing;
    Dynamic XAML

Maybe you are looking for