Problem with non modal ADM dialog

I have problem with focus and mouse and keyboard event passing to non modal dialog if some modal window was opened and closed on Windows platform.
I have this problem in my plugin, but also I did some tests with SDK WordFinder Plugin.There are 2 dialogs open there : CountDialog-non modal dialog and PromtDialog-modal one. I commented all lines in function DeleteCountDialog to leave this dialog on the screen. So, first, when "create page map" menu is selected, CountDialog is appearing and stays on the screen. At this stage, it can be moved and get focus when is clicked.After that, I click on "find word by word offset" and then PromtDialog is appearing. when I close Promtdialog by clicking on OK or Cancel, CountDialog is "freezing" - means, it can not be moved and does not get focus when I click on it.
Is it known problem ? Is there is some workaround there ?
thanks in advance,
Lidia.

Thanks a lot for your response.
I did changes as you recommended, but still have the same result.
So I have WordFinder from Acrobat SDK 8 with only one file changed:WordFinderDlg.cpp - see below.The result is the same:
1. I open Acrobat->Open some file
2. Click on "Advanced->Acrobat SDK->Word Finder->create Page Map" menu
3. "count" non Modal Dialog is opened and working and then stays on the screen and can be moved without problem.
4. Now I click on "Advanced->Acrobat SDK->Word Finder->find Word By Offset" - Modal Promt Dialog is opened. click some number and then click ok - choosen word is selected in Acrobat. From this moment, first "Count" dialog is frosen - can be selected, can not be moved.
The only workaround I see here is to create non Modal dialog every time I close Modal one.
Could you please advice ? May I please send to you project in zip ?
I really need it ASAP ?
thanks in advance,
Lidia.
ADOBE SYSTEMS INCORPORATED
Copyright (C) 1994-2006 Adobe Systems Incorporated
All rights reserved.
NOTICE: Adobe permits you to use, modify, and distribute this file
in accordance with the terms of the Adobe license agreement
accompanying it. If you have received this file from a source other
than Adobe, then your use, modification, or distribution of it
requires the prior written permission of Adobe.
\file WordFinderDlg.cpp
- Implements a modeless progress dialog and a generic prompt dialog.
// Acrobat headers
#ifdef WIN_PLATFORM
#include "PIHeaders.h"
#endif
#include "ADMAcroSDK.h"
#include "resource.h"
Constants/Declarations
static ADMDialogRef countDialog;
static AVWindow gAVWindow = NULL;
// Global variables used for simplicity
const ASInt32 MaxLen = 80;
static char textStr[MaxLen];
static char titleStr[MaxLen];
static char msgStr[MaxLen];
Modeless Progress Dialog
/* UpdateCountDialog
** Updates the dialog with a new GUI function to show count number
void UpdateCountDialog(ASInt32 cnt)
ADMItemRef itemRef;
itemRef = sADMDialog->GetItem(countDialog, IDC_COUNT);
sADMItem->SetIntValue(itemRef, cnt);
sADMDialog->Update(countDialog);
/* CreateCountDialog
/** GUI function to delete the count dialog
void DeleteCountDialog(void)
// destroy dialog
/*if (countDialog) {
sADMDialog->Destroy(countDialog);
countDialog = NULL;
// Release ADM
ADMUtils::ReleaseADM();*/
/* SettingsCountDialogOnInit
** Called to initialize the the dialog controls
ASErr ASAPI CountDialogOnInit(ADMDialogRef dialogRef)
ADMItemRef itemRef;
itemRef = sADMDialog->GetItem(dialogRef, IDC_COUNT);
sADMItem->SetUnits(itemRef, kADMNoUnits);
sADMItem->SetIntValue(itemRef, 0);
return kSPNoError;
/* CreateCountDialog
** Creates the modeless dialog.
void CreateCountDialog(void)
// Initialize ADM.
ADMUtils::InitializeADM();
// Display modeless dialog.
countDialog = sADMDialog->Create(sADMPluginRef, "ADBE:Wordfinder", IDD_COUNT_DIALOG,
kADMNoCloseFloatingDialogStyle, CountDialogOnInit, NULL, NULL);
Generic Prompt Dialog
/* PromptOnOK
** Called when the user clicks OK. Stores the string entered by the
** user.
static void ASAPI PromptOnOK(ADMItemRef item, ADMNotifierRef inNotifier )
sADMItem->DefaultNotify(item, inNotifier);
// get user input string
ADMDialogRef dialog = sADMItem->GetDialog(item);
ADMItemRef item1 = sADMDialog->GetItem(dialog, ID_PROMPT_FIELD);
sADMItem->GetText(item1, textStr, MaxLen);
sADMDialog->EndModal(dialog,IDOK,FALSE);
AVAppEndModal();
AVWindowDestroy(gAVWindow);
/* PromptDialogOnInit
** Called to initialize the dialog controls.
ASErr ASAPI PromptDialogOnInit(ADMDialogRef dialogRef)
gAVWindow = AVWindowNewFromPlatformThing (AVWLmodal, AVWIN_WANTSKEY, NULL, gExtensionID, sADMDialog->GetWindowRef(dialogRef));
AVAppBeginModal (gAVWindow);
sADMDialog->SetText(dialogRef, titleStr);
sADMDialog->SetDefaultItemID(dialogRef, IDOK);
sADMDialog->SetCancelItemID(dialogRef, IDCANCEL);
ADMItemRef itemRef;
itemRef = sADMDialog->GetItem(dialogRef, IDOK);
sADMItem->SetNotifyProc(itemRef, PromptOnOK);
itemRef = sADMDialog->GetItem(dialogRef, ID_PROMPT_FIELD);
sADMItem->SetUnits(itemRef, kADMNoUnits);
sADMItem->SetMinIntValue(itemRef, 1);
itemRef = sADMDialog->GetItem(dialogRef, ID_PROMPT_NAME);
sADMItem->SetText(itemRef, msgStr);
return kSPNoError;
/* PromptForInfo
/** Generic prompt dialog that gets a text string from the user.
/** @return IDOK or IDCANCEL.
ASInt32 PromptForInfo(const char *title, const char *msg, char *buf, ASInt32 bufLen)
if (!buf || (bufLen == 0))
ASRaise (GenError(genErrBadParm));
// Initialize ADM.
ADMUtils::InitializeADM();
// init data
buf[0] = 0;
strncpy(titleStr, title, sizeof(titleStr) - 1);
strncpy(msgStr, msg, sizeof(msgStr) - 1);
// Dispaly modal dialog to get user input
ASInt32 rc = sADMDialog->Modal(sADMPluginRef, "ADBE:Wordfinder", IDD_PROMPT_DIALOG,
kADMModalDialogStyle, PromptDialogOnInit, NULL, NULL);
// get user input data
if (rc==IDOK)
strcpy(buf, textStr);
// Release ADM
ADMUtils::ReleaseADM();
return rc;

Similar Messages

  • Non-Modal SUD Dialog Possible?

    Is it possible to have a non-modal SUD dialog box?  I would like to use a SUD dialog box to show some things going on while a script is running, and would like it to operate much like a non-modal message box. 
    Thanks!  Julia

    Thank you for your reply, I was hoping to display a table (with changing values) or some images while scripts were executing, but I will be content with the non-modal MsgBoxDisp dialog boxes 

  • [SOLVED!] On USB drives, problems with non-English chars and HAL

    Hello,
    I am having a problem with non-English caracters (áãàçéẽê...) on files stored on my USB drive.
    On Windows they're created with the correct name. But on Linux the files have the non-English characteres replaced by '?' and are not accessible.
    If I manuallly mount the drives using 'mount -o iocharset=utf8 /dev/sdb1 /media/usbdisk' the characters are OK, so I think I just need to get HAL to pass the correct parameters to mount. However I don't know how to do that, and haven't found any good solution.
    I tried to build a custom kernel setting the default charset as UTF-8 and it didn't work.
    Any ideas? I'm using x86-64, HAL 0.5.13-3 and my locale is pt-BR.UTF-8.
    Thanks!
    EDIT: Actually, this is not a HAL problem, but a problem with 'exo'. For the solution, I edited /etc/xdg/xfce4/mount.rc and added iocharset=utf8 to the [vfat] category.
    Last edited by Renan Birck (2009-11-28 20:54:23)

    I don't use Thunar presently, but I looked in the Thunar Volume Manager doc and I didn't find anything to change the mount options of removable drives. I am not quite sure if it's possible or not. Maybe someone using it can tell for sure.
    But if it is not possible to change the mount options, a possible solution is to disable the Thunar Volume Manager plugin and to use something else more configurable to manage the automount function.
    Personally I use the halevt package from AUR which uses configuration files in the xml format.
    It's not so easy to use but is highly configurable.
    But there exists other tools also.
    I can help you with halevt if you choose that way...

  • Problems with non-ASCII characters on Linux Unit Test Import

    I found a problem with non-ASCII characters in the Unit Test Import for Linux.  This problem does not appear in the Unit Test Import for Windows.
    I have attached a Unit Test export called PROC1.XML  It tests a procedure that is included in another attachment called PROC1.txt. The unit test includes 2 implementations.  Both implementations pass non-ASCII characters to the procedure and return them unchanged.
    In Linux, the unit test import will change the non-ASCII characters in the XML file to xFFFD. If I copy/paste the the non-ASCII characters into the Unit Test after the import, they will be stored and executed correctly.
    Amazon Ubuntu 3.13.0-45-generic / lubuntu-core
    Oracle 11g Express Edition - AL32UTF8
    SQL*Developer 4.0.3.16 Build MAIN-16.84
    Java(TM) SE Runtime Environment (build 1.7.0_76-b13)
    Java HotSpot(TM) 64-Bit Server VM (build 24.76-b04, mixed mode)
    In Windows, the unit test will import the non-ASCII characters unchanged from the XML file.
    Windows 7 Home Premium, Service Pack 1
    Oracle 11g Express Edition - AL32UTF8
    SQL*Developer 4.0.3.16 Build MAIN-16.84
    Java(TM) SE Runtime Environment (build 1.8.0_31-b13)
    Java HotSpot(TM) 64-Bit Server VM (build 25.31-b07, mixed mode)
    If SQL*Developer is coded the same between Windows and Linux, The JVM must be causing the problem.

    Set the System property "mail.mime.decodeparameters" to "true" to enable the RFC 2231 support.
    See the javadocs for the javax.mail.internet package for the list of properties.
    Yes, the FAQ entry should contain those details as well.

  • Problem with non iPhone users receiving my text sent pictures. Can I make them smaller files?

    Problem with non iPhone users receiving my text sent pictures.  Can I make them smaller files? I know that is possible for email sent pics.

    My bad,  It was a Verizon problem.  When they upgraded my phone they were supposed to remove all blocks on messaging . Found out they did not do this.  All messaging now works.  Thanks for listening.

  • Problems with non-ascii keywords

    I have some problems with non-ascii keywords that makes the whole keyword feature useless for me. I don't know if I'm doing something wrong or if there something I'm missing completely.
    The problem is that when I enter something like "grön" iPhoto sometimes refuses me to type in "grön" on another photo and "eats" the "ö". And if I select the matching keyword from the popup list iPhoto has changed the originally "grön" to "gr¨ön" (if that comes out right on the web). Here are a few screenshots to show what happens
    If someone knows what happens I would really appriciate some hints on how to avoid this.
    Note that adding/editing keywords works just fine in Aperture.

    There is a long standing issue with iPhoto and non-ascii characters. I know of no solution.
    iPhoto menu -> Provide iPhoto Feedback and report it as a bug.
    Regards
    TD

  • Focus Problem -- Two Non Modal Dialogs

    Hi ,
    In my applet, when user does something which is not allowed, I display an error message box (JOptionPane dialog - modal).
    There is another dialog box (non modal) that user
    can open to view search results and put it aside the
    applet window to do some parallel work.
    Now when error message dialog appears, the search
    dialog box also pops up even if the user
    has put this behind the applet window (by clicking browser window or applet, the search dialog goes behind the window).
    Can you please let me know, how can I get rid
    of this search dialog (non-modal) popup. I mean
    search dialog should remain open but should not
    come infront (ie should not get focus) when modal
    error message dialog pops up.
    NOTE: I don't want to make search dialog
    a modal dialog.
    Thanx,
    [email protected]

    Thanks for the reply michael. I forgot to mention particularly during my post that i am facing this problem on Solaris system. Running the same application on windows is working fine. I can't make other non-modal dialogs visibility to false because they should be visible on the screen all the time throught out the application life cycle and making it visible/non-visible doesn't get sense in my application. Does anybody is facing the same problem with Solaris system? Plz help.
    Hitesh

  • Problem with non-container managed entity manager

    i am working on a project, in which i am using entity beans.i use netbeans, glassfish as application server and toplink as persistence provider .
    i created a java class that handles all the operations with the entitys, which means i using non-container managed entity manager.
    in the constructor
    try{
                EntityManagerFactory emf = Persistence.createEntityManagerFactory("voidPU");
                entityManager = emf.createEntityManager();
            catch(Exception ex){
                throw new EJBException(ex.getMessage());
            }then i call a function in this class from a servlet
    the code of the function
    List users = null;
            try {
                ProgLanguages progLanguage = entityManager.find(ProgLanguages.class, languageId);
                users = (List) progLanguage.getUserIdCollection();
            catch(IllegalStateException illegalStateException){
                throw new EJBException(illegalStateException.getMessage());
            catch(IllegalArgumentException illegalArgumentException) {
                throw new EJBException(illegalArgumentException.getMessage());
            }i got an IllegalArgumentException saying Unknown entity bean class: class vanguard.server.entity.ProgLanguages, please verify that this class has been marked with the @Entity annotation
    what confuses me is that sometimes it works and most of the time it does not work, have i made anything wrong?, or there is a problem with any of the tools netbeans, glassfish, or toplink?

    Is it always the same entity that is reported as 'unknown' ? You mention that it works sometimes but is it the same deployment and the same code that works? The first thing I would verify is that the ear is being created as expected by netbeans. Check the persistence.xml file and verify that all of the classes are listed that will be used as entities.
    --Gordon                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                           

  • Problem with Non-English Fields Output to PDF by JASPER in JDev10.1.3

    I am using jsprx files(designed in i-report) to generate pdf reports out of an oracle database.
    The non-English fields are shown correctly when I output the report into an HTML or when I view it with JasperView.
    If I try making PDF files (JasperExportManager.exportReportToPdfFile) the static fields containing e.g.Arabic/Chineese characters won't be displayed and dynamic fields from the database with non-English contents will be shown as ??? or null.
    I received some suggestions about using PARAMETERS to feed the report instead of FIELDS, which I think can not be helpful in this case and in general.
    I think this should be a common problem. These are the components I am using:
    itext-1.4.7. jar
    commons-digester- 1.7.zip
    jasperreports- 1.2.8.jar
    Any comment or help is appreciated.
    Thanks
    Farbod

    I am using jsprx files(designed in i-report) to generate pdf reports out of an oracle database.
    The non-English fields are shown correctly when I output the report into an HTML or when I view it with JasperView.
    If I try making PDF files (JasperExportManager.exportReportToPdfFile) the static fields containing e.g.Arabic/Chineese characters won't be displayed and dynamic fields from the database with non-English contents will be shown as ??? or null.
    I received some suggestions about using PARAMETERS to feed the report instead of FIELDS, which I think can not be helpful in this case and in general.
    I think this should be a common problem. These are the components I am using:
    itext-1.4.7. jar
    commons-digester- 1.7.zip
    jasperreports- 1.2.8.jar
    Any comment or help is appreciated.
    Thanks
    Farbod

  • Problem with non-ASCII file name in content disposition header

    Hi All,
    I am facing some problems with the non-ASCII file name incase of content-disposition header. I read from the RFC 2183 that if the file name contains non-ASCII characters then the same should be encoded before sending to browser. I did the same but realized 2 problems:
    1. The name of the file is truncated in case the file name is slightly long for e.g. �����������j�b�g��������������������������.txt
    2. Also when the same file is opened in notepad, the title is showing encoded name %E6%9C%80%E4%B8%8A%E4%BD%8D.....
    Overall, I feel that the browser is not understanding or responding to the encoded header values.
    Is there any solution to this problem? I am using Microsoft IE 6.0.
    The code snippet is given below:
    protected void doGet(HttpServletRequest req, HttpServletResponse resp) throws ServletException, IOException {
              String fileName = "�����������j�b�g��������������������������.txt";          
              fileName = URLEncoder.encode(fileName, "UTF-8");
              resp.setCharacterEncoding("UTF-8");
              resp.setHeader("Content-Disposition", "attachment; filename=\"" + fileName + "\"");
              resp.setContentType("application/download-binary");
              String s = "This is inside txt file";
              resp.getOutputStream().write(s.getBytes("UTF-8"));
              return;
         }Any help or pointer would be highly appreciated.
    Thanks and Regards,
    Ashish

    The MIME standards for non-ASCII filenames are not widely implemented.
    Many mailers use an ad hoc method for encoding filenames. JavaMail
    supports both methods, but you need to set properties, such as the
    mail.mime.encodefilename property. See the JavaMail javadocs for
    the javax.mail.internet package.

  • Problem with Non-cumulative key figure.

    Hi all,
    I am facing the problem with the Non-cumulative Key Figure (Quantity). I have created and loaded data to the non-cumulative InfoCube. <b>This cube is defined by me to test the non-cumulative key figure.</b>
    <b>In BEx query the non-cumulative key figure and cumulative key figure (Value change) both display same values, i.e. non-cumulative key figure contains the same values which we have loaded for cumulative value change. Non-cumulative key figure is not calculated based on associated cumulative key figure.</b>
    I have done the following while defining the non-cumulative InfoCube:
    1. Created a non-cumulative key figure which is associated with a cumulative key figure (value change).
    2. Loaded data to non-cumulative InfoCube from flat file.
    3. Compressed data in non-cumulative InfoCube after the load.
    Note:
    1. Validity area is determined by the system based on the minimum and maximum date in data.
    2. Validity determining characteristic, 0CALDAY is the default characteristic selected by the system.
    Is there any other settings to be done?
    Please help me in resolving this issue.
    Thanks and regards
    Pruthvi R

    Being a non-cumulative KF, total stock is automatically takes care of that.
    Try putting all the restrictions which you have included for total receipts and total issues, for eg,  restrict Total Stock with the movement types used in Receipts as well as Issues.
    Check and revert.
    Regards
    Gajendra

  • Problem with non-stop looping

    This file has been supposedly changed from As2 to As3. It seems as if it used to stop when I first got it. But the links didn't work. When I followed troubleshooting protocols, it started looping non-stop.
    Please help. I can't seem to attach the flv and the action script files. All I get from the output window is "Fonts should be embedded for any text that may be edited at runtime, other than text with the "Use Device Fonts" setting. Use the Text > Font Embedding command to embed fonts."
    Please help. I paid a coder to switch the file from as2 to as3 and this is what he gave me...

    contact that coder and let them know the problem.  if it's a problem with their code, they should fix it without charge.

  • Problem with Non JSF Request to JSF Page

    Hi All,
    I am working on dynamic controls generation based on the request come from non jsf page
    For the first request, pageworks perfectly. but when we go for second request, it is not rendering and I am getting same old page.
    What I have identified is if I have 2 pages as JSF, application is not giving any problem.
    For this I have written small test application contains both JSF pages only.
    page1 contains 3 submit buttons.
    When submit buttons are clicked based on the request, I get, am able to see the dynamic controls.
    SO there is no problem with JSF PAGE to JSF Page Communication
    Now I have done some changes in First JSF page. Instead of submitting directly I am submitting the page through JavaScript which is nonb JSF request. There I am facing the problem and based on requested qaction I am not able to see correct rendered page based on the requested action.
    Any Idea why it is giving problem for non JSF requests??
    Thanks
    Sudhakar

    For Your Convenience in understanding the problem
    I am pasting entire test code
    Page 1 -- (here page2 is Page1 and Page1 is page2 - some naming convention errors :) )
    <?xml version="1.0" encoding="UTF-8"?>
    <jsp:root version="1.2" xmlns:f="http://java.sun.com/jsf/core" xmlns:h="http://java.sun.com/jsf/html" xmlns:jsp="http://java.sun.com/JSP/Page">
        <jsp:directive.page contentType="text/html;charset=UTF-8" pageEncoding="UTF-8"/>
        <jsp:text><![CDATA[
    <!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN"
    "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">
    ]]></jsp:text>
        <f:view>
            <html lang="en-US" xml:lang="en-US">
                <head>
                    <meta content="no-cache" http-equiv="Cache-Control"/>
                    <meta content="no-cache" http-equiv="Pragma"/>
                    <title>Page2 Title</title>
                    <link href="resources/stylesheet.css" rel="stylesheet" type="text/css"/>
                </head>
                <body style="-rave-layout: grid">
                    <h:form binding="#{Page2.form1}" id="form1">
    <!-- Non JSF REquests -->
                        <h:commandButton action="#{Page2.button1_action}" binding="#{Page2.button1}" id="button1" style="left: 48px; top: 48px; position: absolute" value="Submit" onclick="document.forms['form1'].action='faces/Page2.jsp?id=1'; document.forms['form1'].submit(); return false;"/>
                        <h:commandButton action="#{Page2.button2_action}" binding="#{Page2.button2}" id="button2" style="left: 48px; top: 96px; position: absolute" value="Submit" onclick="document.forms['form1'].action='faces/Page2.jsp?id=2'; document.forms['form1'].submit(); return false;"/>
                        <h:commandButton action="#{Page2.button3_action}" binding="#{Page2.button3}" id="button3" style="left: 48px; top: 144px; position: absolute" value="Submit" onclick="document.forms['form1'].action='faces/Page2.jsp?id=3'; document.forms['form1'].submit(); return false;"/>
    <!-- this  is JSF request -->
                        <!--
                        <h:commandButton action="#{Page2.button1_action}" binding="#{Page2.button1}" id="button1" style="left: 48px; top: 48px; position: absolute" value="Submit" />
                        <h:commandButton action="#{Page2.button2_action}" binding="#{Page2.button2}" id="button2" style="left: 48px; top: 96px; position: absolute" value="Submit" />
                        <h:commandButton action="#{Page2.button3_action}" binding="#{Page2.button3}" id="button3" style="left: 48px; top: 144px; position: absolute" value="Submit" />-->
                    </h:form>
                </body>
            </html>
        </f:view>
    </jsp:root>Page1 Bean
    * Page2.java
    * Created on June 25, 2005, 11:08 AM
    * Copyright user
    package webapplication8;
    import javax.faces.*;
    import com.sun.jsfcl.app.*;
    import javax.faces.component.html.*;
    import javax.faces.context.ExternalContext;
    import javax.faces.context.FacesContext;
    import javax.servlet.http.HttpServletRequest;
    import javax.servlet.http.HttpServletResponse;
    import javax.servlet.http.HttpSession;
    public class Page2 extends AbstractPageBean {
        // <editor-fold defaultstate="collapsed" desc="Creator-managed Component Definition">
        private int __placeholder;
        private HtmlForm form1 = new HtmlForm();
        public HtmlForm getForm1() {
            return form1;
        public void setForm1(HtmlForm hf) {
            this.form1 = hf;
        private HtmlCommandButton button1 = new HtmlCommandButton();
        public HtmlCommandButton getButton1() {
            return button1;
        public void setButton1(HtmlCommandButton hcb) {
            this.button1 = hcb;
        private HtmlCommandButton button2 = new HtmlCommandButton();
        public HtmlCommandButton getButton2() {
            return button2;
        public void setButton2(HtmlCommandButton hcb) {
            this.button2 = hcb;
        private HtmlCommandButton button3 = new HtmlCommandButton();
        public HtmlCommandButton getButton3() {
            return button3;
        public void setButton3(HtmlCommandButton hcb) {
            this.button3 = hcb;
        // </editor-fold>
        public Page2() {
            // <editor-fold defaultstate="collapsed" desc="Creator-managed Component Initialization">
            try {
            } catch (Exception e) {
                log("Page2 Initialization Failure", e);
                throw e instanceof javax.faces.FacesException ? (FacesException) e: new FacesException(e);
            // </editor-fold>
            // Additional user provided initialization code
        protected webapplication8.ApplicationBean1 getApplicationBean1() {
            return (webapplication8.ApplicationBean1)getBean("ApplicationBean1");
        protected webapplication8.SessionBean1 getSessionBean1() {
            return (webapplication8.SessionBean1)getBean("SessionBean1");
         * Bean cleanup.
        protected void afterRenderResponse() {
        public String button1_action()  throws Exception{
            // TODO Following code was replaced by static navigation
           getSessionBean1().setId(1);       
          /* ExternalContext ctx=(ExternalContext)FacesContext.getCurrentInstance().getExternalContext();
           HttpServletRequest req=(HttpServletRequest)ctx.getRequest();
           HttpServletResponse res=(HttpServletResponse)ctx.getResponse();
           res.sendRedirect("http://localhost:18080/webapplication8/faces/Page2.jsp");
           return null;*/
            return "case1";
        public String button2_action()  throws Exception{
            // TODO Following code was replaced by static navigation
                getSessionBean1().setId(2);
          /*  ExternalContext ctx=(ExternalContext)FacesContext.getCurrentInstance().getExternalContext();
           HttpServletRequest req=(HttpServletRequest)ctx.getRequest();
           HttpServletResponse res=(HttpServletResponse)ctx.getResponse();
           res.sendRedirect("http://localhost:18080/webapplication8/faces/Page2.jsp");
           return null;*/
            return "case2";
        public String button3_action() throws Exception{
            // TODO Following code was replaced by static navigation
                getSessionBean1().setId(3);
            /*    ExternalContext ctx=(ExternalContext)FacesContext.getCurrentInstance().getExternalContext();
           HttpServletRequest req=(HttpServletRequest)ctx.getRequest();
           HttpServletResponse res=(HttpServletResponse)ctx.getResponse();
           res.sendRedirect("http://localhost:18080/webapplication8/faces/Page2.jsp");
            return null;*/
            return "case3";
    }page 2
    <?xml version="1.0" encoding="UTF-8"?>
    <jsp:root version="1.2" xmlns:f="http://java.sun.com/jsf/core" xmlns:h="http://java.sun.com/jsf/html" xmlns:jsp="http://java.sun.com/JSP/Page">
        <jsp:directive.page contentType="text/html;charset=UTF-8" pageEncoding="UTF-8"/>
        <jsp:text><![CDATA[
    <!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN"
    "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">
    ]]></jsp:text>
        <f:view>
            <html lang="en-US" xml:lang="en-US">
                <head>
                    <meta content="no-cache" http-equiv="Cache-Control"/>
                    <meta content="no-cache" http-equiv="Pragma"/>
                    <title>Page1 Title</title>
                    <link href="resources/stylesheet.css" rel="stylesheet" type="text/css"/>
                </head>
                <body style="-rave-layout: grid">
                    <h:form binding="#{Page1.form1}" id="form1">
                        <h:panelGrid binding="#{Page1.gridPanel1}" id="gridPanel1" style="left: 96px; top: 48px; position: absolute"/>
                        <f:selectItems binding="#{Page1.radioButtonList1SelectItems1}" id="radioButtonList1SelectItems1"/>
                        <h:commandButton action="#{Page1.button1_action}" binding="#{Page1.button1}" id="button1"
                            style="left: 384px; top: 120px; position: absolute" value="Submit"/>
                        <h:commandButton action="#{Page1.button1_action}" binding="#{Page1.button1}" id="button1" style="left: 384px; top: 72px; position: absolute" value="Submit"/>
                        <h:outputLink binding="#{Page1.hyperlink1}" id="hyperlink1" style="left: 480px; top: 216px; position: absolute" value="http://www.sun.com/jscreator">
                            <h:outputText binding="#{Page1.hyperlink1Text}" id="hyperlink1Text" value="Hyperlink"/>
                        </h:outputLink>
                        <h:commandLink binding="#{Page1.linkAction1}" id="linkAction1" style="left: 456px; top: 264px; position: absolute">
                            <h:outputText binding="#{Page1.linkAction1Text}" id="linkAction1Text" value="Link Action"/>
                        </h:commandLink>
                    </h:form>
                </body>
            </html>
        </f:view>
    </jsp:root>page2 bean
    * Page1.java
    * Created on June 25, 2005, 10:52 AM
    * Copyright user
    package webapplication8;
    import javax.faces.*;
    import com.sun.jsfcl.app.*;
    import com.sun.jsfcl.data.DefaultSelectItemsArray;
    import java.util.Vector;
    import javax.faces.component.UIComponent;
    import javax.faces.component.UISelectItems;
    import javax.faces.component.html.*;
    import javax.faces.context.ExternalContext;
    import javax.faces.context.FacesContext;
    import javax.faces.el.ValueBinding;
    import javax.faces.model.SelectItem;
    import javax.servlet.http.HttpServletRequest;
    import javax.servlet.http.HttpServletResponse;
    public class Page1 extends AbstractPageBean {
        // <editor-fold defaultstate="collapsed" desc="Creator-managed Component Definition">
        private int __placeholder;
        private HtmlForm form1 = new HtmlForm();
        public HtmlForm getForm1() {
            return form1;
        public void setForm1(HtmlForm hf) {
            this.form1 = hf;
        private HtmlPanelGrid gridPanel1 = new HtmlPanelGrid();
        public HtmlPanelGrid getGridPanel1() {
            return gridPanel1;
        public void setGridPanel1(HtmlPanelGrid hpg) {
            this.gridPanel1 = hpg;
        private HtmlCommandButton button1 = new HtmlCommandButton();
        public HtmlCommandButton getButton1() {
            return button1;
        public void setButton1(HtmlCommandButton hcb) {
            this.button1 = hcb;
        private HtmlOutputLink hyperlink1 = new HtmlOutputLink();
        public HtmlOutputLink getHyperlink1() {
            return hyperlink1;
        public void setHyperlink1(HtmlOutputLink hol) {
            this.hyperlink1 = hol;
        private HtmlOutputText hyperlink1Text = new HtmlOutputText();
        public HtmlOutputText getHyperlink1Text() {
            return hyperlink1Text;
        public void setHyperlink1Text(HtmlOutputText hot) {
            this.hyperlink1Text = hot;
        private HtmlCommandLink linkAction1 = new HtmlCommandLink();
        public HtmlCommandLink getLinkAction1() {
            return linkAction1;
        public void setLinkAction1(HtmlCommandLink hcl) {
            this.linkAction1 = hcl;
        private HtmlOutputText linkAction1Text = new HtmlOutputText();
        public HtmlOutputText getLinkAction1Text() {
            return linkAction1Text;
        public void setLinkAction1Text(HtmlOutputText hot) {
            this.linkAction1Text = hot;
        // </editor-fold>
        public Page1() {
            // <editor-fold defaultstate="collapsed" desc="Creator-managed Component Initialization">
            try {
                ExternalContext ctx=(ExternalContext)FacesContext.getCurrentInstance().getExternalContext();
                HttpServletRequest req=(HttpServletRequest)ctx.getRequest();
                HttpServletResponse res=(HttpServletResponse)ctx.getResponse();
                String id=req.getParameter("id");
                if(id!=null)
                    getSessionBean1().setId(Integer.parseInt(id));
                if (getSessionBean1().getId()==1) {
                    addTextBox();
                else if (getSessionBean1().getId()==2) {
                    addCheckBox();
                    addRadio();
                else if (getSessionBean1().getId()==3) {
                    addRadio();
                   // addCheckBox();
            } catch (Exception e) {
                log("Page1 Initialization Failure", e);
                throw e instanceof javax.faces.FacesException ? (FacesException) e: new FacesException(e);
            // </editor-fold>
            // Additional user provided initialization code
        protected webapplication8.ApplicationBean1 getApplicationBean1() {
            return (webapplication8.ApplicationBean1)getBean("ApplicationBean1");
        protected webapplication8.SessionBean1 getSessionBean1() {
            return (webapplication8.SessionBean1)getBean("SessionBean1");
         * Bean cleanup.
        protected void afterRenderResponse() {
        private void addRadio() {
            HtmlPanelGrid gridPanel = new HtmlPanelGrid();
            UIComponent parent = gridPanel1;
            HtmlOutputText outputText = new HtmlOutputText();
            outputText.setValue("Some Desc");
            outputText.setId("somedesc2");
            HtmlSelectOneRadio checkBox = new HtmlSelectOneRadio();
            checkBox.setBorder(0);
            checkBox.setLayout("pageDirection");
            checkBox.setId("a3");
            UISelectItems items = new UISelectItems();
            DefaultSelectItemsArray objArray =new DefaultSelectItemsArray();
            vectDefaultSelectItemsArray.add(objArray);
            arrays=(DefaultSelectItemsArray[])vectDefaultSelectItemsArray.toArray(new DefaultSelectItemsArray[vectDefaultSelectItemsArray.size()]);
            int size =arrays.length;
            arrays[size - 1].clear();
            for (int i =0;i<10;i++) {
                arrays[size - 1].add(new SelectItem(""+i+"",""+i));
            // array.setItems(new String[] {"Yes","No" });
            items.setValueBinding("value",getValueBinding("#{Page1.arrays["+(size-1)+"]}"));
            checkBox.getChildren().add(items);
            gridPanel.getChildren().add(outputText);
            gridPanel.getChildren().add(checkBox);
            parent.getChildren().add(gridPanel);
        private void addCheckBox() {
            HtmlPanelGrid gridPanel = new HtmlPanelGrid();
            UIComponent parent = gridPanel1;
            HtmlOutputText outputText = new HtmlOutputText();
            outputText.setValue("Some Desc");
            outputText.setId("somedesc1");
            HtmlSelectManyCheckbox checkBox = new HtmlSelectManyCheckbox();
            checkBox.setBorder(0);
            checkBox.setLayout("pageDirection");
            checkBox.setId("a2");
            UISelectItems items = new UISelectItems();
            DefaultSelectItemsArray objArray =new DefaultSelectItemsArray();
            vectDefaultSelectItemsArray.add(objArray);
            arrays=(DefaultSelectItemsArray[])vectDefaultSelectItemsArray.toArray(new DefaultSelectItemsArray[vectDefaultSelectItemsArray.size()]);
            int size =arrays.length;
            arrays[size - 1].clear();
            for (int i =0;i<10;i++) {
                arrays[size - 1].add(new SelectItem(""+i+"",""+i));
            // array.setItems(new String[] {"Yes","No" });
            items.setValueBinding("value",getValueBinding("#{Page1.arrays["+(size-1)+"]}"));
            checkBox.getChildren().add(items);
            gridPanel.getChildren().add(outputText);
            gridPanel.getChildren().add(checkBox);
            parent.getChildren().add(gridPanel);
        private void addTextBox() {
            HtmlPanelGrid gridPanel = new HtmlPanelGrid();
            UIComponent parent = gridPanel1;
            HtmlOutputText outputText = new HtmlOutputText();
            outputText.setValue("Some Description for Control Text Box");
            outputText.setId("somedesc");
            HtmlInputText textField = new HtmlInputText();
            //  textField.setId("textField_"+control.getId());
            textField.setId("a1");
            HtmlOutputText outputText1 = new HtmlOutputText();
            hyperlink1Text.setValue(" ");
            hyperlink1Text.setStyleClass("bodyText");
            textField.setStyleClass("frmObjects");
            gridPanel.setColumns(3);
            gridPanel.getChildren().add(outputText);
            gridPanel.getChildren().add(hyperlink1Text);
            gridPanel.getChildren().add(textField);
            parent.getChildren().add(gridPanel);
        private DefaultSelectItemsArray array = new DefaultSelectItemsArray();
        public DefaultSelectItemsArray getArray() {
            return array;
        public void setArray(DefaultSelectItemsArray dsia) {
            this.array = dsia;
        private Vector vectDefaultSelectItemsArray = new Vector();
        private DefaultSelectItemsArray[] arrays = new DefaultSelectItemsArray[10];
        public DefaultSelectItemsArray[] getArrays() {
            return arrays;
        public void setArrays(DefaultSelectItemsArray[]dsia) {
            this.arrays = dsia;
        private UISelectItems radioButtonList1SelectItems1 = new UISelectItems();
        public UISelectItems getRadioButtonList1SelectItems1() {
            return radioButtonList1SelectItems1;
        public void setRadioButtonList1SelectItems1(UISelectItems uisi) {
            this.radioButtonList1SelectItems1 = uisi;
        private ValueBinding getValueBinding(String expression) {
            return     FacesContext.getCurrentInstance().getApplication().createValueBinding(expression);
        public String button1_action() {
            // TODO Replace with your code
            return "case1";
    }my navigation.xml
    <?xml version="1.0" encoding="UTF-8"?>
    <!DOCTYPE faces-config PUBLIC "-//Sun Microsystems, Inc.//DTD JavaServer Faces Config 1.0//EN"
                                  "http://java.sun.com/dtd/web-facesconfig_1_0.dtd">
    <faces-config>
        <navigation-rule>
            <from-view-id>/Page2.jsp</from-view-id>
            <navigation-case>
                <from-outcome>case1</from-outcome>
                <to-view-id>/Page1.jsp</to-view-id>
            </navigation-case>
            <navigation-case>
                <from-outcome>case2</from-outcome>
                <to-view-id>/Page1.jsp</to-view-id>
            </navigation-case>
            <navigation-case>
                <from-outcome>case3</from-outcome>
                <to-view-id>/Page1.jsp</to-view-id>
            </navigation-case>
        </navigation-rule>
        <navigation-rule>
            <from-view-id>/Page1.jsp</from-view-id>
            <navigation-case>
                <from-outcome>case1</from-outcome>
                <to-view-id>/Page2.jsp</to-view-id>
            </navigation-case>
        </navigation-rule>
    </faces-config>my managed beans xml
    <?xml version="1.0" encoding="UTF-8"?>
    <!DOCTYPE faces-config PUBLIC "-//Sun Microsystems, Inc.//DTD JavaServer Faces Config 1.0//EN"
                                  "http://java.sun.com/dtd/web-facesconfig_1_0.dtd">
    <faces-config>
        <managed-bean>
            <managed-bean-name>Page1</managed-bean-name>
            <managed-bean-class>webapplication8.Page1</managed-bean-class>
            <managed-bean-scope>request</managed-bean-scope>
        </managed-bean>
        <managed-bean>
            <managed-bean-name>SessionBean1</managed-bean-name>
            <managed-bean-class>webapplication8.SessionBean1</managed-bean-class>
            <managed-bean-scope>session</managed-bean-scope>
        </managed-bean>
        <managed-bean>
            <managed-bean-name>ApplicationBean1</managed-bean-name>
            <managed-bean-class>webapplication8.ApplicationBean1</managed-bean-class>
            <managed-bean-scope>application</managed-bean-scope>
        </managed-bean>
        <managed-bean>
            <managed-bean-name>Page2</managed-bean-name>
            <managed-bean-class>webapplication8.Page2</managed-bean-class>
            <managed-bean-scope>request</managed-bean-scope>
        </managed-bean>
        <managed-bean>
    </faces-config>

  • Problem with non english caracter

    Hi,
    I'm using JRockit 1.5.0_03, I have a problem with pages with non english caracters. is it possible to change certain properties of JVM like "user.country", "file.encoding" or "user.language"? If yes, how can I change it?
    Thanks in advanced

    Hi,
    I'm using JRockit 1.5.0_03, I have a problem with pages with non english caracters. is it possible to change certain properties of JVM like "user.country", "file.encoding" or "user.language"? If yes, how can I change it?
    Thanks in advanced

  • Modaler ADM Dialog mit Tabs

    Hallo,
    Ich möchte einen modalen ADM Dialog entwickeln in dem ich wie bei dem "Neue Kompositioins" Dialog von After Effects über Tabs auf unterschiedliche Einstellungen zugreifen kann. Ich habe es schon erfolglos mit zwei kADMTabbedFloatingDialogStyle probiert.
    Gibt es villeicht noch ein Sample das mir nicht bekannt ist, in dem diese Art von Dialogen behandelt werden??
    Vielen Dank
    Andre Sick

    sadly enough this is an issue with safari in general. it isn't just for macs either, it is also for PC's. i would suggest downloading another internet browser.

Maybe you are looking for

  • Premiere Pro CS4 "Export Settings" window does not show up.

    Hello, I've run into a new problem with Premiere Pro CS4. Basically, when I select "File > Export > Media" my Export Settings window doesn't show up. If I click on the Premiere window I hear the beeping sound and nothing happens, if I hit Enter the E

  • How do I retrieve a variable from a stored procedure in Access?

    Given a stored procedure like the one below, PROCEDURE getSomething(                pVar1           in float,                pVar2               in float,                pVar3               in float,                pVar4               in float,      

  • Urgent: Problems in Generic Extraction by Function Module

    Hi BW Gurus, I am new to SDN and also new to generic extraction using function module. My requirement is to extract long text(142 char) from CRM to BW as the text is not stored in database table I used function module read_text with in another ZXXX f

  • How do i copy a thread in text messages and copy into a note pad app?

    how do i copy a thread in text messages and copy into a note pad app?

  • Problem with serial communicat​ion PLEASE HELP

    Hello everybody ! I'd like to ask You for some feedback on my wierdo problem that I got with my program. I have built a device that detects changes in magnetic field. It is used for detecting vehicles passing it on a highway. Generally the main compo