Hi,

I have just found what the problem is. It is to do with the handling of
the parameter values in the plugin code, so it's nothing to do with the
JSP page or the type of inputs as such.

In the getRequestInformation() method of the plugin you have to do the
following:

StringParameterType stringPT = new StringParameterType(255, null, true);
zipFile = new PluginParameter<String>("zipFile", " Zip file", "Contains
raw data files", stringPT);

...but I was trying to handle the parameter from the JSP page as a File
type (it came from a file chooser), and it doesn't like that:

FileParameterType filePT = new FileParameterType();
zipFile = new PluginParameter<File>("zipFile", " Zip file", "Contains
raw data files", filePT);               

So as long as all parameters are handled as Strings, everyone is
happy.....

I just tried it with a select box and that worked too, so presumably all
the other input types are fine too.

Cheers
Micha

==================================
Dr Micha M Bayer
Bioinformatics Specialist
Genetics Programme
The Scottish Crop Research Institute
Invergowrie
Dundee
DD2 5DA
Scotland, UK
Telephone +44(0)1382 562731 ext. 2309
Fax +44(0)1382 562426
http://www.scri.ac.uk/staff/michabayer
==================================
 

> -----Original Message-----
> From: [EMAIL PROTECTED] [mailto:basedb-devel-
> [EMAIL PROTECTED] On Behalf Of Nicklas Nordborg
> Sent: 23 November 2007 11:33
> To: BASE dev
> Subject: Re: [basedb-devel] can't get inputs other than text to work
on
> custom JSP input pages
> 
> Micha Bayer wrote:
> > Hi,
> >
> > I am in the process of making a custom JSP page for collecting
inputs
> > for the tab2mage importer. I am following the recipe at
> >
> >
>
http://base.thep.lu.se/chrome/site/latest/html/developerdoc/plugin_deve
> l
> > oper/plugin_developer.api.html#plugin_developer.api.jspparameters
> >
> > Everything works fine as long as I stick to the example provided
here
> --
> > I can see the page, my inputs get picked up, and I can pass them to
> the
> > plugin no probs.
> >
> > I obviously want other types of input on the page - file choosers,
> > select buttons, radio buttons, etc. It appears that as soon as I add
> > another type, it breaks the submission of the page -- it just
> reloads,
> > and the params are not passed to the plugin. I am also not getting
> any
> > error messages at all then -- not in the tomcat logs, not in the JSP
> > page/browser, not from the code (although I have even tried to catch
> > Throwables in there.
> >
> > Is this intentional? Are all the inputs required to be of the text
> type
> > only? Or am I just being dense?
> 
> It should not be restricted to text inputs. There is really no
> difference between different input types on the receiving JSP since
all
> parameters are just posted as name/value pairs of strings.
> 
> I can't comment on the strange behaviour of not submitting the
> parameters to the plug-in since you don't show me any code. Have you
> tries adding debug output to try to track the execution path?
> 
> /Nicklas
> 
>
-----------------------------------------------------------------------
> --
> This SF.net email is sponsored by: Microsoft
> Defy all challenges. Microsoft(R) Visual Studio 2005.
> http://clk.atdmt.com/MRT/go/vse0120000070mrt/direct/01/
> _______________________________________________
> basedb-devel mailing list
> basedb-devel@lists.sourceforge.net
> https://lists.sourceforge.net/lists/listinfo/basedb-devel
_ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _

SCRI, Invergowrie, Dundee, DD2 5DA.  
The Scottish Crop Research Institute is a charitable company limited by 
guarantee. 
Registered in Scotland No: SC 29367.
Recognised by the Inland Revenue as a Scottish Charity No: SC 006662.


DISCLAIMER:

This email is from the Scottish Crop Research Institute, but the views 
expressed by the sender are not necessarily the views of SCRI and its 
subsidiaries.  This email and any files transmitted with it are confidential 
to the intended recipient at the e-mail address to which it has been 
addressed.  It may not be disclosed or used by any other than that addressee.
If you are not the intended recipient you are requested to preserve this 
confidentiality and you must not use, disclose, copy, print or rely on this 
e-mail in any way. Please notify [EMAIL PROTECTED] quoting the 
name of the sender and delete the email from your system.

Although SCRI has taken reasonable precautions to ensure no viruses are 
present in this email, neither the Institute nor the sender accepts any 
responsibility for any viruses, and it is your responsibility to scan the email 
and the attachments (if any).


-------------------------------------------------------------------------
This SF.net email is sponsored by: Microsoft
Defy all challenges. Microsoft(R) Visual Studio 2005.
http://clk.atdmt.com/MRT/go/vse0120000070mrt/direct/01/
_______________________________________________
basedb-devel mailing list
basedb-devel@lists.sourceforge.net
https://lists.sourceforge.net/lists/listinfo/basedb-devel

Reply via email to