master-detail

Creating master-detail table and dialog, how to reuse same dialog for create and edit

陌路散爱 提交于 2019-11-27 04:43:35
I am attempting to create a dialog that will serve the purpose of both creating objects and updating them. So if I happen to click the 'new' button I will be presented a dialog containing empty fields to be filled or if I click on an edit button for an entry, that entry's data will presented in the dialog for update. Following the example in the primefaces showcase for version 5.2, I can present the data in a read only outputText form, however when I change it to an inputText, the field remains empty. The following code is an example of what I have: <h:form id="form"> <p:dataGrid id="guestList

Sharing data between fragments using new architecture component ViewModel

怎甘沉沦 提交于 2019-11-26 22:06:34
On Last Google IO, Google released a preview of some new arch components, one of which, ViewModel. In the docs google shows one of the possible uses for this component: It is very common that two or more fragments in an activity need to communicate with each other. This is never trivial as both fragments need to define some interface description, and the owner activity must bind the two together. Moreover, both fragments must handle the case where the other fragment is not yet created or not visible. This common pain point can be addressed by using ViewModel objects. Imagine a common case of

ASP.NET MVC example of editing multiple child records

谁说胖子不能爱 提交于 2019-11-26 18:29:05
Does anyone know of any examples or tutorials of an MVC view that shows parent/child data all on one form, and allows all the child records to be editable? For example, say I have a table of people and another containing the vehicles they own. One one form, I want to show every vehicle for a given person, and make the data elements editable (i.e. license plate number, car color, etc.) in case there are mistakes. I don't want to jump to a separate edit form for each vehicle. My attempts thus far have gotten me to the point where I can display the data, but I can't get it to post back to the

Sharing data between fragments using new architecture component ViewModel

天大地大妈咪最大 提交于 2019-11-26 12:18:58
问题 On Last Google IO, Google released a preview of some new arch components, one of which, ViewModel. In the docs google shows one of the possible uses for this component: It is very common that two or more fragments in an activity need to communicate with each other. This is never trivial as both fragments need to define some interface description, and the owner activity must bind the two together. Moreover, both fragments must handle the case where the other fragment is not yet created or not

How to show details of current row from p:dataTable in a p:dialog and update after save

醉酒当歌 提交于 2019-11-26 11:23:34
I have a JSF 2 application that has two pages, one to list students and one to show details of a given student. The listing page has a link to the details page in each row of the students table, that opens a new tab in browser to show those details, when clicked. Now the requirements changed to no more show details in a new tab, but in a modal dialog in the listing page. My idea is to simply embed the details page content in the modal dialog so the listing page will not get too big and hard to maintain. Here start my doubts. After some research I changed the link in each row of the listing to

Creating master-detail table and dialog, how to reuse same dialog for create and edit

半腔热情 提交于 2019-11-26 11:19:32
问题 I am attempting to create a dialog that will serve the purpose of both creating objects and updating them. So if I happen to click the \'new\' button I will be presented a dialog containing empty fields to be filled or if I click on an edit button for an entry, that entry\'s data will presented in the dialog for update. Following the example in the primefaces showcase for version 5.2, I can present the data in a read only outputText form, however when I change it to an inputText, the field

How to show details of current row from p:dataTable in a p:dialog and update after save

非 Y 不嫁゛ 提交于 2019-11-26 08:50:47
问题 I have a JSF 2 application that has two pages, one to list students and one to show details of a given student. The listing page has a link to the details page in each row of the students table, that opens a new tab in browser to show those details, when clicked. Now the requirements changed to no more show details in a new tab, but in a modal dialog in the listing page. My idea is to simply embed the details page content in the modal dialog so the listing page will not get too big and hard

ASP.NET MVC example of editing multiple child records

喜夏-厌秋 提交于 2019-11-26 06:19:50
问题 Does anyone know of any examples or tutorials of an MVC view that shows parent/child data all on one form, and allows all the child records to be editable? For example, say I have a table of people and another containing the vehicles they own. One one form, I want to show every vehicle for a given person, and make the data elements editable (i.e. license plate number, car color, etc.) in case there are mistakes. I don\'t want to jump to a separate edit form for each vehicle. My attempts thus

Creating master-detail pages for entities, how to link them and which bean scope to choose

老子叫甜甜 提交于 2019-11-25 22:17:13
问题 I have started learning JSF, but sadly most tutorials out there present only a log in or a register section. Can you point me to some more in depth examples? One thing I\'m interested in is a page presenting a list of products . I\'m on page home and I press on page products so that I can see the latest products added. And every time I visit the page, the product list will be created from the latest entries in the database. How can I handle this? One way to solve this would be to create a