Read and respond to this message at: 
https://sourceforge.net/forum/message.php?msg_id=3339058
By: woodchuck5

hihi Henner,

i have a DbForm page that will render an associated radio button for certain
records depending on a flag column for each record.

i use this radio button to allow the user to update/delete those records only.
so the user must select one of these records before pressing the update/delete
button.  (records that don't have an associated radio button means it cannot
be modified or deleted)

on certain pages (using pagination), all the displayed records will not
be updatable/deletable.  on other pages, the first record will not
be updatable/deletable.  however, in both cases if the user presses 
update/delete
it generates a null exception because the KeyInfo object required for creating
an Event object is null (because there is no record selected and therefore no
key).

the code for DbAssociatedRadioTag assumes there is always a first row associated
radio button for putting the default "checked" attribute:

if (getParentForm().getCurrentCount() == 0)
{
            tagBuf.append(" checked=\true\");
}

but this is not always true in my case.

and because KeyInfo is null, it will throw an exception in the createEvent()
function of the DatabaseEventFactoryImpl class here:

constructorArgs = new Object[] {
                              new Integer(kInfo.getTableId()),
                              kInfo.getKeyId(),
                              request,
                              config
                           };

unfortunately, this error happens very early.  and i cannot use interceptors
or even validation to make a workaround.  it seems that a modification of the
Controller class, and/or the DatabaseEventFactoryImpl is the only way to stop
the creation of Event objects (which depend on KeyInfo) when the creation of
KeyInfo is not possible.

any thoughts about this?

thanks in advance,
woodchuck

______________________________________________________________________
You are receiving this email because you elected to monitor this forum.
To stop monitoring this forum, login to SourceForge.net and visit: 
https://sourceforge.net/forum/unmonitor.php?forum_id=55830


-------------------------------------------------------
SF.Net email is sponsored by:
Tame your development challenges with Apache's Geronimo App Server. Download
it for free - -and be entered to win a 42" plasma tv or your very own
Sony(tm)PSP.  Click here to play: http://sourceforge.net/geronimo.php
_______________________________________________
DbForms Mailing List

http://www.wap-force.net/dbforms

Reply via email to