cancel
Showing results for 
Show  only  | Search instead for 
Did you mean: 
jayaprakash
Level 3

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.
Labels (1)
0 Kudos
(4) Replies
NigelM
Level 4

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.
0 Kudos
jayaprakash
Level 3

NigelM wrote:
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 :");
0 Kudos
NigelM
Level 4

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.
0 Kudos
NigelM
Level 4

NigelM wrote:
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.
0 Kudos