How to assign itemrender variables in global public variable of my applicaton.

Hi Friends,
How to assign internal item render values in global public variable. can u see below example.
List have one itemrender,within the itemrender i am using data grid .The  dataGrid have itemrender.now i tried the data grid itemrender assign values to public variable of my application,but the Error came... How can u slove this Problem Any One can Help to me.
Example:
public var myData:arrayCollection;
<mx:List variableRowHeight="true" dataChange="validateNow()"  width="900" id="Lst_userlist" verticalScrollPolicy="off"  horizontalScrollPolicy="off" 
     buttonMode="true">
<mx:itemRenderer>
  <fx:Component>       
   <mx:VBox paddingTop="-5"  horizontalScrollPolicy="off" verticalScrollPolicy="off" >        
         <fx:Script>
          <![CDATA[        
           override public function set data(value:Object):void
          ]]>
         </fx:Script>
         <mx:VBox id="vbox_grid" horizontalScrollPolicy="off" verticalScrollPolicy="off" width="890"  paddingLeft="10" paddingTop="5"
                 backgroundColor="#317152" color="#FFFFFF">        
          <mx:DataGrid visible="false" includeInLayout="false" height="100%" id="membershipGrid" alternatingItemColors="[#DCDCDC,#F8F8FF]"
              paddingLeft="5"  horizontalScrollPolicy="off" color="black"
              horizontalGridLines="false" verticalScrollPolicy="auto"  verticalGridLines="false"   rowHeight="25"
              borderSkin="{null}" showHeaders="true" borderVisible="false" dataProvider="{data.dataCollection}" width="900" >
           <mx:columns>
            <mx:DataGridColumn width="180" headerText="Name" minWidth="150" sortable="true"  wordWrap="true" >
             <mx:itemRenderer>
              <fx:Component>
               <mx:HBox horizontalScrollPolicy="off"   >
                <fx:Script>
                 <![CDATA[
                  override public function set data(value:Object):void
                  function Click_Name():void
                    outerDocument.myData=data;  //  Here Error  came                 
                 ]]>
                </fx:Script>
                <mx:Image id="fileimg"    buttonMode="true"  toolTip="This is the User's Home Organization"/>          
                <s:Label  id="lbl_Gridcloumn_name"  width="200" buttonMode="true" textDecoration="underline"  click="Click_Name()"  />
               </mx:HBox>
              </fx:Component>
             </mx:itemRenderer>
            </mx:DataGridColumn>
</cloumn>
</datagrid>
Error:
        Access of possibly undefined property myData through a reference with static  type com.istmanagement.views:ProgramAcessRights_ComponentInnerClass3.
Thanks,
Magesh R.

Hi Flex harUI ,
Thanks man....because  of i was stugle in last one week.... once again Thanks.......

