Sign Up

Sign Up to our social questions and Answers Engine to ask questions, answer people’s questions, and connect with other people.

Have an account? Sign In

Have an account? Sign In Now

Sign In

Login to our social questions & Answers Engine to ask questions answer people’s questions & connect with other people.

Sign Up Here

Forgot Password?

Don't have account, Sign Up Here

Forgot Password

Lost your password? Please enter your email address. You will receive a link and will create a new password via email.

Have an account? Sign In Now

You must login to ask a question.

Forgot Password?

Need An Account, Sign Up Here

Please briefly explain why you feel this question should be reported.

Please briefly explain why you feel this answer should be reported.

Please briefly explain why you feel this user should be reported.

Sign InSign Up

The Archive Base

The Archive Base Logo The Archive Base Logo

The Archive Base Navigation

  • Home
  • SEARCH
  • About Us
  • Blog
  • Contact Us
Search
Ask A Question

Mobile menu

Close
Ask a Question
  • Home
  • Add group
  • Groups page
  • Feed
  • User Profile
  • Communities
  • Questions
    • New Questions
    • Trending Questions
    • Must read Questions
    • Hot Questions
  • Polls
  • Tags
  • Badges
  • Buy Points
  • Users
  • Help
  • Buy Theme
  • SEARCH
Home/ Questions/Q 6622145
In Process

The Archive Base Latest Questions

Editorial Team
  • 0
Editorial Team
Asked: May 25, 20262026-05-25T21:22:08+00:00 2026-05-25T21:22:08+00:00

I am developing a registration page in BlackBerry app. I am sending all the

  • 0

I am developing a registration page in BlackBerry app. I am sending all the fields entered to the local server.Country is one of the form fields and is in a ObjectChoiceField. Whenever user selects a country having more than one word for ex: United States of America, it says sign up failed. When user selects country with single name, registration is always successful.Can anybody guide me how can I make the ObjectChoiceField accept the spaces or remove the spaces in the country?

  • 1 1 Answer
  • 0 Views
  • 0 Followers
  • 0
Share
  • Facebook
  • Report

Leave an answer
Cancel reply

You must login to add an answer.

Forgot Password?

Need An Account, Sign Up Here

1 Answer

  • Voted
  • Oldest
  • Recent
  • Random
  1. Editorial Team
    Editorial Team
    2026-05-25T21:22:09+00:00Added an answer on May 25, 2026 at 9:22 pm

    There is no problem in ObjectChoiceField. For example if you want to send the Value like “Black Berry” you must send it to the web service like “Black%20Berry”. Because %20 takes the space character. So after you are taking the value form ObjectChoiceField means……

    ar[obchfield.getSelectedIndex()];// this is your value say for example:”Black Berry”.

    Take this below code in seperate Classname Utility.java:

    public class Utility {
    public static String escapeHTML(String s){
        StringBuffer sb = new StringBuffer();
        int n = s.length();
           for (int i = 0; i < n; i++) {
              char c = s.charAt(i);
              switch (c) {
                 case ' ': sb.append("%20"); break;
                 default:  sb.append(c); break;
            }
        }
        return sb.toString();
    }}
    

    Then do like this:

    Utility.escapeHTML(ar[obchfield.getSelectedIndex()]);//converts the "Black Berry" to "Black%20Berry".
    

    then it returns a String like: “Black%20Berry” and send it to server. Enough.
    Your problem is solved.

    If you have any doubt come on StackOverFlow chat room name “Life for Blackberry” to clarify Your and our doubts.

    • 0
    • Reply
    • Share
      Share
      • Share on Facebook
      • Share on Twitter
      • Share on LinkedIn
      • Share on WhatsApp
      • Report

Sidebar

Related Questions

Currently I'm developing a registration form for new user in Android (native app.) and
I am developing a student registration form in asp.net. there are two tables viz
I'm developing a webapp+android app that has its own registration flow - simple authentication
I am want to do registration in my app. So i have made all
I am developing a web application. In my guest registration page I need to
Background: I am developing an app which sends an SMS to users after registration
I am Developing a Registration Form in ASP.NET in Which I am using client
I am developing a php script which contains an html form. If not all
I am developing a registration web app using Struts2 and need some guidance. Background:
While developing a Grails 1.0.5 app I'm appalled at how slow the grails test-app

Explore

  • Home
  • Add group
  • Groups page
  • Communities
  • Questions
    • New Questions
    • Trending Questions
    • Must read Questions
    • Hot Questions
  • Polls
  • Tags
  • Badges
  • Users
  • Help
  • SEARCH

Footer

© 2021 The Archive Base. All Rights Reserved
With Love by The Archive Base

Insert/edit link

Enter the destination URL

Or link to existing content

    No search term specified. Showing recent items. Search or use up and down arrow keys to select an item.