- This topic has 3 replies, 2 voices, and was last updated 10 years, 2 months ago by support-pradeep.
-
AuthorPosts
-
totoherosMemberHi,
I have generated a CRUD gwt 2.0 app from PurchaseOrder, OrderDetail, Product tables.
But I would like to make it less crud !.I want my user to be able to manage relation. For example, select a Product from an orderDetail instead of changing the productcode.
It would be nice to add a button “Pick Product…” from the OrderDetail Editor
See image attached,I seen that the necessary code is genered in gwt.product.client.components package.
see code source attached.Is there a way to achieve this ?
Thanks in advanceTotoheros
Attachments:
You must be logged in to view attached files.
support-pradeepMembertotoheros,
This is a GWT development query. I suggest you cross post to GWT or development related forums like stackoverflow.com for better support on this query.
Let us know if you see any issues with MyEclipse.
totoherosMemberOk thanks. Does that means that I can publish the genereted code from myeclipse ?
I have already some encouraging results and if somebody is interested or have any suggestion …
1) I added a button “Pick Product…” the same way as in SingleRelatedToProductWidget.ui.xml
into OrderdetailEditWidget.ui.xml2) In OrderdetailEditor.java, I added the following code as in RelatedToProductEditor.java
// Handle the Select gesture display.getSelectButton().addClickHandler(new ClickHandler() { public void onClick(ClickEvent event) { final ProductPicker picker = new gwt.product.client.components.ProductPicker(); picker.addCloseHandler(new CloseHandler<PopupPanel>() { public void onClose(CloseEvent<PopupPanel> event) { if (picker.getSelectedproducts() == null || picker.getSelectedproducts().size() <= 0) return; // addProductsToRelated(picker.getSelectedproducts());// original relatedToProductEditor GWTProduct selectedProduct = picker.getSelectedproducts().iterator().next(); orderdetail.setProductcode(selectedProduct.getProductcode()); edit(orderdetail); } }); picker.setGlassEnabled(true); picker.center(); } });
3) need to add in Orderdetail.gwt.xml
<inherits name=”gwt.product.Product”/>
support-pradeepMembertotoheros,
Yes, you can post the generated code from MyEclipse, on other forums for development related queries.
-
AuthorPosts