Make primefaces data table behaving like a split window? - jsf-2

I've a requirement to modify a primefaces datatable as the changes are made in another datatable. It should perform like the split window, where the user can type in the top window and he can see changes in the bottom window.

Can't you use the Collector widget?

Related

Opening Kendo popup window for adding new records

I have an separate Add button (neither on toolbar, nor on grid) and I want to open a popup window (having some fields) after clicking this button in order to create a new record. I have a look at the Kendo Demo pages, but all the samples use grid's or toolbar's Create button. Instead of them, a need a sample with a separate button. Any sample please?
Update: I want to create a listview as shown below instead of grid:
If you call dataGrid.addRow() method and edit mode is set to "popup", Popup window will be displayed.
Look at this dojo

vaadin 7 - move data between sub windows

I have the main UI class with a button that shows a subwindow when clicked. That subwindow has a textField and a button. When you press the subwindow's button, another sub window opens. You could call it the sub-sub window. This sub-sub window has a textfield and a button that will close this sub-sub window. I would like to update the textfield in the subwindow when i close this sub-sub window with the textfield value on the sub-sub window. is there a way to do this without creating everything on the main UI Class? I would like to create 2 classes for these sub windows and would like to pass the data back. I got it to work by putting everything on the main UI class but i thought there would be a better way.
TIA,
Thomas Kim
You can either bind all your components which acces shared data to same model, using Vaadin Data Binding or you can use Events to propagate value changes from subwindows to whichever component may be concerned.
Consider using Model View Presenter pattern to structure you view layer. There is a nice article to explain basics of MVP and its implementation in Vaadin.
https://vaadin.com/web/magi/home/-/blogs/model-view-presenter-pattern-with-vaadin
This approach will not only solve your problem, but also lead to better separated and maintable presentation layer.

How to navigate page with Vaadin menubar?

These are my first steps with java, I took grails and vaadin plugin. I want to make simple app with menu bar navigation, so I have got some Vaadin example:
http://demo.vaadin.com/sampler-for-vaadin6#BasicMenuBar
created some commands:
edit.addItem("Cut1", menuCommand1);
edit.addItem("Cut1", menuCommand1);
Each command just draw table from another example:
http://demo.vaadin.com/sampler-for-vaadin6#TableHeaderIcons
Unfortunately each time I hit menu item it draws one table under another table, but what I was expecting is to draw each table in place of previous one.
How to achieve this?
vaadin's UI is stored as state (in a session) on the server. if you add several items they stay unless removed. so e.g. if you want to replace the table there you two options. either removeAllComponents and then add the new one or if you have hold of the original table then you can replaceComponent in the wrapping layout (most likely a VerticalLayout?).
if the table is just supposed to change content, then you are better off to just change/modifiy the dataSource of the table.

Bring Control to Front when Selected in the Structure Pane

I would like to build a Wizard component, where I can guid the user through different pages. When the last page is reached, an action is performed.
That component should work similar as the TPageControl, where I can create sheets at design-time. Creating that 'sheets' is already done, but my problem is, that the last added sheet is always on top of the other sheets, and I cannot select another one anymore (which are behind). In the TPageControl component, I can select a sheet in the Structure Pane, and it comes to the front, where can I put controls on it.
And this is my question: How can I bring a control (my wizard sheet) to the front, when it is selected in the Structre Pane?
I have to override the TWinControl.ShowControl function. That function is fired when you click in the structure pane on the child control. Then, I just need to invoke the BringToFront function of that child.

How can i implement an interface like BB Messenger?

How can i implement an interface like BB Messenger showing a tree with a list of complex field items that are shown only if the tree item expands.??
Use a ListField for the contents of the collapsible area (you control how each row is painted), and use some other focusable field for the header. Add both to a VerticalFieldManager. When you click on the header once, remove the ListField from the Manager. When you click on it again, add it back.
I think you are talking about tree view. for that you can try this.
Create a field to display a tree view

Resources