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 187757
In Process

The Archive Base Latest Questions

Editorial Team
  • 0
Editorial Team
Asked: May 11, 20262026-05-11T15:52:49+00:00 2026-05-11T15:52:49+00:00

It’s hard to explain my problem so give me a break if it’s not

  • 0

It’s hard to explain my problem so give me a break if it’s not very clear.

I have some ten properties that can be edited in the view. Most of them are booleans. These properties configure a test environment (like one property can be configured to show the solution).

Now, the problem is that some properties can’t be set to true if others are set to false. Nothing would go wrong, but it’s just useless. It’s like one property would be configured not to show the correct button and another to show the solution. In our system, if you can’t click on the correct button, then solution will never be shown.

Does this kind of problem have a name? Do such properties have a name (just like there are immutable properties)? Are there best-practices to implement such a story? We can hard code it in the view, but I would rather have a generic system.

  • 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. 2026-05-11T15:52:49+00:00Added an answer on May 11, 2026 at 3:52 pm

    The word you’re looking for is orthogonality. The settings are not orthogonal, as they can’t vary independently.

    As to how to handle showing these properties, the completely generic way to do it (and your problem may not warrant the coding cost of this genericicity) would be to give each control an expression that references the other controls, where if the complete expression evaluates to true (or false), the control is disabled in the view.

    Easier to code would be a control that exposed an isDisabled() method, which you could override as necessary. Here’s a short Java example, which leverages Java anonymous classes to do the hard work. It assumes there’s already a Control class, with a booleanValue() getter that converts it to a boolean, and that since AutoDisabledControl is-a Control, it can be used as a drop-in replacement for a Control:

      public class AutoDisabledControl extends Control {     public isDisabled() { return false ; }   }    ..... usage ....   // control1 is never disabled   final Control1 = new AutoDisabledControl() ;   // Control2 is disabled if control1 is false   final Control2 = new  AutoDisabledControl() {     public isDisabled() { return control1.booleanValue() == false; }   };   // conntrol 3 is enabled only if control1 and control2 are true   final Control1 = new  AutoDisabledControl() {     public isDisabled() { return ! (                         control1.booleanValue()                         && control2.booleanValue()) ;    }; 

    Naturally, in the View’s display, it checks each control’s isDisabled() , and disables the ones that return true; when a Control’s value is changed, the view redisplays. I’m assuming some sort of MVC Pattern.

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

Sidebar

Ask A Question

Stats

  • Questions 109k
  • Answers 109k
  • Best Answers 0
  • User 1
  • Popular
  • Answers
  • Editorial Team

    How to approach applying for a job at a company ...

    • 7 Answers
  • Editorial Team

    How to handle personal stress caused by utterly incompetent and ...

    • 5 Answers
  • Editorial Team

    What is a programmer’s life like?

    • 5 Answers
  • Editorial Team
    Editorial Team added an answer return strWhole.EndsWith( sufx ); May 11, 2026 at 9:22 pm
  • Editorial Team
    Editorial Team added an answer Try something like this instead: query = LoadDoors(query, x =>… May 11, 2026 at 9:22 pm
  • Editorial Team
    Editorial Team added an answer Well, i think this might be impossible, as the only… May 11, 2026 at 9:22 pm

Related Questions

Is it possible to replace javascript w/ HTML if JavaScript is not enabled on
I am currently running into a problem where an element is coming back from
I ran into a problem. Wrote the following code snippet: teksti = teksti.Trim() teksti
Seemingly simple, but I cannot find anything relevant on the web. What is the
It seems to me obfuscation is an idea that falls somewhere in the security

Trending Tags

analytics british company computer developers django employee employer english facebook french google interview javascript language life php programmer programs salary

Top Members

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.