aspose file tools*
The moose likes JSF and the fly likes Problem in JSF Big Moose Saloon
  Search | Java FAQ | Recent Topics | Flagged Topics | Hot Topics | Zero Replies
Register / Login
JavaRanch » Java Forums » Java » JSF
Bookmark "Problem in JSF " Watch "Problem in JSF " New topic
Author

Problem in JSF

Viswanath Sriram
Greenhorn

Joined: Jul 20, 2006
Posts: 12
<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

Joined: Oct 25, 2004
Posts: 77
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

Joined: Aug 25, 2005
Posts: 536
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?


MCSD, SCJP, SCWCD, SCBCD, SCJD (in progress - URLybird 1.2.1)
 
I agree. Here's the link: http://aspose.com/file-tools
 
subject: Problem in JSF