Tell me please, how to implement open windows panel on java server face? We are building an accounting program, we need to open several windows simultaneously in one browser tab, we want the user to minimize the windows and expand the minimized window on demand.

  • Do you understand that these will not be real windows? In my opinion, this will greatly complicate the interface, both from the user's point of view and the developer's point of view. - Mikhail Vaysman
  • at the expense of real windows, then most likely not, we want that the main window would not open the browser window, but the form itself, as it were, it’s spinning in my head as it should be, but I understand that it sounds crazy about the implementation - Yaroslav Volodymyrovich
  • may have seen, there is such an accounting system 1c enterprise, so there you can minimize the windows of open documents below (by default), that's what I want for something like this - Yaroslav Volodymyrovich
  • have you seen an MDI implementation anywhere on the web? I can not remember. - Mikhail Vaysman
  • I did not see, if I honestly just now found out about it - Yaroslav Volodimirovich

1 answer 1

If you use the JSF framework Primefaces , then there is exactly what you need. Here is an example of a page with dialogs that open when you click a button, and when minimized they are attached to the bottom edge of the browser page:

 <?xml version='1.0' encoding='UTF-8' ?> <!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd"> <html xmlns="http://www.w3.org/1999/xhtml" xmlns:h="http://java.sun.com/jsf/html" xmlns:f="http://java.sun.com/jsf/core" xmlns:p="http://primefaces.org/ui"> <f:view> <h:head/> <h:body> <p:commandLink onclick="PF('dialog1').show()">button 1</p:commandLink> <br/> <p:commandLink onclick="PF('dialog2').show()">button 2</p:commandLink> <br/> <p:commandLink onclick="PF('dialog3').show()">button 3</p:commandLink> <br/> <p:dialog header="dialog 1" resizable="true" modal="false" draggable="true" widgetVar="dialog1" minimizable="true" maximizable="true"> dialog1 </p:dialog> <p:dialog header="dialog 2" resizable="true" modal="false" draggable="true" widgetVar="dialog2" minimizable="true" maximizable="true"> dialog2 </p:dialog> <p:dialog header="dialog 3" resizable="true" modal="false" draggable="true" widgetVar="dialog3" minimizable="true" maximizable="true"> dialog3 </p:dialog> </h:body> 

The result is this page: One dialog is open, the rest are rolled up

dialog 1 is open, the other two dialogs are minimized.

  • Thanks, that is necessary - Yaroslav Volodymyrovich