Similar Messages

  • How to Assign a Field value to a Variable??

    Dear All,
    Kindly let me know, if <b>"HOW TO ASSIGN A FIELD VALUE TO A VARIABLE????"</b>
    Situation is, we have a Field (OBJK-TASER) in which 2 tables (SER01 & SER03) are stored. And we want to access names of the Tables which are there in the field(TASER) in  (OBJK) table  to a variable and then passing that variable to the sql query as a table name to get data accessed dynamicaly.

    try this
    select TASER from OBJK into table it_table.
    loop at it_table.
    select field1 field2 from (it_table-table) into table it_fields.
    endloop

  • Avoid Global Public variables...

    Hello Experts,
    I have declared few variables in package specification (l_test , l_test_2)and i'm using across the API procedures.
    But when i run the TOAD expert it says "Avoid defining global public variables in the package specification."
    So i thought of moving the code from package specification to package body...
    Is this a good approach and will my code work as it was working before if i declare in the body...
    Plz suggest ...
    Thanks...
    Earlier
    Package Specification Part
    CREATE OR REPLACE PACKAGE PKG_TEST
    AS
    l_test NUMBER(1);
    l_test_2 NUMBER(2);
    END;New
    CREATE OR REPLACE PACKAGE BODY PKG_TEST
    AS
      l_test NUMBER(1);
    l_test_2 NUMBER(2);
       PROCEDURE process
       IS
       END process ;
       PROCEDURE process_2
       IS
       END process_2 ;
    END PKG_TEST;

    Linus,
    Just so you are aware, the scope of those variables are different depending on if they are defined in the PACKAGE (SPEC) or PACKAGE BODY.
    Declared in the PACKAGE (Spec): Globally accessible to everything on the Schema.
    Declared in the PACKAGE (Body): Globally accessible to everything with that particular Package.
    So as you can see, this quite a big difference. TOAD is warning you because putting globals in the PACKAGE is a pretty sloppy coding practice that can easily lead to difficult to maintain code. While you can ignore it, I'd suggest not doing that. ;)
    In fact, I'd suggest avoiding globals altogether when possible. Passing parameters may be more time consuming, but it makes it very clear what each procedure/function should be doing, and future programmers will thank you. Time you'll save on initial programming will be made up when doing maintenance. But admittedly globals are useful, just be careful when using them. Getting your code to work isn't enough; you should aim to make it clear and understandable too.

  • How to declare a global/public variable in Oracle Forms

    Hi All,
    I have to get the value of a variable which is declared in the event 'When_Button_Pressed', in an another trigger with in the form.
    My variable & type
    l_db_handle EXEC_SQL.ConnType;
    This variable used to get the handle of a new database connection.
    (Here I am trying to make connection to two different databases from Form. That is working fine.)
    I have tried with Global variable to transfer this variable value to other triggers. But it is not working. It shows 'Wrong type error'
    Could you please let me know, how can I declare which DB handle variable as public in form(I mean i have to use this variable all the triggers with in the form)
    Thanking You,
    Manu

    Put the code in a package within the form, have the triggers call functions/procedures within the package. All variables which need to be referenced in more than one procedure can be created as package variables.

  • [b]how to assign whole expression to a temporary variable[/b][/b]

    Good afternun. Can someone help me how to assign the whole expression to a temporary variable. The expression is
    id = catDao.findByPK(info.getCategoryId());
    Thanks in advance and may I know how to validate the temporary variable?

    You can do this with an anonymous class and a command pattern.
    interface LazyEval {
       public Object getValue();
    LazyEval le = new LazyEval() {
      public Object getValue() {
        return catDao.findByPK(info.getCategoryId());
    id = le.getValue();However, this sound like a solution to a problem which should be done another way.

  • How to assign bean value to a local variable in JSP using struts.

    Hi everybody!
    I've a problem that puzzled me on how to assign a bean value to a local variable like String in JSP using struts.
    we can have someting like this to display the value
    <bean:write name="detailService" property="status" />or
    <bean:define id="theStatus" name="detailService" property="status"/>
         This is country: <%=theStatus%>but an error occured when I tried like this:
    String currentStatus = "<bean:define id="theStatus" name="detailService" property="status"/>";
    or
    String currentStatus = "<bean:write name="detailService" property="status" />";Is there a way to do this?.....
    Any help pretty much appreciated

    Java != JSP.
    The <bean:define> and <bean:write> tags are custom tags meant to appear in the HTML section of a JSP file, as opposed to the scriptlet section. They actually get turned into java code as part of the translation process.
    The <bean:write> tag naturally just writes out what you tell it to.
    The <bean:define> tag defines a local variable, and gives it a value.
    this should do it.
    <bean:define id="theStatus" name="detailService" property="status" type="java.lang.String"/>
    <%
      String currentStatus = theStatus;
    %>With the advent of JSTL, you shouldn't really need to use scriptlet code anymore. Personally I am for 0% scriptlet code in any jsp I write.

  • How to assign a sql statement to a variable

    hey
    i am assigning a sql statement into a variable. But in sql statement where condition i am passing a variable, i am getting syntax error while processing this statement . Could please help me
    my code is like this
    sSql:='select id from SOURCES where name=' || vc_arr(i);
    Open C for sSql;
    ....

    If you use bind variables, you don't need the single quotes, and may avoid significant performance and security problems otherwise associated with dynamic SQL.
    sSql := 'select id from SOURCES where name = :some_value';
    OPEN C FOR sSql USING vc_arr(i);

  • How to assign a value to the page variable to enable partial page rendering

    This is part of my code:
    <bc4j:rootAppModuleScope name="App1"
    rendered="on@ctrl:page">
    Now, I want to change the value of "on@ctrl:page" to "true" after user click a button so that part of the page will be displayed. But how do I assign the value to "on@ctrl:page". I tried to put the followings in my even handler:
    <bc4j:setPageProperty name="on" value="true">
    <bc4j:parameter name="on" />
    </bc4j:setPageProperty>
    But it doesn't work. Could someone pls tell me how I should do it.
    Thanks a lot!
    Ling

    You should do is:
    in your event handle codes,you add the list:
    public static EventResult eventname(
    BajaContext context,
    Page page,
    PageEvent event) throws Throwable
    EventResult result = new EventResult(page);
    result.setProperty("on","true");//or "false"
    return result;
    then,
    change
    rendered="on@ctrl:page" -> data:rendered="on@ctrl:eventResult"
    also ,you should see the 5th part of 'UIX Developer's Help'

  • How can I detect if a global bolean variable has changed

    I have a boolean global variable that change its value from time to time. At hte beginning of my program I take the actual time, but everytime this value change I have to reset this previous value and take the actual one. I've tried to do this with the event structure but it doesn't work because this is a global variable and not a control in the panel. Some idea to solve this problem? Thanks in advance,
    Angel

    It's mainly because you are reading value change events for the indicator, not the control. Value change events are only fired for changes given by a user. The indicator however is not updated by the GUI, but by programmatic input from the control. By replacing the reference with a reference to the control it will work. Or you can write the value to the indicator by using a Value (Signaling) property, that will trigger a change event for the indicator.
    Note: You should not register the event inside the loop, do that only once - outside the loop.
    If the boolean you are to monitor is not changed from the GUI you can as I mentioned above make it fire an event by setting the value using the value signalling property inst
    ead of wiring the new value directly, but the property node has it's downsides so another option is to create a user event, put that reference in the global, and then run the generate user event function whenever the boolean changes.
    I see you read the ms timer when the value changes. Why? If you want the time get the time, if you want the time since the last update you could use the ms timer, keep the previous value in a shift register and then calculate the difference, but the ms timer rolls over now and then so that can give false results...What is the purpose of the time and how often does the value change?
    Attached is an exmaple that use a user event and the generate event function.
    MTO
    Attachments:
    example_Rev3.llb ‏54 KB

  • How to assign DOT ( current context ) to a variable ?

    If i use XML dot (.) within Href , i am getting current context (http://servername/test)
    Like this -->
    <TD>
    <xsl:element name="a">
    <xsl:attribute name="href">./</xsl:attribute>
    <xsl:value-of select="NAME" />
    </xsl:element>
    </TD>
    But if i try to assign dot to a variable ,variable is not picking up the current context.
    How can do this ?

    <xsl:variable name="a" select="."/>
    Usually this is not necessary, since you can refer to the current context using the current() function.

  • How to assign value from insert statement to variable from a trigger

    Hi,
    I got this really annoying problem and I don't know if I am doing it correctly.
    I have a BEFORE INSERT trigger on a table. When someone executes an insert statement I want to grab the value of a column from that statement and assign it to a variable and then do stuff with it. I'm stuck on the assignment.. look below..
    CREATE OR REPLACE TRIGGER CARS.geotest2_trigger
    BEFORE INSERT ON CARS.GEO_TEST2
    FOR EACH ROW
    DECLARE
    v_chainkey nchar(32);
    v_chainkey2 nchar(32);
    not_exists EXCEPTION;
    BEGIN
    :NEW.CHAINKEY := v_chainkey;
    SELECT GEO_TEST.CHAINKEY INTO v_chainkey2 FROM GEO_TEST WHERE GEO_TEST.CHAINKEY = v_chainkey;
    IF v_chainkey2 = '' or v_chainkey2 is null THEN
    RAISE not_exists;
    ELSE
    INSERT INTO GEO_TEST2 VALUES(:NEW.CHAINKEY, :NEW.BLA, :NEW.FOO);
    END IF;
    EXCEPTION
    WHEN not_exists THEN
    RAISE_APPLICATION_ERROR(-20010, 'Chainkey does not exist in parent table GEO_TEST');
    END;
    I keep getting this error
    Error: ORA-04098: trigger 'CARS.GEOTEST2_TRIGGER' is invalid and failed re-validation
    SQLState: 42000
    ErrorCode: 4098

    It isn't assigning because v_chainkey is not at the left hand side of the assignment statement.
    test@ORA10G>
    test@ORA10G>
    test@ORA10G> declare
      2    x  number := 5;
      3    y  number;
      4  begin
      5    x := y; -- does not assign anything to y; assigns NULL to x,
      6            -- because y is NULL at this point
      7            -- so, essentially the value 5 of x is *LOST* now
      8    dbms_output.put_line('x = '||x);
      9  end;
    10  /
    x =
    PL/SQL procedure successfully completed.
    test@ORA10G>
    test@ORA10G>
    test@ORA10G>In any case, here's what you are probably looking for:
    test@ORA10G>
    test@ORA10G> --
    test@ORA10G> drop table geo_test;
    drop table geo_test
    ERROR at line 1:
    ORA-00942: table or view does not exist
    test@ORA10G> drop table geo_test2;
    drop table geo_test2
    ERROR at line 1:
    ORA-00942: table or view does not exist
    test@ORA10G>
    test@ORA10G> create table geo_test (chainkey nchar(32));
    Table created.
    test@ORA10G> insert into  geo_test (chainkey) values ('a');
    1 row created.
    test@ORA10G> insert into  geo_test (chainkey) values ('');
    1 row created.
    test@ORA10G>
    test@ORA10G> create table geo_test2 (chainkey nchar(32), bla number(1), foo number(1));
    Table created.
    test@ORA10G>
    test@ORA10G>
    test@ORA10G> CREATE OR REPLACE TRIGGER geotest2_trigger
      2  BEFORE INSERT ON GEO_TEST2
      3  FOR EACH ROW
      4  DECLARE
      5    v_chainkey2  nchar(32);
      6    not_exists   EXCEPTION;
      7  BEGIN
      8    SELECT GEO_TEST.CHAINKEY INTO v_chainkey2 FROM GEO_TEST WHERE nvl(GEO_TEST.CHAINKEY,'~') = nvl(:new.chainkey,'~');
      9    IF v_chainkey2 is null THEN
    10      RAISE not_exists;
    11    END IF;
    12  EXCEPTION
    13    WHEN not_exists THEN
    14      RAISE_APPLICATION_ERROR(-20010, 'Chainkey does not exist in parent table GEO_TEST');
    15  END;
    16  /
    Trigger created.
    test@ORA10G>
    test@ORA10G> --
    test@ORA10G> insert into geo_test2 (chainkey,bla,foo) values ('b',1,1);
    insert into geo_test2 (chainkey,bla,foo) values ('b',1,1)
    ERROR at line 1:
    ORA-01403: no data found
    ORA-06512: at "TEST.GEOTEST2_TRIGGER", line 5
    ORA-04088: error during execution of trigger 'TEST.GEOTEST2_TRIGGER'
    test@ORA10G>
    test@ORA10G> --
    test@ORA10G> insert into geo_test2 (chainkey,bla,foo) values (null,1,1);
    insert into geo_test2 (chainkey,bla,foo) values (null,1,1)
    ERROR at line 1:
    ORA-20010: Chainkey does not exist in parent table GEO_TEST
    ORA-06512: at "TEST.GEOTEST2_TRIGGER", line 11
    ORA-04088: error during execution of trigger 'TEST.GEOTEST2_TRIGGER'
    test@ORA10G>
    test@ORA10G> --
    test@ORA10G> insert into geo_test2 (chainkey,bla,foo) values ('a',1,1);
    1 row created.
    test@ORA10G>
    test@ORA10G>
    test@ORA10G>pratz
    I think the sole purpose of that "not_exists" exception is this -
    If you try to insert a NULL value for GEO_TEST2.CHAINKEY, then this trigger will throw an error even if at least one NULL value exists in GEO_TEST.CHAINKEY column.
    Not sure if that's something that you wanted.
    Message was edited by:
    pratz

  • Referencing package public variables remotely

    According to Oracle 8i documentation, its not possible to reference - directly or indirectly - package global public variables remotely. This implies the construct <package_name>.<public_variable_name>@<remote_database> doesn't work. The only way possible is to create public functions in the remote package to return the value of the variable. (e.g. function return_variable return <public_variable_name>%type is begin return <public_variable_name>; end;)
    Can anyone please confirm this, otherwise suggest any other simpler way of accessing remote package variables?
    Thanks.

    Rahul,
    No unfortunately you can't get at them, nor can you get any constants. It sure would be a good thing if you could, but I use the following to get around this problem as getting global variables and constants is a very important thing. This method I've shown below actually works pretty slick and it uses a remote function and a view to get the job done.
    I actually like how this works better than calling a variable/constant directly. The example below I just did up, but it shows the basic idea. Basically you put a number beside your var/const as a comment marker. I usually use a sequence to keep track of the numbers I've assigned. A test package was made that has 1 variable and 1 constant. A function is made that gets these values. A view is made that calls this function and returns ALL of the variable and constant values. You can take this even further and have it return the actual variable/constant name itself as well.
    I like doing it this way as you now only have ONE entry point (the view) to get as many variables/constants as you like, even if spread across multiple packages. I have my own code that does all of this, but the example below gives you an idea of how to make one yourself. Remember this is just a simple example, you can make it so you don't have to do the union in the view, and you can make the function return more things if you like, but I'm kinda short on time so my example is pretty simple, but it works quite well.
    The following is from the Oracle docs telling you about trying to get remote values ...
    --[START]
    http://otn.oracle.com/docs/products/oracle9i/doc_library/901_doc/appdev.901/a88876/adg10pck.htm#2501
    Remote Procedure Calls and Parameter Values
    You must explicitly pass values to all remote procedure parameters, even if there are defaults. You cannot access remote package variables and constants.
    --[END]
    Ok here's the code and some output ...
    --[START]
    CREATE OR REPLACE PACKAGE PKG_TEST
    AS
    --[NOTE] : see the comment number markers below, these stay fixed even though they are just comments
    GI_VAR_ONE NUMBER := -100; --[1]
    GI_CONST_ONE CONSTANT NUMBER := -200; --[2]
    END;
    Package created.
    CREATE OR REPLACE FUNCTION FN_TEST(VAR_POSITION NUMBER)
    RETURN NUMBER
    AS
    LI_RETURN NUMBER := 0;
    BEGIN
    IF VAR_POSITION = 1 THEN
    LI_RETURN := PKG_TEST.GI_VAR_ONE;
    ELSIF VAR_POSITION = 2 THEN
    LI_RETURN := PKG_TEST.GI_CONST_ONE;
    END IF;
    RETURN LI_RETURN;
    END;
    Function created.
    CREATE OR REPLACE VIEW V_TEST
    VAR_POSITION,
    VAR_VALUE
    AS
    SELECT 1,FN_TEST(1) FROM DUAL
    UNION
    SELECT 2,FN_TEST(2) FROM DUAL;
    View created.
    SELECT * FROM V_TEST;
    VAR_POSITION VAR_VALUE
    1 -100
    2 -200
    begin
    PKG_TEST.GI_VAR_ONE := -123;
    end;
    PL/SQL procedure successfully completed.
    Commit complete.
    select * from v_test;
    VAR_POSITION VAR_VALUE
    1 -123
    2 -200
    --[END]
    Enjoy :)
    Tyler D.

  • How to assign a variable value to crystal report viewer formula with CR2008

    Hi ,
    I am using crystal reports 2008 and i am not able to find how to assign  variable value  to crystal report viewer formula.
    In CR 8.5 , i used to have crystalreport1.Formulas(0) = variable1
                                             crystalreport1.Formulas(1) = variable2
    but, i don't find similar kind  in crystal reports 2008.
    How can i achieve the same functionality using crystal reports 2008.
    Thanks in Advance
    Regards,
    Ramnath

    Hi,
    Can i anyone help me out with this.
    I am generating crystal reports in vb6 using CR 8.5 and vb6 and below is the code snippet for the same
    CrystalReport1.Formulas(0) = "PrintTitle= '" & strMyTitle & "'"
    CrystalReport1.Formulas(1) = "FromDate= '" & MskFromDate.Text & "'"
    CrystalReport1.Formulas(2) = "ToDate= '" & MskToDate.Text & "'"
    Please let me know how the same functionality can be achieved in VB.Net using Crsytal reports 2008
    Any code snippet would be of great Help.
    Thanks in Adnvance.
    Ramnath

  • How to assign a JSP variabl's value to a JavaScript variable?

    Hello,
    I want to assign a JSP variable's value to JAVASCRIPT variable.
    or how to assign JavaScript variable's value to JSP varialbe
    HOw do i do it ?
    can anyone please help?
    Regards and thanks for your time.
    Ashvini

    I want to assign a JSP variable's value to
    JAVASCRIPT variable.
    var jsVariable = <%=someVariable%>;
    or how to assign JavaScript variable's value to JSP
    varialbeYou can't. JSP is server-side and JavaScript is client-side. The JSP variables are never available on the client side for any sort of assignment.

  • How to Set and Use a global variable within a session?

    Dear All,
    I'm new to jsp, and would like to ask how to set and use a global variable within a session?
    Thanks in advance.
    Regards,
    Cecil

    With session.setAttribute("name",object) you can store a Attribute in the session object.
    with session.getAttribute("name") you can get it.
    That's it.
    Regards,
    Geri

Maybe you are looking for