On 12.Sep.2002 -- 10:00 AM, Bobby Mitchell wrote:
> My solution is to change the code in DatabaseAction.java to remove the
> table_name. from the variable names. I made this change to test it and
> it works. I suppose I need to change the code in such a way to allow a
> user to supply a configuration directive such as
> false. Is there any reason I
> should not do this or is there a better way?
> I'm cross-posting this to the dev list.
> Bobby Mitchell wrote:
> >To start with, I apologize for posting so many different posts lately.
> >I'm stuck and I'm not sure which way to go, but I have been working to
> >find a solution. Please disregard the several earlier posts.
> >I'm trying to use XMLForms and Mod-db actions together. My problem
> >stems from the fact that mod-db uses request parameters from a key
> >column to set the ?'s in the query and when setting the request
> >parameters to the column values retrieved it sets them by appending
> >table_name. to the column/req-param name. My request parameters and
> >column names are the same.
> >Assume my query is select ID, EMAIL from NIAC_MAILLIST where EMAIL=?
> >Mod-db is now looking for a request parameter called
> >NIAC_MAILLIST.EMAIL and if found it successfully grabs the data from
> >the database. Otherwise it exits. If I append
> >&NIAC_MAILLIST.EMAIL="b@n" to the query string mod-db works and
> >creates the variables for the data, but XMLForm generates an "Invalid
> >data format" error. I created a session attribute called
> >NIAC_MAILLIST.EMAIL and am setting it to EMAIL. If mod-db would set
> >the ? from the session attributes instead of request parameters I
> >could set it that way. Otherwise I need to find a way to get mod-db to
> >not append the table name to the front of the column.
> >Any ideas?
Bobby, mod-db defaults to using request parameters in order to make a
transition from the other database actions easy. However, it employs the
tags nested into end tags to specify the
InputModule to use. In addition you can give the InputModule instructions
where to look for the data.
Hence, you could obtain some or all data from the session and specify the
name of the session attribute to use as well. You could even interpret
the session attribute as java.util.Map and use a specific entry.
This should be described in the InputModules documentation. Advanced uses
are described in the javadocs for the specific InputModules.
> > niac_db
Here you could say
You could even pass more configuration info to the InputModule by nesting
it into the tag.
Besides you patch to turn off name prefixing looks worthwhile and I will
look more into it when I'm back from travelling next week.
C h r i s t i a n H a u l
fingerprint: 99B0 1D9D 7919 644A 4837 7D73 FEF9 6856 335A 9E08
To unsubscribe, e-mail: email@example.com
For additional commands, email: firstname.lastname@example.org