Using a p:remoteCommand to update a p:dataTable

前端 未结 1 1635
轻奢々
轻奢々 2021-01-13 18:04

Given the following XHTML code that has one and a having only two columns.



        
1条回答
  •  无人及你
    2021-01-13 18:58

    After doing this, if a row held by the given is updated (which in turn, updates via inside . It is sometimes necessary), the given in causes validation its borders turn red implying violating the associated validation that should not happen.

    This isn't what is happening. If that were true, you'd have seen 3 HTTP requests in the network monitor. But there are only 2 (one from the submit of the panel and one from the ).

    The cause is the itself. Its process attribute defaults to @all ("whole view"). You can also confirm this by inspecting the javax.faces.partial.execute request parameter in the network monitor. It says @all. In other words, the entire form is also submitted/processed, including those empty inputs.

    You need to explicitly set it to @this:

    
    

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