how to make values clear on each request.

Hi All,

I have menu on my page.When I click on menu I am opening my pages.

say my menu tab isHome.Under Home i have submenus asA,B,C.

on pages A,B,C I havesearch parameters.

If I go on page A and put search parameters in search fileds I am able to search my record.

Again from menu tab i cliked onPage B.

And again I clicked onPage A.But that time the parameters which I put in search fields previously must get vanish.But those parameters still remain same there.

Can anybody tell me how to make parameters vanish from fields for second time.

Thanks

Sandip

[666 byte] By [sandip_03_jsfa] at [2007-11-26 21:14:42]
# 1
Is it session scoped? If so, then you have to manually null out the values in the bean.This should not occur in request scope, or you might have nested the search fields in the same form.
BalusCa at 2007-7-10 2:52:47 > top of Java-index,Enterprise & Remote Computing,Web Tier APIs...
# 2
Hi BalusC,Yes it is session scoped.Can you please tell me how I will manually set null values in bean.i.e How I will identify method where i will make values manually null in each request.thanksSandip
sandip_03_jsfa at 2007-7-10 2:52:47 > top of Java-index,Enterprise & Remote Computing,Web Tier APIs...
# 3

Hi BalusC,

Please help in scope in faces-config.

For displaying/editing my records I am using your link

http://balusc.xs4all.nl/srv/dev-jep-dat.html

But I am facing problem as,

my search paramters not getting null.

But if I put my scope in faces-config as request its wroking fine i.e. search parameters are getting null.

But with request scope I am facing another problem.i.e If I search any record i will get displayed searched record on same page.

But if i try to edit that record i am seeing data of other record there because of request scope.

can you please help in this

Thanks

sandip_03_jsfa at 2007-7-10 2:52:47 > top of Java-index,Enterprise & Remote Computing,Web Tier APIs...
# 4

Hi,

I am able to clear values but after editing record I am seeing data of other record.

On summary page where I have search text boxes and where I am displaying my records I have written as,

<h:dataTable value="#{bean.allRecs}"

In Java I am writing as,

private HtmlDataTable recsDataTable;

public List getAllRecs() {

list = list from Databse;

anotherBean.firstName("");// here I am clearing my search parameter after displaying list

return list;

}

I Have edit method as,

public String edit() {

ABC abc = (ABC) getRecsDataTable().getRowData();

System.out.prin(abc.firstName);// here I am getting displayed first name of other record

}

Thanks

Sandip>

sandip_03_jsfa at 2007-7-10 2:52:47 > top of Java-index,Enterprise & Remote Computing,Web Tier APIs...
# 5
can anybody tell me why I am seeing data of another recordThanksSandip
sandip_03_jsfa at 2007-7-10 2:52:48 > top of Java-index,Enterprise & Remote Computing,Web Tier APIs...