File APIs for Java Developers
Manipulate DOC, XLS, PPT, PDF and many others from your application.
http://aspose.com/file-tools
The moose likes JSF and the fly likes problem when using a4j:commandButton and a4j:commandLink Big Moose Saloon
  Search | Java FAQ | Recent Topics | Flagged Topics | Hot Topics | Zero Replies
Register / Login


Win a copy of EJB 3 in Action this week in the EJB and other Java EE Technologies forum!
JavaRanch » Java Forums » Java » JSF
Bookmark "problem when using a4j:commandButton and a4j:commandLink " Watch "problem when using a4j:commandButton and a4j:commandLink " New topic
Author

problem when using a4j:commandButton and a4j:commandLink

Amr Khaled
Greenhorn

Joined: Feb 01, 2010
Posts: 3
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

Joined: Oct 18, 2007
Posts: 26
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.


Thanks,
Prasad Kumbhare
SCJP 5.0, SCWCD 5.0, SCBCD 5.0
Amr Khaled
Greenhorn

Joined: Feb 01, 2010
Posts: 3
There is no exception at all.
I meant with fail that it fails displaying the pdf file generated by Jasper
Nilson Parra
Greenhorn

Joined: Feb 25, 2010
Posts: 2
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

Joined: Feb 25, 2010
Posts: 2
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

Joined: Jun 01, 2010
Posts: 3
Hi.

I am experiencing the same problem.

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

Did anyone find the solution ?

 
I agree. Here's the link: http://aspose.com/file-tools
 
subject: problem when using a4j:commandButton and a4j:commandLink
 
Similar Threads
a4j:command link in h:datatable refreshed datatable even when not reRendered
Get the return value of ajax action
download file using h:commandLink or h:graphicImage
RichFaces 4.0 M6 <a4j:commandLink> NOT Working
display confirmation box before deleting