You are viewing a plain text version of this content. The canonical link for it is here.
Posted to user@struts.apache.org by Alen Ribic <al...@mweb.co.za> on 2003/06/30 09:48:44 UTC

Skip some FORM field(s) pre-population process

Hi all

Can I some how exclude an html field (<html:file /> to be exact) from
pre-populating info that is to be edited?

My scenario follows:

I have a form that is used to edit a product.
It contains fields such as "Product name==input/text", "Product
description==textarea", "Product image==input/file", etc.
The <html:file /> is named "productImageObject".
I'm using DynaForm.

My value object for product contains all necessary fields but importantly it
has a String field named productImageName that holds the name of the image
but not the actual data of the image. I don't wanna place the data of the
image in the DB as you can see.

Adding a new product works 100% for me, but when I run a edit page, the
value object is set as an request attribute "ProductForm", preload data.
Problem now is that Struts system is looking for a file object using the
getter getProductImageObject() that I don't have (DB, I only store the name
of image not data). It must just some how skip this pre-load, get call, and
my problem will be solved?
I remember that JSF AFAIK can do something like this.

Thanks for any help.

--Alen


---------------------------------------------------------------------
To unsubscribe, e-mail: struts-user-unsubscribe@jakarta.apache.org
For additional commands, e-mail: struts-user-help@jakarta.apache.org