Skip to Main Content

Java SE (Java Platform, Standard Edition)

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!

Problem with protected constructor

Tuan HaAug 22 2017 — edited Aug 22 2017

I have 2 class in 2 package: class ClassOne in package1 and clas ClassTwo in package2. Class ClassTwo extends class ClassOne which have a protected constructor: protected ClassOne(String s). When i call protected constructor of ClassOne in constructor of ClassTwo it get none error but i can see it when do ctrl+space, it just show a public constructor super(). So what is this problem, why IDEs not show protected constructor when i ctrl+space?

package package1;

public class ClassOne {

    public ClassOne(){

      

    }

    protected ClassOne(String s){

        System.out.println(s);

    }

}

package package2;

import package1.ClassOne;

public class ClassTwo extends ClassOne{

    public ClassTwo(){

        super("Why this protected constructor can use but not visiable?");//i can use this constructor protected ClassOne(String s) but can see it when ctrl+space

    }

}

Comments

jariola

Epic Fail wrote:

Running Apex 18.1

I have a 1:Many relationship and I'm wanting to let the user input the parent and children simultaneously. (example would be posts -> tags) I'm wanting to do this the same way apex does the "Link Builder" "Set Items" section. When the user enters the first "Tag" I want a new row created with a new element and a new remove button created for the next "Tag". I was wondering if anyone knows how this is could be done. I was thinking APEX_ITEM but that doesn't appear to be the recommended method.

I'm not familiar what is "Link Builder" in APEX. Could you point me to document or give steps how navigate there?

Have you think just using e.g. popup lov that allow multiple values?

First insert parent record, then process popup lov values . You can use apex_string.split to save popup lov values as rows.

You can check more detail what I mean if download and install https://github.com/jariolaine/apex-blog

Epic Fail

Anytime you make an element on a page link to another page and you click the target button in the link section it will bring up the "Link Builder". I'm going to include a picture to make it more clear.

Capture.PNG

A LOV will not work because I am allowing the user to enter whatever term(s) they want.

Epic Fail

Found a solution. Rodrigo Mesquita created the following plugin.

https://github.com/rodrigomesquitaexplorer/APEX-MultiRow-Item-Plugin

1 - 3
Locked Post
New comments cannot be posted to this locked post.

Post Details

Locked on Sep 19 2017
Added on Aug 22 2017
0 comments
672 views