Send class parameters

Hello

I want the code for a class of grid control.

I have a main screen. and data grid screen.

I want to send some settings from the main screen to the screen of data grid.

Example Code:

class of the main table that provides the constructor to display the user interface components
dataGrid class extends UiApplication implements TrackwheelListener {KeyListener
   
Private members of the class of table
Private VerticalFieldManager mainVerticalManager;
private VerticalFieldManager vfmColumns [];
Private HorizontalFieldManager mainHorizontalManager;
   
main function that serves as an entry point for the application of BlackBerry
Calls the constructor of the dataGrid control to display the user interface components
    Public Shared Sub main (String [] args)
{
dataGrid app = new dataGrid (args [1], args [2], args [3], args [4]); / / it is wrong, I know.

app.enterEventDispatcher ();
}
   
dataGrid constructor
    public dataGrid (String strGridTitle, int intColumnCount, String [], String [] astrColumnValues astrColumnTitles)
{
Instance of full screen (extends the screen) to display all the user interface components on
GridScreen FullScreen = new FullScreen();
....

}

}

I need 4 parameter entry in the dataGrid class. How can initialize this class dataGrid with these settings?

I have to build this class dataGrid as follows:

dataGrid frmDataGrid = new dataGrid (param1, param2, param3, param4);

But how can I build this class. There are 4 parameters and types are a string, an integer, and two string array.

I searched this forum for this problem but I can't find or I just can't find the right search key.

Thanks for your help,

Ferhat Ikbal

www.bestcoder.NET

I solved the problem. Thank you

Tags: BlackBerry Developers

