Note that there are some explanatory texts on larger screens.

plurals
  1. POSearch by specific cloumn name in Seam
    text
    copied!<p>I am working in seam with jsf1.2. </p> <p>Everything working fine for me, except the search operation. Can anyone please suggest me to go in a right way?</p> <p>Here, how I am having my form:</p> <pre><code> &lt;h:form class="input-list" id="searchUser" style="width:100%;" name="searchUser"&gt; &lt;div class="edit-label"&gt;FIRST NAME :&lt;/div&gt; &lt;h:inputText tabindex="1" id="firstName" type="text" class="miniusername clp" value="#{userListAction.firstName}" required="true"&gt; &lt;f:validateLength minimum="3" maximum="20" /&gt; &lt;/h:inputText&gt; &lt;h:commandButton value="Search" tabindex="2" style="margin-left: 5px" action="#{userListAction.retrieveName}" class="usersearch"&gt; &lt;/h:commandButton&gt; &lt;/h:form&gt; </code></pre> <p>My interface:</p> <pre><code> @Local public interface UserListAction extends Serializable { public List&lt;User&gt; retrieveCustomers(); public List&lt;User&gt; retrieveEmployees(); public List&lt;User&gt; getUsersList(); public CLRPUser getLoginUser(); public List&lt;User&gt; retrieveName(); @WebRemote public String deleteById(Integer userId); @WebRemote public CLRPUser getUserById(Integer userId); public UserTypeEnum getUserType(); public void setUserType(UserTypeEnum userType); public void setFirstName(String firstName); public String getFirstName(); public CLRPUser getCurrentUser(); public void setCurrentUser(CLRPUser currentUser); } </code></pre> <p>Action class which implements the interface:</p> <pre><code> @Name("userListAction") @Stateless @AutoCreate public class UserListActionImpl implements UserListAction { @In protected UserService userService; @Out(value = "userType", scope = ScopeType.CONVERSATION, required = false) private UserTypeEnum userType; @In private LoggedInUser loggedInUser; @Out(value = "currentUser", scope = ScopeType.CONVERSATION, required = false) @In(value = "currentUser", scope = ScopeType.CONVERSATION, required = false) private CLRPUser currentUser; @In(value = "firstName", scope = ScopeType.CONVERSATION, required = false) private String firstName; /** * */ private static final long serialVersionUID = 8649412602585430272L; /* * (non-Javadoc) * * @see com.ermms.clrp.user.UserAction#getUsersList() */ public List&lt;User&gt; retrieveName() { System.out.print("FirstName is :" + firstName); return userService.getAllUsers(firstName); } public UserTypeEnum getUserType() { return this.userType; } public void setUserType(UserTypeEnum userType) { this.userType = userType; } public void setFirstName(String firstName) { this.firstName = firstName; } public String getFirstName() { return firstName; } @Override public CLRPUser getCurrentUser() { // TODO Auto-generated method stub return null; } @Override public void setCurrentUser(CLRPUser currentUser) { // TODO Auto-generated method stub } } </code></pre> <p>Console says the First name is : null.</p> <p>I tried more times, but lost my mind in this. Please suggest me.</p>
 

Querying!

 
Guidance

SQuiL has stopped working due to an internal error.

If you are curious you may find further information in the browser console, which is accessible through the devtools (F12).

Reload