[izpack-users] Variables in custom panel are not passed as IzPack variables

Yossi Baram yossiba at eldat.com
Tue Jan 3 10:10:09 CET 2006


Hi,
I need the user to specify the location of a certain file and later on
to copy it into a specific location.
 
The custom panel:
 
public class WarPathPanel extends PathInputPanel
{
 
  public WarPathPanel(InstallerFrame parent, InstallData idata)
  {
    super(parent, idata);
  }
 
  public boolean isValidated()
  {
    boolean retval = super.isValidated();
    String chosenPath = pathSelectionPanel.getPath();
    if(chosenPath == null || chosenPath.length() < 1 )
      return( false );
    idata.setVariable("Jboss.WarFile",chosenPath);
 
    return( true );
  }
 
  public void panelActivate()
  {
    super.panelActivate();
    String chosenPath;
    if( idata.getVariable("Jboss.WarFile") != null )
      chosenPath = idata.getVariable("Jboss.WarFile");
    else
      chosenPath = idata.getInstallPath();
    pathSelectionPanel.setPath(chosenPath);
  }
  public String getSummaryBody()
  {
    return(String) ( idata.getVariable("Jboss.WarFile"));
  }
}
 
 
myAntActionSpec:
<antactions>
<pack name="Upload files">
 <antcall quiet="yes"
   buildfile="$INSTALL_PATH/compile/UploadFiles.xml"  
   order="afterpacks">
   <property name="WAR" value="Jboss.WarFile"/>
    <target name="compile" />  
  </antcall>
 </pack>
.......
.......
</antactions>
 
UploadFile.xml:
 
<?xml version="1.0"?>
 
<project name="AdvanTAG Installer" default="compile" basedir=".">
 
  <target name="prepare">
        <record name="${UPLOAD_LOG_FILE}" action="start"/>
        <copyfile src="${WAR}\Advantag.war" dest="c:\Eldat Common
Path\Advantag.war"/>
         <record name="${UPLOAD_LOG_FILE}" action="stop"/>        
  </target>
  <target name="compile" depends="prepare"
        description="Compiles all source code.">
  </target>
 
</project>
 
 
I  inserted the panel to install.xml and it compiles.
 
Running the installation and setting the path of advantag.war in the
custom panel(should set the "Jboss.WarFile" variable), after running the
InstallPanel I get an InstallerExecption in the UploadFile.xml file -
src d:\Installation\Jboss.WarFile\Advantag.war  does not exist.
 
Why didnt the Jboss.WarFile variable was set according to the path that
was set in the custom panel?
Please advise
Yossi
 
 
 
-------------- next part --------------
An HTML attachment was scrubbed...
URL: https://lists.berlios.de/pipermail/izpack-users/attachments/20060103/d574a348/attachment.html 


More information about the izpack-users mailing list