• Post Reply Bookmark Topic Watch Topic
  • New Topic
programming forums Java Mobile Certification Databases Caching Books Engineering Micro Controllers OS Languages Paradigms IDEs Build Tools Frameworks Application Servers Open Source This Site Careers Other all forums
this forum made possible by our volunteer staff, including ...
Marshals:
  • Campbell Ritchie
  • Liutauras Vilda
  • Bear Bibeault
  • Junilu Lacar
  • Martin Vashko
Sheriffs:
  • Jeanne Boyarsky
  • Tim Cooke
  • Knute Snortum
Saloon Keepers:
  • Ron McLeod
  • Tim Moores
  • Stephan van Hulst
  • Tim Holloway
  • Carey Brown
Bartenders:
  • Scott Selikoff
  • salvin francis
  • Piet Souris

Problem in JSF

 
Greenhorn
Posts: 12
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
<f:view>
<f:subview id="Locationview">
<h:form id="form1">
<h:dataTable id="table1" value="#{locForm.allLocation}" var="locForm" rowClasses="Data1" headerClass="tableHeader">

<h:column>
<f:facet name="header">
<h:outputText value=""/>
</f:facet>
<h:selectManyCheckbox id="locationId">
<f:selectItem itemValue="#{locForm.locationId}"/>
</h:selectManyCheckbox>
</h:column>

<h:column>
---------
</h:column>

<h:column>
----------------
</h:column>
</h:dataTable>
<h:commandButton styleClass="button" value="Add" action="add"/>
<h:commandButton styleClass="button" value="InActive" action="#{locForm.inactivateloc}" />
<h:commandButton styleClass="button" value="In Active Locations" action="inactiveloc"/>
<h:commandButton styleClass="button" value="Cancel" action="cancel"/>

</h:form>
</f:subview>
</body>
</f:view>

Here when i am not selecting any of the rows and click inactive button it is calling the backing bean method.But if i select any of the row it is not calling the backing bean method.


what is the problem i am not understanding?can any body help me
 
Ranch Hand
Posts: 77
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
Is this code you just made up to show us or is it real code because it has few errors.
First Use <h:messages></h:messages> to see if there is any conversion Error or validation Error
Remove </body (May be Error) and <subview (Not required in this case).
 
Ranch Hand
Posts: 536
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator

Here when i am not selecting any of the rows and click inactive button it is calling the backing bean method.But if i select any of the row it is not calling the backing bean method.


you mean that nothing happens when you press the inactive button with some rows selected on the page? thats wierd. how did you come to the conclusion that the action method is not being called? did you debug your backing bean?
 
What a stench! Central nervous system shutting down. Save yourself tiny ad!
Java file APIs (DOC, XLS, PDF, and many more)
https://products.aspose.com/total/java
  • Post Reply Bookmark Topic Watch Topic
  • New Topic
Boost this thread!