Win a copy of Murach's Python Programming this week in the Jython/Python forum!
  • Post Reply Bookmark Topic Watch Topic
  • New Topic

Navigate to new view on ajax update  RSS feed

Christer Dalevind
Posts: 2
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator

I'm using the Dynamic Faces framework together with JSF to poll updates for a backing bean value like this:

<hutputText id="state" styleClass="stateTextStyle" value="#{stateBean.userState}"/>

function refreshWithAjax() {
DynaFaces.fireAjaxTransaction(null, {'render: 'state'});

and in StateBean class I have the following code (pseudocode here):

public String getState() {
//if state has a certain value call performNavigation method otherwise just
//return state as string

private void performNavigation() {
FacesContext context = FacesContext.getCurrentInstance();
Application application=context.getApplication();
NavigationHandler navigation=application.getNavigationHandler();

My problem is that the navigation only occurs after I press F5 to refresh
the whole page or click on a commandButton. Any ideas on how to solve this?
  • Post Reply Bookmark Topic Watch Topic
  • New Topic
Boost this thread!