Community Forums
Results 1 to 5 of 5

Thread: Getting Selected value through Custom Code as plugin

  1. #1
    Join Date
    Jun 2014
    Posts
    8

    Getting Selected value through Custom Code as plugin

    Hi,

    I have created an panel with a text box by extending the CustomCodePanel of installanywhere. How can i get the value provided by the end-user in the text box. Whether i need to use the installanywhere variables to store the value.

    To get the values provided in the user-input panel, we have result variables. Like the same, need to get the values provided in the customized panel. Here if it get stored in a result variables, give me an idea to get the stored value.

    Note: Purpose to get the value is to store in a text file under USER_INSTALL_DIR.
    Last edited by jayaprakash; 06-05-2014 at 11:47 PM.

  2. #2
    Join Date
    Apr 2014
    Posts
    10

    Use the proxy object

    You return the result of you custom code using the setVariable method of the proxy instance you are provided by the IA invoker. If we are talking about a panel, if you want the answer recorded in the response file for silent install you need to get an instance of the ReplayService from the proxy object also.

  3. #3
    Join Date
    Jun 2014
    Posts
    8
    Quote Originally Posted by NigelM View Post
    You return the result of you custom code using the setVariable method of the proxy instance you are provided by the IA invoker. If we are talking about a panel, if you want the answer recorded in the response file for silent install you need to get an instance of the ReplayService from the proxy object also.
    As you suggessted i used the ReplayVariableService's register method, in this i can get only the variable in the install log. How can i get the data provided in the text box, created using custom code.

    The code snippet of ReplayVariableService is mentioned here.

    ccpp.setVariable((String)ccpp.getVariable("$GIVEN_UNAME_VARIABLE$"), jtf.getText());
    rpvs.register("$GIVEN_UNAME_VARIABLE$","Value from Custom :");

  4. #4
    Join Date
    Apr 2014
    Posts
    10

    Don't use the $ signs around the variable name

    When you register a variable using the replay service you do not surround it with dollar signs, you just use the raw name. That is why you had no value as it was assuming the variable name included dollar signs and no variable with that name existed.

  5. #5
    Join Date
    Apr 2014
    Posts
    10
    Quote Originally Posted by NigelM View Post
    When you register a variable using the replay service you do not surround it with dollar signs, you just use the raw name. That is why you had no value as it was assuming the variable name included dollar signs and no variable with that name existed.
    When you register a variable using the replay service you do not surround it with dollar signs, you just use the raw name. That is why you had no value as it was assuming the variable name included dollar signs and no variable with that name existed.

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts
  •