0
votes

On an XPage I have placed a checkbox group:

<xp:checkBoxGroup
    value="#{employeeBean.employee.concern}"
    disabled="#{employeeBean.employee.editable eq false}">
    <xp:selectItem itemLabel="yes"></xp:selectItem>
    <xp:selectItem itemLabel="no"></xp:selectItem>
    <xp:selectItem itemLabel="maybe"></xp:selectItem>
</xp:checkBoxGroup>

I have binded the value of the control to field in my Proposal class via a managed bean.

The field concern is of type string and has its out of the box getters and setters.

The problem is whenever I include the data-binding and change values the complete XPage SSJS fails. I do not get an error in the console (server, web client).

Does this have something to do with the type of value the checkbox returns or should I change the type of field in my class?

1

1 Answers

0
votes

One thing that springs to mind is the employee object. If this is not set (i.e. there is an instance of the object) then it will fail with a null pointer exception.

In your case it is quite valid the concern field is of type String - obviously you will need a getConcern() and setConcern(String value) method.

Now the real problem is that you cannot see what the server thinks is wrong!

The best way to get to that is to look at the stack traces in the logs. And by far the easiest way to do that is to install the "XPages Log File Reader" application from OpenNTF.org

But my guess is that you haven't created an employee object prior to calling the getEmployee() method to return it ;-)

/John