Viswanath Sriram

Greenhorn
+ Follow
since Jul 20, 2006
Cows and Likes
Cows
Total received
0
In last 30 days
0
Total given
0
Likes
Total received
0
Received in last 30 days
0
Total given
0
Given in last 30 days
0
Forums and Threads
Scavenger Hunt
expand Ranch Hand Scavenger Hunt
expand Greenhorn Scavenger Hunt

Recent posts by Viswanath Sriram

Hi
I want to know all the differences between actionListener attribute and actionListener tag.why they had given actionListener tag though we are having actionListener attribute
13 years ago
JSF
can we do Page navigation in JSF with out action attribute in CommandButton tag

Other than like this:
<h:commandButton value="Click" action="redirect"/>
13 years ago
JSF
Hi,
I want to do validation.When i click the commandbutton some validation should be done here.depending on that the action should be done.But if the function is returning false also the the form is calling the backing bean.I should stop that action if the function return false.
Is this the correct way

function check()
{
var value=document.getElementById('form:field1').value;
if(value=="")
{
alert('Please select an event to edit');
return false;
}
else
{
return true;
}
}
===================
h:commandButton value="Edit" action="#{bean.method}"
onKlick ="javascript:check();"
13 years ago
JSF
Hi,
I want to do validation.When i click the commandbutton some validation should be done here.depending on that the action should be done.But if the function is returning false also the the form is calling the backing bean.I should stop that action if the function return false.
Is this the correct way

function check()
{
var value=document.getElementById('form:field1').value;
if(value=="")
{
alert('Please select an event to edit');
return false;
}
else
{
return true;
}
}
===================
h:commandButton value="Edit" action="#{bean.method}" on click="javascript:check();"
13 years ago
JSF
<f:view>
<f:subview id="Locationview">
<h:form id="form1">
<h:dataTable id="table1" value="#{locForm.allLocation}">

<h:column>
<h:selectManyCheckbox id="locationId">
<f:selectItem itemValue="#{locForm.locationId}"/>
</h:selectManyCheckbox>
</h:column>

</h:dataTable>
<h:messages/>
<h:commandButton value="InActive" action="#{locForm.inactivateloc}" />
</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 displaying the (validation error:value is not valid) and it is not calling the backing bean method.


what is the problem i am not understanding?can any body help me
13 years ago
JSF
<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
13 years ago
JSF
you can have a radio button for wach row like this


<h:dataTable value="#{beanname.methodname}" var="xxx">

<h:column>
<h:selectOneRadio>
<f:selectItem itemValue="#{xxx.propertname}" itemLabel="{#xxx.propertname}"/>
</h:selectOneRadio>
</h:column>

<h:column>
// other controls
</h:column>
<h:column>
// other controls
</h:column>
<h:column>
// other controls
</h:column>

</h:dataTable>
13 years ago
JSF
ya we can do this using save() in hibernate.create the bean object and set the data to the bean then save the bean object using sace method.you need not write the insert query to do this.
13 years ago
JSF
I have used datatable tag to display the rows.For every row a check box will appear with its id.Now i want the list of the selected items in the controller.can any body explain this with code.
13 years ago
JSF
I have used datatable tag to display the rows.For every row a check box will appear with its id.Now i want the list of the selected items in the controller.can any body explain this with code.





[BPSouther: Removed the word urgent from the subject line]
[ September 20, 2006: Message edited by: Ben Souther ]
13 years ago
JSP
Hi,

How to call sequences from hibernate.I want the sequence value.

(Removed E-mail so the user doesn't get tons more spam - Mark)
[ July 20, 2006: Message edited by: Mark Spritzler ]
Hi,
Can any one tell me how to call the database function from hibernate.