Advertisement
Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- <td><h:commandButton id="view" class="myButton2" value="view" action="#{searchBean.displayCompanyName()}">
- <f:setPropertyActionListener target="#{searchBean.locationsList}" value="#{locationslist}" />
- </h:commandButton></td>
- <table>
- <tr>
- <td><div class="white"><H2>Work Locations</H2></div>
- <div class="tables"><h:dataTable value="#{searchBean.locationsList}" var="l" border="1">
- <div class="td"><h:column>
- <div class="th"><f:facet name="header">
- <div class="generaltext3">County</div>
- </f:facet></div>
- <div class="generaltext2">#{l}</div>
- //NOTE: here when I call l, it just returns a reference to the objects
- // in the list. I don't have access to the elements within the object
- //from here (ie: l.countyname is not allowed (where countyname
- // is one of the elements of the Locations object))
- </h:column></div>
- </h:dataTable></div>
- </td>
- </tr>
- </table>
- @ManagedBean
- @SessionScoped
- public class SearchBean implements Serializable {
- private List<Locations> locationsList=new ArrayList<Locations>();
- public void setLocationsList(List<Locations> locationsList) {
- this.locationsList = locationsList;
- }
- public List<Locations> getLocationsList(){
- return locationsList;
- }
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement