[izpack-user] Processor for File Field, Documentation update

68 views
Skip to first unread message

Shailesh Mangal

unread,
Apr 17, 2008, 3:33:25 PM4/17/08
to IzPack
When you use userInputPanel, you have an option of using Validator and Processor. Their role is well explained in the documentation but what is not given in the docs is that not all the fields types have processor tags.
 
Update documentation:
  IzPack documentation should be updated to indicate which fields (RuleField, PasswordsField) support the processor tag.
 
Using Processor for File field in UserInputPanel
While we were writing a installer for our test management tool, we needed to capture a file name and replace the fully qualified file name into one of the properties files. Before that we needed to modify the fileName (for windows) and replace single '\' with '\\'. We were using userInputPanel with File fields to let the user select the file and processor sounded most logical place to manipulate the fileName. But some debugging revealed that field type File doesn't honor the processor element. We modified the userInputPanel and applied the processor. We will be happy to share the fix if any body needs it.
 
Shailesh
Now, Test Management is a breeze.

Dennis Reil

unread,
Apr 18, 2008, 2:05:59 AM4/18/08
to us...@izpack.codehaus.org

Please create an JIRA-issue for that. I would take care of applying the fix.

 

Regards,

   Dennis

Shrirang

unread,
Nov 11, 2009, 1:12:22 AM11/11/09
to us...@izpack.codehaus.org

I would like to have the fix for the processor. I have an exactly same as
you. But we are using maven and fixing it using maven cann be a challenge.
Did you a JIRA issue for this?

--
View this message in context: http://old.nabble.com/Processor-for-File-Field%2C-Documentation-update-tp16754135p26296603.html
Sent from the izpack - users @ codehaus mailing list archive at Nabble.com.


---------------------------------------------------------------------
To unsubscribe from this list, please visit:

http://xircles.codehaus.org/manage_email


Shrirang

unread,
Nov 12, 2009, 11:40:12 PM11/12/09
to us...@izpack.codehaus.org

I have created the JIRA as well as attached the fix along with the JIRA
issue.
http://jira.codehaus.org/browse/IZPACK-487


Dennis Reil wrote:
>
> Please create an JIRA-issue for that. I would take care of applying the
> fix.
>
>
>
> Regards,
>
> Dennis
>
>
>
> Von: Shailesh Mangal [mailto:sx...@yahoo.com]
> Gesendet: Donnerstag, 17. April 2008 21:33
> An: IzPack
> Betreff: [izpack-user] Processor for File Field, Documentation update
>
>
>
> When you use userInputPanel, you have an option of using Validator and
> Processor. Their role is well explained in the documentation but what is
> not given in the docs is that not all the fields types have processor
> tags.
>
>
>
> Update documentation:
>
> IzPack documentation should be updated to indicate which fields
> (RuleField, PasswordsField) support the processor tag.
>
>
>
> Using Processor for File field in UserInputPanel
>
> While we were writing a installer for our test management tool

> <http://www.getzephyr.com/> , we needed to capture a file name and


> replace the fully qualified file name into one of the properties files.
> Before that we needed to modify the fileName (for windows) and replace
> single '\' with '\\'. We were using userInputPanel with File fields to
> let the user select the file and processor sounded most logical place to
> manipulate the fileName. But some debugging revealed that field type
> File doesn't honor the processor element. We modified the userInputPanel
> and applied the processor. We will be happy to share the fix if any body
> needs it.
>
>
>
> Shailesh
>

> Now, Test Management <http://www.getzephyr.com/> is a breeze.
>
>
>

--
View this message in context: http://old.nabble.com/Processor-for-File-Field%2C-Documentation-update-tp16754135p26331346.html

Shrirang

unread,
Nov 12, 2009, 11:48:38 PM11/12/09
to us...@izpack.codehaus.org

One more way in which we could avoid processor in all the fields is to have
it in the dynamic variables itself. This will ensure that we can have it at
all the input fields that use the variable without which we cannot use the
field effectively anyways. I think that should be a good idea to go forward.
Let me know if this is possible and dod you want me to write the fix and
attached it. So every time the dynamic variable is applied it will be
processed by the processor field. It will look something like this.

<variable name="PATH" value="$INSTALL_PATH">
<processor class="ProcessorClassName">
</variable>

Please let me know your thoughts.

--
View this message in context: http://old.nabble.com/Processor-for-File-Field%2C-Documentation-update-tp16754135p26331398.html

Nicholas Albion

unread,
Jul 8, 2013, 3:09:54 AM7/8/13
to izpac...@googlegroups.com, IzPack, sx...@yahoo.com
I'm trying to get this working using izpack-maven-plugin:5.0.0-rc1-SNAPSHOT

I have:
 - created a Processor class
 - merged my jar with the installer using <jar>
 - added a processor="my.package.PathProcessor" attribute to the <spec> of <field type="dir">
 - also tried adding a <processor class="my.package.PathProcessor"/> as a child of <field type="dir">

I can't figure out how to get the processor to fire.  


public class PathProcessor implements Processor {
@Override
public String process(ProcessingClient client) {
return client.getText().replaceAll("\\", "/");
}
}

Nicholas Albion

unread,
Jul 9, 2013, 12:19:28 AM7/9/13
to izpac...@googlegroups.com, IzPack, sx...@yahoo.com
The <processor> element needs to be added as a child of the <spec> element.
Reply all
Reply to author
Forward
0 new messages