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
Developer
arunbiet
Posts: 381
Registered: ‎06-22-2010
My Device: na

NavigationClick problem in BitmapField

I have a HFM where i am adding a BitmapField.HFM is NON_FOCUSABLE and BitmapField is FOCUSABLE.Both of them has navigationClick.But when i click  BitmapField the nagivation of HFM executes.But the same is not true for touchEvent.In touchEvent respective toucEvents are being executed,so whats the problem with navigationClick?

Please use plain text.
Regular Contributor
milan555
Posts: 52
Registered: ‎07-04-2011
My Device: Bold-3

Re: NavigationClick problem in BitmapField

If you want to use navigation click then you must have to make your HFM FOCUSABLE.

If you do not make your HFM focusable you can not use navigation click or touch event.

So you must have to make field Focusable.

 

Please use plain text.
Developer
arunbiet
Posts: 381
Registered: ‎06-22-2010
My Device: na

Re: NavigationClick problem in BitmapField

But i want the navigation click of BitmapField should work instead of HFM

Please use plain text.
Trusted Contributor
milanvishal
Posts: 201
Registered: ‎12-17-2010
My Device: Not Specified

Re: NavigationClick problem in BitmapField

ya but you add your bitmapfield in your HFM & your HFM in unfocusable so because of that HFM your navigation click did not work.

do one thing make your HFM focusable & remove that navigation click from it ..

Then you will get proper idea...

 

Regards,

Please use plain text.
Developer
peter_strange
Posts: 19,609
Registered: ‎07-14-2008
My Device: Not Specified

Re: NavigationClick problem in BitmapField

Focus doesn't really apply to Managers.  You can't have an unfocusable Manager only Fields.  However Managers do get events like navigationClick and touchEvent so that they can figure out which Field to give the event to.

 

In addition there are complications with the interaction of navigationClick and touchEvents - touch Events 'click' can be turned in navigationClick. 

 

In addition, you have to careful when you have non focusable Fields near focusable Fields and try to use touch events, touch Events can be supplied to Fields that are not 'in focus' because they are closer to the point being touched.  You may need to check that the touch event is in the Field.

 

That said I don't really understand the question.  Can you explain the problem again, perhaps with a diagram?

Please use plain text.
Developer
arunbiet
Posts: 381
Registered: ‎06-22-2010
My Device: na

Re: NavigationClick problem in BitmapField

The question is simple.I have a Manager where i m adding fields.I have navigationClick on both the Manager and Field,coz my structure is dynamic,which means onclick attribute i will fetch from an XML.So when my Field have focus and i do click on it,instead of going to nagivation segment of Field its going to that of the Manager.So how to avoid it?

Please use plain text.
Developer
peter_strange
Posts: 19,609
Registered: ‎07-14-2008
My Device: Not Specified

Re: NavigationClick problem in BitmapField

As I mentioned above, Managers do get events like navigationClick so that they can select the Field that has been 'clicked'.  That is how the process works. 

 

Try the following two tests:

 

1) Remove navigationClick from the Manager

2) Change your navigationClick to return super.navigationClick.

 

Tell us what happens.  In both cases does the Field get the 'click'?

 

What are you trying to achieve with navigationClick in the Manager anyway?

Please use plain text.