PDA

View Full Version : Getting Selected value through Custom Code as plugin



jayaprakash
06-04-2014, 01:16 AM
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.

NigelM
06-09-2014, 04:46 PM
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.

jayaprakash
06-10-2014, 06:28 AM
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 :");

NigelM
08-12-2014, 03:17 PM
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.

NigelM
08-12-2014, 03:19 PM
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.