Win a copy of Practical SVG this week in the HTML/CSS/JavaScript forum!
  • Post Reply Bookmark Topic Watch Topic
  • New Topic

a4j:commandButton inside rich:popupPanel throwing error for null values

 
jyothi nalam
Greenhorn
Posts: 25
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
Hi,

working to solve this since 3days and nothing resolved. I have a dataTable which has a link to edit the row. onClick, a popup panel is displayed with the corresponding row details. But, after modifying and clicking the save button, I am getting the following exception

4:07:56,518 SEVERE [org.richfaces.log.Context] (http-localhost/127.0.0.1:8082-2) /search.xhtml @247,67 value="#{selectedPart.data1}": Target Unreachable, 'selectedPart' returned null on 'org.javassist.tmp.java.lang.Object_$$_javassist_seam_12': javax.el.PropertyNotFoundException:data1: Target Unreachable, selectedPart returned null on 'org.javassist.tmp.java.lang.Object_$$_javassist_seam_12'
at com.sun.faces.facelets.el.TagValueExpression.getType(TagValueExpression.java:100) [jsf-impl-2.1.7-redhat-1.jar:2.1.7-redhat-1]
at com.sun.faces.renderkit.html_basic.HtmlBasicInputRenderer.getConvertedValue(HtmlBasicInputRenderer.java:95) [jsf-impl-2.1.7-redhat-1.jar:2.1.7-redhat-1]
at javax.faces.component.UIInput.getConvertedValue(UIInput.java:1030) [jboss-jsf-api_2.1_spec-2.0.2.Final-redhat-1.jar:2.0.2.Final-redhat-1]
at javax.faces.component.UIInput.validate(UIInput.java:960) [jboss-jsf-api_2.1_spec-2.0.2.Final-redhat-1.jar:2.0.2.Final-redhat-1]


I have tried enclosing the popuppanel in a form. adding the domElementAttachment="form" to the rich:popupPanel. But nothing working.

Any help is appreciated.

Thanks in advance.
 
Tim Holloway
Bartender
Posts: 18419
60
Android Eclipse IDE Linux
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
Another thing you may have to do is move the popup declaration. In order to avoid issues with Internet Explorer, popups must have their own forms; they cannot appear on a form with non-popup elements. And, since forms cannot be nested, that form would have to precede or follow the other form(s).

However, what it looks like your problem is, is that you haven't properly declared "selectedPart" as a javabean OR that "selectedPart" is being declared as a loop variable. Which would fail because of the forms issue I just mentioned.
 
jyothi nalam
Greenhorn
Posts: 25
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
Thanks Tim for the reply.

Yes, the problem is due to the nested forms. Though I have already included the popup in a separate form , the popup already has a form inside. when I removed the inside form, the problem is resolved.
 
  • Post Reply Bookmark Topic Watch Topic
  • New Topic
Boost this thread!