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
New Contributor
Posts: 3
Registered: ‎06-11-2010
My Device: 8900
My Carrier: Movistar

Capture the "Back" key.

[ Edited ]

 

Hi everybody! I'm currently adapting a Web application for BlackBerry. It's an EAR Proyect deployed on a WebLogic Server with Java 1.4.2, on a HP-UX platform. I've been searching the forum and found this:

 

http://www.blackberry.com/developers/docs/widgetapi/blackberry.system.event.html

 

I need to capture the BACK key, because is allowing the user to navigate back to encrypted pages and that's not good and I can't allow it.

 

My main question is where on the application or the Weblogic should I put this line: <feature id="blackberry.system.event" version="1.0.0"/>  or create the config.xml file. Because I don't have one on the proyect and the one on the WebLogic server it's not working. 

 

I create this config.xml myself:

 

<?xml version="1.0" encoding="utf-8"?>
<widget xmlns=" http://www.w3.org/ns/widgets"
        xmlns:rim="http://www.blackberry.com/ns/widgets"
        version="2.0"
        rim:header="RIM-Widget: rim/widget"
        rim:navigationMode="true">     
  <name> BB Widget </name>
  <description>
    BB Widget to control BB buttons.
  </description>
  <content src="index.jsp"/>
  <feature id="blackberry.system.event" version="1.0.0"/>  
  <license>
    Example license
    Copyright (c) 2008 My Corp.
    THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND,
    EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF
    MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND
    NONINFRINGEMENT. IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS
    BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN
    ACTION OF CONTRACT, INSULT OR OTHERWISE, ARISING FROM, OUT OF OR IN
    CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE
    SOFTWARE.
  </license>
</widget>

 

but still don't know where to put it. Any help will be very appreciated.

Thanks in advance,

Enrique

 

Retired
Posts: 3,708
Registered: ‎10-16-2008
My Device: Z10
My Carrier: Rogers

Re: Capture the "Back" key.

Hi Quks,

 

If you are loading a remote web page into your widget and you want to enable a feature for that remote website, you would construct your config.xml file like the following:

 

 

<?xml version="1.0" encoding="utf-8"?>
<widget xmlns=" http://www.w3.org/ns/widgets"
        xmlns:rim="http://www.blackberry.com/ns/widgets"
        version="2.0"
        rim:header="RIM-Widget: rim/widget"
        rim:navigationMode="true">     
  <name> BB Widget </name>
  <description>
    BB Widget to control BB buttons.
  </description>
  <content src="index.jsp"/>
  <access subdomains="true" uri="http://mydomain/mysite">
    <feature id="blackberry.system.event" version="1.0.0"/>  
  </access>
  <license>
    Example license
    Copyright (c) 2008 My Corp.
    THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND,
    EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF
    MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND
    NONINFRINGEMENT. IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS
    BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN
    ACTION OF CONTRACT, INSULT OR OTHERWISE, ARISING FROM, OUT OF OR IN
    CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE
    SOFTWARE.
  </license>
</widget>

 

 

Tim Neil
Director, Application Platform & Tools Product Management
Follow me on Twitter
New Contributor
Posts: 3
Registered: ‎06-11-2010
My Device: 8900
My Carrier: Movistar

Re: Capture the "Back" key.

Hi tneil, thanks for the anwser. This config.xml should be on the WebLogic or in the WEB-INF folder of the application?

Retired
Posts: 3,708
Registered: ‎10-16-2008
My Device: Z10
My Carrier: Rogers

Re: Capture the "Back" key.

The config.xml file needs to be built into your BlackBerry widget....  

 

This functionality will not work in the general browser. 

Tim Neil
Director, Application Platform & Tools Product Management
Follow me on Twitter
New Contributor
Posts: 3
Registered: ‎06-11-2010
My Device: 8900
My Carrier: Movistar

Re: Capture the "Back" key.

Could you please post a "How to"? thanks again.

Retired
Posts: 3,708
Registered: ‎10-16-2008
My Device: Z10
My Carrier: Rogers

Re: Capture the "Back" key.

You should be able to find multiple tutorial videos on how to create widgets here:

 

http://na.blackberry.com/eng/developers/resources/videolibrary.jsp#tab_tab_browser

 

You can also can get the SDK, tutorials, samples, labs from here:

http://na.blackberry.com/eng/developers/browserdev/widgetsdk.jsp

Tim Neil
Director, Application Platform & Tools Product Management
Follow me on Twitter