replying to myself again - bad habbit...
Instead of getting the group like this :- #set ( $newLineGroup = $intake.InvoiceLine.Default ) if I get it like this :- #set ( $newLineGroup = $intake.InvoiceLine.mapTo( $virginObject ) ) then the problem goes away. I have to provide a virgin Invoice line in the context, but that is pretty easy. I assume this is a bug. N ----- Original Message ----- From: "Neil Stevens" <[EMAIL PROTECTED]> To: "Turbine Users List" <[EMAIL PROTECTED]> Sent: Tuesday, November 19, 2002 9:51 AM Subject: Re: is it possible to distinguish new and old Groups in intake? > Thanks Rodney, > > But I am way ahead of that bit of help now :-) > > I already use removeGroup. But the key thing is here, that the phantom data > appears after I have visited another non intake screen inbetween. The life > of a group should only be for the request. In fact I have seen posts > bemoaning that fact. > > I am using turbine 2.1, because I want to go live in early December, but I > have a feeling that bugs in 2.1 will never be fixed, with 2.2 and 3 getting > all the development effort :-(. > > I assume 2.2 will not be released by then ....anyone? > > N > > > ----- Original Message ----- > From: "Rodney Schneider" <[EMAIL PROTECTED]> > To: "Turbine Users List" <[EMAIL PROTECTED]> > Sent: Tuesday, November 19, 2002 12:48 AM > Subject: Re: is it possible to distinguish new and old Groups in intake? > > > > 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]> > > > > > > > -- > To unsubscribe, e-mail: <mailto:[EMAIL PROTECTED]> > For additional commands, e-mail: <mailto:[EMAIL PROTECTED]> > > -- To unsubscribe, e-mail: <mailto:[EMAIL PROTECTED]> For additional commands, e-mail: <mailto:[EMAIL PROTECTED]>
