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

  • SEARCH
  • Home
  • 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 6122771
In Process

The Archive Base Latest Questions

Editorial Team
  • 0
Editorial Team
Asked: May 23, 20262026-05-23T15:56:17+00:00 2026-05-23T15:56:17+00:00

I have the following problem: I’m implementing a RCP application based on Netbeans platform.

  • 0

I have the following problem:

I’m implementing a RCP application based on Netbeans platform. I added a new custom secondary option panel to the application.

After designing the panel and setting up the proper methods (I implemented the part that is calling the changed method from the controller when fields change) I modified the valid method from the option panel (the view) to have a proper validation on all the fields. From what I understood this is called by the controller to validate the form before saving. The only issue is that this method is never called from what I can see so any validation that is done in it is not activated.

Could somebody tell me what I’m doing wrong? Thank you!

boolean valid() {
    if (addressTextField.getText().isEmpty()) {
        return false;
    }
    if (portTextField.getText().isEmpty()) {
        return false;
    }
    if (userTextField.getText().isEmpty()) {
        return false;
    }
    if (passwordPasswordField.getPassword().length == 0) {
        return false;
    }
    if (databaseNameTextField.getText().isEmpty()) {
        return false;
    }

    //TODO: change this back to the connection string builder after testing
    String databaseURL = "jdbc:mysql://" + addressTextField.getText().trim() + ":"  + portTextField.getText().trim() + "/" + databaseNameTextField.getText().trim() +
            "?user=" + userTextField.getText().trim() + "&password=" + StringUtilities.charToString(passwordPasswordField.getPassword());
    if(!SQLDatabaseConnectionManagerImpl.testPing(databaseURL)) {
        messageLabel.setText("");
        messageLabel.setForeground(Color.red);
        messageLabel.setText(NbBundle.getBundle(ImportDataOptionsPanel.class).getString("ImportDataOptionsPanel.connectionErrorMessage.text"));
        debug("Error on database connection with the following connection string: " + databaseURL, ImportDataOptionsPanel.IMPORTANT);
        return false;
    }

    return true;
}
  • 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-23T15:56:17+00:00Added an answer on May 23, 2026 at 3:56 pm

    The hint is in this code comment

    // TODO listen to changes in form fields and call controller.changed()
    

    You need to tell the controller when something has changed and when to validate the data.
    So in a simplistic scenario you could listen on a keytyped event and then called controller.changed()

    private void jTextField1KeyTyped(java.awt.event.KeyEvent evt) {
        controller.changed();
    }
    
    • 0
    • Reply
    • Share
      Share
      • Share on Facebook
      • Share on Twitter
      • Share on LinkedIn
      • Share on WhatsApp
      • Report

Sidebar

Related Questions

I have following problem. I have created a tab based Application with three Views
I have following problem: I have built a tabbar application with 4 tabs. I
I have following problem. I want to create a file system based session storage
I am a new programmer... i have following problem.. Terminating app due to uncaught
I have following problem: My webservice application returns xml data in following order: <my_claims>
I'm new to android and I have following problem I have a ListView. The
I have following problem Bundle bundle = new Bundle(); bundle.putString(url, someUrl); This works fine.
I have the following problem: public Boolean Exists(String userName) { IRepository<User> = new UserRepository();
I have the following problem, I am implementing a queue abstraction with RavenDB in
I have following problem: I've got an UITableView with 7 custom cells. Each of

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.