Similar Questions

  • Send class increment on the same parameter?

    Please help me...

    IM creating a simple code like this

    package mypackage;
    
    import net.rim.device.api.ui.Field;
    import net.rim.device.api.ui.FieldChangeListener;
    import net.rim.device.api.ui.UiApplication;
    import net.rim.device.api.ui.component.ButtonField;
    import net.rim.device.api.ui.component.LabelField;
    import net.rim.device.api.ui.container.MainScreen;
    
    public class TestScreen extends MainScreen implements FieldChangeListener{
    ButtonField tambah;
        public TestScreen(int offset){
    
            add(new LabelField("Offset = "+offset));
            tambah = new ButtonField("Tambah");
            tambah.setChangeListener(this);
            add(tambah);
    
        }
    
        private void test(int offset){
            TestScreen screen = new TestScreen(offset + 10);
            UiApplication.getUiApplication().pushScreen(screen);
        }
    
        public void fieldChanged(Field field, int offset)
        {
            if(field==tambah){
                test(offset);
    
            }
        }
    }
    

    at the first offset click Get 10? but the second offset click get same result (10)...
    I want while I click on the... button compensate for the increment of 10, 20, 30 and the next...

    Please help me master2...

    Please modify your code for:

    public class TestScreen extends MainScreen implements FieldChangeListener{
    ButtonField tambah;
    int offset;
        public TestScreen(int offset){
            this.offset=offset;
            add(new LabelField("Offset = "+offset));
            tambah = new ButtonField("Tambah");
            tambah.setChangeListener(this);
            add(tambah);
    
        }
    
        private void test(int offset){
            TestScreen screen = new TestScreen(offset + 10);
            UiApplication.getUiApplication().pushScreen(screen);
        }
    
        public void fieldChanged(Field field, int context)
        {
            if(field==tambah){
                test(offset);
    
            }
        }
    }
    
  • with two parameters of submit button

    Hello

    You are able to send two parameters in a submitForm by javascript? I would like to send the pdf itself over its xml to a servlet.

    Thank you

    See this class getDocuments method. You can get all attachments using Java code.

    http://help.Adobe.com/en_US/LiveCycle/9.0/programLC/Javadoc/com/Adobe/LiveCycle/formsservi ce/client/FormsServiceClient.html

    Thank you

    Srini

  • Problem in sending parameter user_id in Google Analytics.

    Hello

    I want to implement Google Analytics in my application.

    To do this, I need to send some parameters that include:

    v = version no

    CID = user id (here I add the imei only)

    TID = id tracking

    etc...

    Now in my application, there is a login form, when the user gets the connection that I have to send the UserID as well as the other parameters, as shown above.

    So I want to know what I can send the user id ('user_id', 10) like this?

    Otherwise, what is the key to user_id?

    Google analytical application in your application.

    Please see this link...

    https://developers.Google.com/analytics/devguides/collection/protocol/v1/DevGuide

  • Attempt to send Email but no success

    Hello guys,.

    I wrote a code to send an Email. But not send Mail. The Code is below

    sending class extends screen
    {
    Its session = null;
    public sending()
    {
    Try
    {
    its = session.getDefaultInstance ();
    Store store = null;
    Transport tp = null;
    if(ses!=null)
    {
    Store = its .getStore ();
    TP = its .getTransport ();
    }
    String emailAddress = "[email protected]";
    If ((Store!=null) & (tp! = null))
    {
    E-mail message = New Message();
    If (emailAddress! = null &! emailAddress.equals(""))
    {
    email.addRecipient (Message.RecipientType.TO, new Address (emailAddress, emailAddress));
    }
    Void String = null;
    String content = 'This is first BB to Yahoo email';
    void = "Hello Nitin";
    email.setSubject (sub);
    email.setContent (happy);
    TP. Send (email);
    System.out.println ("Success sending Email");
    }
    on the other
    {
    System.out.println ("could not send emails");
    }
    } catch (Exception ex) {}
    }
    }

    What I would do.

    The best link I can give you is that you already have - the search button.  I suggest that you use.  Then you will find the article for this problem and other resources that will be useful for other problems you will have.

    You also help us to help by answering the questions that people ask and working on the problem yourself.  If you say

    "I want to know what is the problem with this Code."

    can you ask someone to read your code, test, understand, guess your test environment and then guess where is the problem and try to write a response.  It's a lot of work.  You need to make it easy for people to help you.  Then tell us exactly what you're doing, how you are testing, and what you see.  Then we can focus on where the problem is in fact rather than trying to figure out where it is.

    I think you will find an answer to your problem in this thread:

    http://supportforums.BlackBerry.com/T5/Java-development/sending-mail-with-OS-4-2-code-snippet/TD-p/5...

  • GET THE HTTP REQUEST PARAMETERS

    Hello

    How can I send three parameters through GET on my server, I need to send three sttrings generated in my application on the server.

    I've tried with network application of Pentecost without success, demand will, but parameters never arrive

    QNetworkAccessManager * Manager = new QNetworkAccessManager (this);
    Application of QNetworkRequest (QUrl ("http://server.php"));
    request.setRawHeader ("to", "email");
    request.setRawHeader ("title", "hello");
    request.setRawHeader ("msg", "text messages");

    Manager-> get (request);

    Thank you

    You could add the strings as GET parameters to the URL:

    QUrl ("http://server.php?to=email&title=hello&msg=text+msg");

    But I think you should PUT these fields to the server because the URL has a maximum length:

    QByteArray data;

    Data.Append ("[email protected] &"); ")

    Data.Append ("title = Hello World &"); ")

    Data.Append ("msg = Hello World! Are you okay? ») ;

    Manager-> post (request, data);

    I have it wrapped in a method that takes QMap as parameter and returns QByteArray, because it's quite annoying to keep in mind to add '&' between each pair of key / value.

  • problem with sending mail after sending by GET

    Hello. i've got such a problem-i can send a screenshot to the server by HTTP using the POST method like this:

              Bitmap _bitmap = new Bitmap(Display.getWidth(), Display.getHeight());
                Display.screenshot(_bitmap);
    
                JPEGEncodedImage _jpg = JPEGEncodedImage.encode(_bitmap, 20);
                DataBuffer _db = new DataBuffer();
                _db.write(_jpg.getData());
    
                _http = (HttpConnection)
                            Connector.open(_url, Connector.READ_WRITE);
    
                _http.setRequestMethod("POST");
    
                _http.openOutputStream().write(_db.toArray());
    

    and it works well. but now i need, initially, send some parameters (such as the IMEI) using GET and then this screenshot using POST (the same as in this code I do this more or less like this:)

    URLEncodedPostData _u = new URLEncodedPOstData(null, false);_u.append("imei", "123456789");   
    
        _http = (HttpConnection)
                Connector.open(_url+_u, Connector.READ_WRITE);
         DataInputStream _dis = _http.openDataInputStream(); 
    
         Bitmap _bitmap = new Bitmap(Display.getWidth(), Display.getHeight());
                Display.screenshot(_bitmap);
    
                JPEGEncodedImage _jpg = JPEGEncodedImage.encode(_bitmap, 20);
                DataBuffer _db = new DataBuffer();
                _db.write(_jpg.getData());
    
                        _http.setRequestMethod("POST");
    
                _http.openOutputStream().write(_db.toArray());
    

    but this gives me an IOException! but still even with IOException I log and server gets the imei that was sent using GET. I noticed that the problem is caused by this line:

    _HTTP.setRequestMethod ("post");

    I put it right after the connection:

    _httpConnection = (HttpConnection)Connector(_url+_u, Connector.READ_WRITE);_httpConnection.setRequestMethod("POST");
    

    now, I only get an IOException, and always the server will not get my picture. only the imei...

    Why is this? Why can I not use post after get? or what I am doing wrong?

    thx for any suggestion...

    Kind regards!

    Hi, problem solved. I have new httpConnection each time so that I could not do that. now it's ok.

    Kind regards

  • Where the parameters to retrieve sent from another application

    I'm launching my native application of the native application, I'll send some parameters of chain, as well as codfile name, where and how I could recover the parameters send in my application?

    ApplicationManager.getApplicationManager (.launch("yourCodFileName?param1¶m2"));

    Where can I retrieve param1 and param2 in my application?

    Concerning

    Rakesh shankar. P

    args [] in your main method

  • Additional parameters to a service of the population "dataRef.

    Is it possible to send more than one option setting 'dataRef"of a mobile form via a URL?

    , It seems as if only one parameter can be included, but additional parameters are ignored when passed in a URL. For example: http://server:8080/lc/content/dam/lcapplications/theApp/1.0/Forms/theForm.xdp/jcr:content? type = html & dataRef = http://Server: 8080/rest/services/PAP/Services/applications/filling/New? fi rstGUID = ABCD & second = 2014 & anotherID = things.

    I tried a number of combinations of?'s, Roger and the encoding of the URL without success. Separately, the service rendered and the population services work well. Recording and playback shows the parameters passed correctly when called alone and one parameter only when passed as part of the URL dataRef.

    I understand the dataRef parameters. To be able to send several parameters for the service that you are referring to in the dataRef parameter, you need to HTML to encode it all dataRef =... part of the URL.

  • How to send more than one parameter to A pop - up region

    Hello

    I am trying to send several parameters to my popup OFA set (standard) in version 12.1.3.

    According to the Guide of Dev OAF, I can use this field to send 'Specify parameters of basic page to move to the area of popup, if the pop type is set.'

    I can send a single parameter (e.g. * pItemID={@ItemID}*), but I do not know how to send another parameter. Using commas or spaces as delimiters
    doesn't seem to work.

    What is the correct syntax to send several parameters?

    Thank you, RMH

    Hello

    I have not tried, but you can follow the approach below.

    popupBean1.setParameters ("pItemID = {@ItemID} & deptNo = {@Deptno}")

    Kind regards
    GYAN

  • passing parameters to a procedure of url

    Hello

    I use the Express 4 Application, in which my requirement is as follows:
    (a) conduct a redirection to a url by using pl/sql procedure "authenticate" when the page loads
    as follows:
    return_to_uri varchar2 (2000): = ' http://mysite.com: < port_no > /apex/ < my_schema >. < package_name >. < procedure_name > ';
    openid_uri varchar2 (100): = 'https://www.google.com/accounts/o8/id;
    build_uri: = '? NS = http://something.com'
    || '& id2 = http://something2.com'
    || '& id3 = http://something3.com'
    || '& return_to =' | UrlEncode (return_to_uri);
    v_redirect_url: = openid_uri | build_uri;
    owa_util. REDIRECT_URL (v_redirect_url);

    The above procedure performs a redirect url to Google successfully and send some parameters added to
    return_to_uri' so ' http://mysite.com: < port_no > /apex/ < my_schema >. < package_name >. < procedure_name >? NS = http://something.com & param_id = AQRST1299STR4 & param_id2 = 1QPL86GBN4JK55F';

    However, it always gives me error BAD URL.

    I get the params individually as follows in the procedure:

    procedure get_redirect (p1 in varchar2, p2 in varchar2, p3 in varchar2)
    Start
    < redirect here once again to a valid apex application >
    end;

    I gave approval to run on APEX_PUBLIC_USER and the PUBLIC procedure.
    I don't know if something like this is possible. Is it the signs '&' in the url that is the problem. I tried searching for it but I'm still not able to get any useful resource.
    Any help would be greatly appreciated.
    Thank you

    possibly an apache rewrite rule can help, something that identifies the query based on the name of your procedure and converts the URL for procedure parameter names. You can even google Server provide a dummy URL that can handle your HTTP server using a rewrite rule redirect to the URL and real procedure
    Here are some links that may help you get started in this direction

    Oracle Application Express (APEX)
    http://httpd.Apache.org/docs/1.3/mod/mod_rewrite.html

  • How to send a document in net. HTTP.request as a POST variable?

    I have read and reread the doc on the net. HTTP.request and he says I can pass an argument to oRequest, but I failed to pass in the current document, which is what I want to do.

    I tried app.activeDocs [0], or the encoding of a string, but if he makes the call with no error, nothing is sent.

    ORequest must be a single document, or a variable consisting of name-value pairs? How to send multiple parameters to a POSITION otherwise?

    I did very well with the call using GET, but when I tried to send the document as a GET variable, I did nothing either.

    I send to an end point of LiveCycle REST so either POST or GET is fine.

    Thank you!

    Validating the document current is simple * provided * your script runs outside the context of the document (i.e. in the console or a script to the folder level). There is no access to scripts of doc-level for obvious reasons.

    For example, put this in the console JS OCCURS the current file to a URL:

    Net.HTTP.request ({}

    cVerb: 'POST',

    cURL: "http://localhost/submit.php."

    oRequest: Collab.documentToStream (this);

    oHandler: {}

    answer: function (msg, uri, err) {}

    If (err! = undefined) app.alert (msg);

    }

    }

    });

    Your problem talking to a vanilla Web service, is that you can send the RFC1867 delimiters (i.e. the form apply for "multipart/form-data") that the ReadStream object is not a method of concatenation in the JSAPI Acrobat. It's also how you would usually precede other fields in the form, but if you are careful with your codes side server that you can send to save them as GET parameters in cURL. Normally, you'd be polite and passed a context of Type in the table of aHeaders header - it won't matter for the transmission process, but will allow your webservice predict what that heck he was sent.

    Your webservice will then read the raw data. PHP for example, you will get nothing in the $_FILES global, but you can grab the PDF by reading all of the input buffer, with the line:

    $pdf = file_get_contents() ("php://input");

    If this line was in the server script which was the JS code above, the variable $pdf will contain an exact binary copy of the currently opened document.

  • HTTPService sends not parameter

    I'm quite new to Flex/Flash programming; However, I am quite familiar with OBJECT oriented programming. I use Flex 4 for this project.

    I am running into a problem of transmission of a parameter in an aspx file using HTTPService. I tested the aspx file in a browser (which generates xml data) and it works perfectly well with results showing as expected. The function I use to call my data is used in the application as "creationComplete" tag

    For some reason any the following does not send a parameter...

    private function init (): void {}

    var params: Object = {};

    params ["Act"] = "count with all."

    httpServ.send (params);

    }

    .. compare this code sends a request to the page and gets the output I've provided for sending no parameters (which is nothing; no xml). So a datagrid empty!

    However, after some research on googled around, I found other methods of adding a parameter and came across this method...

    private function init (): void {}

    httpServ.url = "http://localhost/awesomedir/FreeServ.aspx'+' '? ' + 'Act = count with all'; "

    httpServ.send ();

    }

    It works like a charm. Absolutely perfect... I get the xml data in my datagrid.

    I really want to get the first approach to work and the approach I've seen where params ["Act"] = "count with all." becomes params.act = count with "all"; but I had no luck with either. Anyone know why send the params object would fail?

    I think it depends on the code in your aspx page. I have no problem to send objects to the .NET web services.

    Maybe your main code expects parameters of url rather than the real settings?

  • How to pass the parameters or values film double hollow?

    Hello

    I create a game in Flash 8 with 2 AS and I have some questions to ask.

    First of all, I'm stuck for 2 days to create a tower Laser beam to the target.

    I searched the internet for solutions but I can't really find one, so I'll try display of questions myself...

    First I tried to create, and the effectHolder in which each laser beam has been created, because it seems I can create only one line in each movieClip...

    _root.duplicateMovie(effectHolder_mc , "effectHolder_" + this, _root.getNextHighestDepth());
    v = a = _root["effectHolder_" + this];
    ray.onEnterFrame = function()
    {
    v.clear();
    v.lineStyle(1,0xFF0000,100);
    v.moveTo(this._x, this._y);
    v.lineTo(creep._x , creep._y);
    v.text = "True"

    }

    It's triggered eveytime, she was a target.

    With each turn that triggered a laser that I created, it became more than offset, so I tried selfdestructing after some time.

    this._alpha -= 10;

    if (this._alpha <= 0)

    {

         this.removeMovieClip();

    }

    But he did not actually work, so I tried another solution. I tried to give each MovieClip ("Laser"), duplicate code that creates the laser beam.

    onClipEvent(load)
    {
         this.fx = from._x;
         this.fy = from._y;
         this.tx = to._x;
         this.ty = to._y;
    }
    onClipEvent(enterframe)
    {
         _root.dmg.text = "From: " + fx + "," + fy + " To: " + tx + "," + ty; //I used this on a textbox to see if parameters are transmited. But they were all 'undefined'

            this.clear();
         this.lineStyle(1,0xFF0000,100);
         this.moveTo(from._x, from._y);
         this.lineTo(to._x , to._y);

         this._alpha -= 4;
         if (this._alpha <= 0)
         {
              this.removeMovieClip();
         }
                                 
    }

    The problem is that I did not know how to pass the coordinates of the tower and the target to the MovieClip so that it knows where to create the line.

    X++;
    duplicateMovieClip(_root.Laser, "Laser" + X, X,{from._x,from._y,to._x,to._y});         
    g = _root[_root.Laser + X];
    g.fx = from._x;
    g.fy = from._y;
    g.tx = to._x;
    g.ty = to._y;

    Please leave suggestions on how to send the parameters or values for the created clip, or an idea of the creation of this line ("beam") for each tower, without so much trolling.

    Thank you

    Chris

    What is the trigger of v's _alpha decrease?

  • see link with several parameters

    Hi all:
    I use af:golink to call a new page with different parameters like the code below:
     <af:goLink text="Run Report" styleClass="xes" destination="/printreportservlet?reporttype=pdf&filename=new_report.jasper"  targetFrame="_blank"/>
    but when I use it cann't page display "website cannot display the page.

    but when I use a single parameter as:
     <af:goLink text="Run Report" styleClass="xes" destination="/printreportservlet?reporttype=pdf"  targetFrame="_blank"/>
    or
    <af:goLink text="Run Report" styleClass="xes" destination="/printreportservlet?filename=new_report.jasper"  targetFrame="_blank"/>
     
    It works successfully,
    so is there any problem to send several parameters while asking us to servlet.

    Best regards

    What happens if you put this URL in the address bar directly, it works? If it isn't, then it seems that the problem is with your servlet. If this does not work, try to escape the ampersand in the URL. I can't paste the value here, as the forum he transformed into an ampersand, but you can read [url http://articles.techrepublic.com.com/5100-10878_11-5032714.html] this

    JOhn

Maybe you are looking for

  • Restart the StampAngle.Plist question

    It is the new screen I get when my iMac restarts now, I don't know why this started happening <? XML version = "1.0" encoding = "UTF-8"? > <! DOCTYPE plist PUBLIC "-computer //Apple / / DTD PLIST 1.0 / / IN" "http://www.apple.com/DTDs/PropertyList-1.

  • Power on issue to a Satellite M70

    Hi there all the I have two of these laptops on the bench with the same problem.When you press the power button, nothing happens, no noise of the car or fan, he's just dead. I looked around the forum and have tried holding down the BACKSPACE key whil

  • HP Pavilion Sleekbook PC 14: Recovery of Windows 8: PC in a reboot cycle?

    Laptop model: HP Pavilion Sleekbook PC 14Product number: C7D58PA #AKLThe system board ID: 18F9BIOS version: F 18Editor BIOS: Insyde 64-bit Windows 8 (I think, unless he updated to 8.1 I don't know) No drive CD or DVD (Ultrabook). It is a laptop from

  • most used the disk after the complete command line defragmentation

    I did the full defragmentation by using this command in the command prompt 'defrag c: w', but when it finished I checked the properties of the hard drive that I've defragmented and in the part 'space used' he had reached about 5-8 GB more than before

  • OfficeJet Pro 8000 Wireless: Wireless Desktop 8000 jet doesn't work when connected by USB

    I used my printer wireless without problem since 2009. A few weeks ago, the wireless connection has been lost. When I tried to re-login, using the wizzard rint and scan for Windows, he doesn't get the device unless the USB cable is connected. I ran t