pivot-user mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From Camilo Casadiego <Camilo.Casadi...@adv.co>
Subject RE: question: how can I load a popup window?
Date Wed, 29 Feb 2012 20:11:39 GMT
Hi there...if you want just simple message you can use the Promp class or the alert class like

Alert.alert(MessageType.WARNING, "Se presentaron errores de validacion en el proceso de carga!",

But if what u want is to have a complex modal popup like this


Then its really simple you just have to have a class that holds the window...the class must
extend dialog lije this...

public class NewItemCanvasDialog extends Dialog implements Bindable {

      private static Logger logger = Logger.getLogger(NewItemCanvasDialog.class);

Then you have your bxml like this...

<?xml version="1.0" encoding="UTF-8"?>
<workspace:NewItemCanvasDialog bxml:id="dialog"
      modal="true" xmlns:bxml="http://pivot.apache.org/bxml"

See that the base element of the bxml is NewItemCanvasDialog so this means that the class
is going to be loaded autmatically when you stanciathe througth BXMLSerializer

Then if you have an instance of a Dialog class ypu can do something like this:

dialog = NewItemDialog.loadNewObjectDialog(type, specificWindow, "Setup"); //this is a singleton
class where al the maps ara stored and creates the sitance of the presentacion objects
dialog.open(MenuBarController.this); //then having a dialog you just have to open it.

Kind Regards,


Camilo Casadiego Espitia
Arquitecto de SW
* + 57 1 6393000
* camilo.casadiego@adv.com.co<mailto:camilo.casadiego@adv.com.co>
* http://www.adv.com.co<http://www.adv.com.co/>
Carrera 11 No. 93 - 53 P7
Bogotá - Colombia

De: Bruno Rodrigues [mailto:brunord@gmail.com]
Enviado el: Wednesday, February 29, 2012 2:26 PM
Para: user
Asunto: question: how can I load a popup window?

Hello guys,
I am trying to get into apache pivot universe, and I am doing some GUI tests for learn it.
My simples question is:
how can I launch a popup window from an application?

I have tried creating another class (that implements application) and launch it calling "DesktopApplicationContext.main(PopupGUI.class,

works well, but if I try to close it, all my application closes. do I need to put some code
into "shutdown" method to avoid this?

thanks a lot!!

View raw message