i am not a Richfaces User. But:
1) an Action method of the JSF standard CommandButton should return the outcome Navigation String or Null ( in your case). ex.: public String removeItem() {...}
2) its recommended to Use List as value of datatables rather than maps, i don't know what type has your property finalResults
3) if you use JSF 2.x then you can pass parameters to your actionMethods as EL ValueExpression: action="#{searchAuthDetailController.removeSelectedAuthor(item.id)}"
, i recommend using <f:ajax ....>
for updating, then you can render/update only some parts of the page
i hope these help.
if you wish i can give you a working example (no richfaces ).
UPDATE: EXAMPLE
Bean: NOTE: no need to register your Bean in faces-config, instead i use here the Annotations to do that
import java.util.ArrayList;
import java.util.List;
import javax.annotation.PostConstruct;
import javax.faces.bean.ManagedBean;
import javax.faces.bean.SessionScoped;
@ManagedBean(name="bbean")
@SessionScoped
public class MyBean {
private boolean dataTableRendered;
private boolean linksRendered;
private List<User> users;
private List<String> links;
public MyBean() {
}
@PostConstruct
public void init(){
try{
users = new ArrayList<User>();
links = new ArrayList<String>();
dataTableRendered = new Boolean(true);
linksRendered = new Boolean(true);
for(int i=0; i<5; i++){
users.add(new User(i,"User: XYZ-"+i));
}
for(int i=0; i<3; i++){
links.add("http://www.abc-"+i+".tld");
}
}catch(Exception e){
e.printStackTrace();
}
}
public final void removeUser(final User selectedUser){
if( selectedUser == null ){
return;
}
for(User u: this.users){
if( u.getId() == selectedUser.getId() ){
users.remove(u);
break;
}
}
this.setLinksRendered(false);
}
public boolean isDataTableRendered() {
return dataTableRendered;
}
public void setDataTableRendered(boolean dataTableRendered) {
this.dataTableRendered = dataTableRendered;
}
public boolean isLinksRendered() {
return linksRendered;
}
public void setLinksRendered(boolean linksRendered) {
this.linksRendered = linksRendered;
}
public List<User> getUsers() {
return users;
}
public void setUsers(List<User> users) {
this.users = users;
}
public List<String> getLinks() {
return links;
}
public void setLinks(List<String> links) {
this.links = links;
}
}
User Object:
import java.io.Serializable;
public class User implements Serializable{
private static final long serialVersionUID = -8349963947101031989L;
private int id;
private String name;
public User(int id, String name) {
this.id = id;
this.name = name;
}
public int getId() {
return id;
}
public void setId(int id) {
this.id = id;
}
public String getName() {
return name;
}
public void setName(String name) {
this.name = name;
}
}
Form xhtml Page:
<!DOCTYPE html>
<html xmlns="http://www.w3.org/1999/xhtml"
xmlns:f="http://java.sun.com/jsf/core"
xmlns:h="http://java.sun.com/jsf/html"
xmlns:ui="http://java.sun.com/jsf/facelets"
>
<h:head>
<meta charset="UTF-8" />
<meta http-equiv="content-type" content="text/html; charset=UTF-8" />
<title>Test</title>
</h:head>
<body>
<f:view>
<h:form id="dataForm">
<h:dataTable id="dataTable" var="user" value="#{bbean.users}"
rendered="#{bbean.dataTableRendered}"
>
<h:column>
<h:outputText value="#{user.name}"></h:outputText>
</h:column>
<h:column>
<h:commandButton value="Remove">
<f:ajax execute="@form" render="@form" listener="#{bbean.removeUser(user)}" />
</h:commandButton>
</h:column>
</h:dataTable>
<h:panelGroup layout="block" id="linksTable" rendered="#{bbean.linksRendered}">
<ui:repeat var="link" value="#{bbean.links}">
<h:outputText value="#{link}, "></h:outputText>
</ui:repeat>
</h:panelGroup>
</h:form>
</f:view>
</body>
</html>