Hi all

I'm using primefaces 5 with HtmlUserDialog, in my page i'm using <p:selectmanycheckbox> that binding with a instance of ch.ivyteam.ivy.scripting.objects.List, for example:

p:selectManyCheckbox value="#{data.selectedWeeklyDayList}" layout="pageDirection">                                                   f:selectItems value="#{data.listWeekDay}" var="weekDay" 
    itemValue="#{weekDay}"
    itemLabel="#{weekDay.value}"/>  
/p:selectManyCheckbox>

And selectedWeeklyDayList and listWeekDay are instances of ch.ivyteam.ivy.scripting.objects.List. When i submit this page, after several times, i got this exception:

IllegalAccessException: Class javax.faces.component.UIComponentBase can not access a member of class ch.ivyteam.ivy.scripting.objects.List with modifiers "private"
 RuntimeException: java.lang.IllegalAccessException: Class javax.faces.component.UIComponentBase can not access a member of class ch.ivyteam.ivy.scripting.objects.List with modifiers "private"
 IllegalStateException: Error restoring component: addNewEditForm_5649:selectedWeeklyDayList

Now i just have temporary solution to avoid this exception is i change from ch.ivyteam.ivy.scripting.objects.List to java.util.List

Why do i face this issue? and is there any solutions to avoid it but i still can use ch.ivyteam.ivy.scripting.objects.List? because i need to use some features of this class (for ex: clone() method)

Thanks all.

asked 03.06.2015 at 06:50

trungdv's gravatar image

trungdv
(suspended)
accept rate: 52%


Thanks for your support it's problem because ivy list make it's constructor to be private then other caller can not create new instance. It's also a issue in JIRA of IvyTeam (https://jira.axonivy.com/jira/browse/XIVY-427) And it has been fixed in version 6.0.2 revision 50953

link

answered 03.02.2016 at 02:21

trungdv's gravatar image

trungdv
(suspended)
accept rate: 52%

Seems your getter and setter of data.selectedWeeklyDayList is private.

To your clone() problem. The interface List does not implement Cloneable. You have to use the actual Object. For example ArrayList.

List<Object> list = new ArrayList<Object>();
list.clone(); <-- doesn't exist
((ArrayList) list).clone(); <-- unchecked cast to ArrayList. ArrayList implements Cloneable.

or you use ArrayList itself.

ArrayList<Object> list = new ArrayList<Object>();
link

answered 05.06.2015 at 12:42

HaraldWeber's gravatar image

HaraldWeber
(suspended)
accept rate: 33%

edited 05.06.2015 at 12:42

Follow this question

By Email:

Once you sign in you will be able to subscribe for any updates here

By RSS:

Answers

Answers and Comments

Markdown Basics

  • *italic* or _italic_
  • **bold** or __bold__
  • link:[text](http://url.com/ "Title")
  • image?![alt text](/path/img.jpg "Title")
  • numbered list: 1. Foo 2. Bar
  • to add a line break simply add two spaces to where you would like the new line to be.
  • basic HTML tags are also supported

Tags:

×147
×58

Asked: 03.06.2015 at 06:50

Seen: 5,048 times

Last updated: 03.02.2016 at 02:21