Unfetched attribute access error

Hi there!

I have a problem with my employee management software. In my system there are Users which have UserSkillLinks which have Skills. I want to add UserSkillLinks with Skills to the User.

My code is:
UserEdit.java:

public void onCreateSkillLink() { // called by the create button in User-edit.xml

    openLookup("profilegen$Skill.browse", new Lookup.Handler() {
        @Override
        public void handleLookup(Collection items) {
            for (Skill skill : (Collection<Skill>) items) {
                UserSkillLink skillLink = metadata.create(UserSkillLink.class);

                skillLink.setSkill(skill);
                skillLink.setUser(getItem());
                skillLink.setUsed(true);
                skillLink.setTested(false);

                userskilllinkDs.addItem(skillLink);
            userskilllinkDs.refresh();
            skillDs.refresh();
            }
        }
    },
    WindowManager.OpenType.DIALOG);
}

.
I get a unfetched attribute access error when I try to save the User, although the view is correct.

SUP-Unfetched1

SUP-Unfetched2

SUP-Unfetched3

What do I miss? Please help :frowning:

Can you show us how this view is set up:

image

Maybe also try a nested datasource “skillcategoryDs” in the nested collection Datasource userskilllinksDs

Did some similar things in my application and faced the same issues. not quite sure how i fixed it… this was about 2 month ago … :smiley:

Daniel

Hi! Thanks for your reply.

The view looks like this:

SUPUserSkillView

Hi Rene,

Is it possible for you to zip the project and attach it here? It’s quite hard to see the cause of the problem on the screenshots.