Bind an inputRichText to a Bean

前端 未结 1 1716
萌比男神i
萌比男神i 2021-01-14 13:13

I\'m trying to bind an xp:inputRichText to a bean (ChatBean), but get this validation error when the code tries update the field to the bean:

java.lang.Ille         


        
1条回答
  •  感情败类
    2021-01-14 13:57

    The UIInputRichText requires an object of type com.ibm.xsp.http.MimeMultipart

    If you change your ChatBean to work with this instead, it should work as desired:

    public class ChatBean implements Serializable {
       private static final long serialVersionUID = 1L;
       private com.ibm.xsp.http.MimeMultipart chatContent;
    
       public com.ibm.xsp.http.MimeMultipart getChatContent() {
           return chatContent;
       }
    
       public void setChatContent(com.ibm.xsp.http.MimeMultipart chatContent) {
           this.chatContent = chatContent;
       }
    
       public void saveContent() {
           // TODO implement save
           this.chatContent = null;
       }
    }
    

    0 讨论(0)
提交回复
热议问题