System.getProperty returns NULL on Simulator

The following call:

System.getProperty("video.snapshot.encodings")

Returns a null value.

I tried using the default Simulator of the component package 4.5.0_4.5.0.16.

This key is available in 4.7 +. I don't know what you're trying to do, but you should know that there is no way to adjust the front camera of 4.6.

Tags: BlackBerry Developers

Similar Questions

  • Java 7 u45 System.getProperty returns null

    After the upgrade to u45, our web launch application has stopped working. He failed System.getProperty ("myproperty").

    "myproperty" is defined as an

    < resources >

    < j2se version = "+ 1.6" initial-heap-size = "64 m" max-heap-size = "256 m" / >

    < jar href = "nms_wsclient.jar" Download = hand "impatient" = "true" / > "

    < href = tΘlΘchargement jar "commons - httpclient.jar" = "forward" / >

    < href = tΘlΘchargement jar "commons - codec.jar" = "forward" / >

    < href = tΘlΘchargement jar "commons - logging.jar" = "forward" / >

    < jar href = "log4j.jar" Download = "forward" / > "

    "< property name ="myproperty"" value = "http://138.120.128.94:8085 /" / > ""

    < / resource >

    with old java version, System.getProperty ("myproperty") works very well to return the value, but with u45 it returns null.

    Does anyone have the same problem? no idea how to fix or work around it?

    Thank you

    Zhongyao

    7u45 made a change that is not documented in the release notes. You must precede the properties with jnlp.myproperty in your JNLP file, unless your jnlp file is signed.

    But like me, since you can have different values in multiple deployments, signing the JNLP is impossible.

    I tried to submit a bug on this issue report, but their bug report process works as well as 7u45...

  • Problems capturing pictures about OS6 - East System.getProperty ("video.snapshot.encodings"); valid?

    Hello

    I hope someone can help with this query.

    I use the code that is very similar to the sample application camerademo to take a photo using the camera. It works properly on devices running OS5. However, on devices running OS6 photo is just an image of white/black.

    I think I followed the problem until the encoding string passed to getSnapshot(). When I switch which must be a valid encoding string (based on the output of System.getProperty ("video.snapshot.encodings")) the captured image is a black screen. However, when I pass null to getSnapshot() it works correctly. I want to avoid using null as the captured image is much more that I need and for reasons of effectiveness, I would like to avoid having to reduce its size after the capture of the photo.

    I tested this on the 9780 Simulator. The corresponding code is included below for reference.

    Thanks in advance!

    /*
     * CameraDemo.java
     *
     * Copyright © 1998-2008 Research In Motion Ltd.
     *
     * Note: For the sake of simplicity, this sample application may not leverage
     * resource bundles and resource strings.  However, it is STRONGLY recommended
     * that application developers make use of the localization features available
     * within the BlackBerry development platform to ensure a seamless application
     * experience across a variety of languages and geographies.  For more information
     * on localizing your application, please refer to the BlackBerry Java Development
     * Environment Development Guide associated with this release.
     */
    
    package com.rim.samples.device.camerademo;
    
    import java.util.Vector;
    
    import javax.microedition.amms.control.camera.CameraControl;
    import javax.microedition.media.Manager;
    import javax.microedition.media.Player;
    import javax.microedition.media.control.VideoControl;
    
    import net.rim.device.api.system.Characters;
    import net.rim.device.api.ui.Field;
    import net.rim.device.api.ui.Keypad;
    import net.rim.device.api.ui.UiApplication;
    import net.rim.device.api.ui.component.Dialog;
    import net.rim.device.api.ui.component.RichTextField;
    import net.rim.device.api.ui.container.MainScreen;
    import net.rim.device.api.util.StringUtilities;
    
    /**
     * A sample application used to demonstrate the VideoControl.getSnapshot()
     * method. Creates a custom camera which can take snapshots from the
     * Blackberry's camera.
     */
    final class CameraDemo extends UiApplication
    {
        /** Entry point for this application. */
        public static void main(String[] args)
        {
            CameraDemo demo = new CameraDemo();
            demo.enterEventDispatcher();
        }
    
        /** Constructor. */
        private CameraDemo()
        {
            CameraScreen screen = new CameraScreen();
            pushScreen( screen );
        }
    }
    
    /**
     * A UI screen to display the camera display and buttons.
     */
    final class CameraScreen extends MainScreen
    {
        /** The camera's video controller. */
        private VideoControl _videoControl;
    
        /** The field containing the feed from the camera. */
        private Field _videoField;
    
        private Player player;
    
        /** An array of valid snapshot encodings. */
        private EncodingProperties[] _encodings;
    
        /**
         * Constructor. Initializes the camera and creates the UI.
         */
        public CameraScreen()
        {
            //Set the title of the screen.
            //setTitle( new LabelField( "Camera Demo" , LabelField.ELLIPSIS | LabelField.USE_ALL_WIDTH ) );
    
            //Initialize the camera object and video field.
            initializeCamera();
    
            //Initialize the list of possible encodings.
            initializeEncodingList();
    
            //If the field was constructed successfully, create the UI.
            if(_videoField != null)
            {
                createUI();
            }
            //If not, display an error message to the user.
            else
            {
                add( new RichTextField( "Error connecting to camera." ) );
            }
    
        }
    
        /**
         * Adds the VideoField and the "Take Photo" button to the screen.
         */
        private void createUI()
        {
            //Add the video field to the screen.
            add(_videoField);
    
        }
    
        /**
         * Initializes the Player, VideoControl and VideoField.
         */
        private void initializeCamera()
        {
            try
            {
                //Create a player for the Blackberry's camera.
               player = Manager.createPlayer( "capture://video" );
    
                //Set the player to the REALIZED state (see Player docs.)
                player.realize();
    
                //Grab the video control and set it to the current display.
                _videoControl = (VideoControl)player.getControl( "VideoControl" );
    
                if (_videoControl != null)
                {
                    //Create the video field as a GUI primitive (as opposed to a
                    //direct video, which can only be used on platforms with
                    //LCDUI support.)
                    _videoField = (Field) _videoControl.initDisplayMode (VideoControl.USE_GUI_PRIMITIVE, "net.rim.device.api.ui.Field");
                    //Display the video control
                    _videoControl.setDisplayFullScreen(true);
                    _videoControl.setVisible(true);
                }
    
                //Set the player to the STARTED state (see Player docs.)
                player.start();
    
            }
            catch(Exception e)
            {
                Dialog.alert( "ERROR " + e.getClass() + ":  " + e.getMessage() );
            }
        }
    
        /**
         * Create a screen used to display a snapshot.
         * @param raw A byte array representing an image.
         */
        private void createImageScreen( byte[] raw )
        {
            //Initialize the screen.
            ImageScreen imageScreen = new ImageScreen( raw );
    
            //Push this screen to display it to the user.
            UiApplication.getUiApplication().pushScreen( imageScreen );
        }
    
        /**
         * Handle trackball click events.
         * @see net.rim.device.api.ui.Screen#invokeAction(int)
         */
        protected boolean invokeAction(int action)
        {
            boolean handled = super.invokeAction(action); 
    
            if(!handled)
            {
                switch(action)
                {
                    case ACTION_INVOKE: // Trackball click.
                    {
                    try
                    {
                        //A null encoding indicates that the camera should
                        //use the default snapshot encoding.
                        String encoding = null;
    
                        // All the below result in a black screen being captured on OS6 devices
                        // encoding = "encoding=jpeg&width=1024&height=768";
                        // encoding = "encoding=jpeg&width=1024&height=768&quality=superfine";
                        // encoding = _encodings[1].getFullEncoding();
                        // Null works but the image captured is large (~1MB)
                        encoding = null;
    
                        //Retrieve the raw image from the VideoControl and
                        //create a screen to display the image to the user.
                        createImageScreen(_videoControl.getSnapshot(  encoding ) );//null works
                    }
                    catch(final Throwable e)
                    {
                        UiApplication.getUiApplication().invokeLater(new Runnable()
                        {
                            public void run()
                            {
                                Dialog.alert( "ERROR " + e.getClass() + ":  " + e.getMessage() );
                            }
                        });
                    }
    
                        return true;
                    }
                }
            }
            return handled;
        }
    
        /**
         * Prevent the save dialog from being displayed.
         * @see net.rim.device.api.ui.container.MainScreen#onSavePrompt()
         */
        public boolean onSavePrompt()
        {
            return true;
        }
    
        /**
         * Initialize the list of encodings.
         */
        private void initializeEncodingList()
        {
            try
            {
                //Retrieve the list of valid encodings.
                String encodingString = System.getProperty("video.snapshot.encodings");
    
                //Extract the properties as an array of words.
                String[] properties = StringUtilities.stringToKeywords(encodingString);
    
                //The list of encodings;
                Vector encodingList = new Vector();
    
                //Strings representing the four properties of an encoding as
                //returned by System.getProperty().
                String encoding = "encoding";
                String width = "width";
                String height = "height";
    
                EncodingProperties temp = null;
    
                for(int i = 0; i < properties.length ; ++i)
                {
                    if( properties[i].equals(encoding))
                    {
                        if(temp != null && temp.isComplete())
                        {
                            //Add a new encoding to the list if it has been
                            //properly set.
                            encodingList.addElement( temp );
                        }
                        temp = new EncodingProperties();
    
                        //Set the new encoding's format.
                        ++i;
                        temp.setFormat(properties[i]);
                    }
                    else if( properties[i].equals(width))
                    {
                        //Set the new encoding's width.
                        ++i;
                        temp.setWidth(properties[i]);
                    }
                    else if( properties[i].equals(height))
                    {
                        //Set the new encoding's height.
                        ++i;
                        temp.setHeight(properties[i]);
                    }
                }
    
                //If there is a leftover complete encoding, add it.
                if(temp != null && temp.isComplete())
                {
                    encodingList.addElement( temp );
                }
    
                //Convert the Vector to an array for later use.
                _encodings = new EncodingProperties[ encodingList.size() ];
                encodingList.copyInto((Object[])_encodings);
            }
            catch (Exception e)
            {
                //Something is wrong, indicate that there are no encoding options.
                _encodings = null;
            }
        }
        protected  boolean keyDown(int keycode,
                               int time) {
            System.out.println("Input" + keycode + "/" + Keypad.key(keycode) + " C1 = " + Keypad.KEY_CONVENIENCE_1 +  " C2 = " + Keypad.KEY_CONVENIENCE_2);
            if ( Keypad.key(keycode) == Keypad.KEY_CONVENIENCE_1 ) {
                return true;
            }
            return super.keyDown(keycode, time);
        }
    
            protected  boolean keyChar(char c, int status, int time) {
                System.out.println("Input" + c + ":" + Keypad.getKeyCode(c, status));
                switch (c) {
                    case Characters.ESCAPE:
                        this.close();
                        return true;
                    default:
                        return super.keyChar(c, status, time);
                }
    
            }
    }
    

    Thanks for getting back to me.

    It turns out that it was only a problem on the Simulator. I managed to get my hands on a real device 9780 and the code works fine on it.

  • System.getProperty

    I'm trying to access the SD card on the Simulator.

    I first 'change' SD card via the Simulation menu and specify a path name, that I have set up to be identical to the structure of the directory of the SD card.

    Then, something I just found out, is that I have to get the name of the SD card.

    System.getProperty tried to get the name of the root directory, and I got the following results.

    The key string result

    filecon.dir.MemoryCard null

    filecon.dir.MemoryCard.Name null

    Why do I get null for the name of the name of the SD card?

    How to open a file on an SD card on the Simulator is - a. Is there anything else I need to put in place on the Simulator in addition to change SD card.

    .. .where is this result telling me that the way to access the Blackberry directory on the SD card is to use the following:

    file:///BlackBerry/

    that is the SD card has no name... null?

    Thank you

    -Donald

    I solved this myself (at least this part :-)

    OK, for those of you who want to know how to open your media card correctly (at least in the storm).

    First, make a call to System.getProperty ("fileconn.dir.memorycard");

    This returns the string "file:///SDCard/".

    Note that you are not guaranteed that the file system of the media card will always be SD card, so you should always call System.getProperty beforehand.

    Then, if you use the Simulator, you must select the simulate change... SD card menu. This opens a small window allowing you to select different directories (by default is set to None, which means the media card is disconnected). You can click new folder to set the directory that emulates the directory root of the press card. You can enter several directories and it will remember them so you can switch from one to the other. The entry selected (highlighted) is used, so if you select none, it generates an event to remove media card.

    You must also set the it strategy using strategy-simulation game IT... menu.

    Under the tab control application, you must assign to allow local connections and all the other features that you will use. Similarly, the policy of COMPUTER you must select allow local connections and click on him-> the button to add to the list of policies. Also you must click on the set after that to define the it strategy.

    OK, now you can open the connection to the file.

    -Donald

  • Hash table returns null

    It's the stumping me. I add a key and a value in a hash table, pass in the key and retrieve the value. Basic enough, but when I go to retrieve the value a second time (after the restart of the application), it returns null.

    If it isn't exactly the code that would be the basic scheme:

    class A
    {
         private static Hashtable table = new Hashtable();
    
         public static Object getObject(Class clazz)
         }
              return A.table.get(clazz);
         }
    
         public static void setObject(Class clazz, Object obj)
         }
              A.table.put(clazz, obj);
         }
    
         //Code stuff...
    }
    
    class B
    {
         public static void main(String[] args)
         {
              A.setObject(C.class, new C());
              Object obj = A.getObject(C.class); //This works
         }
    
         //Code stuff...
    }
    
    class C
    {
         //Code stuff...
    }
    

    What happens on the 9550 Simulator and is fixed after restarting the Simulator but work always and only the first time through. If the app is closed, then reopened, then it returns null, even if the hash table was always the same items.

    Ah. When you run the application a second time, he rebuilt serializers to persistent store. Unfortunately, your objects of the class are new instances, so that they cannot be used as persistent hash keys. I suggest you use class names as keys rather than objects of class themselves.

  • LocationProvider.getInstance always returns null

    I'm trying to run a slightly modified version of the application on a BlackBerry 7250 GPSDemo. As my device software is version 4.1, I use the BlackBerry JDE 4.1. No matter what are the parameters for the criteria, I pass in LocationProvider.GetInstance, I always return null. I can run google maps on this unit and get my location, so I'm assuming that the GPS is supported in this regard. Did anyone see any problem with code and/or information on the devices below?

    Wireless blackBerry 7250 (CDMA)

    v4.1.0.353 (Platfor 2.2.0.159)

    The kernel v3.8.3.7 encryption

    The microedition configuration: CLDC-1. 1

    Microedition profile: MIDP-2. 0

    Microedition JTWI Version: 1.0

    Microedition Media Version: 1.1

    Microedition PIM Version: 1.0

    Try
    {
    GpsReceiverCriteria criteria = new Criteria();
    gpsReceiverCriteria.setHorizontalAccuracy (Criteria.NO_REQUIREMENT);
    gpsReceiverCriteria.setVerticalAccuracy (Criteria.NO_REQUIREMENT);
    gpsReceiverCriteria.setCostAllowed (true);
    gpsReceiverCriteria.setPreferredPowerConsumption (Criteria.POWER_USAGE_LOW);
    gpsReceiverCriteria.setAddressInfoRequired (false);

    _locationProvider = LocationProvider.getInstance (gpsReceiverCriteria);
               
    If (_locationProvider is nothing)
    {
    Runnable ShowGpsLocationProviderNull1Dialog = new Runnable()
    {
    public void run()
    {
    Dialog.Alert ("Provider is null - HA: NR VA: NR CA:T PC:L");
    }
    };
    invokeLater (showGpsLocationProviderNull1Dialog);  Ask the event dispatcher thread to display the dialog box as soon as POSSIBLE
    }
       
    gpsReceiverCriteria.setHorizontalAccuracy (Criteria.NO_REQUIREMENT);
    gpsReceiverCriteria.setVerticalAccuracy (Criteria.NO_REQUIREMENT);
    gpsReceiverCriteria.setCostAllowed (false);
    gpsReceiverCriteria.setPreferredPowerConsumption (Criteria.POWER_USAGE_LOW);
    gpsReceiverCriteria.setAddressInfoRequired (false);

    _locationProvider = LocationProvider.getInstance (gpsReceiverCriteria);
               
    If (_locationProvider is nothing)
    {
    Runnable ShowGpsLocationProviderNull2Dialog = new Runnable()
    {
    public void run()
    {
    Dialog.Alert ("Provider is null - HA: NR VA: NR CA:F PC:L");
    }
    };
    invokeLater (showGpsLocationProviderNull2Dialog);  Ask the event dispatcher thread to display the dialog box as soon as POSSIBLE
    }

    _locationProvider = LocationProvider.getInstance (null);
               
    If (_locationProvider is nothing)
    {
    We would like to display a dialog box indicating that the GPS is not supported, but because that
    the event dispatcher thread has not been started yet, modal screens cannot be pushed on
    the battery in the display.  So delay the operation until the event dispatcher thread runs
    asking him to call the executable object following as soon as possible.
    Runnable showGpsUnsupportedDialog = new Runnable() {}
    public void run() {}
    Dialog.Alert ("No receiver GPS on this unit is available, exit...");
    System.Exit (1);
    }
    };
    invokeLater (showGpsUnsupportedDialog);  Ask the event dispatcher thread to display the dialog box as soon as POSSIBLE
    }
    on the other
    {
    only a single listener can be associated with a provider and point it comes to the same
    call, but with the value null, so, no need to cache the listener instance
    request an update every second
    _locationProvider.setLocationListener (new LocationListenerImpl(), _interval, 1, 1);
    retval = true;
    }
    } catch (LocationException) {}
    System.Err.println ("Failed to instantiate the object LocationProvider, exit...");
    System.Err.println (the);
    System.Exit (0);
    }

    Oops... sory. My dyslexia again out of in

    I think that the 7250 has no GPS function at all.

    Yet again, Google it didn't need because they have their own turn cells DB and web services to retrieve the "approximate" location

  • Need help with ics. SQL return null

    Hi experts WCS.

    I have this ics. SQL statement that returns an IList as null and nothing in the errStr in debugging print.

    IList rsATypes is ics. SQL (, sqlATypes, listName, limit, bCache errStr);

    The code is in one of my jsp. He ran very well in my local JSK (HyperSQL Db), but returns NULL in the case of Test (Oracle DB, if this is another).

    I got the sql statement println during execution and run it directly in Oracle DB (same instance) it returns the expected result set.

    The code snippet:

      System.out.println("## ics.GetSSVar(\"pubid\")          : " + ics.GetSSVar("pubid"));
    
        // Get Attribute Types
        String sqlATypes = "SELECT DISTINCT assetpublication.assettype "
                         + "FROM assetpublication "
                         + "LEFT JOIN approvedassets "
                         + "    ON assetpublication.assetid = approvedassets.assetid "
                         + "WHERE pubid = '" + ics.GetSSVar("pubid") + "' "
                         + "AND (tstate is null OR tstate <> 'A') "
                         + "AND (voided is null OR voided <> 'T') "
                         + "ORDER BY assettype; ";
        System.out.println("##0126 sqlATypes : " + sqlATypes);
        String from = "AssetPublication, ApprovedAssets";
        // String listName = null;
        String listName = "ATypesList";
        int limit = -1;
        // boolean bCache = true;
        boolean bCache = false;
        StringBuffer errStr = new StringBuffer("");
        ics.ClearErrno();
        IList rsATypes = ics.SQL(from, sqlATypes, listName, limit, bCache, errStr);
    
        System.out.println("## rsATypes : " + rsATypes);
        if (rsATypes == null) {
            System.out.println("## NO DATA in rsATypes! errStr : " + errStr.toString());
    

    }

    The journal:

    ## ics.GetSSVar("pubid")          : 1374097570685
    ## sqlATypes : SELECT DISTINCT assetpublication.assettype FROM assetpublication LEFT JOIN approvedassets     ON assetpublication.assetid = approvedassets.assetid WHERE pubid = '1374097570685' AND (tstate is null OR tstate <> 'A') AND (voided is null OR voided <> 'T') ORDER BY assettype;
    ## rsATypes : null
    ## NO DATA in rsATypes! errStr :
    


    I got enclosing try catch block, who did not take any exception.


    The funny thing is, in the same piece of code, an ics. Casea used already worked (which I noticed outside because there was not enough for what I want to do):

            StringBuffer errSB = new StringBuffer("");
            ics.SetVar("assetid", id);
            IList approvedAsset = ics.SelectTo("ApprovedAssets", "state,voided,tstate,locked,reason,treason", "assetid", null, -1, null, true, errSB);
    

    Any help/ideas from anyone would be really appreciated.

    Thanks Guddu1223, I discovered why.

    The SQL statement cannot end with a semicolon (see line 11 of my original above codes). Delete who had back all the records provided for in my resultset in the IList.

    The reason why it works in my local, but not stable instance that I guess is my local JSK + HyperSQL, in WCS + Oracle DB instance trying...

  • ViewObject get attribute always returns null

    Hi guys,.

    I need your help, I'm going crazy.

    I'm just trying to browse a ViewObject as I did a thousand times but despite getEstimatedRowCount return 1 and the Row inside the SENTENCE object is not null, getattribute always returns null, does not care if I call getAttribute (String) or getAttribut (int)

    This is the last code I tested:

    AppMod = (PeopleFinderAppModuleImpl) this.getApplicationModule () PeopleFinderAppModuleImpl;

    PfUserGetInfoImpl pf_Info = (PfUserGetInfoImpl) appMod.getPfUserGetInfo1 ();

    pf_Info.setp_userid (UserID);

    pf_Info.executeQuery ();

    System.out.println ("# view getEstimatedRowCount:" + pf_Info.getEstimatedRowCount ());

    PfUserGetInfoRowImpl r = null;

    RowSetIterator rsIterator = pf_Info.createRowSetIterator (null);

    While (rsIterator.hasNext ()) {}

    r = (PfUserGetInfoRowImpl) rsIterator.next ();

    System.out.println ("# AttributeCount:" + r.getAttributeCount ());

    String [] uploading = r.getAttributeNames ();

    for (int i = 0; i < attrs.length; i ++) {}

    System.out.println (I + "" + uploading [i] + "=" + r.getAttributeValues () [i]);

    }

    }

    rsIterator.closeRowSetIterator ();

    The output is:

    # userid: EPETRANG

    # Discovers getEstimatedRowCount: 1

    # AttributeCount: 13

    0 Userid = null

    1 name = null

    2 Givenname = null

    3 family name = null

    4 title = null

    5 Dn = null

    6 mail = null

    7 company = null

    8 Department = null

    9 Telephonenumber = null

    Mobile 10 = null

    11 Ipphone = null

    Manager of 12 = null

    My Env record:

    Build JDEVADF_11.1.1.7.0_GENERIC_130226.1400.6493

    1.6.0_45 64-bit JVM

    Of course, the query returns 1 row SQLDeveloper and ApplicationModule compressiometre is as well.

    You see something wrong in the code? I tried to delete and re-create the ViewObject without a bit of luck.

    Hi guys,.

    Thanks to you all.

    This morning I just tried to delete and recreate the Weblogic JDev field and now everything works fine. Looks like that integrated weblogic has been screwed

    Thanks again.

  • HttpServletRequest getParameter returns null in Jdeveloper 11 g

    Hello:

    IM currently involved in a project to the title of the ADF faces in Jdeveloper 11 g. I have a requirement that an online application must be connected to a bank. We can redirect the workflow on the site of the Bank, but the return parameters are the problem. The Bank sends the confirmation by MAIL, but when we try to get the data to a ControllerBean using a HttpServletRequest parameters return null.

    This works very well in the Adf using Oracle Jdeveloper 10 g but in Jdeveloper 11 g Adf in richfaces don't.

    Here are the facts:

    1. a third application must send parameters via post method in the form of html to my request.

    2. in the PrepareModel of the support of my jsp bean, I get the HttpServletRequest object.

    3. I have access to the settings in the HttpServletRequest.

    Here's the pararameter sending form example:

    < html >
    < head >
    < meta http-equiv = "Content-Type".
    Content = text/html"; charset = windows-1252 "/ >"
    < title > < /title > answer Bank
    < script languaje = "JavaScript" type = "text/javascript" >
    function responder() {}
    document. TestForm.Submit ();
    }
    < /script >
    < / head >
    < body >
    < name of the form = "testform" action = "myAppUrl" method = "post" >
    < input type = "hidden" name = "parameter1" value = "Value1" / >
    < input type = "hidden" name = "parameter 2' value = 'value2' / >
    < input type = "hidden" name = "parameter3' value = 'value3' / >
    < / make >
    < / body >
    < / html >


    The code I use in the bean of the JSP (HttpServeletRequest get parameters):


    public void prepareModel (LifecycleContext context) {}
    super.prepareModel (context);
    ADC ADFContext = ADFContext.getCurrent ();
    FacesContext facesContext = FacesContext.getCurrentInstance ();
    try {}
    HttpServletRequest request =.
    (HttpServletRequest) facesContext.getExternalContext () .getRequest ();
    System.out.println (Request.GetParameter ("Parameter1")); / / < < < < < ME GIVES a NULL VALUE
    System.out.println (Request.GetParameter ("parameter2")); / / < < < < < ME GIVES a NULL VALUE
    System.out.println (Request.GetParameter ("parameter3")); / / < < < < < ME GIVES a NULL VALUE
    } catch (Exception ex) {}
    ex.printStacktrace ();
    }
    }

    Any advice?

    Concerning

    Jorge

    Edited by: 828478 01/15/2011 10:43

    Hello

    on the f: view of the JSPX page element, set the afterMethod property to point to a managed bean method. In this method of bean management, determine the phase and if this phase is afterRestore, read the query parameter, if it exists (be sure to check if the setting exists). If the parameter exists, write on a range of memeory as viewScope or session. Then when you need this setting in the managed bean, get it from the scope of the memory

    Frank

  • Dependency injection and inaccessible target return null

    Hello
    I tried a simple code to jsf 2.
    That's
    Here's the jsp
    -----
    < h:form >
    < h:inputText value="#{MBTest.thePerson.name}"/ >
    < h:commandButton value = 'submit' action = "#{MBTest.action}" / >
    < h:messages / >
    < / h:form >
    -----

    Here's Managed bean MBTest
    -----
    @ManagedBean (name = "MBTest")
    @RequestScoped
    public class MBTest {}

    @ManagedProperty (value = "#{thePerson}")
    private person thePerson = null;

    public MBTest() {}
    }

    public person {} getThePerson()
    Return thePerson;
    }

    {} public void setThePerson (person thePerson)
    this.thePerson = thePerson;
    }

    {} public void action()
    System.out.println (thePerson.GetName ());
    }
    }
    -----
    This is the Person class
    -----
    public class person {}

    private String name = null;
    private int age = 0;

    public int getAge() {}
    return age;
    }

    public void setAge (int age) {}
    This.Age = age;
    }

    public String getName() {}
    return the name.
    }

    public void setName (String name) {}
    myIdName = name;
    }
    }
    -----

    But once this completed page opens (Please note that "thePerson" managed bean instance is not instantiated, just the managed property has been declared). When the button is pressed, it gives me the error of followuing
    -----
    /index. XHTML @12,60 value = "#{MBTest.thePerson.name}": unattainable target, "thePerson" returned null "
    -----
    Could you please tell me why?

    Off topic:
    Where the code tags? I can't find it here.

    as far as I can see, your person class is not a managed bean. I expect an annotation @ManagedBean (name = "thePerson") on it. If you do not a managed bean, JSF doesn't know it exists.

    If you don't want a person as being a managed bean, then simply yourself create an instance of your class MBTest.

    private Person thePerson = new Person();
    
  • getAttribute() method of a view object returns NULL

    Hello
    I am currently implementing PPR in one of my OFA page and I took the following approach.

    I stated the Boolean attribute transitional follwing in the VO() outside of the existing attribute 'sense '.
    1 MfgEnttity
    2 MfgAcct
    3 MfgSubAcct
    4 MfgCc
    5 MfgProj

    In the page I used these attributes in the property made in the form "${oa." XXR2RMfgproSegVO.MfgSubAcct}' like that.

    Now, in the central, I wrote the following code.

    ' Public Sub processRequest (pageContext OAPageContext, OAWebBean webBean)
    {
    super.processRequest (pageContext, webBean);
    OAApplicationModule am = pageContext.getApplicationModule (webBean);
    am.invokeMethod ("initializeXXR2RMfgproSegVO");
    }
    ' Public Sub processFormRequest (pageContext OAPageContext, OAWebBean webBean)
    {
    super.processFormRequest (pageContext, webBean);

    Event string = pageContext.getParameter (EVENT_PARAM);
    Source of the string = pageContext.getParameter (SOURCE_PARAM);
    Am = (OAApplicationModule) pageContext.getApplicationModule (webBean) OAApplicationModule;
    am.invokeMethod ("handleSegmentChangeEvent");
    }
    }


    And the AM code is as follows:

    Public Sub initializeXXR2RMfgproSegVO()
    {
    OAViewObject vo = getXXR2RMfgproSegVO();
    If (!) VO.isPreparedForExecution ())
    vo.executeQuery ();
    Line = vo.createRow ();
    vo.insertRow (row);
    row.setNewRowState (Row.STATUS_INITIALIZED);
    }

    Public Sub handleSegmentChangeEvent()
    {
    PVO OAViewObject = (OAViewObject) findViewObject ("XXR2RMfgproSegVO");
    OARow hdrRow = (OARow) pVO.getCurrentRow ();
    String status = (String) hdrRow.getAttribute ("Meaning").
    System.out.println ("poRow" + hdrRow.toString ());
    System.out.println ("value of the State is" + status);
    If ("Entity". Equals (Status))
    {
    hdrRow.setAttribute ("MfgEnttity", Boolean.TRUE);
    hdrRow.setAttribute ("MfgAcct", Boolean.FALSE);
    hdrRow.setAttribute ("MfgSubAcct", Boolean.FALSE);
    hdrRow.setAttribute ("MfgCc", Boolean.FALSE);
    hdrRow.setAttribute ("MfgProj", Boolean.FALSE);
    } else
    If ("Account". Equals (Status))
    {
    hdrRow.setAttribute ("MfgEnttity", Boolean.FALSE);
    hdrRow.setAttribute ("MfgAcct", Boolean.TRUE);
    hdrRow.setAttribute ("MfgSubAcct", Boolean.FALSE);
    hdrRow.setAttribute ("MfgCc", Boolean.FALSE);
    hdrRow.setAttribute ("MfgProj", Boolean.FALSE);
    } else
    If ("Subaccount". Equals (Status))
    {
    hdrRow.setAttribute ("MfgEnttity", Boolean.FALSE);
    hdrRow.setAttribute ("MfgAcct", Boolean.FALSE);
    hdrRow.setAttribute ("MfgSubAcct", Boolean.TRUE);
    hdrRow.setAttribute ("MfgCc", Boolean.FALSE);
    hdrRow.setAttribute ("MfgProj", Boolean.FALSE);
    } else
    If ("cost Center".equals (status))
    {
    hdrRow.setAttribute ("MfgEnttity", Boolean.FALSE);
    hdrRow.setAttribute ("MfgAcct", Boolean.FALSE);
    hdrRow.setAttribute ("MfgSubAcct", Boolean.FALSE);
    hdrRow.setAttribute ("MfgCc", Boolean.TRUE);
    hdrRow.setAttribute ("MfgProj", Boolean.FALSE);
    } else
    If ('Project'. Equals (Status))
    {
    hdrRow.setAttribute ("MfgEnttity", Boolean.FALSE);
    hdrRow.setAttribute ("MfgAcct", Boolean.FALSE);
    hdrRow.setAttribute ("MfgSubAcct", Boolean.FALSE);
    hdrRow.setAttribute ("MfgCc", Boolean.FALSE);
    hdrRow.setAttribute ("MfgProj", Boolean.TRUE);
    }
    on the other
    {
    hdrRow.setAttribute ("MfgEnttity", Boolean.FALSE);
    hdrRow.setAttribute ("MfgAcct", Boolean.FALSE);
    hdrRow.setAttribute ("MfgSubAcct", Boolean.FALSE);
    hdrRow.setAttribute ("MfgCc", Boolean.FALSE);
    hdrRow.setAttribute ("MfgProj", Boolean.FALSE);
    }
    }
    }

    Now when I change in the value of the attribute "Meaning" page that he can always get into the else part, which is where all the attributes are 'False'.

    The two System.out.Println statements return the following values.

    03/10/22 15:41:08 poRow xxr2r.oracle.apps.gl.coam.poplist.server.XXR2RMfgproSegVORowImpl@3
    03/10/22 15:41:08 state value is null

    Can you please why this 'status' returns NULL and how I can get the current selected line in the page?

    Thank you
    Lucile

    Hello

    you set the attributes of PVO, based on a condition, your old code is just the question is from where you can get the status, you may get this page, but you must pass this value to AM.

    thanx
    Pratap

  • BC4J: EntityAssociation.getSourceEnd () .getDBObjectName () returns null

    Dear forum,

    I use JDeveloper 10.1.3.4.0.4270 with 10.1.3.42.70 ADF business components.

    This is what I call inside the validate method of a class that extends EntityImpl.
        
        private void test(){
            EntityDefImpl entityDefImpl = this.getEntityDef();
            AssociationDefImpl[] associationDefImpls=entityDefImpl.getAssociationDefImpls();
            for(int iter=0;iter<associationDefImpls.length;iter++){
                AssociationDefImpl associationDefImpl=associationDefImpls[iter];
                EntityAssociation entityAssociation=associationDefImpl.getEntityAssociation();
                System.out.println(entityAssociation.getSourceEnd().getDBObjectName());      // null
                System.out.println(entityAssociation.getSourceEnd().getName());       
                System.out.println(entityAssociation.getDestinationEnd().getDBObjectName()); // null
                System.out.println(entityAssociation.getDestinationEnd().getName());
            }
        }
    My problem is that getDBObjectName() always returns null, while getName() returns what it should be, and, otherwise, everything looks beautiful and functional as it should.

    I guess I'm doing something wrong here. So, how could I, in implementation of the entity, its associations list and search the database of the names of tables?

    Thank you for your help,

    ADSM

    Try:

    System.out.println(((EntityDefImpl)entityAssociation.getSourceEnd().getOwner()).getSource());
    System.out.println(((EntityDefImpl)entityAssociation.getDestinationEnd().getOwner()).getSource());
    
  • Whenever my computer installs the Microsoft/Windows updates I get Internet and restoring the system to return.

    Whenever my computer installs the Microsoft/Windows updates I get Internet and restoring the system to return.

    Cite your version of IE and the full version of Windows (for example, WinXP SP3;) Vista 64 - bit SP2; Win7 RC. Win7) during the validation in an IE specific forum or a newsgroup. Please do it in your next reply.

    By "The Internet began" do you mean that you encounter errors Page can not be displayed ?

    Updates have you installed just before this problem started? Have you installed an update of the third-party driver that is offered by Windows Update?

    TIP: Never, EVER to use system restore to 'Cancel' an update, Service Pack, or upgrade of IE!  Instead, uninstall the update, Service Pack, or the IE patch & reboot.  If that does not resolve the problem, then try System Restore. ~ Robear Dyer (PA Bear) ~ MS MVP (that is to say, mail, security, Windows & Update Services) since 2002 ~ WARNING: MS MVPs represent or work for Microsoft

  • Cannot install windows update, error: updates have not been configured correctly. The system then returns

    Original title: Windows updates fail to configure.

    I wonder to install Windows updates. I do and I am told they have installed.  When I have to restart my computer, I get a message that the updates have not been configured correctly. The system then returns. Next time I turn on the computer I get a message saying that updates have not been successful.  This has happened for months. I think that my computer is very slow because of it. I also think that my computer is a little short on memory. It is an Inspiron 530 with 1 GB memory

    Hello

    I suggest you try the steps from the link below and check if it helps.

    Error: Failed to setup of the Windows updates. Restoration of the changes. Do not turn off your computer when you try to install Windows updates: http://support.microsoft.com/kb/949358

    I hope this information is useful.

  • ConnectionFactory.getConnection () returns null.

    ConnectionFactory connFact = new ConnectionFactory();
            ConnectionDescriptor connDesc = null;
            connDesc = connFact.getConnection(----here goes my url String----);
    

    Hi all

    In the code posted above, number In Line 3, reason for which the null value is returned by the statement "connFact.getConnection (- this is my String url-);"   and he is assigned to the variable 'connDesc '.  Although I was able to login successfully before 2 to 3 hours. but it is now return null...

    Could you please help me?

    Best regards,

    Hi Sir,

    After going through the link provided by you (and a few other sup on internet links), I was able to resolve the issue for now... I write the code for other users help here...

    Thank you for your support...

    Best regards.

    // make a list of transport types ordered according to preference (they will be tried in succession)
    int[] preferredTransportTypes = {TransportInfo.TRANSPORT_MDS, TransportInfo.TRANSPORT_WAP2};
    
    // Create ConnectionFactory
    ConnectionFactory factory = new ConnectionFactory();
    
    // Configure the factory
    factory.setPreferredTransportTypes( preferredTransportTypes );
    
    // use the factory to get a connection
    ConnectionDescriptor conDescriptor = factory.getConnection("http://www.blackberry.com");
    
    if ( conDescriptor != null ) {
    
       // connection suceeded
       int transportUsed = conDescriptor.getTransportDescriptor().getTransportType();
    
       // using the connection
       HttpConnection  httpCon = (HttpConnection) conDescriptor.getConnection();
       ...
    }
    

Maybe you are looking for

  • You can add custom messaging answers?

    You can add your own personal message on your iPhone for iWatch?

  • iCloud library download not working not

    Hi all I have a problem with the iCloud library months ago that my library (14000 pictures) is not properly download from my mac (10.11.3). At present, there are still 7000 points to download, but over the past two months to download anything. I have

  • My Acer Aspire E 15 fails to start after 10 upgraded Windows.

    Hello, im having a problem starting my laptop. I have just upgraded to Windows 10 8.1 Windows recently. my laptop does not start upward for the first time (the Acer logo appears and the cycling tour of points, but then the screen goes black) I turned

  • Dark LaserJet CP1025nw print

    I have a new colourlaser LaserJet CP1025nw. problem is much too dark impression and that's why the cartridges run out too fast, especially the black one. I try to color changes in the settings of the driver, but these changes isn't any effection. I h

  • Cannot use the browser or one of my apps. I have internet!

    I have the internet, but can't open any websites such as Facebook, yahoo, or Google?