switch the setting to display the application object module impl

Hello

in my ApplImpl class likely requery(), what I have now is:
{} public void requery()
...
VO = getRelationsVO1 ();
vo.setWhereClause ("client_id =" + getRid ());
vo.executeQuery ();
}
Instead, I added a: setting clientid to my RelationsVO1
so, I would like to replace vo.setWhereClause ("client_id =" + getRid ());
with some settings from the code

Help, please

Best regards
AB

Published by: grodno Sep 29, 2011 06:40

Hello

Use this

vo.setNamedWhereClauseParam("clientid",getRid());

Note: clientid is variable binding in RelationsVO1.

~ Abhijit

Published by: Abhijit Dutta, Sep 29, 2011 19:39

Tags: Java

Similar Questions

  • Start getting script error code 0/line48/tank 2 / failed to get the value of the application object of property is null or undefined

    whenever I start all the applications I get three error code of script, I was wondering how to stop this.

    Check if the following will help with your question.
    Open your Internet Explorer browser.
    Click on the menu 'tools '.
    Click on 'Internet Options '.
    Click on the "Advanced" tab
    Check the checkbox "disable the script debugger. It is located under the heading "Navigation".
    Uncheck the "display a notification of every script error".
    Click 'Apply' then 'OK '.
    Close Internet Explorer.
    Open Internet Explorer to make sure that the script errors are not displayed.

    Please reply back and let us know if this can help.

    Marilyn

  • insertLabel() in the Application object for storing persistent data

    I thought to store persistent information in the object of the application itself:

    Not so interesting snippet:

    app.insertLabel ("pxComplexName", "test");

    Later / safe restart

    app.extractLabel ("pxComplexName", "test");

    I know how to get labels from IDML. Does anyone know where the label of the Application is saved?

    I thougt about using this as a counter using simple script in a trial version of a script. Any thougts on this subject?

    Kind regards

    Gregor

    Labels of the application are saved in the application preferences file. When a user clears preferences, all recorded data as labels is removed. This can be a good thing or a bad thing - depending on what you need...

    Substances

  • I get a Client Certificate error "name of the application object is 0 x 80094001 invalid or too long."

    I am trying to generate a client certificate for my machine windows 7 so I can make client authentication with IIS 7 server cert. I get the error above of my CA.

    «Original title: Client Certificate error "the request subject name is invalid or too long 0 x 80094001»»

    Hi matte_,

    I wish you post your question in the TechNet forums because it caters to an audience of it professionals.

    Check out the link-

    TechNet forums

    Hope this helps!

  • How to monitor the status of the application - REST

    Hi all

    I was following the blog using vCAC 6.X REST API - Part 2 - elastic sky to request a REST. I was able to post the request. It returns the response immediately after the successful presentation.   How to monitor demand? "The response of the application object has assigned to the header 'rental' property https:// < < hostname > > /catalog-service/api/consumer/requests/56428808-f9a0-4bac-b83d-ce75ddc86b78 '.

    I tried to use URLs of 'place' that didn't work.

    var requsetRest = vcacHost.createRestClient (vCACCAFEServicesEnum.CATALOG_SERVICE);

    var response = requsetRest.get ("consumer/applications/56428808-f9a0-4bac-b83d-ce75ddc86b78");


    Any help appreciated.


    Thank you

    I was able to get the application to the vcaccafeenitiesfinder.getCatalogItemRequest method.

  • Flex 4.1 export of custom components in an Application or Module if used in the Module only?

    According to me, Miss me something here:

    "Because a module is loaded into a child domain, it has definitions of classes that are not in the area of the main application. For example, the first module to load the PopUpManager class becomes the owner of the PopUpManager class for the whole application because it records the Manager with the SingletonManager. If later another module tries to use the PopUpManager, Adobe® Flash® Player throws an exception.

    This technique also applies to components. The module that uses the first has the class of the component definition in its field. Therefore, if another module tries to use a component that has already been used by another module, its definition do not match the existing definition. To avoid a mismatch of definitions of element, create an instance of the component in the main application. The result is that the definition of the component is the property of the main application and can be used by modules in any field of the child. »

    I thought that if I use a component in one module then I won't be able to use it in application modules or a brother and I would be able to use it only in the Submodule of this module as the component definitions are in the scope of module which is a child of the scope of the application.

    So I just do a simple example: application with 2 moduleLoaders and 2 modules both using the same 3 components:

    (1) ButtonBar

    (2) DataGrid

    (3) CustomSkinnableComponent (empty, just extends SkinnableComponent) with custom skin (with a Rect 200 x 200 px, extends skin).

    I start the application--> two modules load without problem. Wasn't this supposed to cause error with the second loading module because the first module contains the definitions of components? Or does not result in an error because the component definitions match and match because my component is in the same project in flex, and in this case there is no problem. Problem will be if I have 2 or more RSL with the same definitions of package and class, but different features?

    I do not really understand how to cause incompatibility of definitions component so I can watch to avoid that it... can someone please explain?

    I'm confused and I thought I knew this kind of things. What Miss me?

    Also one last thing:

    I thought that if a module contains component definitions which means it is swf should grow in size-> due to the use of modules. If the application contains the definitions of components would not be what it means the application swf will grow in size and then-> why should I use a module? To save the memory of bodies and images/fonts embeded in the module?

    Bearing also in mind that the skin of a component is also a class definition and I incorporate some large images in there, and I use this skin in 2 modules, wouldn't that require skin to be implemented-> big size of swf application and no module swf as it should?

    Please someone shed some light in my foggy mind

    Post edited by: FM_Flame

    Pretty much:

    public var foo:Object;

    public function runTest (): void

    {

    If (Application.application.foo is nothing)

    Application.application.foo = new SomeClass();

    on the other

    trace (test (application.application.foo));

    }

    If you click the first button, then the second, you should see a type

    incompatibility.

  • List of open and active/Windows Forms displayed within Windows XP 7 v/s windows on the right by clicking on the name of the application in the status bar

    Salvation OR,.

    We found that the list of forms/open windows displayed in Windows XP (on the right by clicking on the name of the application in the windows taskbar) seems to indicate all open and active windows/forms in the application.

    We would like to know how to enable the same functionality in a Windows 7 environment. The best we can do now is to double click on the name of the application on the windows taskbar to switch between active windows/Forms in the application. We would like a menu similar to the windows XP appearance about running on Windows 7 when it comes to this particular feature.

    Thank you and best regards,

    -Ashish

    The taskbard has changed significantly in Windows Vista and 7. You can get a similar functionality to what you call by customizing the taskbar in the taskbar properties. In addition, now press SHIFT key while right-clicking to display a menu similar to what you show in your screenshot, except that it does not display the name of the element. In Windows 7, the feature make you is typically done by hovering over the icon in the bar tasks and selecting one of the points of view which appears above the element.

    You can use the Windows shellapi to do a limited customization of the task bar, but this API is very difficult to use and I would not recommend this approach.

    CVI provides a method to change the name of the item in the taskbar (see this KB), but it does not add the name after the restoration in the context menu.

  • The application to display very slowly, please give me advice, thanks.

    Dear all,

    Could someone give me some advice? Thanks, I'm new developer in the development of a program administered for BB bold 9000, but when I run the application, it was display very slowly. Thank you.

    My code is displayed as follows:

    Main:

    import net.rim.blackberry.api.browser.Browser;
    import net.rim.blackberry.api.browser.BrowserSession;
    import net.rim.device.api.servicebook.ServiceBook;
    import net.rim.device.api.servicebook.ServiceRecord;
    import net.rim.device.api.system.Characters;
    import net.rim.device.api.system.EncodedImage;
    import net.rim.device.api.ui.Color;
    import net.rim.device.api.ui.DrawStyle;
    import net.rim.device.api.ui.Field;
    import net.rim.device.api.ui.Font;
    import net.rim.device.api.ui.Graphics;
    import net.rim.device.api.ui.UiApplication;
    import net.rim.device.api.ui.component.BitmapField;
    import net.rim.device.api.ui.component.LabelField;
    import net.rim.device.api.ui.container.HorizontalFieldManager;
    import net.rim.device.api.ui.container.MainScreen;
    import net.rim.device.api.ui.container.VerticalFieldManager;
    import net.rim.device.api.ui.decor.Background;
    import net.rim.device.api.ui.decor.BackgroundFactory;
    
    public class SmartoneVodafoneServices extends UiApplication {
    
        public static void main(String arg[]) throws Throwable {
            SmartoneVodafoneServices application = null;
            application = new SmartoneVodafoneServices();
            application.enterEventDispatcher();
        }
    
        public SmartoneVodafoneServices() throws Throwable {
                pushScreen(new SmartoneVodafoneServicesScreen());
        }
    }
    
    class SmartoneVodafoneServicesScreen extends MainScreen {
    
        //private TableLayoutManager table = TableDefine();
        private String url = "http://202.140.96.134:8080/Hero/shortcuts_demo.xml";
        private static ServiceBook sb = ServiceBook.getSB();
        private static ServiceRecord[] records = sb.findRecordsByCid("BrowserConfig");
    
        public SmartoneVodafoneServicesScreen() throws Throwable {
            super();
            LabelField title = new LabelField("Smartone Vodafone Services",
                    DrawStyle.ELLIPSIS | Field.USE_ALL_WIDTH | DrawStyle.HCENTER);
            setTitle(title);
    
            Background bg = BackgroundFactory.createSolidBackground(Color.BLACK);
            getMainManager().setBackground(bg);
            String[][] arr = null;EncodedImage pic = null;int p = 0;
            UiApplication.getUiApplication().getScreenCount();
            arr = Conn.WorkForXML(url);
            HorizontalFieldManager mainHManager = new HorizontalFieldManager(Field.FIELD_VCENTER);
            VerticalFieldManager col1 = new VerticalFieldManager(Field.FIELD_HCENTER);
            VerticalFieldManager col2 = new VerticalFieldManager(Field.FIELD_HCENTER);
            VerticalFieldManager col3 = new VerticalFieldManager(Field.FIELD_HCENTER);
            VerticalFieldManager col4 = new VerticalFieldManager(Field.FIELD_HCENTER);
            VerticalFieldManager col5 = new VerticalFieldManager(Field.FIELD_HCENTER);
    
            for (int i = 0; i < arr.length; i++) {
                if (arr[i][0] != null || arr[i][1] != null || arr[i][2] != null) {      
    
                    LabelField name = showName(arr[i][0]);
                    pic = Conn.GetPngField(arr[i][1]);
                    final String link = arr[i][2];
                    //final String link = "http://202.140.96.134:8080/blackberry/index.html";
                    BitmapField myBitmapField = new BitmapField(pic.getBitmap(),Field.FOCUSABLE|FIELD_VCENTER){
                        protected boolean invokeAction(int status){
                            //BrowserSession site = Browser.getDefaultSession();
                            BrowserSession site = createWAPBrowserSession();
                            site.displayPage(link);
                            return true;
                        }
    
                        protected void paint(Graphics g) {
                            g.setBackgroundColor(Color.BLACK);
                            g.drawRoundRect(0, 0, getWidth(), getHeight(), 10, 10);
                            g.setColor(Color.WHITE);
                            super.paint(g);
    
                        }
                    };
    
                    switch (p) {
                        case 0:
                            col1.add(new LabelField(" ",LabelField.NON_FOCUSABLE));
                            col1.add(myBitmapField);
                            col1.add(name);
                            break;
                        case 1:
                            col2.add(new LabelField(" ",LabelField.NON_FOCUSABLE));
                            col2.add(myBitmapField);
                            col2.add(name);
                            break;
                        case 2:
                            col3.add(new LabelField(" ",LabelField.NON_FOCUSABLE));
                            col3.add(myBitmapField);
                            col3.add(name);
                            break;
                        case 3:
                            col4.add(new LabelField(" ",LabelField.NON_FOCUSABLE));
                            col4.add(myBitmapField);
                            col4.add(name);
                            break;
                        case 4:
                            col5.add(new LabelField(" ",LabelField.NON_FOCUSABLE));
                            col5.add(myBitmapField);
                            col5.add(name);
                            break;
                    }
                    p ++;
                    if ( p == 5 ){
                        p = 0;
                    }
                }
            }
            mainHManager.add(col1);
            mainHManager.add(col2);
            mainHManager.add(col3);
            mainHManager.add(col4);
            mainHManager.add(col5);
            add(mainHManager);
        } 
    
        public LabelField showName(String name) {
            return new LabelField(name,LabelField.NON_FOCUSABLE|LabelField.FIELD_VCENTER){
                protected void paint(Graphics g) {
                    Font myFont = Font.getDefault().derive(Font.PLAIN, 7);
                    g.setColor(Color.WHITE);
                    g.setFont(myFont);
                    super.paint(g);
                }
            };
        }
    
        public static BrowserSession createWAPBrowserSession()
        {
            // If there are browser services found - search for the WAP2
            // Service Record
            String uid = null;
            int numRecords = records.length;
            for( int i = 0; i < numRecords; i++ )
            {
                ServiceRecord myRecord = records[i];
                //if (myRecord.getName()){
                if (myRecord.getUid().equals("WAP Browser Smartone")==true){
                    uid = myRecord.getUid();
                }
            }
            return Browser.getSession(uid);
        }
    
        public boolean keyChar(char key, int status, int time)
           {
               switch (key) {
                   case Characters.ESCAPE:
                        System.exit(0);
                        break;
               }
               return true;
               //return true to indicate that a key was pressed
           }
    }
    

    Conn.Java

    import java.io.*;
    
    import javax.microedition.io.*;
    
    import net.rim.blackberry.api.browser.Browser;
    import net.rim.blackberry.api.browser.BrowserSession;
    import net.rim.device.api.math.*;
    import net.rim.device.api.servicebook.ServiceRecord;
    import net.rim.device.api.system.*;
    import net.rim.device.api.ui.Color;
    import net.rim.device.api.ui.Field;
    import net.rim.device.api.ui.Graphics;
    import net.rim.device.api.ui.XYEdges;
    import net.rim.device.api.ui.component.BitmapField;
    import net.rim.device.api.ui.decor.Border;
    import net.rim.device.api.ui.decor.BorderFactory;
    import net.rim.device.api.xml.parsers.*;
    
    import org.w3c.dom.*;
    
    public class Conn {
    
        /**
         * @return
         * @throws IOException
         * @throws Throwable
         * @throws Throwable
         */
    
        public static String[][] WorkForXML(String url) throws IOException, Throwable {
            // TODO Auto-generated method stub
            String[][] arr = null;
            HttpConnection conn = null;
            Document doc;
    
                conn = (HttpConnection) Connector.open(url);
                conn.setRequestMethod(HttpConnection.GET);
    
            try {
                if (conn.getResponseCode() == HttpConnection.HTTP_OK) {
    
                    DocumentBuilderFactory docBuilderFactory = DocumentBuilderFactory.newInstance();
                    DocumentBuilder docBuilder = docBuilderFactory.newDocumentBuilder();
    
                    docBuilder.isValidating();
                    doc = docBuilder.parse(conn.openInputStream());
                    conn.close();
                    doc.getDocumentElement().normalize();
    
                    NodeList list = doc.getElementsByTagName("item");
                    arr = new String[list.getLength()][3];
    
                    for (int i = 0; i < list.getLength(); i++) {
                        Node nNode = list.item(i);
                        NodeList sList = nNode.getChildNodes();
    
                        if (sList.item(1).getFirstChild().getNodeValue().equals("0")) {
    
                            arr[i][0] = sList.item(3).getFirstChild().getNodeValue();
                            arr[i][1] = sList.item(7).getFirstChild().getNodeValue();
                            arr[i][2] = sList.item(11).getFirstChild().getNodeValue();
    
                        }
                    }
                    conn=null;
                    docBuilderFactory = null;
                    docBuilder = null;
                }
            } catch (IOException e) {
                // TODO Auto-generated catch block
                e.printStackTrace();
            } catch (ParserConfigurationException e) {
                // TODO Auto-generated catch block
                e.printStackTrace();
            }
    
            return arr;
        }
    
        public static EncodedImage GetPngField(String pic) throws IOException {
    
            EncodedImage imageField = null;
            HttpConnection picon = null;
    
                picon = (HttpConnection) Connector.open(pic);
                picon.setRequestMethod(HttpConnection.GET);
    
            try {
                if (picon.getResponseCode() == HttpConnection.HTTP_OK) {
    
                    DataInputStream inputStream = picon.openDataInputStream();
                    ByteArrayOutputStream byteArrayOutputStream = new ByteArrayOutputStream();
    
                    byte[] buffer = new byte[5120];
                    int len = 0, imageSize = 0;
    
                    while (-1 != (len = inputStream.read(buffer))) {
                        byteArrayOutputStream.write(buffer);
                        imageSize += len;
                    }
    
                    byteArrayOutputStream.flush();
                    picon.close();
                    picon=null;
                    byte[] imageData = byteArrayOutputStream.toByteArray();
                    byteArrayOutputStream.close();
                    byteArrayOutputStream = null;
                    inputStream = null;
                    //imageField = PNGEncodedImage.createEncodedImage(imageData, 0, imageSize);
                    EncodedImage pngImage = PNGEncodedImage.createEncodedImage(imageData, 0, imageSize);
                    imageField = resizeImage(pngImage,55,55);
    
                }
            } catch (IOException e) {
                // TODO Auto-generated catch block
                e.printStackTrace();
            }
    
            return imageField;
        }
    
        public static EncodedImage resizeImage (EncodedImage png,int Height, int Width) {
    
            int currHeight,currWidth,multH = 0,multW = 0;
    
            try {
    
                currHeight = png.getHeight();
                currWidth = png.getWidth();
                multH = Fixed32.div(Fixed32.toFP(currHeight),Fixed32.toFP(Height));
                multW = Fixed32.div(Fixed32.toFP(currWidth),Fixed32.toFP(Width));
    
            } catch (Exception e) {}
    
            return png.scaleImage32(multH,multW);
        }
    }
    

    I have

    hyoryeo wrote:

    Thanks ydarishy & peter_strange, I just point the programmer SR. is not recommended to use the wire in my workplace. But I think that the wire is the good way to make my faster program because I found that the wire would be used in many places in the Blackberry. Then I would practice the Thread in the test project.

    have been changes to the program and use the wire, saw the fastest forward speed. I would add the bar of charge process if necessary of the head. Thanks ydarishy & peter_strange,.

    SmartoneVodafoneServices.java

    import java.util.Vector;
    
    import net.rim.blackberry.api.browser.Browser;import net.rim.blackberry.api.browser.BrowserSession;import net.rim.device.api.servicebook.ServiceBook;import net.rim.device.api.servicebook.ServiceRecord;import net.rim.device.api.system.Characters;import net.rim.device.api.ui.Color;import net.rim.device.api.ui.DrawStyle;import net.rim.device.api.ui.Field;import net.rim.device.api.ui.UiApplication;import net.rim.device.api.ui.component.LabelField;import net.rim.device.api.ui.container.HorizontalFieldManager;import net.rim.device.api.ui.container.MainScreen;import net.rim.device.api.ui.container.VerticalFieldManager;import net.rim.device.api.ui.decor.Background;import net.rim.device.api.ui.decor.BackgroundFactory;
    
    public class SmartoneVodafoneServices extends UiApplication {
    
       public static void main(String arg[]) throws Throwable {      SmartoneVodafoneServices application = null;      application = new SmartoneVodafoneServices();     application.enterEventDispatcher();   }
    
       public SmartoneVodafoneServices() throws Throwable {          pushScreen(new SmartoneVodafoneServicesScreen()); }}
    
    class SmartoneVodafoneServicesScreen extends MainScreen {
    
      private String url = "http://202.140.96.134:8080/Hero/shortcuts_demo.xml";
    
      private static ServiceBook sb = ServiceBook.getSB();  private static ServiceRecord[] records = sb.findRecordsByCid("BrowserConfig");    private HorizontalFieldManager mainHManager = new HorizontalFieldManager(Field.FIELD_VCENTER);    private VerticalFieldManager colum1 = new VerticalFieldManager(Field.FIELD_HCENTER);  private VerticalFieldManager colum2 = new VerticalFieldManager(Field.FIELD_HCENTER);  private VerticalFieldManager colum3 = new VerticalFieldManager(Field.FIELD_HCENTER);  private VerticalFieldManager colum4 = new VerticalFieldManager(Field.FIELD_HCENTER);  private VerticalFieldManager colum5 = new VerticalFieldManager(Field.FIELD_HCENTER);
    
        private Vector col = new Vector();
    
      public SmartoneVodafoneServicesScreen() throws Throwable {        super();      LabelField title = new LabelField("Smartone Vodafone Services",               DrawStyle.ELLIPSIS | Field.USE_ALL_WIDTH | DrawStyle.HCENTER);        setTitle(title);      col.addElement(colum1);col.addElement(colum2);col.addElement(colum3);col.addElement(colum4);col.addElement(colum5);       Background bg = BackgroundFactory.createSolidBackground(Color.BLACK);     getMainManager().setBackground(bg);       SmartoneVodafoneServicesScreen screen = this;     ConnectXMLThread startMainThread = new ConnectXMLThread(url,col,mainHManager, screen);        startMainThread.start();      //startMainThread.wait(30000);
    
      } 
    
      public BrowserSession createWAPBrowserSession()   {     // If there are browser services found - search for the WAP2      // Service Record     String uid = null;        int numRecords = records.length;      for( int i = 0; i < numRecords; i++ )      {         ServiceRecord myRecord = records[i];          if (myRecord.getUid().equals("WAP Browser Smartone")==true){              uid = myRecord.getUid();          }     }     return Browser.getSession(uid);   } public boolean keyChar(char key, int status, int time)       {         switch (key) {            case Characters.ESCAPE:                    System.exit(0);                   break;           }         return true;          //return true to indicate that a key was pressed      }}
    

    ConnectXMLThread.java

    import java.util.Vector;
    
    import javax.microedition.io.Connector;import javax.microedition.io.StreamConnection;
    
    import net.rim.device.api.ui.UiApplication;import net.rim.device.api.ui.container.HorizontalFieldManager;import net.rim.device.api.ui.container.VerticalFieldManager;import net.rim.device.api.xml.parsers.DocumentBuilder;import net.rim.device.api.xml.parsers.DocumentBuilderFactory;
    
    import org.w3c.dom.Document;import org.w3c.dom.Node;import org.w3c.dom.NodeList;
    
    public class ConnectXMLThread extends Thread {
    
      private StreamConnection conn;    private Document doc; private Vector vector = new Vector(); private String url;   private Vector col;   private HorizontalFieldManager mainHManager;  private SmartoneVodafoneServicesScreen screen;
    
      //public ConnectXMLThread(long startApplication) {    public ConnectXMLThread(String url, Vector col, HorizontalFieldManager mainHManager, SmartoneVodafoneServicesScreen screen) {     // TODO Auto-generated constructor stub       //this.starttime = startApplication;      this.url = url;       this.col = col;       this.mainHManager = mainHManager;     this.screen = screen;
    
       }
    
       public void run() {       try {         conn = (StreamConnection) Connector.open(url);            DocumentBuilderFactory docFac = DocumentBuilderFactory.newInstance();         DocumentBuilder docBui = docFac.newDocumentBuilder();         doc = docBui.parse(conn.openInputStream());           NodeList list = doc.getElementsByTagName("item");
    
               for (int i = 0; i < list.getLength(); i++) {               Node nNode = list.item(i);                NodeList sList = nNode.getChildNodes();
    
                 if (sList.item(1).getFirstChild().getNodeValue().equals("0")) {                   String[] arr = new String[3];                 arr[0] = sList.item(3).getFirstChild().getNodeValue();                    arr[1] = sList.item(7).getFirstChild().getNodeValue();                    arr[2] = sList.item(11).getFirstChild().getNodeValue();                   vector.addElement(arr);               }         }         Vector threadList = new Vector(vector .size());           for (int i = 0; i < vector.size(); i++) {              String[] arr = (String[]) vector.elementAt(i);                String img = arr[1];              String url = arr[2];
    
                    ConnectPNGThread requestThread = new ConnectPNGThread(img, url, i,col,screen);                requestThread.start();
    
                  threadList.addElement(requestThread);
    
               }
    
               //System.out.println("Wait for threads to complete");         boolean isComplete = false;           while (!isComplete) {             // NetworkThread.sleep(500);              for (int i = 0; i < threadList.size(); i++) {                  if (((ConnectPNGThread) threadList.elementAt(i)).isAlive()) {                     isComplete = false;                       break;                    }                 if (i == threadList.size() - 1) {                     isComplete = true;                    }             }         }         //final long endApplication = System.currentTimeMillis();         UiApplication.getUiApplication().invokeLater(new Runnable() {             public void run() {                   for (int num = 0; num < 5; num++) {                        mainHManager.add((VerticalFieldManager) col.elementAt(num % 5));                  }                 screen.add(mainHManager);                 //Dialog.alert(Long.toString((endApplication - starttime)));              }         });
    
             System.out.println("All threads are complete");       } catch (Exception e) {
    
         }
    
       }
    
    }
    

    ConnectPNGThread

    import java.io.ByteArrayOutputStream;import java.io.DataInputStream;import java.util.Vector;
    
    import javax.microedition.io.Connector;import javax.microedition.io.StreamConnection;
    
    import net.rim.blackberry.api.browser.BrowserSession;import net.rim.device.api.system.EncodedImage;import net.rim.device.api.system.PNGEncodedImage;import net.rim.device.api.ui.Color;import net.rim.device.api.ui.Field;import net.rim.device.api.ui.Graphics;import net.rim.device.api.ui.component.BitmapField;import net.rim.device.api.ui.component.LabelField;import net.rim.device.api.ui.container.VerticalFieldManager;
    
       public class ConnectPNGThread extends Thread {
    
          private StreamConnection picon;       private int p;        private Vector col;       private String img;       private String url;       private SmartoneVodafoneServicesScreen screen;
    
            public ConnectPNGThread(String img, String url, int i, Vector col, SmartoneVodafoneServicesScreen screen) {           // TODO Auto-generated constructor stub           super();          this.img = img;           this.url = url;           this.p = i%5;         this.col = col;           this.screen = screen;     }
    
         public void run() {       //public NetworkThread() {            try {             picon = (StreamConnection) Connector.open(img);               DataInputStream inputStream = picon.openDataInputStream();                ByteArrayOutputStream byteArrayOutputStream = new ByteArrayOutputStream();                byte[] buffer = new byte[5120];               int len = 0, imageSize = 0;               while (-1 != (len = inputStream.read(buffer))) {                  byteArrayOutputStream.write(buffer);                  imageSize += len;             }             picon.close();                byteArrayOutputStream.flush();                byte[] imageData = byteArrayOutputStream.toByteArray();               final EncodedImage pngImage = PNGEncodedImage.createEncodedImage(imageData, 0, imageSize);                final BitmapField myBitmapField = new BitmapField(pngImage                        .getBitmap(), Field.FIELD_VCENTER | Field.FOCUSABLE) {                    protected boolean invokeAction(int status) {                      // BrowserSession site = Browser.getDefaultSession();                     BrowserSession site = screen.createWAPBrowserSession();                       site.displayPage(url);                        return true;                  }
    
                       protected void paint(Graphics g) {                        g.setBackgroundColor(Color.BLACK);                        g.drawRoundRect(0, 0, getWidth(), getHeight(), 10, 10);                       g.setColor(Color.WHITE);                      super.paint(g);
    
                     }
    
                   };
    
                  VerticalFieldManager c = (VerticalFieldManager) col.elementAt(p);             c.add(new LabelField(" ", LabelField.NON_FOCUSABLE));             c.add(myBitmapField);
    
                  } catch (Exception e) {               //e.printStackTrace();                System.out.println(e.toString());         }     }
    
        }
    
    
    
  • Close application when the application switch menu item to invoke

    Hello, I made application for blackberry (os 5,6,7), but it has a strange behavior.

    When I press the switch application menu item, my request is close, so I can't get back to my application once I switched to another application.

    I have replace my onClose to be like this

    public boolean onClose()
    {
    This.Close ();
    Returns true;
    UiApplication.getUiApplication () .requestBackground ();
    getApplication () .requestBackground ();
    Returns true;
    }

    but the problem remains.

    Please help me solve this problem

    When you change your application, the close method is not pushed directly so I think that you look elsewhere this

    Try to use the Application Switch with an application example - say the sample HelloWorld application.  I think he won't, which suggests that the problem is in your application.

    There are three places to look:

    (a) the Application disable method is pressed when the request is sent to the background.  Maybe you have coded it and it closes the application

    (b) you have a certain type of background processing controls (isForeground()) and reacts according to what it finds.

    (c) in the method onObscured() to one of theFields/screen on the display at once.  .

    Other than that, I think you're looking for a general bug in your application.  The starting point is to look at the debugging log when you do this - look for anything from your application you consider odd.

  • Popup to display on the application startup

    Hello

    I want to display a dialog box to start the application. I made a custom dialog box and opens it on

    onCreationCompleted of main.qml, but it does not appear.

    for some reason the dialog boxes do not work onCreationCompleted but if you set a variable in your root container

    Page {
       Container {
           id: root
           property bool appOn
    
           onAppOnChanged: {       myDialog.open();       //if it wont open on the variable change do it in a timer
           dialogTimer.start();
    }
    
        onCreationCompleted: {
           root.appOn = true;
        }
       }
    }
    

    It may not work on a change of variable, but it works on a timer.

    example on how to set up a timer

    Timer {
                    id: dialogTimer
                    interval: 0
                    onTimeout: {
                        myDialog.open()
                        dialogTimer.stop()
                    }
                }
    
  • Allowing the Application Switch

    After looking at a lot of post about how to remove the context menu item Application Switch, I have an application that doesn't show at all, and I want it to be displayed.

    I have a great class called (summary btw) BaseScreen that overrides the makeContextMenu call method to the method of the superclass.

    protected void makeMenu (menu Menu, for example int) {}

    super.makeMenu (menu, for example);

    }

    My screens inherit from BaseScreen, and they also overrides this method and finally calling the super method

    protected void makeMenu (menu Menu, for example int) {}

    menu. Add (myMenuItem);

    .....

    super.makeMenu (menu, for example);

    }

    But I don't see that the menu item close. And want to support the Application Switch menu item.

    If anyone have experienced this?

    I work with 9000 "BOLD" (4.6) and Curve 8310 (4.5) and I see the same behavior.

    Thank you

    -f4

    ----

    http://supportforums.BlackBerry.com/T5/Java-development/add-quot-switch-application-quot-menu-item-i...

    If you look at the second post of MSohm, it says that the Application Switch menu item was introduced in 4.7. So you won't see it on the 9000 Bold and Curve 8310.

  • Order the application for blackBerry Smartphones switch

    I recently noticed that my 'Application Switch' command does not work. I always and already "press and held" the Blackberry icon, but the screen is displayed. I want to assure you that I don't have too many applications running at once. Help please? Thank you

    Press once on BB and chose the application switch, if that does not work then

    Try a battery pull if you please, with the BlackBerry device powered on, remove the battery 15 seconds and then reinsert the battery to reboot the device. This will clear all hide as restarting a PC. Then try again and see if the problem persists.

  • Developer Mode error: outdated., the xxAM.xxVO1 view object contained no trace. The records displayed may have been deleted, or the current record of the view object is not properly initialized.

    Hi all

    I'm creating a Maunal search page.

    To do this, I created a view based on a custom display object.

    Page contains 2 parameters.

    If I give all settings and click the OK button.

    It gives the following error.

    Developer Mode error: outdated data


    This page contains outdated information. This error could have been caused by the use of the buttons of the browser (the browser back button, for example). If the browser navigation buttons were not used, this error may result from coding errors in the application code. Please check press the back button on the browser developer guide - view primary key object comparison section to review the main cause of this error and correct the mistakes of coding.


    Cause:
    The view BLTrinDisplayAM.ViewVO1 object did not contain any record. The records displayed may have been deleted, or the current record of the view object is not properly initialized.

    To visit, please click on the Home link at the top of the application page to return to the main menu. Next, go to this page using the app's navigation controls (menu, links and so on) rather than use the controls of the browser as rear or front.

    If I don't give any parameter and click go Button.The content of the view are displayed.

    So if I pass all parameters and click Go, then the corresponding record is displayed.

    Why, for the first time, if I give the parameter and click Go, obsolete data error is coming?

    Please help me.

    Grateful for your help!

    -Aren

    You use the object of the view for the search criteria and search results fields.

    I suggest you to remove references of VO fields of search criteria, item1 and item2.

    And in the event of the button 'Go' in the processFormRequest, get the criteria for field values entered by the user as below and run the object (ViewVO1) of the view by using these values.

    String buCode = pageContext.getParameter ("item1");

    String lsiCode = pageContext.getParameter ("item2");

    Thank you

  • report interactive apex 5, pivot action does not display columns in the application developed on 4.2.6

    I just installed apex 5.01 on apex 4.2.6.

    When I want to use the pivot of the action on an interactive report developed on 4.2.6 the names of the columns does not appear.

    If I add a new column, it seems

    calculated columns displayed

    Thank you

    Hello

    The pivot must be enabled for these columns.  To do this, you can upgrade the application developed in 4.2.6 as follows:

    -Click on the application

    -Click utilities

    -Click on the Application upgrade

    -Activate the IR Pivot should appear.  Click on the number of candidate object

    -You can select some or all of the IRs to upgrade

    Kind regards

    Christina

  • Stop the automatic execution of the View object without setting to insert only?

    Hello

    I have a View object that is used to insert only.  However, as I have to be able to filter through the lines not validated with a view criteria, I can't put the View tuning object to insert only.

    I do not want to run queries to the database because the attribute I am filtering by is a transitional attribute that is set when a new line is created.  The only purpose of this attribute should be used for filtering.  When my VO runs a query, I get an error because this attribute is not in the table of database mapped to the VO.  Currently, this attribute is added to the EO and I added it to the VO as attribute 'of the entity.  Another reason, I want to query the DB is because there are more than 500 k rows in the table.

    In short, I need a way to stop all the display object queries until I called the line below but I can't adjust the View object to insert only.

    welltdwVO.setQueryMode(ViewObject.QUERY_MODE_SCAN_UNPOSTED_ENTITY_ROWS);
    

    Thanks for reading.

    Hello

    First keeping a transitional attribute at the level of the entities should not raise an error make sure you follow the instructions.

    http://docs.Oracle.com/CD/E21764_01/Web.1111/b31974/bcentities.htm#BABHGCAH

    Secondly, to prevent the execution of the query you can run together of empty lines on the view object, before displaying the page. If an iterator is involved, and it doesn't have to be so also on the property of RowCountThreshold-1.

Maybe you are looking for

  • Don't forget icloud ID and the password

    HIII My little brother create icloud account and he earased the iphone 5. When I tried to open it, they ask me to the icloud ID and password, but my brother forgets the ID and the password. How can we open the device?

  • Satellite A660-17F - no option "restore to out of the box.

    Hello! I have a laptop of toshiba a660-17th with windows 7 64 bit.It's fantastic and I got it for at least 3 years. It came not with all drives, and there the recovery partition. Some time ago my hard drive broke down. I had to replace it with a new.

  • Toshiba 40TL938G - find the date and time settings

    I have a 40TL938G and I can't find the date and time settings.Can someone help me? SSYI read the manual and it does ' t say anything about these settings. THX

  • Water damage map MOTHER V3 - 772 G (need replacement)

    Dear community, So my little baby brother dropped water on my laptop, I'm looking for a replacement and found 2 links. I was wondering if the two are supported for my laptop since I. Model no va73v3 - 772 G-54208G50Makk Currently I have the motherboa

  • Reset Password Admin on my Windows 7 PC

    I have two account on my pc which is windows 7. The account has a password. What can I do to recover the password so that I don't lose anything on my PC? And 01:00 using, I can't use youtube or facebook.