论坛

主页 » Liferay Portal » English » 3. Development

组合视图 统一视图 树状图
讨论主题 [ 上一个 | 下一个 ]
toggle
Jack Bakker
need new db prim key before creat vaadin file upload comp with rollback..
2012年10月15日 上午8:31
答复

Jack Bakker

等级: Liferay Master

帖子: 666

加入日期: 2010年1月3日

最近的帖子

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 ?
Jack Bakker
RE: need new db prim key before creat vaadin file upload comp with rollback
2012年10月15日 上午10:16
答复

Jack Bakker

等级: Liferay Master

帖子: 666

加入日期: 2010年1月3日

最近的帖子

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