cocoon-users mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From Jorge Davila <is...@nicaraguarealestate.com>
Subject Re: cforms - ojb: generate unique id
Date Tue, 23 Nov 2004 16:09:40 GMT
Oops! The same answer with more elements:

Reading the samples I can't find one sample demostrating how to generate 
unique id using ojb... well, in the samples, employee e.g. ... the 
unique id are asigned using instructions like:

function form2bean(form) {
  // .................

    var contact = new Packages.org.apache.cocoon.forms.samples.Contact();

     contact.setId("1");
  // .................

     bean.addContact(contact);

     form.load(bean);
     form.showForm("form2-display-pipeline");
     form.save(bean);

     cocoon.sendPage("form2bean-success-pipeline", { "form2bean": bean });
}

and here the two questions:

1.- What line a need to autogenerate an unique id
2.- How I can do to show my final html page. When I put a field identity 
for the id in the html form is placed an forms_onsubmit() and the final 
result is not showed.

Thank for your response,

Jorge Dávila.

Jorg Heymans wrote:
> I think you're suffering from a few other knock-on effects and this is 
> making your result page rendering fail.
> 
> But to get onto your question: unique id's can be generated by the OR 
> mapping tool itself. Hibernate can do it, i'm sure ojb can as well.
> 
> Regards
> Jorg
> 
> Jorge Davila wrote:
> 
>> Hello all!:
>>
>> I'm trying to agregate a new record in a postgresql database ... but 
>> when i put a widget field in my definition file I obtain an:
>>
>> forms_onsubmit();
>>
>> in my form (in the html page).
>>
>> then, my result page is not showed.
>>
>> How generate the unique id using flow?
>>
>> Best regards,
>>
>> Jorge Dávila.
> 
> 
> 
> ---------------------------------------------------------------------
> To unsubscribe, e-mail: users-unsubscribe@cocoon.apache.org
> For additional commands, e-mail: users-help@cocoon.apache.org


---------------------------------------------------------------------
To unsubscribe, e-mail: users-unsubscribe@cocoon.apache.org
For additional commands, e-mail: users-help@cocoon.apache.org


Mime
View raw message