File APIs for Java Developers
Manipulate DOC, XLS, PPT, PDF and many others from your application.
http://aspose.com/file-tools
  • Post Reply
  • Bookmark Topic Watch Topic
  • New Topic

problem when using a4j:commandButton and a4j:commandLink

 
Amr Khaled
Greenhorn
Posts: 3
  • 0
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
I'm a beginner in JSF & richfaces
I'm having a JSF Richfaces page.
I'm trying to execute a JasperReport code that displays the generated pdf file in the browser.

Actually when I put the code in the ActionListner method of the:
h:commandButton
h:commandLink
a4j:htmlCommandLink

it works successfully but when I try using;
a4j:commandButton
a4j:commandLink
these components fail

I didn't get the pdf rather than I get blank page with some strange characters displayed

Anybody knows why this happens

Thanks
 
Prasad Kumbhare
Greenhorn
Posts: 26
  • 0
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
Can you please post stacktrace of any exceptions you see in console ? When you say fails, I understood it throws some exceptions behind the scene.
 
Amr Khaled
Greenhorn
Posts: 3
  • 0
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
There is no exception at all.
I meant with fail that it fails displaying the pdf file generated by Jasper
 
Nilson Parra
Greenhorn
Posts: 2
  • 0
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
Hi everybody.
something similar happens to me. Shows you something like this?


%PDF-1.4
%����
3 0 obj
<</Length 3815/Filter/FlateDecode>>stream


this is my button, which is inside a <rich:modalPanel>



method of backbean:




Please, if anyone knows what to do, I would greatly appreciate.

Thanks.


Nilson
 
Nilson Parra
Greenhorn
Posts: 2
  • 0
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
Hi.

make the following changes in my code:

code previous:

Changed by:


with tags <h:form> and <h:commandButton> works fine.

the question is, why the tags <a4j:form> and <a4j:commandButton> dont work?


Nilson
 
Daniel Gisbert
Greenhorn
Posts: 3
  • 0
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
Hi.

I am experiencing the same problem.

It works fine with <h:commandButton> but not with <a4j:commandButton>

Did anyone find the solution ?

 
It is sorta covered in the JavaRanch Style Guide.
  • Post Reply
  • Bookmark Topic Watch Topic
  • New Topic