Welcome!

Welcome to the official BlackBerry Support Community Forums.

This is your resource to discuss support topics with your peers, and learn from each other.

inside custom component

Java Development

Reply
New Developer
Posts: 36
Registered: ‎10-29-2009
My Device: Not Specified

How to change the field value of a the previous screen when ever poping up the current screen

I am having two screens. I am showing first screen and after that showing second screen. When ever I am poping the screen , I need to change the field in the first screen.

 

I have written in the onexpose method of first screen like this.

 

protected void onExposed() {

             delete(bm);
            bm = backToLoanResultsFields;
            add(bm);

 

// bm is one of my manager and other manager is backToLoanResultsFields

}

 

I have tried by using replace(bm,backToLoanResultsFields); But it is not working.

 

Plse suggest me

Developer
Posts: 193
Registered: ‎04-27-2009
My Device: Not Specified

Re: How to change the field value of a the previous screen when ever poping up the current screen


nnvnaveen wrote:

I am having two screens. I am showing first screen and after that showing second screen. When ever I am poping the screen , I need to change the field in the first screen.

 

I have written in the onexpose method of first screen like this.

 

protected void onExposed() {

             delete(bm);
            bm = backToLoanResultsFields;
            add(bm);

 

// bm is one of my manager and other manager is backToLoanResultsFields

}

 

I have tried by using replace(bm,backToLoanResultsFields); But it is not working.

 

Plse suggest me


 

You have to write  code in onExposed() method of second screen. In onExposed method of second screen you have to nmodify field of first screen.

Developer
Posts: 467
Registered: ‎07-16-2009
My Device: Z10 LE
My Carrier: Vodafone NL

Re: How to change the field value of a the previous screen when ever poping up the current screen

I see two possible variants:

 

1) onExposed isn't invoke.

2) field managment in onExposed doesn't metter because something.

 

Can you confirm by debug what variant is correct?

Developer
Posts: 19,629
Registered: ‎07-14-2008
My Device: Not Specified

Re: How to change the field value of a the previous screen when ever poping up the current screen

anilsisodiya is not correct, the onExposed you should be overriding is on the first screen.

 

As Eugen suggests, debugging this should find the problem very quickly.

New Developer
Posts: 36
Registered: ‎10-29-2009
My Device: Not Specified

Re: How to change the field value of a the previous screen when ever poping up the current screen

Can anyone provide some sample code for this.