03-23-2012 09:39 AM
Hi, I have a problem. In my application I am trying to do that when I click a button on my screen load certain values in a LabelField. I've tried to do with the FocusChangedListener, but these changes only occur when changing the focus, is there anything that changes occur when I press the button? sorry for my poor English
Solved! Go to Solution.
03-23-2012 09:43 AM
03-23-2012 09:53 AM
I've tried FielChangeListener and does not work, this is my code:
...
ayudaButton = new BitmapButtonField(iconoPlayFocus, iconoPlayUnfocus);
// ayudaButton.setFocusListener(this);
ayudaButton.setChangeListener(this);
.....
public void fieldChanged(Field field, int eventType) {
if(field != ayudaButton){
return;
}
clienteInput.setText(controller.getClienteActual(
nombreInput.setText(controller.getClienteActual()
}
03-23-2012 10:04 AM
03-24-2012 08:02 AM
If you are using the BitmapButtonField class from RIM Advanced UI Samples, then you would use this:
ayudaButton = new BitmapButtonField(iconoPlayFocus, iconoPlayUnfocus){
public void clickButton() {
clienteInput.setText(controller.getClienteActual() .getId());
nombreInput.setText(controller.getClienteActual(). getNombre());
}
};
03-26-2012 04:19 AM
The problem is that in the initial screen, there is a object with anythingvalues and if you click on the BitmatButtonField, we go to another screen and updates the value of the object, and I want to do this, regenerate or paint it screen again with updated data object, is it possible??
05-21-2012 11:47 AM
Finally I added an element in a common class to all screens (class controller) to solve.