Win a copy of Rust Web Development this week in the Other Languages forum!

Ravisekhar Kopparthi

Greenhorn
+ Follow
since Jul 12, 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 Ravisekhar Kopparthi

Hi Robin,

I don't remember any AJAX solution for your problem.

There is a simple trick in HTML

put this in head section of your JSP containing your JSF datatable
<head>
<meta http-equiv="refresh" content="600">
</head>

where 600 is the number of seconds the browser waits to refresh the page.

In your backing bean do a databind at every refresh.

Hope this helps.

Thanks
Ravi
15 years ago
JSF
Forgot to mention:

Paste the answer in this forum (as I remember doing it in that file but dont exactly remember now) so that others can also find it.

You are really doing a good job man by answering so many questions..

Thanks
Ravi
15 years ago
JSF
Hey Rajeev,

How are u doing? I see you became JSF guru answering tons of questions..


I think you need to check the ViewMIApplication.jsp in IUS?

I have used the number formatting the way you wanted.

Thanks
Ravi
15 years ago
JSF
JSF has a complex lifecycle. It all boils down to if you have considered the JSF life cycle in the code that you pasted.

To me it appears that the <h:datable> is rendered before calling your method.

I think you need to use IBM's scriptcollector
<h:ScriptCollector pre-Render ="onPageLoadBegin()">

and put all the pre render logic in onPageLoadBegin(facesContext)

Hope this helps.

Thanks
Ravisekhar Kopparthi
15 years ago
JSF
Hi,

This is very much possible.
Lets say you have dropdown1 and dropdown2 in your page.

When you select dropdown1 get the value of it in backing bean
do your query to retrieve options for drop down to and set it in sessionScope.

Have the second drop down point to this variable in sessionScope
like this
<h:select id="options" value="#{sessionScope.options}" >


Now to bind this option back to JavaBean is very easy
again when a submit event is fired in the backing bean method
get the value of dropdown2 and set it on a JavaBean.

Hope this helps.

Thanks
Ravisekhar Kopparthi
15 years ago
JSF