Fórum

need new db prim key before creat vaadin file upload comp with rollback..

thumbnail
Jack Bakker, modificado 11 Anos atrás.

need new db prim key before creat vaadin file upload comp with rollback..

Liferay Master Postagens: 978 Data de Entrada: 03/01/10 Postagens Recentes
have a Vaadin portlet add document form which includes a file upload (with browse) ; for a pdf

I want to name the pdf file server side using the same as db primary key (postgresql 8.4)

Doc doc = DocLocalServiceUtil.create(0)
doc = DocLocalServiceUtil.addDoc(doc)

String fileName = doc.getDocId()

..

but for rollback, what if user just navigates away from the form ?
thumbnail
Jack Bakker, modificado 11 Anos atrás.

RE: need new db prim key before creat vaadin file upload comp with rollback

Liferay Master Postagens: 978 Data de Entrada: 03/01/10 Postagens Recentes
no longer needed

a class that implements Receiver allows for the filesystem filename to be changed after upload

turned into more of a Vaadin question than a Liferay one ; tho while on that point there are transaction challenges across LR/Vaadin