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

Web and WebWorks Development

Reply
Developer
ravi1989
Posts: 777
Registered: ‎07-21-2012
My Device: 9810

cursor is not display while using navigation

Hi  i make one list which is scrolling in blackberry 9700 using

<rim:navigation mode="focus" />


 . but i am facing some problem .list is scrolling using trackpad but cursor is not display.  can you give me some suggestion how to focus in a row and how to display cursor..? 

 

 

Thanks

 

Please use plain text.
Developer
Hithredin
Posts: 404
Registered: ‎06-03-2010
My Device: Z10 Red

Re: cursor is not display while using navigation

Navigation with cursor is not compatible with navigation with focus, you have to choose between one of them
Please use plain text.
Developer
ravi1989
Posts: 777
Registered: ‎07-21-2012
My Device: 9810

Re: cursor is not display while using navigation

thanks for reply .. i am not getting focus also on button.. i am using this code.

<!--input type=submit id="1" class="heading_btn" x-blackberry-focusable="true" onmouseover="highlight(this);" onmouseout="unhighlight(this);" style="margin-top:10px" value="Get Arrival Schedule" onclick="FillValues();SetAction(1)"-->
<input type=submit id="2" class="heading_btn" x-blackberry-focusable="true" onmouseover="highlight(this);" onmouseout="unhighlight(this);" style="margin-top:10px" value="Get Departure Schedule" onclick="FillValues();SetAction(2)">



in java script

function highlight(e) {
alert(e);
//document.getElementById(e).style.background-color=red;
e.setAttribute("style", "background-color: red; outline: cyan solid thick;");
}

function unhighlight(e) {
// document.getElementById(e).style.background-color=black;
e.setAttribute("style", "");
}
Please use plain text.
Contributor
bilhasry
Posts: 14
Registered: ‎07-24-2012
My Device: Torch 2 9810

Re: cursor is not display while using navigation

why don't you try to use css, you can use pseudo :hover
Please use plain text.
Developer
ravi1989
Posts: 777
Registered: ‎07-21-2012
My Device: 9810

Re: cursor is not display while using navigation

Do uou have any example .. please share .i need urgently.

 

Thanks

Please use plain text.
Developer
Hithredin
Posts: 404
Registered: ‎06-03-2010
My Device: Z10 Red

Re: cursor is not display while using navigation

About Focus, have you check you config.xml file to add the line explained there:

http://supportforums.blackberry.com/t5/Web-and-WebWorks-Development/x-blackberry-focusable-does-not-...

Please use plain text.
Developer
ravi1989
Posts: 777
Registered: ‎07-21-2012
My Device: 9810

Re: cursor is not display while using navigation

It is also not working..do you have example or another idea please share..

 

 

Thanks

regards

 

Please use plain text.
Developer
Hithredin
Posts: 404
Registered: ‎06-03-2010
My Device: Z10 Red

Re: cursor is not display while using navigation

Is your alert in the highlight functionfired or not?

Please use plain text.
Developer
ravi1989
Posts: 777
Registered: ‎07-21-2012
My Device: 9810

Re: cursor is not display while using navigation

Hi 

 

i am getting focus on button and alert also. but when i apply same concept in scrolling list (using table) then focus is not coming in row.

 

please help

 

 

unction GetDepartureStationDashboard_callBack(r)
{
document.getElementById('loadingImg').style.visibility = "hidden";
var tabledata = "";
tabledata += "<table x-blackberry-focusable=\"true\">";
for (var i = 0; i < r.length-1; i++)
{
tabledata += "<tr x-blackberry-focusable=\"true\" id=\"i\" x-blackberry-onUp=\"scroll(50)\" x-blackberry-onDown=\"scroll(50)\"   onmouseover=\"highlight(this);\" onmouseout=\"unhighlight(this);\">";
tabledata += "<td width=\"30%\">" + r[i].platformNo + "</td>";
tabledata += "<td width=\"30%\">" + r[i].schDepart + " - " + r[i].expDepart + "</td>";
tabledata += "<td width=\"35%\">" + r[i].stationName + " (" + r[i].crsCode + ")" + "</td>";
if(r[i].schDepart == r[i].expDepart)
tabledata += "<td width=\"5%\" align=\"left\"><img src=\"images/correct-icon.png\" width=\"24\" height=\"24\" /></td>";
else
tabledata += "<td width=\"5%\" align=\"left\"><img src=\"images/error.png\" width=\"24\" height=\"24\" /></td>";
tabledata += "</tr>";
}
tabledata += "</table>";
document.getElementById("mainBodyDiv").innerHTML = tabledata;
}

 

 

in first row will show hight . but not all

Please use plain text.
Developer
Hithredin
Posts: 404
Registered: ‎06-03-2010
My Device: Z10 Red

Re: cursor is not display while using navigation

Maybe Blackberry is lost with you same ids: Change to 

tabledata += "<tr x-blackberry-focusable='true' id='" + i + "' x-blackberry-onUp='scroll(50)' x-blackberry-onDown=\"scroll(50)\"   onmouseover=\"highlight(this);\" onmouseout=\"unhighlight(this);\">";

 

Try also to remove x-blackberry-focusable from the table.

 

 

And have a look to the doc:

https://developer.blackberry.com/html5/api/blackberry.focus.html

 

It says that if your function "scroll()" does not specifically set the focus (not scroll but set the focus), the focus will remains and never change.


Please use plain text.