On Mon, 18 Nov 2002 20:43, you wrote: > However in my screen, I want a new empty line at the end of the table so I > add :- > > > #set ( $newLineGroup = $intake.InvoiceLine.Default ) > #textfield ( $newLineGroup.ProdCode.Key $newLineGroup.ProdCode ) > #showError ( $newLineGroup.ProdCode.isValid() > $newLineGroup.ProdCode.getMessage() ) > ...etc > > This allows the user to add a new Invoice line, and it work fine, > mostly!!!!!!!!!!!!!!!!!!!!!!!!!!!!! > > Sometimes, the line gets data in it from previous requests > AAAAAAAGGGGGGGHHHHHHH!!!!!!!!!!!!!
Hi Neil, I am not 100% sure this will fix your problem, but here is an extract from the latest version of the intake howto: -------------- Intake data is retained in the request in order to allow for the possibility that it will be re-presented to the user on the next page. Normally this is desirable behaviour - there may have been an error in the data so you want to redisplay it. There is a possibility however that you might want to reuse the same group on either the same or a different page after fully processing the data; in this case it may be undesirable to redisplay the previously entered data. The prime example of this is where a page includes a repeating group of records and provides an opportunity to add a further record using the default group, returning to the same page after each record is added. In this situation you will find that the default group needs to be removed from the request, otherwise the data entered on the previous page will be redisplayed. Intake allows for this by providing a way of removing the data that is no longer appropriate to display. Simply: intake.remove(group); ... where "intake" is a reference to your IntakeTool and "group" is a reference to the group you wish to remove from the request. You would do this after the new record had been validated and added to the database. It will be rare that you actually need to do this - it is required only in situations where the same group is used on subsequent pages after the data has been fully processed. -------------- Regards, -- Rodney -- To unsubscribe, e-mail: <mailto:[EMAIL PROTECTED]> For additional commands, e-mail: <mailto:[EMAIL PROTECTED]>
