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
Contributor
mjbarrerab
Posts: 11
Registered: ‎11-16-2011
My Device: developer
My Carrier: developer
Accepted Solution

Help validate listField.

Hi, 

 

I wonder if anyone can help me with a problem  I have a list on a screen but I need to validate that only can select in order, I appreciate if someone can help me with this issue.

Thank you.

Please use plain text.
Contributor
mjbarrerab
Posts: 11
Registered: ‎11-16-2011
My Device: developer
My Carrier: developer

Re: Help validate listField.

Please... sombody help me.!! :smileysad:
Please use plain text.
Developer
maadani
Posts: 729
Registered: ‎05-04-2011
My Device: 9700

Re: Help validate listField.

Can you please elaborate more on the problem?

 

E.

Please use plain text.
Contributor
mjbarrerab
Posts: 11
Registered: ‎11-16-2011
My Device: developer
My Carrier: developer

Re: Help validate listField.

I have a list and need to take an order of sequence, for example, if I have a list of 10 items,start from index 0, then step index 1, 2, 3 .. etc ... but I can not skip the index 0 to index 2 ...that's the validation I need to do, I hope you can understand me .... I speak Spanish and my English is very poor ..

thanks!.

Please use plain text.
Developer
maadani
Posts: 729
Registered: ‎05-04-2011
My Device: 9700

Re: Help validate listField.

Here is what I would do:

 

1. Create an object that would be in charge of the validation logic (check if the order was valid, reset validation, etc.).

 

2. Override the fieldChangeNotify to call the validation manager with the selected Item Index.

 

3. At this point, the Validation Manager check the input and decides what to do: let the user continue (validation completed successfully), display an error message (input not valid) or do nothing and wait for rest of input.

 

I think that should get you started for now.

 

E.

Please use plain text.
Contributor
mjbarrerab
Posts: 11
Registered: ‎11-16-2011
My Device: developer
My Carrier: developer

Re: Help validate listField.

madaani thanks for your help, I have the idea how to fix the problem with the explanation that you gave me.

thank you very much!

Please use plain text.