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

New Contributor
Posts: 4
Registered: ‎02-19-2010
My Device: Black Berry storm
My Carrier: ISTS

black berry URL Embeding

I have been using url embeding in UI. It opens the link directly in to UI.

Then after entering right username and password to login  my web application it is returning to the same login page. The URL is setting right for next page but it is not returning to right page. After wrong username and  password it is moving to right error page. Please help me understanding where is the problem.



 case Event.EVENT_REDIRECT :
                RedirectEvent e = (RedirectEvent) event;
                String referrer = e.getSourceURL();
                switch (e.getType())
                    case RedirectEvent.TYPE_SINGLE_FRAME_REDIRECT :
                        // Show redirect message.
                        Application.getApplication().invokeAndWait(new Runnable()
                            public void run()
                                Status.show("You are being redirected to a different page...");
                    case RedirectEvent.TYPE_JAVASCRIPT :
                    case RedirectEvent.TYPE_META :
                        // MSIE and Mozilla don't send a Referer for META Refresh.
                        referrer = null;     
                    case RedirectEvent.TYPE_300_REDIRECT :
                        // MSIE, Mozilla, and Opera all send the original
                        // request's Referer as the Referer for the new
                        // request.
                        Object eventSource = e.getSource();
                        if (eventSource instanceof HttpConnection)
                            referrer = ((HttpConnection)eventSource).getRequestProperty(REFERER);


this is my code for event redirection which changes the URL after right username and password.