This week's book giveaway is in the Cloud/Virtualizaton forum.
We're giving away four copies of Mesos in Action and have Roger Ignazio on-line!
See this thread for details.
Win a copy of Mesos in Action this week in the Cloud/Virtualizaton forum!
  • Post Reply
  • Bookmark Topic Watch Topic
  • New Topic

Problem in JSF

 
Viswanath Sriram
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">
<hutputText 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
 
Sajan Patel
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).
 
Richard Green
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?
 
  • Post Reply
  • Bookmark Topic Watch Topic
  • New Topic