开发者

JSF Delay rendering of a component

开发者 https://www.devze.com 2023-02-14 08:41 出处:网络
I\'m using JSF/2.0 with vanilla Mojarra. I\'ve got a listtable of clients loading up on a screen, and 10 seconds after the screen loads, I w开发者_如何学JAVAant to put an individual dollar value nex

I'm using JSF/2.0 with vanilla Mojarra.

I've got a list table of clients loading up on a screen, and 10 seconds after the screen loads, I w开发者_如何学JAVAant to put an individual dollar value next to each client name.

I'm thinking of extending an existing JSF component to do this. What's the best way to do this?

JG


The call has to come from the client side since the standard HTTP protocol doesn't allow the server side to push stuff to the client side. Start with JavaScript's setTimeout() function.

<script>setTimeout(functionName, 10000);</script>

You could use plain JS (or even jQuery) to do the changes. If you need to invoke a JSF action, call the jsf.ajax.request() function.

0

精彩评论

暂无评论...
验证码 换一张
取 消