Skip to Main Content

Java Development Tools

Announcement

For appeals, questions and feedback about Oracle Forums, please email oracle-forums-moderators_us@oracle.com. Technical questions should be asked in the appropriate category. Thank you!

Interested in getting your voice heard by members of the Developer Marketing team at Oracle? Check out this post for AppDev or this post for AI focus group information.

How to check if select one choice component only contains 1 option?

Roger MarquisSep 28 2021

Hello all.
On the page I'm currently developing there is a popup which contains a tree table component with multiple columns and select one choice components, and one child disclosure also containing an soc component.
I am seeking a way to check if there is only one select item choice in the soc dropdown, and if so, I want the soc to default to the only available choice.
The soc components are populated dynamically and so may contain a varying number of elements in each dropdown. I have been trying to find a way to count the number of elements in the dropdown but have not found a successful way to count the number of items for both parent and child node lov/soc components.
So basically, I want to check if the soc item list count equals "1". If there is only "1" item option, then default the soc to that value.
Thank you for reading.
My Jdeveloper version is 12.2.1.4

Comments

807599
because there was a meeting and it was decided so. you weren't invited. maybe had you been there, you could have made an intelligent and convincing argument for the inclusing of multiple inheritence. feel free to make this statement via the bug report system, and maybe it will be given consideration. you can probably even support an existing bug report/feature request for it.

of course you'd know all this if you bothered to SEARCH.
791266
Hai friends ..iam new to java .. i have doubt ..plz
help me
Why java does not support multiple inheritance ???
That questions is very frequently asked. Can you please search the forum, or google.

Kaj
807599
Hai friends ..iam new to java .. i have doubt ..plz
help me
Why java does not support multiple inheritance ???
http://www.google.co.in/search?q=Why+java+doesnt+support+multiple+inheritance&ie=utf-8&oe=utf-8&rls=org.mozilla:en-US:official&client=firefox-a
807599
well it is logical, how can a child have two father or two mother.

Well for <2006 it is impossible for > 2007 i don't know.
807599
well it is logical, how can a child have two father or two mother.
Inheritance in computer programming means something completely different than in biology.

Many people make the mistake by making this analogy: that a subclass is a "child" and its superclass is a "parent". That is not the case.

Maybe it shouldn't have been called "inheritance", because that word seems to confuse people into thinking that it has anything to do with inheritance in the biological sense.
807599
well it is logical, how can a child have two father
or two mother.

Inheritance in computer programming means something
completely different than in biology.

Many people make the mistake by making this analogy:
that a subclass is a "child" and its superclass is a
"parent". That is not the case.

Maybe it shouldn't have been called "inheritance",
because that word seems to confuse people into
thinking that it has anything to do with inheritance
in the biological sense.
This is what Mr xxx java teacher taught us hehehe

well i know it is different from biology..
807599
well it is logical, how can a child have two father or two mother.
Stretching a tenuous analogy is a bad idea. And it is possible for a child to have to mothers, at least in Canada:

http://www.cbc.ca/cp/national/070103/n010302A.html
quote:
An Ontario boy can legally have two mothers and a father, the province's highest court ruled Tuesday.

The same-sex partner of the child's biological mother went to court seeking to also be declared a mother of the boy...
807599
If you really need multiple inheritance you could try something with interfaces and the implement statement, that's the way you can get something like multiple inheritance in Java.

Ana

Pd something like a father and as many step mothers as you like!!
843785
The reasons for omitting multiple inheritance from the Java language mostly stem from the "simple, object oriented, and familiar" goal.
To understand multiple inheritance, the learner needs some level of expertise like virtual derivations etc in c++. Multiple inheritance will allow method duplication, and throws the learner into confusion which method might be called by the compiler in which scenario at run time.

Even though this answer seems to be funny, this is the actual reason why java omitted multiple inheritance of classes.
But java support multiple inheritance of interfaces. Multiple interface inheritance allows an object to inherit many different method signatures with the caveat that the inheriting object must implement those inherited methods.
796254
thread's over a year and a half old.

did you sign up for a new nic just for this?

%
843785
<3 Abstract & Interface
843785
duffymo wrote:
thread's over a year and a half old.

did you sign up for a new nic just for this?

%
Oh come on. Are you telling me that when there hasn't been a new thread in awhile, you aren't tempted to just search the boards for random topics and post a new answer to every thread that comes up, regardless of whether it was answered or not?
1 - 12

Post Details

Added on Sep 28 2021
3 comments
255 views