Win a copy of Cross-Platform Desktop Applications: Using Node, Electron, and NW.js this week in the JavaScript forum!
  • Post Reply Bookmark Topic Watch Topic
  • New Topic

JSF page button does not open on the server  RSS feed

 
Rafael Ra
Greenhorn
Posts: 15
1
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
Good morning!

I have a strange problem.

My application run well on localhost, but the server that I sent when I click a button p:commandButton does not open

I am looking at the Glassfish server.log and no error is generated. However I see an error in the browser debug

image below


it refers to this line


dlgNew is defined


Just to remember: run ok on localhost.
Using: primefaces 3.4.2 / spring security / Hibernate

any idea what is happening?

Thanks!
 
Tim Holloway
Bartender
Posts: 18662
71
Android Eclipse IDE Linux
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
I don't see anything obvious, although if your localhost execution is managed by your IDE and your remote execution is not, that would be a starting point. Also consider changing

to

For one thing, if I'm not mistaken, the oncomplete method is working in JavaScript mode and that means that the page element IDs must be their true, absolute IDs as generated by the JSF page renderer, not the short IDs that are in the JSF View Template source. Senility keeps me from remembering, but in RichFaces, I think there was a custom RichFaces JavaScript method to assist in that. Maybe PrimeFaces has an equivalent.

Also, "prepararInserir()" is bad form. JSF EL is supposed to be defining a reference to the Action method that JSF will invoke. It's not supposed to be a direct call by the page. So remove the "()".
 
Rafael Ra
Greenhorn
Posts: 15
1
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
Resolved.

I had another page that work and I redid it step by step.
I have no idea what I did to solve, however some things I needed to change.

Thanks all!

Before:


After:

--------------------------

Before:


After:
 
Tim Holloway
Bartender
Posts: 18662
71
Android Eclipse IDE Linux
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
You still should remove the "()" from prepararInserer.

It's semantically incorrect and may result in unexpected consequences.
 
Rafael Ra
Greenhorn
Posts: 15
1
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
Removed.

Tks for reminder.

 
  • Post Reply Bookmark Topic Watch Topic
  • New Topic
Boost this thread!