Advertisement
Guest User

Untitled

a guest
Apr 20th, 2014
68
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
text 1.37 KB | None | 0 0
  1. <td><h:commandButton id="view" class="myButton2" value="view" action="#{searchBean.displayCompanyName()}">
  2.  
  3. <f:setPropertyActionListener target="#{searchBean.locationsList}" value="#{locationslist}" />
  4.  
  5. </h:commandButton></td>
  6.  
  7. <table>
  8.  
  9. <tr>
  10. <td><div class="white"><H2>Work Locations</H2></div>
  11. <div class="tables"><h:dataTable value="#{searchBean.locationsList}" var="l" border="1">
  12.  
  13. <div class="td"><h:column>
  14. <div class="th"><f:facet name="header">
  15. <div class="generaltext3">County</div>
  16. </f:facet></div>
  17. <div class="generaltext2">#{l}</div>
  18.  
  19. //NOTE: here when I call l, it just returns a reference to the objects
  20. // in the list. I don't have access to the elements within the object
  21. //from here (ie: l.countyname is not allowed (where countyname
  22. // is one of the elements of the Locations object))
  23.  
  24. </h:column></div>
  25. </h:dataTable></div>
  26.  
  27. </td>
  28. </tr>
  29.  
  30.  
  31. </table>
  32.  
  33. @ManagedBean
  34. @SessionScoped
  35. public class SearchBean implements Serializable {
  36.  
  37. private List<Locations> locationsList=new ArrayList<Locations>();
  38.  
  39. public void setLocationsList(List<Locations> locationsList) {
  40. this.locationsList = locationsList;
  41. }
  42.  
  43. public List<Locations> getLocationsList(){
  44.  
  45. return locationsList;
  46. }
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement