Win a copy of The Java Performance Companion this week in the Performance forum!
  • Post Reply
  • Bookmark Topic Watch Topic
  • New Topic

Creator 2 and Ajax4JSF

 
Abul Kayes
Greenhorn
Posts: 3
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
Hi everyone! This is my first post to JavaRanch forum.
I'm new to JSF and Creator. I was trying to put AJAX functionality with Ajax4JSF to a simple JSF page I made with Java Studio Creator 2 (update 1). I did as they instructed in their tutorials. But it didn't work.
Can anyone please tell if there is any issue with Ajax4JSF and Creator 2.
Any references, 'Hello World' code will be much appreciated. Thanks!
 
Sergey Smirnov
Ranch Hand
Posts: 167
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
Could you post a jsf page code for review?
 
Abul Kayes
Greenhorn
Posts: 3
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
Hi! Sorry for the delay in replying. I've been keeping too busy at work for some days.
Ok, all I wanna say that the procedure to add AJAX functionality (as instructed in 'Ajax4jsf Developer Guide') to a JSF page works only with the <h:...> tags, not with the <ui:...> tags.

Here's the JSP code that works for me:


But when I put the <ui:...> tags as follows it doesn't work.



Please let me know if its possible to use <ui> tags with Ajax4jsf.
Thank you.
 
Sergey Smirnov
Ranch Hand
Posts: 167
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
I have no Creator 2 on my desk. So, I can say for sure. Add
<a4j:log hotkey="M" /> before the <ui:body>. It should show the Ajax log if you press Ctrl-Shift-M after the page is loaded into the browser. Take a look, does the request go to the server and does the response come back.
 
Abul Kayes
Greenhorn
Posts: 3
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
Hi Sergey.
I put the <a4j:log> tag before the <ui:body> tag. It works fine with the <h> tags. But with the <ui> tags, when I press ctrl+shift+M, it just echoes the text to the static text field. But no logs are viewed. But I think the echoed text is coming from server. So why doesn't it work with onkeyup event? The whole thing is quite blurry to me. Can you suggest on this?
 
  • Post Reply
  • Bookmark Topic Watch Topic
  • New Topic