Use created skin state

tl;dr How do I change a components state to a new state defined in a custom skin.
Hello Everyone ,
  I have created a new component that extends Panel ( NewPanel.as ).  I have created a skin for NewPanel.as , in which the new skin has an additional state (newState).  What must I do to make an instance of my NewPanel class change its visual state to "newState".  Most of the examples on the internet , show a button and changing its default states , but not adding a brand new one.
Sincerely ,
  Ubu

Create a site for publication.
Duplicate a page in your template site.
Drag it to the publish site
Rename the page.
Edit the page.
Publish the page.
It's easier than it sounds.

Similar Messages

  • How to create indexes using CREATE TABLE statement

    Hi,
    Can anyone please tell me how to create indexes using CREATE TABLE staement? This point is part SQL Expert exam (1Z0-047) and please guide me to use which books for this particular exam.
    Thanks in advance.

    Can anyone please tell me how to create indexes using CREATE TABLE staement?e.g. creating a primary key or a unique constraint will generate indexes along with the create table syntax:
    SQL> create table t (a integer primary key, b integer unique)
    Table created.
    SQL> select   index_name, index_type, uniqueness
      from   user_indexes
    where   table_name = 'T'
    INDEX_NAME                     INDEX_TYPE                  UNIQUENES
    SYS_C0016575                   NORMAL                      UNIQUE  
    SYS_C0016574                   NORMAL                      UNIQUE  
    2 rows selected.

  • Why do we use CRAETE DATA statement ?

    Hi,
    Why do we use CREATE DATA statement ? is it only for optimisation  ?
    thanks.
    Edited by: B on Jan 27, 2009 4:13 PM

    >
    B wrote:
    > Hi, thank you for the answers. The reply by Sonia Baboo was not copy paste from abap help. whereas the one from Niki was.
    >
    >
    >  i have rewarded points. the answers were very helpful
    >
    > thanks
    > B
    It was copy and paste from SAP Help.  http://help.sap.com/saphelp_nw70/helpdata/EN/16/0dce040cf711d3b9360000e8353423/content.htm

  • EXTRACT ALL CREATE DATABASE STATEMENTS?

    Hi,
    I manually created a database named demo, using CREATE DATABASE statement as follows:
    CREATE DATABASE demo
    USER SYS IDENTIFIED BY fyicenter
    USER SYSTEM IDENTIFIED BY fyicenter
    LOGFILE GROUP 1 ('/oraclexe/oradata/FYI/redo01.log') SIZE 10M,
    GROUP 2 ('/oraclexe/oradata/demo/redo02.log') SIZE 10M,
    GROUP 3 ('/oraclexe/oradata/demo/redo03.log') SIZE 10M
    MAXLOGFILES 5
    MAXLOGMEMBERS 5
    MAXLOGHISTORY 1
    MAXDATAFILES 100
    MAXINSTANCES 1
    CHARACTER SET US7ASCII
    NATIONAL CHARACTER SET AL16UTF16
    DATAFILE '/oraclexe/oradata/FYI/system01.dbf' SIZE 32M REUSE
    EXTENT MANAGEMENT LOCAL
    SYSAUX DATAFILE '/oraclexe/oradata/FYI/sysaux01.dbf' SIZE 32M REUSE
    DEFAULT TABLESPACE tbs_1
    DEFAULT TEMPORARY TABLESPACE tempts1
    TEMPFILE '/oraclexe/oradata/demo/temp01.dbf'SIZE 20M REUSE
    UNDO TABLESPACE undotbs
    DATAFILE '/oraclexe/oradata/demo/undotbs01.dbf'
    SIZE 20M REUSE AUTOEXTEND ON MAXSIZE UNLIMITED;
    Is is true that the database specification would be saved in a file located somewhere or this database specification(definition) would be recorded in a certain data dictionary table once the CREATE DATABASE statement is executed? If yes, what are the default database creation file name or name of the data dicitonary table?
    In other word, if someone would like to view the database definition of a created database, e.g. demo in this case, how would she or he be able to view all the create database statements as shown above?
    In MySQL, it would be SHOW DATABASE command. Is there any statement in Oracle equivalent to SHOW DATABASE to produre the similiar output?

    alter database backup controlfile to trace;
    a trace file is created in the "udump" folder that contains desired SQL
    but most folks would NEVER do it this way.
    Additional steps are required beyond what you stated.
    http://download.oracle.com/docs/cd/B19306_01/server.102/b14231/create.htm#i1009122
    Last time I did a manual creation it took 2 - 3 HOURS to complete 2 scripts below
    Run Scripts to Build Data Dictionary Views
    Run the scripts necessary to build views, synonyms, and PL/SQL packages:
    CONNECT SYS/password AS SYSDBA
    @/u01/oracle/rdbms/admin/catalog.sql
    @/u01/oracle/rdbms/admin/catproc.sql
    EXIT
    Edited by: sb92075 on Feb 22, 2010 5:17 PM

  • Create user statement on Procedures

    Hi,
    How to use create user command in oracle procedure.
    Whenever I am using the statemet create user <username> identified by <password> it gives me the error. But whenever I am removing this statement the procedure is compiling successfully.
    Is there anyway to use create user statement inside procedure?
    Regards,
    Indraneel

    You have to use dynamic sql :
    SQL> begin
      2  execute immediate ('create user test_user identified by test_user');
      3  end;
      4  /
    PL/SQL procedure successfully completed.
    SQL>Of course the command should be completed with other information (e.g. default tablespace, temporary tablespace, and so on).
    Paul

  • Using once created prepared statement with different connections in Oracle

    Can I use same statement cash using different connections in Oracle
    For example I have a prepared statement p1. After its using i close connection (return it to the pool)
    Next time I want use p1 statement using another connection.
    Question : When I creat p1 in second time ,is it returned from cash or created as a new statement. And what I should do to use once prepared statement using differend connections.
    Thaks.

    As far as I know a PreparedStatement lives and dies with the Connection that created it. So, you cannot use a PreparedStatement with other Connection instances than the one that created it.
    You will have to recreate the PreparedStatement for each time you open a connection, or use the same PreparedStatement and NOT close the Connection in between. The last suggestion can be risky though, if you never close the connection...
    Jakob Jenkov
    www.jenkov.com

  • Create a view using a select statement

    Hi
    I need to create a view using a select statement to view details from 2 different tables which will only show data where the holidays commence after june.
    I am new to oracle so any help will do.
    Thanks

    Hi
    I need to create a view using a select statement to view details from 2 different tables which will only show data where the holidays commence after june.
    I am new to oracle so any help will do.
    Thanks

  • Exclude create user statements using datapump API

    I’m trying to perform a schema import and exclude the "create user" statements using the datapump API but I can’t get the syntax correct for the dbms_datapump.metadata_filter call.
    Using impdp I use a parfile that includes the following statements:
    schemas=bob, john
    exclude=user
    How do I achieve the same effect using the dbms_datapump.metadata_filter API?
    Any assistance greatly appreciated.
    Gavin

    Did you ever figure out your issue? I'm having the same issue after I try to set attributes.

  • Create a new rule for printing form to use in time statement form

    Hello,
    we need to print an information on time statement form in dependence of a special substitution. Is there any possibility to create a new rule for printing form to use in time statement form? I can't find any information about this.
    Thanks for your help.
    Regards,
    Daniela

    Yes, I've tried this, but I get the error message:
    Form class TEDT can only be displayed with this editor.
    What am I doing wrong? Do I have to create a customer form class and assign a customer time statement form?
    Thanks for your information.
    Regards,
    Daniela

  • Finding create user statement using the export dump

    I have an Oracle export dump and it is a schema level export only.
    Is there any way that I can get the create user statement from that dump using import full=y show=y ?
    How do I identify the create user statement once I did the show=y

    Yes with full export this is possible because full export will create all schemas but this is not possible with schema level export because schema level import does not recreate schema.

  • Skin state problem with PopupAnchor

    I wanted a button which on hover show a popup. and depending on some state, add/remove elements from the popup.
    I extended Button to create HoverButton and used DropDownController with PopupAnchor to get the hover to popup behavior. However for some reason removing element from the popup using skin state isn't working. I've included a sample code below.
    Basically when you mouse hover over the button, you should see a popup with one or two label depending on state which gets toggled when you click on the button. Initially you see one label in the popup because it's in open state. when you click on the button, state should change to close. so when you hover on the button, popup shows up with two button. So far so good. But if you move your mouse away and then hover again, all of sudden you don't get the second button.
    anyone have any idea why this is happening?
    MainApplication.mxml
    <?xml version="1.0" encoding="utf-8"?>
    <s:WindowedApplication
         xmlns:fx="http://ns.adobe.com/mxml/2009"
         xmlns:s="library://ns.adobe.com/flex/spark"
         xmlns:mx="library://ns.adobe.com/flex/mx"
         xmlns:local="*">
    <local:HoverButton skinClass="HoverButtonSkin" label="wtf" horizontalCenter="0" verticalCenter="0"/>
    </s:WindowedApplication>
    HoverButton.as
    package 
    import flash.events.MouseEvent;
    import spark.components.Button;
    import spark.components.Group;
    import spark.components.supportClasses.DropDownController;
    import spark.events.DropDownEvent;
    [SkinState("open")]
    [SkinState("close")]
    public class HoverButton extends Button
    private var _dropDownController:DropDownController;
    private var _open:Boolean = true;
    [SkinPart(required='true')]
    public var dropDown:Group;
    public function HoverButton()
    super();
    _dropDownController = new DropDownController();
    _dropDownController.openButton = this;
    _dropDownController.rollOverOpenDelay = 300;
    _dropDownController.addEventListener(DropDownEvent.OPEN, handleDropDownOpenClose, false, 0, true);
    _dropDownController.addEventListener(DropDownEvent.CLOSE, handleDropDownOpenClose, false, 0, true);
    override protected function clickHandler(event:MouseEvent):void
    _open = !_open;
    override protected function getCurrentSkinState():String
    var skinstate:String;
    // if the hover is opened, return open
    if (_dropDownController.isOpen) {
    if (_open) {
    skinstate = "open";
    } else {
    skinstate = "close";
    } else {
    skinstate = super.getCurrentSkinState();
    return skinstate;
    override protected function partAdded(partName:String, instance:Object):void
    super.partAdded(partName, instance);
    if (instance == dropDown) {
    _dropDownController.dropDown = dropDown;
    override protected function partRemoved(partName:String, instance:Object):void
    super.partRemoved(partName, instance);
    if (instance == dropDown) {
    _dropDownController.dropDown = null;
    private function handleDropDownOpenClose(event:DropDownEvent):void
    // invalidate skin state whenever the hover gets opened or closed.
    invalidateSkinState();
    HoverButtonSkin.mxml
    <?xml version="1.0" encoding="utf-8"?>
    <s:SparkSkin xmlns:fx="http://ns.adobe.com/mxml/2009" xmlns:s="library://ns.adobe.com/flex/spark"
                 xmlns:fb="http://ns.adobe.com/flashbuilder/2009" width="50" height="50">
        <fx:Metadata>[HostComponent("HoverButton")]</fx:Metadata>
        <!-- states -->
        <s:states>
            <s:State name="up" />
            <s:State name="over" />
            <s:State name="open" stateGroups="hoverState" />
            <s:State name="close" stateGroups="hoverState" />
            <s:State name="down" />
            <s:State name="disabled" />
        </s:states>
    <s:Rect top="0" bottom="0" left="0" right="0">
    <s:fill>
    <s:SolidColor color="0xAAAAAA" />
    </s:fill>
    </s:Rect>
    <s:PopUpAnchor id="popUp" displayPopUp="false" displayPopUp.hoverState="true" includeIn="hoverState"
       left="0" right="0" top="0" bottom="0" itemDestructionPolicy="auto"
       popUpPosition="above" popUpWidthMatchesAnchorWidth="false">
    <s:Group id="dropDown">
    <s:VGroup>
    <s:Label text="{'hover ' + currentState}"/>
    <s:Label text="closeLabel" includeIn="close"/>
    </s:VGroup>
    </s:Group>
    </s:PopUpAnchor>
    <s:Label id="labelDisplay" verticalCenter="0" horizontalCenter="0"/>
    </s:SparkSkin>

    hello!
    I've experienced the same problem after installing arch on my new hp nx7400. Workaround is to compile psmouse as a module, so i ask you to do that...
    Ubuntu users only need to unloading module before shutdown / reboot by adding 'modprobe -r psmouse' to '/etc/init.d/halt' and '/etc/init.d/reboot' because they have psmouse as a module compiled to kernel.
    I've noticed that arch devs made that floppy is now a module so I would be gratefull if they could do the same with psmouse.

  • Use of Prepared Statement in adf

    Hi Experts,
    I am confused with the Use of prepared statement in adf.
    My use case is ,
    I have to update a table from every page in my application under certain conditions.
    My question is ,
    whether I have to create the VO iterator binding in every page and by calling the createinsert and insert the data in to the table or
    use a common method in the Application module impl
    which is using a prepared statement,(which is not even creating the ViewObject ) like
    PreparedStatement st = null;
    String sql = "INSERT INTO hr.departments (DEPARTMENT_ID,    DEPARTMENT_NAME,   MANAGER_ID,   LOCATION_ID) VALUES (seq,?,?,?)";
                st=getDBTransaction().createPreparedStatement(sql,0);
                st.setString(1, name);
                st.setString(2, mgr_id);
                st.setString(3, Loc_id);
                st.execute();
    getDBTransaction().commit();which is the best approach?
    Studio Edition Version 11.1.1.2.0
    Ranjith

    Ranjith,
    Without further understanding the use case, there's not really much difference between the two approaches. In both cases, you'd have a binding in the page definition (either an iterator binding for the VO or a method binding for the AM service method). Both will use bind variables. The main difference I can see is that, depending on how you have configured your AM pooling settings, the VO method will incur fewer parses in the DB because the AM will cache prepared statements for you.
    John

  • Use of "infotypes" statement

    Hi,
    What is the use of infotypes statement.
    I saw a code block in sdn. here they have used a infotype statement as below.
    infotypes: 0041.
    tables: pernr.
    data: record type standard table of p0041,
    lfs_rec like line of record.
    parameters: p_pernr type persno.
    start-of-selection.
    call function 'HRAR_READ_INFOTYPE'
    exporting
    personnel_number = p_pernr
    infotype = '0041'
    IMPORTING
    RC = RC
    tables
    infotype_table = record
    exceptions
    exception_infotype = 1.
    loop at record into lfs_rec.
    write:/10 lfs_rec-pernr,
    30 lfs_rec-begda,
    42 lfs_rec-endda,
    54 lfs_rec-dar01,
    60 lfs_rec-dat01.
    endloop.
    In the above code they have used
    infotypes: 0041.
    But 0041 is not used anywhere in the program.
    I have read that infotypes statement is used to create a internal table. But here i have no clue they have craeted internal table separately.
    Please help
    Thanks in advance,
    Bala.

    hi Bala,
    You are right,  infotypes statement is used to create a internal table. Infotype can be used as reference to the standard table. eg if we consider the case of standard table PA0001, then is infotype is 0001.
    in case of this code:
    call function 'HRAR_READ_INFOTYPE'
    exporting
    personnel_number = p_pernr
    infotype = '0041'
    IMPORTING
    RC = RC
    tables
    infotype_table = record
    exceptions
    exception_infotype = 1.
    we are passing infotype as '0041', so it will read from standard table PA0041 and it will fetch data from that table according to p_pernr and the data will be fetched into the internal table 'record'. That is why infotypes are used.
    I hope this explaination is sufficient.
    regards
    arjun.

  • Using A callable statement in java

    Hi all im trying to get results back from the database using a callable statement the problem is that it is placing / infront of single quotes.I need to get rid of this because it's not returning anything
    here is my code
    CallableStatement statementOne;
    statementOne = ComparitiveAnalysisGUI.conn.prepareCall("{call graphProc(?,?,?,?,?,?,?)}");
    statementOne.setString(1,"\"date_format(calldate, '%Y-%m-%d H:59:59'),avg(billsec)\"");
    statementOne.setString(2,"Clovercdr");
    statementOne.setString(3,start);
    statementOne.setString(4,end);
    statementOne.setString(5,"Boksburg");
    statementOne.setString(6,"\"billsec > 0 and Network = " + network + "\"");
    statementOne.setString(7,"\"date_format(calldate, '%Y-%m-%d %H:M:S')\"");
    System.out.println(statementOne.toString());
    rs = statementOne.executeQuery();
    the result of the println is
    com.mysql.jdbc.CallableStatement@ec4a87: CALL graphProc('"date_format(calldate, \'%Y-%m-%d %H:59:59\'),avg(billsec)"','Clovercdr','\'2006-03-14 00:00:01\'','\'2006-03-14 23:59:59\'','Boksburg','"billsec > 0 and Network = \'SAMobile\'"','"date_format(calldate, \'%Y-%m-%d %H:M:S\')"')
    as you can see quite a mess please help if you can get the statement to look as follows
    CALL graphProc("date_format(calldate, '%Y-%m-%d %H:59:59'),avg(billsec)",'Clovercdr','2006-03-14 00:00:01','2006-03-14 23:59:59','Boksburg',"billsec > 0 and Network = 'SAMobile'","date_format(calldate, '%Y-%m-%d %H:M:S')")
    thanks Brian

    Ok in order to understand why I did what I did parhaps it would be best if you saw my Stored procedure
    create procedure graphProc(col varchar(100),company varchar(20),startTime datetime,endTime datetime,branchName varchar(20),andSection varchar(200),groupSec varchar(100))
    BEGIN
    SET @stmt := CONCAT("SELECT ",col," from ",company," where calldate between '",startTime,"' and '",endTime,"' and branchName = '",branchName,"' and ",andSection," Group by ",groupSec);
    PREPARE stmt1 from @stmt;
    EXECUTE stmt1;
    the call is for example
    call graphProc("date_format(calldate, '%Y-%m-%d %H:59:59'),avg(billsec)",'Clovercdr','2006-03-01 00:00:01','2006-03-14 23:59:59','Boksburg',"billsec > 0 and date_format(calldate, '%k') BETWEEN 7 AND 19 and Network = 'SAMobile'","date_format(calldate, '%Y-%m-%d %H:M:S')")//
    as you can see In MySQL the "date_format(calldate, '%Y-%m-%d %H:59:59'),avg(billsec)" has to be quoted like this, so it can recognise it as a single parameter, since , '%Y-%m-%d %H:59:59' is viewed as another parameter
    thaks for your reply
    Brian

  • "The CREATE USER statement must be the only statement in the batch" in SQL Azure - why? what to do?

    I'm getting an error on a line in the middle of a larger sql script, only in SQL Azure.
    IF NOT EXISTS (SELECT * FROM sys.database_principals WHERE name = N'foouser')
    CREATE USER [foouser] FOR LOGIN [foouser] WITH DEFAULT_SCHEMA=[dbo]
    GO
    Error: "The CREATE USER statement must be the only statement in the batch."
    I don't actually understand what 'the only statement in the batch' means.
    What is a batch? Is it a SQL file? Is it related to a 'GO' statement or an 'IF' statement? What is the reason for the error? And how do I avoid it?
    Thanks,
    Tim

    >IF...ELSE imposes conditions on the execution of a Transact-SQL statement
    I understand the general purpose of an If statement. I could let go of our definition of statement counting disagreeing too except that because of the error I'm stuck.
    It's less important for Create User but what I am really puzzled over now is a very similar issue how am I supposed to do a safe version of CREATE LOGIN, when I don't know whether a login has been previously created on the server or whether I
    am setting up the database on a clean server?
    IF NOT EXISTS (SELECT * FROM sys.server_principals WHERE name = N'foouser')
    CREATE LOGIN [foouser] WITH PASSWORD = 'asdfasdf'
    GO
    If I try and execute this script, it throws the same error as above.
    The first unworkable workaround idea is to omit the if statement
    CREATE LOGIN [foouser] WITH PASSWORD = 'asdfasdf'
    GO
    But if the login already exists on the server (because a similar script was already run), then the script throws an error.
    The second unworkable workaround idea is to do
    DROP LOGIN [foouser]
    GO
    CREATE LOGIN [foouser] WITH PASSWORD = 'asdfasdf'
    GO
    Obviously this throws an error in the second block if the login doesn't already exist on the server.
    The third workaround idea I have is to go conditional by putting an IF condition around DROP instead of CREATE:
    Unfortunately that doesn't work for me either!
    "The DROP LOGIN statement must be the only statement in the batch"
    (This is despite the fact that 'drop login' is listed on the
    supported commands page, not the partially supported page..?! Which disagrees with the notes on
    this page.)
    Anyway the real question I am interesting in addressing is: is there actually a way to have a 'Create/Delete login
    if exists' operation which is SQL-Azure compatible and doesn't throw me error messages (which messes with the sql execution tool I am using)?
    If there is no way, I would like to believe it's because it would be a bad idea to do this. But in that case why is it a bad idea?
    Tim

Maybe you are looking for

  • Two Threshold Analog to Digital

    I was asked to develop some code that would take a signal in on an analog, then convert it to a digital, then perform frequency, duty cycle, and signal integrity testing on it.  The built in NI functions for performing these tasks were insufficient b

  • Virus message on Boot

    On initial booting up, and prior to windows starting up, I see the following message "Caution: this hard disk may be infected by virus" I have checked the hard disk thoroughly on another unit, and it is free of virus. I have tried with bios setting o

  • Ken Burns: make final crop size same as crop coordinatesin next clip

    I have split a clip at a certain point, say 2 seconds in. I have a Ken Burns crop for the duration of the first two seconds so the final frame is cropped to the (red) end frame. I want this to flow seemlessly into the next frame, which has just had a

  • Procedures, Functions & Packages Documentation

    Hi folks: Here at my work, I have more than 500 functions, procedures & packages. As part of our company procedures, every single DB Object, module, report, etc... must have a technical documentation. It is, kind of waste of time, to write for every

  • Excel not respondin when I send data

    Hi All, I have created an Input chedule and when I try to send data, excel is not reponding. Could any one help me why this happens?