Pass Parameter to Module Loaded with ModuleManager

Is it possible to pass a parameter to a module loaded with ModuleManager?

80sRelic,
First, to answer a lingering question from your last post, the reason simIndex was 3 for each module (as opposed to 1,2,3) has to do with timing. When you ran getDataFromParent() within the module you probably did so after an event like the creationComplete event. The for loop (with simIndex++) executed almost instantly while the asynchronous events for each module kicked in a few ms later, so '3' across the board.
Also, as far as the IModuleInfo::factory.create() method goes, yes you can pass a slew of parameters in here, but this is NOT the way to pass data to the module. I don't know what this parameter is all about, I thought it might pass variables to the module constructor (it does not), the documentation says something about 'let building factories change what they create,' but I never figured it out. Sorry. All I know is that whatever this is, it is not the way.
BTW, the general topic we're dealing with is 'passing data' between module and application and more info can be found here and in the flex 3 cookbook.
But, I'm guessing you already know this. (Just in case!!! )
Of all the ways to pass data, gettingDataFromTheParent() is probably the worst method, or so they say. In general, passing data between module and application couples the two objects together and so they are no longer are they black boxes to each other. And I'm guessing the reason gettingDataFromParent() is the least preferred method probably has to do with change, where changeOverTimeOfApp > changeOverTimeOfModule.
I wrote a small app, which might help demonstrate a nice way for you to pass data in your project. Please note that the app, as it stands doesn't make much sense. Modules should only be used when there's a really good reason to do so, for instance if the module is prohibitively large and only a fraction of the users will actually ever need to employ the module. In my particular example, using a custom component would be simpler and make much much more sense.
Well, here it is (with .fxp appended at the bottom). Hope this helps,
- e
<?xml version="1.0" encoding="utf-8"?>
<s:Application xmlns:fx="http://ns.adobe.com/mxml/2009"
               xmlns:s="library://ns.adobe.com/flex/spark"
               xmlns:mx="library://ns.adobe.com/flex/halo" >
  <fx:Script>
    <![CDATA[
      import modules.ColoredRectangle;
      import mx.collections.ArrayCollection;
      import mx.events.ModuleEvent;
      import mx.modules.IModuleInfo;
      import mx.modules.ModuleManager;
      private var myModInfo:IModuleInfo;
      private var myColor:uint;
      private var colorCollection:ArrayCollection = new ArrayCollection(
           [{colorName:"Red",    hex:"0xFF0000"},
            {colorName:"Orange", hex:"0xFFA500"},
            {colorName:"Yellow", hex:"0xFFFF00"},
            {colorName:"Green",  hex:"0x008000"},
            {colorName:"Blue",   hex:"0x0000FF"},
            {colorName:"Indigo", hex:"0x4B0082"},
            {colorName:"Violet", hex:"0xEE82EE"}] );
      protected function fetchModules():void     {
        myModInfo = ModuleManager.getModule("modules/ColoredRectangle.swf");
        myModInfo.addEventListener(ModuleEvent.READY, moduleReadyHandler);
        myModInfo.load();
      private function moduleReadyHandler(event:ModuleEvent):void {
        for each(var colorObj:Object in colorCollection) {
           var myModuleInstance:ColoredRectangle = myModInfo.factory.create() as ColoredRectangle;
           myModuleInstance.myColor = uint(colorObj.hex);
           tileBox.addElement(myModuleInstance);
    ]]>
  </fx:Script>
  <s:HGroup verticalCenter="0" horizontalCenter="0"
            width="750" height="400" gap="50">
     <s:Border width="100%" height="400">
        <s:layout>
           <s:VerticalLayout />
        </s:layout>
        <s:Button id="seeModulesButton1" label="fetch modules!"
               click="fetchModules()" width="100%"/>
        <s:Scroller width="100%" height="100%">
           <s:Group  id="tileBox" height="100%" width="100%">
              <s:layout>
                 <s:TileLayout columnAlign="justifyUsingGap" />
              </s:layout>
           </s:Group>
        </s:Scroller>
     </s:Border>
   </s:HGroup>
</s:Application>

Similar Messages

  • Pass parameter betwen modules

    I have a main application with a "login.jsf" and "home.jsf". It also has modules(bounded task flows) created as adf libraries. I am working with my own UIShell and want to pass a parameter from the main application to one of my modules to query some results.
    For example i have a "UserBean " class with the attribute "codInternal" and my security bounded task flow need this parameter to make a query.
    How can i do this?. I am working with JDeveloper 11.1.2.3
    Thanks.

    I have done this:
    public String goToModuloSeguridad() {
    taskFlowId = "/WEB-INF/seguridad-task-flow.xml#seguridad-task-flow";
    FacesContext context = FacesContext.getCurrentInstance();
    Application application = context.getApplication();
    TaskFlowDefinition definition = MetadataService.getInstance().getTaskFlowDefinition(tfi);
    Map<String, TaskFlowInputParameter> parameters = definition.getInputParameters();
    for (TaskFlowInputParameter parameter : parameters.values()) {
    String name = parameter.getName();
    String expression = parameter.getValueExpression();
    ValueExpression expressionValue = null;
    ExpressionFactory elFactory = application.getExpressionFactory();
    ELContext elContext = context.getELContext();
    expressionValue = elFactory.createValueExpression(elContext, expression, Object.class);
    expressionValue.setValue(elContext,"codInternal");
    Object value = application.evaluateExpressionGet(context, expression, Object.class);
    System.out.println(value);
    return null;
    I have defined mi input parameter in the called task flow:
    <task-flow-definition id="seguridad-task-flow">
    <default-activity>seguridad</default-activity>
    <input-parameter-definition id="__1">
    <name>codigo</name>
    <value>#{pageFlowScope.cod}</value>
    <class>java.lang.String</class>
    </input-parameter-definition>
    <view id="seguridad">
    <page>/seguridad.jsff</page>
    </view>
    <use-page-fragments/>
    </task-flow-definition>
    In my page of the called task flow I have:
    <af:outputText value="Code is : #{pageFlowScope.cod}" id="ot2"/>
    But the value of the outpuText is not updated.

  • Pass parameter to pl/sql block

    Hi,
    I am getting following error when trying to create staging table from shell script by passing parameter.
    SQL*Loader-941: Error during describe of table T1_1DAY_STG
    ORA-04043: object T1_1DAY_STG does not existThis is PL/SQL block being called inside shell script
    begin
    execute immediate 'create table t1_&1._stg as select * from t1_rpt_tmt';
    end Shell Script Call
    load_data_to_oracle()
    for i in 1DAY 7DAY 15DAY
    do
    ${ORACLE_HOME}/bin/sqlplus ${ORACLE_USER}/${ORACLE_PASSWD}@${ORACLE_SID} << EOF > ${TMP_LOG_FILE} 2>&1
    set serveroutput on
    @${CREATE_STAGE_SQL} "$i"
    COMMIT;
    QUIT;
    EOF
    ########Main#######
    load_data_to_oracleThanks
    Sandy

    It is probably a permission issue. Are you the owner of the table you are trying to select from in your PL/SQL block? if not, do you have select permission granted specifically?
    Here is my test:
    test > create table T_ABC (a number, b number);
    Table created.
    test > @t_abc Hello
    test > begin
    2
    3 execute immediate 'create table t1_&1._stg as select * from t_abc';
    4
    5 end;
    6 /
    old 3: execute immediate 'create table t1_&1._stg as select * from t_abc';
    new 3: execute immediate 'create table t1_Hello_stg as select * from t_abc';
    PL/SQL procedure successfully completed.
    test > desc t1_Hello_stg
    Name
    A
    B
    test > desc T_ABC
    Name
    A
    B
    test >

  • How to pass parameter to pl/sql block

    Hi,
    I am getting following error when trying to create staging table from shell script by passing parameter.
    SQL*Loader-941: Error during describe of table T1_1DAY_STG
    ORA-04043: object T1_1DAY_STG does not existThis is PL/SQL block being called inside shell script
    begin
    execute immediate 'create table t1_&1._stg as select * from t1_rpt_tmt';
    endShell Script Call
    load_data_to_oracle()
    for i in 1DAY 7DAY 15DAY
    do
    ${ORACLE_HOME}/bin/sqlplus ${ORACLE_USER}/${ORACLE_PASSWD}@${ORACLE_SID} << EOF > ${TMP_LOG_FILE} 2>&1
    set serveroutput on
    @${CREATE_STAGE_SQL} "$i"
    COMMIT;
    QUIT;
    EOF
    ########Main#######
    load_data_to_oraclethanks
    sandy

    i dont understand why you want run it from shell script. you can write procedure like this :
    SQL>
    SQL> CREATE OR REPLACE PROCEDURE mytestProc(p_in VARCHAR2) AS
      2  begin
      3    FOR i IN (select REGEXP_SUBSTR(p_in,'[^,]+',1,ROWNUM) tblName
      4                from dual
      5                CONNECT BY INSTR(p_in, ',', 1, level - 1) > 0)
      6    LOOP
      7      execute immediate 'create table t1_'||i.tblname||'_stg as select * from myt2';
      8    END LOOP;
      9  end;
    10  /
    Procedure createdand run it
    SQL> exec mytestProc('1day,7day,15day');
    PL/SQL procedure successfully completed
    SQL> select * from t1_15day_stg
      2  union all
      3  select * from t1_1day_stg
      4  union all
      5  select * from t1_7day_stg;
    T                  N
    SQL>
    SQL> drop table t1_15day_stg;
    Table dropped
    SQL> drop table t1_1day_stg;
    Table dropped
    SQL> drop table t1_7day_stg;
    Table dropped
    SQL> purge table t1_15day_stg;
    Done
    SQL> purge table t1_1day_stg;
    Done
    SQL> purge table t1_7day_stg;
    Done
    SQL>

  • Fglrx module conflicts with labview 8.2

    Hi, i need your help.
    My graphic card is ATI x1300, and i am using slackware 12.1. This distribution used mesa for graphic driving by default and worked well with labview 8.2.
    After i disable the Direct Rendering Manager of linux kernel config and recomiled the kernel(2.6.21.5) and installed ATI officail driver successfully, reboot, labview got the "segmentation fault" error. I confirmed that fglrx module loaded with nothing error.
    Then i remove fglrx module and use Mesa instead, reboot, labview works fine.
    Any idea to deal with this problem? Or is this a known bug? I want to use fglrx for graphic driving.
    Thank you!

    On Oct 1, 10:10 am, jonasdias <[email protected]> wrote:
    > i have a labview profissional developement system 8.2.1!i thinks that is is possible make a dll but i dont find this Tools»Build Application or Shared Library (DLL)
    > i see this in this site: <a href="http://zone.ni.com/devzone/cda/tut/p/id/3063" target="_blank">http://zone.ni.com/devzone/cda/tut/p/id/3063</a>
    Two suggestions
    Double check and make sure you have the Professional Development
    version of Labview. Do this by starting Labview ant then clicking on
    "Help" and "About Labview" The "About Screen" will tell you what
    version of Labview you have installed on your computer. If the "About
    Screen" says you have the Professional Development version of Labview
    installed on your computer and you don't see "Application Builder" in
    the "Tools" menu then I suggest you talk to your local National
    Instruments Sales Representative to get help.
    Howard

  • Problem with module loading another module

    I have run into what appears to be a bug in Adobe Flex 3.3, but would like others opinion.  I have a simple application which loads a module.
    If a user checks a box, then the module loads a submodule and calls a funtion in that submodule which modifies the UI slightly.
    It really is simple code, but not easy to explain, so bear with me on this :-)  All code is attached.  Rename from *.txt to *.mxml.
    I have added an event listener to the submodule loader for the ModuleEvent.READY event so that I can call a function in it once it is loaded (the function modifies the UI):
    private function onModuleReady(event:Event):void{     Alert.show(
    "Module load successful", "Success");
         if (loader2.child is SubModule) {
              var module:SubModule = loader2.child as SubModule;          module.createCompleteHandler();
              module.modifyUI(pnlMain);
         }else {          Alert.show(
    "loader is NOT SubModule", "Failure");     }
    Stepping through the debugger, loader2.child IS INDEED a SubModule Class, yet I consistantly step into the else clause.  As I debugged this, I added a similar event listener for the READY even on the loading of the first module.  By just defining a new function in the main module, this code now works.  I don't have to actually call that function, just define it, meaning that if I comment out the entire function onModuleReady (the one defined in the main application that is just printing out a trace), I get the error stated above.
    <?xml version="1.0" encoding="utf-8"?><mx:Application 
    xmlns:mx="http://www.adobe.com/2006/mxml" layout="absolute" creationComplete="createCompleteHandler()">
    <mx:Script>
    <![CDATA[
    importMainModule; 
    importmx.events.ModuleEvent; 
    private function createCompleteHandler():void{loader.url =
    "MainModule.swf";
    // loader.addEventListener(ModuleEvent.READY, onModuleReady);loader.loadModule();
    private function onModuleReady(event:Event):void{ 
    if (loader.child isMainModule) { 
    trace("here");}
    Please try the attached code, and try running it with the function onModuleReady implelented in the Application body and with it removed.  Why would defining a function that is never called for the first module affect the second module?

    I figured this out.  I needed to add loader.applicationDomain = ApplicationDomain.currentDomain;
    This fixes the problem.
     

  • Issue with using GET n SET Parameter in module pool programming.

    Hello Friends,
                         I am using SET n GET Parameter to access input values from a screen. But when I use it, the values are not transfered back n forth. Getting initial values.
    Your expertise would be appreciated.
    Cheers,
    Senthil

    Hi,
    check this
    Filling an Initial Screen using SPA/GPA Parameters
    To fill the input fields of a called transaction with data from the calling program, you can use the SPA/GPA technique. SPA/GPA parameters are values that the system stores in the global, user-specific SAP memory. SAP memory allows you to pass values between programs. A user can access the values stored in the SAP memory during one terminal session for all parallel sessions. Each SPA/GPA parameter is identified by a 20-character code. You can maintain them in the Repository Browser in the ABAP Workbench. The values in SPA/GPA parameters are user-specific.
    ABAP programs can access the parameters using the SET PARAMETER and GET PARAMETER statements.
    To fill one, use:
    SET PARAMETER ID <pid> FIELD <f>.
    This statement saves the contents of field <f> under the ID <pid> in the SAP memory. The code <pid> can be up to 20 characters long. If there was already a value stored under <pid>, this statement overwrites it. If the ID <pid> does not exist, double-click <pid> in the ABAP Editor to create a new parameter object.
    To read an SPA/GPA parameter, use:
    GET PARAMETER ID <pid> FIELD <f>.
    This statement fills the value stored under the ID <pid> into the variable <f>. If the system does not find a value for <pid> in the SAP memory, it sets SY-SUBRC to 4, otherwise to 0.
    To fill the initial screen of a program using SPA/GPA parameters, you normally only need the SET PARAMETER statement.
    The relevant fields must each be linked to an SPA/GPA parameter.
    On a selection screen, you link fields to parameters using the MEMORY ID addition in the PARAMETERS or SELECT-OPTIONS statement. If you specify an SPA/GPA parameter ID when you declare a parameter or selection option, the corresponding input field is linked to that input field.
    On a screen, you link fields to parameters in the Screen Painter. When you define the field attributes of an input field, you can enter the name of an SPA/GPA parameter in the Parameter ID field in the screen attributes. The SET parameter and GET parameter checkboxes allow you to specify whether the field should be filled from the corresponding SPA/GPA parameter in the PBO event, and whether the SPA/GPA parameter should be filled with the value from the screen in the PAI event.
    When an input field is linked to an SPA/GPA parameter, it is initialized with the current value of the parameter each time the screen is displayed. This is the reason why fields on screens in the R/3 System often already contain values when you call them more than once.
    When you call programs, you can use SPA/GPA parameters with no additional programming overhead if, for example, you need to fill obligatory fields on the initial screen of the called program. The system simply transfers the values from the parameters into the input fields of the called program.
    However, you can control the contents of the parameters from your program by using the SET PARAMETER statement before the actual program call. This technique is particularly useful if you want to skip the initial screen of the called program and that screen contains obligatory fields.
    If you want to set SPA/GPA parameters before a program call, you need to know which parameters are linked to which fields on the initial screen. A simple way of doing this is to start the program that you want to call, place the cursor on the input fields, and choose F1 followed by Technical info. The Parameter ID field contains the name of the corresponding SPA/GPA parameter. Alternatively, you can look at the screen definition in the Screen Painter.
    The technical information for the first input field of the booking transaction TCG2 looks like this:
    The SPA/GPA parameter for the input field Company has the ID CAR. Use this method to find the IDs CON, DAY, and BOK for the other input fields.
    The following executable program is connected to the logical database F1S and calls an update transaction:
    REPORT BOOKINGS NO STANDARD PAGE HEADING.
    TABLES SBOOK.
    START-OF-SELECTION.
      WRITE: 'Select a booking',
      SKIP.
    GET SBOOK.
      WRITE: SBOOK-CARRID, SBOOK-CONNID,
             SBOOK-FLDATE, SBOOK-BOOKID.
      HIDE:  SBOOK-CARRID, SBOOK-CONNID,
             SBOOK-FLDATE, SBOOK-BOOKID.
    AT LINE-SELECTION.
      SET PARAMETER ID: 'CAR' FIELD SBOOK-CARRID,
                        'CON' FIELD SBOOK-CONNID,
                        'DAY' FIELD SBOOK-FLDATE,
                        'BOK' FIELD SBOOK-BOOKID.
      CALL TRANSACTION 'BOOK'.
    The basic list of the program shows fields from the database table SBOOK according to the user entries on the selection screen. These data are also stored in the HIDE areas of each line.
    If the user selects a line of booking data by double-clicking, the system triggers the AT LINE-SELECTION event and takes the data stored in the HIDE area to fill them into the SPA/GPA parameters of the initial screen of the transaction. Then it calls the transaction. Since you do not suppress the initial screen using AND SKIP FIRST SCREEN, the initial screen may appear as follows:
    If you would use the AND SKIP FIRST SCREEN option with the CALL TRANSACTION statement, the second screen would appear immediately, since all obligatory fields of the first screen are filled.
    Regards
    Edited by: K.P.N on Jan 9, 2008 5:21 AM

  • Pass parameter with apostrophe

    Hi,
    How I can pass parameter with apostrophe to a store procedure.Whats the change i need to make to ' when i am passing.
    Thanks in advance.
    Pramod

    If you are using bind variables, the string should be escaped automatically. If you are not using bind variables, you should be using bind variables.
    Justin
    Distributed Database Consulting, Inc.
    http://www.ddbcinc.com/askDDBC

  • Passing parameter with apostrophe to sp

    Hi,
    How I can pass parameter with apostrophe to a store procedure.Whats the change i need to make to ' when i am passing.
    Thanks in advance.
    Pramod

    just use double apostrophe
    SQL> var x char
    SQL> exec :x := '''';
    PL/SQL-Prozedur wurde erfolgreich abgeschlossen.
    SQL> print x
    X
    '

  • Passing parameter with space?

    How does java pass parameter value with spaces? e.g. url?param1=value with space .
    Is there any built in method like PHP's addslashes?
    Thanks.

    URLEncoder.encode("value with
    space","UTF-8")Also the core JSTL tag c:url will encode parameters with spaces, and of course there's the crude way of just using the + sign.

  • How to pass parameter through URL to bounded task flow with page fragment

    I want to pass parameter to Bounded Task Flow With Page Fragment trough URL
    as I start this taks flow with router and according to this Param I will rout the user.
    I added input param to taks flow named direction and make the task flow called URL invoke url-invoke-allowed
      <input-parameter-definition id="__41">
          <name id="__42">direction</name>
          <value>#{pageFlowScope.direction}</value>
          <class>java.lang.String</class>
        </input-parameter-definition>but I don't know how to add this to the JSPX that I will add the bounded task flow Inside.
    and How to pass this from URL

    Hi,
    url-invoke-allowed is only required if the task flow itself is directly accessible from a browser (which is not the case at all if the task flow uses page fragments). To pass input parameters to a task flow that is embedded in a region and that has input parameters, you define the input parameters on the taskFlow Id that is created in the PageDef file of the containing page. To learn ADF task flows, have a look at the videos below. They also contain a sample for passing parameters to a region
    http://download.oracle.com/otn_hosted_doc/jdeveloper/11gdemos/taskflow-overview-p1/taskflow-overview-p1.html
    http://download.oracle.com/otn_hosted_doc/jdeveloper/11gdemos/taskflow-overview-p2/taskflow-overview-p2.html
    Frank

  • How to write c# to pass parameter with craxddrt.dll?

    any example provided to open crystal report by passing parameter
    after add reference craxddrt.dll etc.
    for 8.5 report

    [Samples|https://wiki.sdn.sap.com/wiki/display/BOBJ/ReportDesignerComponentSDKCOM+Samples].
    Also check your Developer Help file...
    Adn as Don said, unless you have obtained license for craxDDrt.dll, you are breaking your agreement. Use craxDrt.dll...
    Ludek
    Follow us on Twitter http://twitter.com/SAPCRNetSup
    Got Enhancement ideas? Try the [SAP Idea Place|https://ideas.sap.com/community/products_and_solutions/crystalreports]

  • Passed parameter value to be checked with the retrieved column value

    select app.compositename,
    (select distinct stringvalue from WFMESSAGEATTRIBUTE where taskid = APP.taskid and name = 'approverPayload') as APPROVERPAYLOAD,
                                     from DEVT_SOAINFRA.WFTASK APP
                                   where APP.TEXTATTRIBUTE6 not like 'Product Data%'
                                   and (:P_REQUESTTYPE like '%JobCha%')
                                   and (:P_APPROVERID is null or
                                                   upper(nvl(APPROVERPAYLOAD,'-1')) like upper(:P_APPROVERID || ',%') or
                                                   upper(nvl(APPROVERPAYLOAD,'-1')) like upper('%,'||:P_APPROVERID ||',%') or
                                                   upper(nvl(APPROVERPAYLOAD,'-1')) like upper(:P_APPROVERID)
                                                                             above is my query and iam retriving approverpayload based on below select statement
                                                                             (select distinct stringvalue from WFMESSAGEATTRIBUTE where taskid = APP.taskid and name = 'approverPayload')
                                                                                                                and in the where conditions can i check the passed parameter :P_APPROVERID exists in the APPROVERPAYLOAD as i have tried below
                                                                             and (:P_APPROVERID is null or
                                                   upper(nvl(APPROVERPAYLOAD,'-1')) like upper(:P_APPROVERID || ',%') or
                                                   upper(nvl(APPROVERPAYLOAD,'-1')) like upper('%,'||:P_APPROVERID ||',%') or
                                                   upper(nvl(APPROVERPAYLOAD,'-1')) like upper(:P_APPROVERID)
                                                                                                                is my attempt correct if not can any one suggest me how to write it so.

    You cannot use the column alias in the same level in the where clause as you are doing it. It needs to be done one level higher. So it will look something like this.
    select * from
       select <column_name> <new_column_alias>
       from <table_name>
    where <new_column_alias> <operator> <condition>Regards
    Raj

  • To pass parameter values to the object reference of action step in sequence file of teststand programatically using C#.

    //Initialize the Engine
                EngineClass myEngine = new EngineClass();
                myEngine.LoadTypePaletteFilesEx(TypeConflictHandlerTypes.ConflictHandler_Prompt, 0);
                Step myStep = myEngine.NewStep(AdapterKeyNames.DotNetAdapterKeyname,StepTypes.StepType_Action);
                myStep.Name = "object";
                DotNetModule dotnetmodule = myStep.Module as DotNetModule;
                dotnetmodule.SetAssembly(DotNetModuleAssemblyLocations.DotNetModule_AssemblyLocation_File,@"C:sequence.dll");
                dotnetmodule.ClassName = "CN";
                dotnetmodule.MemberType = DotNetModuleMemberTypes.DotNetMember_GetProperty;
                dotnetmodule.MemberName = "ISI";  
    mySequence.Locals.NewSubProperty("object", PropertyValueTypes.PropValType_Reference, false, "", 0);        
    Sequence mySequence = myEngine.NewSequence();
                mySequence.Locals.NewSubProperty(varName, PropertyValueTypes.PropValType_Reference, false, String.Empty, 0);
    mySequence.InsertStep(myStep, 0, StepGroups.StepGroup_Main);
                SequenceFile seqFile = myEngine.NewSequenceFile();
                seqFile.InsertSequence(mySequence);
    seqFile.Save("C:\\mySeq.seq");
    I have done this,dynamically creating a sequence file in teststand programatically through c#.
    Problem is
    1.I created an action step and object Reference variable for the step, but i am not able to pass  parameter values to the objectReference 
    2.I am not able to load the sequence in to the main Sequence of the sequence file in the teststand. How can I do these two things.

    Hi,
    have you ever followed on my Links ?!?!?
    If not please jump to this one
    http://forums.ni.com/ni/board/message?board.id=330&thread.id=26880 
    and read the the answer from Mannoch
    starting with this words:
    Anthony -
    Currently, functionality for retrieving the Metadata Token for a class constructor or member is not fully provided in the TestStand .NET Adapter API. The DotNetModule.GetConstructorMetadataToken() and DotNetModule.GetMetadataToken() methods only return the correct Metadata Token when the member/constructor prototypes have already been loaded. Thus, in the case of your code, when you call DotNetModule.GetMetadataToken(), the method is returning -1 because the member prototype for the Step you are referring to has not yet been loaded.
    That means have to do a workaround for your stuff.
    Juergen
    =s=i=g=n=a=t=u=r=e= Click on the Star and see what happens :-) =s=i=g=n=a=t=u=r=e=

  • Help me in passing parameter

    <%@ page import="java.net.*" %>
    <%@ page import="java.util.*" %>
    <%@ page import="java.io.*" %>
    <%@ page import="java.sql.*" %>
    <html>
    <head>
         <title>Untitled</title>
    </head>
    <body>
    <%
         Vector mail = new Vector();
         try{
         Class.forName("com.mysql.jdbc.Driver").newInstance();
         catch (Exception E) {
         out.println("Unable to load driver.");
         E.printStackTrace();
         try{
              Connection C = DriverManager.getConnection("jdbc:mysql://localhost/attendance","root","");
    %>
    <div align="center"><font size="+6">Student BarList</font><br>
    In this page will display out the student that attendance NOT MORE THAN 70%. The Student Below is NOT ALLOW to take exam for the relevant subject.
    The student whoever not satisfy with the bar can negotiate with the lecturer of the relevant subject.<p/>
    The student below will be bar from the relevent subject:
    <%Statement S = C.createStatement();
                   ResultSet rs = S.executeQuery("SELECT * FROM bar");
                   ResultSetMetaData rsStruc = rs.getMetaData();
    out.println("<table bgcolor=red cellpadding=10 cellspacing=1 size=70>");
                   out.println("<tr bgcolor=red>");
                   int colCount = rsStruc.getColumnCount();
                   String colName = "";
                   for(int i=1;i <= colCount; i++){
                   colName = rsStruc.getColumnName(i) ;
                   out.println("<td><B><font color=white>" + colName + "</font></b></td>\n");
                   out.println("</tr>");
                   while (rs.next()) {
                   String email=rs.getString("email");
                   mail.addElement(email);
                   out.println("<tr bgcolor=ffffff>");
                   for(int i=1;i <= colCount; i++){
                   colName = rsStruc.getColumnName(i) ;
                   String fld = rs.getString(colName);
                        out.println("<td>" + fld + "</td>");
                   out.println("</tr>");
                   out.println("</table>");
                   rs.close();
                   C.close();}
    catch (Exception E) {
         out.println("SQLException: " + E.getMessage());
         for(int i=0; i< mail.size(); i++){
    String add= mail.elementAt(i)+",";
    out.println(add);
         %>
    <form action="simplemail.jsp" method="post">
    <input type="text" name="address" value="<%=add%>">
    <input type="submit" name="send" value="Send Mail">
    </body>
    </html>
    what problem with my page i want to read the vector data then set it inside the variable (e.g [email protected],[email protected]) then put it into the textbox and passing parameter to next page.. how i gotta solve this problem?

    i have to use the hidden input html to send the vector to the next page but found out the problem "Type mismatch: cannot convert from String to Vector"
    <%@ page import="java.net.*" %>
    <%@ page import="java.util.*" %>
    <%@ page import="java.io.*" %>
    <%@ page import="java.sql.*" %>
    <html>
    <head>
    <title>Untitled</title>
    </head>
    <body>
    <%
    Vector mail = new Vector();
    try{
    Class.forName("com.mysql.jdbc.Driver");
    catch (Exception E) {
    out.println("Unable to load driver.");
    E.printStackTrace();
    try{
    Connection C = DriverManager.getConnection("jdbc:mysql://localhost/attendance","root","");
    %>
    <div align="center"><font size="+6">Student BarList</font><br>
    In this page will display out the student that attendance NOT MORE THAN 70%. The Student Below is NOT ALLOW to take exam for the relevant subject.
    The student whoever not satisfy with the bar can negotiate with the lecturer of the relevant subject.<p/>
    The student below will be bar from the relevent subject:<br/>
    <%
    Statement S = C.createStatement();
    ResultSet rs = S.executeQuery("SELECT * FROM bar");
    ResultSetMetaData rsStruc = rs.getMetaData();
    out.println("<table bgcolor=red cellpadding=10 cellspacing=1 size=70>");
    out.println("<tr bgcolor=red>");
    int colCount = rsStruc.getColumnCount();
    String colName = "";
    for(int i=1;i <= colCount; i++){
    colName = rsStruc.getColumnName(i) ;
    out.println("<td><B><font color=white>" + colName + "</font></b></td>\n");
    out.println("</tr>");
    while (rs.next()) {
    String email=rs.getString("email");
    mail.addElement(email);
    out.println("<tr bgcolor='ffffff'>");
    for(int i=1;i <= colCount; i++){
    colName = rsStruc.getColumnName(i) ;
    String fld = rs.getString(colName);
    out.println("<td>" + fld + "</td>");
    out.println("</tr>");
    out.println("</table>");
    rs.close();
    C.close();}
    catch (Exception E) {
    out.println("SQLException: " + E.getMessage());
    //String add = "";
    //for(int i=0; i< mail.size(); i++){
    //add = mail.elementAt(i)+",";
    //out.println(add);
    %>
    <form action="simplemail.jsp" method="post">
    <input type="hidden" name="address" value="<%=mail%>">
    <input type="submit" name="send" value="Send Mail">
    </body>
    </html>the vector should be pass to this page:
    <%@ page import="java.util.*, javax.mail.*, javax.mail.internet.*" %>
    <%
    Vector to2= new Vector();
    to2=request.getParameter("address");
    //String subject=request.getParameter("subject");
    //String message2=request.getParameter("message");
    for(int i=0; i< to2.size(); i++)
         String add = (String)to2.elementAt(i);
         System.out.println(add);
    Properties props = new Properties();
      props.put("localhost:25","localhost:25");
      Session s = Session.getInstance(props,null);
      MimeMessage message = new MimeMessage(s);
      InternetAddress from = new InternetAddress("albert");
      message.setFrom(from);
      InternetAddress to = new InternetAddress(add);
      message.addRecipient(Message.RecipientType.TO, to);
      //message.setSubject(subject);
      //message.setText(message2);
    message.setSubject("Bar exam acknowledgement");
    message.setText("You been bar from the exam, please check on the student attendance online for more information");
      Transport.send(message);
    %>
    <html>
    <p align="center">A Message has been sent.<br>Check your inbox.</p>
    <p align="center"><a href="mail.html">Click here to send another!</a><br>
    </p>
    </html>please help me!!! i stuck in this oledi

Maybe you are looking for