11.04.2013 Views

MANUAL ORACLE DEVELOPER ESPAÑOL.pdf

MANUAL ORACLE DEVELOPER ESPAÑOL.pdf

MANUAL ORACLE DEVELOPER ESPAÑOL.pdf

SHOW MORE
SHOW LESS

Create successful ePaper yourself

Turn your PDF publications into a flip-book with our unique Google optimized e-Paper software.

Developer tiene un tipo especial de ventanas para enviar avisos al usuario. Básicamente<br />

mostrará un mensaje y puede tener hasta tres botones (por ejemplo, "Si" "No" y<br />

"Cancelar"). Hay tres tipos de estilos de alerta: Parar, Precaución y Nota.<br />

Vamos a crear una alerta que nos muestre un mensaje de bienvenida cuando se ejecute<br />

el formulario de Matriculación, para ello tendremos que tenerlo abierto previamente con<br />

Forms Builder. En el Navegador de Objetos, seleccionamos Alertas y pulsamos el<br />

botón de crear . Abrimos la paleta de propiedades de la alerta creada.<br />

Cambiamos las siguiente propiedades:<br />

• A Nombre le damos Bienvenida<br />

• A Título le damos Bienvenido<br />

• A Mensaje le damos Bienvenido al proceso de matriculación.<br />

• A Etiqueta de Botón 1 escribimos Aceptar<br />

• A Etiqueta de Botón 2 y a Etiqueta de Botón 3 lo dejamos en blanco<br />

Ya sólo nos queda llamar a la alerta, para ello, en el disparador<br />

WHEN_NEW_FORM_INSTANCE, escribimos el código:<br />

DECLARE<br />

boton NUMBER;<br />

BEGIN<br />

/*Mostramos la alerta BIENVENIDA y<br />

guardamos el botón pulsado*/<br />

boton := Show_Alert('Bienvenida');<br />

/*Miramos que botón se ha pulsado*/<br />

IF boton = ALERT_BUTTON1 THEN<br />

/*Sólo hay uno, no hacemos nada*/<br />

NULL;<br />

END IF;<br />

/*Rellenamos el formulario*/<br />

Execute_Query;<br />

51

Hooray! Your file is uploaded and ready to be published.

Saved successfully!

Ooh no, something went wrong!