You are viewing a plain text version of this content. The canonical link for it is here.
Posted to users@myfaces.apache.org by "H. Swaczinna" <sw...@wlp-systems.de> on 2007/01/25 12:54:29 UTC
[Tobago] Problem with progress bar and PDF download
Hello,
now to the problem with the progress bar I mentioned earlier.
I want to download a PDF file as the result of an action. I found code
on the net for doing this (http://www.nabble.com/download-file-breaks-lifecycle-t2893828.html).
This works fine. The browser options a dialog box, where you can choose
to open or to store the PDF file. The content of the page remains
unchanged.
But the page remains disabled and with the progress bar running for
ever, because the page waits for the result of the action, which never
comes. Because there's no target attribute in this case, Tobago can not
know, that there will be no result from the action. So I think, we need
some kind of switch, to switch the progress bar off for some special
cases.
Regards
Helmut
P.S. Sorry for the many (bug) postings and thank you for quick bug fixes
and the fantastic support so far.
A question about showing/opening PDF-file in run-time
Posted by Thomas Chang <th...@yahoo.de>.
Good day everybody,
My code look as follow. What I want to do is: I generate a pdf-file in run-time and put it under a dir in server-side, assumed under "c:\temp\myfile.pdf". If one clicks the commmanlink, the PDF-file will be opened in a new browser window with tool-bar which contains save, print etc.
My code look as follow. And I want to know how can I write the function showPDF() in my backing bean.
Or one can do this in an other way?
Thanks
Thomas
myJSF.xhtml
*************
...
<t:commandLink id="csvDownload" value="File download" action="#{fileBean.showPDF }" immediate="true"></t:commandLink>
...
MyBean.java
*************
...
showPDF(){
...
}
...
---------------------------------
NEU: Fragen stellen - Wissen, Meinungen und Erfahrungen teilen. Jetzt auf Yahoo! Clever.
Re: A question about file-download
Posted by Thomas Chang <th...@yahoo.de>.
I've tried this example and it works quite well. But I have now another problem. I.e.: after I've saved the file and close the download dialog. It doesn't change to another xhtml-page (assumed downloadOK.xhtml. See my code shown as follow). It stay by myJSF.xhtml.
Who knows why?
Thanks
Thomas
...
myJSF.xhtml
*************
...
<t:commandLink id="csvDownload" value="File download" action="#{fileBean.fileDownload }" immediate="true"></t:commandLink>
...
MyBean.java
*************
...
fileDownload(){
...
return "downloadOK"
}
...
faces-config.xml
*******************
<navigation>
<from>downloadOK</from>
... <to>downloadOK.xhtml</to>
</navigation>
...
Adrian Mitev <ad...@googlemail.com> schrieb:
See here - http://wiki.apache.org/myfaces/Sending_Files
2007/1/26, Thomas Chang <thomas2004ch@yahoo.de >: Hi,
My code look as follow. What I want to do is: I generate a file in run-time and put it under a dir in server-side, assumed under "c:\temp\myfile.txt". If one clicks the commmanlink, a pop-up dialog for file-download will be shown and one can chose a dir in local to save the file. I wonder if I can use my following code to do so. And I want to know how can I write the function fileDownlaod() in my backing bean.
Or one can do this in an other way?
Thanks
Thomas
myJSF.xhtml
*************
...
<t:commandLink id="csvDownload" value="File download" action="#{fileuploadBean.fileDownload }" immediate="true"></t:commandLink>
...
MyBean.java
*************
...
fileDownload(){
}
...
---------------------------------
Besseren Schutz gegen Spam - jetzt bei dem neuen Yahoo! Mail .
---------------------------------
Was Sie schon immer wissen wollten aber nie zu Fragen trauten? Yahoo! Clever hilft Ihnen.
Re: A question about file-download
Posted by Thomas Chang <th...@yahoo.de>.
Perfect! Thanks!
Adrian Mitev <ad...@googlemail.com> schrieb: See here - http://wiki.apache.org/myfaces/Sending_Files
2007/1/26, Thomas Chang <thomas2004ch@yahoo.de >:Hi,
My code look as follow. What I want to do is: I generate a file in run-time and put it under a dir in server-side, assumed under "c:\temp\myfile.txt". If one clicks the commmanlink, a pop-up dialog for file-download will be shown and one can chose a dir in local to save the file. I wonder if I can use my following code to do so. And I want to know how can I write the function fileDownlaod() in my backing bean.
Or one can do this in an other way?
Thanks
Thomas
myJSF.xhtml
*************
...
<t:commandLink id="csvDownload" value="File download" action="#{fileuploadBean.fileDownload }" immediate="true"></t:commandLink>
...
MyBean.java
*************
...
fileDownload(){
}
...
---------------------------------
Besseren Schutz gegen Spam - jetzt bei dem neuen Yahoo! Mail .
---------------------------------
Yahoo! Messenger - kostenlos* mit Familie und Freunden von PC zu PC telefonieren.
Re: A question about file-download
Posted by Adrian Mitev <ad...@googlemail.com>.
See here - http://wiki.apache.org/myfaces/Sending_Files
2007/1/26, Thomas Chang <th...@yahoo.de>:
>
> Hi,
>
> My code look as follow. What I want to do is: I generate a file in
> run-time and put it under a dir in server-side, assumed under
> "c:\temp\myfile.txt". If one clicks the commmanlink, a pop-up dialog for
> file-download will be shown and one can chose a dir in local to save the
> file. I wonder if I can use my following code to do so. And I want to know
> how can I write the function fileDownlaod() in my backing bean.
>
> Or one can do this in an other way?
>
> Thanks
>
> Thomas
>
> myJSF.xhtml
> *************
> ...
> <t:commandLink id="csvDownload" value="File download" action="#{
> fileuploadBean.fileDownload}" immediate="true"></t:commandLink>
> ...
>
>
> MyBean.java
> *************
> ...
> fileDownload(){
> }
> ...
>
> ------------------------------
> Besseren Schutz gegen Spam - jetzt bei dem neuen Yahoo! Mail
> <http://de.rd.yahoo.com/evt=40589/*http://de.docs.yahoo.com/ymail/landing.html+%0A>.
>
>
>
A question about file-download
Posted by Thomas Chang <th...@yahoo.de>.
Hi,
My code look as follow. What I want to do is: I generate a file in run-time and put it under a dir in server-side, assumed under "c:\temp\myfile.txt". If one clicks the commmanlink, a pop-up dialog for file-download will be shown and one can chose a dir in local to save the file. I wonder if I can use my following code to do so. And I want to know how can I write the function fileDownlaod() in my backing bean.
Or one can do this in an other way?
Thanks
Thomas
myJSF.xhtml
*************
...
<t:commandLink id="csvDownload" value="File download" action="#{fileuploadBean.fileDownload}" immediate="true"></t:commandLink>
...
MyBean.java
*************
...
fileDownload(){
}
...
---------------------------------
Besseren Schutz gegen Spam - jetzt bei dem neuen Yahoo! Mail .
Re: How to set the color to the helpText in ?
Posted by Jay Balunas <ba...@gmail.com>.
I did not see any specific style or class attribute on the component for the
helpText style.
I would suggest taking a quick look at the html page source and see if it
surrounded by its own span or some other element. That way you could use
CSS to set it directly- such as
.myCalendar {
//calendar specific styles
}
.myCalendar span{
//my span calendar styles
color : red;
}
Good Luck,
Jay
On 1/26/07, Thomas Chang <th...@yahoo.de> wrote:
>
> Hi,
>
> How can I set the color to "DD.MM.YYYY"?
>
> <t:inputCalendar id="geburtsdatum" renderAsPopup="true" helpText="
> DD.MM.YYYY"
> ...
> </t:inputCalendar>
> ...
>
> Thanks
>
> Thomas
>
> ------------------------------
> Besseren Schutz gegen Spam - jetzt bei dem neuen Yahoo! Mail
> <http://de.rd.yahoo.com/evt=40589/*http://de.docs.yahoo.com/ymail/landing.html+%0A>.
>
>
>
Exception by using
Posted by Thomas Chang <th...@yahoo.de>.
Hi all,
I try to use the <t:inputtextHelp> as follow.
<t:inputTextHelp id="geldbetrag" helpText="11,11"
value="#{myBean.money}" maxlength="30" size="32">
</t:inputTextHelp>
...
But I got exception as follow:
<t:inputTextHelp> Tag Library supports namespace: http://myfaces.apache.org/tomahawk, but no tag was defined for name: inputTextHelp
Should I update the tomahawk version?
Thanks.
Thomas
---------------------------------
Was ist Glück? Schlafen Fische überhaupt? Die Antworten gibts auf Yahoo! Clever.
How to set the color to the helpText in ?
Posted by Thomas Chang <th...@yahoo.de>.
Hi,
How can I set the color to "DD.MM.YYYY"?
<t:inputCalendar id="geburtsdatum" renderAsPopup="true" helpText="DD.MM.YYYY"
...
</t:inputCalendar>
...
Thanks
Thomas
---------------------------------
Besseren Schutz gegen Spam - jetzt bei dem neuen Yahoo! Mail .
Re: Again a qQuestion about value="#{......}
Posted by David Delbecq <de...@oma.be>.
You are right, seems they were stripped by Mr Chang's client :)
En l'instant précis du 01/26/07 12:55, Jay Balunas s'exprimait en ces
termes:
> FYI - It came though fine the first time for me :)
>
> On 1/26/07, David Delbecq <de...@oma.be> wrote:
>>
>> Somehow, something in the mailing list server has stripped my text,
>> thinking it was html tags :s
>>
>> Here they are again, without their respective opening, closing
>> bracket :s
>>
>> h:outputText value="#{myBean.myFirstname} " style="color: #eeeeee"
>> h:outputText value="#{myBean.mySurname}" style="color: #ffffee"
>>
>>
>> En l'instant précis du 01/26/07 10:07, Thomas Chang s'exprimait en ces
>> termes:
>> > Thanks!
>> >
>> >
>> > David Delbecq <de...@oma.be> schrieb: you can't have several
>> 'style' in
>> a same outputtext.
>> >
>> > The output text has 1 value and 1 style.
>> > if you want several style, your have to split your outputtext:
>> >
>> >
>> >
>> >
>> > (notice i included the space in first value)
>> >
>> >
>> > En l'instant précis du 01/26/07 09:33, Thomas Chang s'exprimait en ces
>> > termes:
>> >
>> >> How can I set the color of each value? Such as following?
>> >>
>> >> value="#{myBean.myFirstname} color="#eeeeee" #{myBean.mySurname}
>> color="#ffffee"..."/>.
>> >>
>> >> Thomas
>> >>
>> >>
>> >> Simon Lessard schrieb: Hello Thomas,
>> >>
>> >> Yes, you can do it using .
>> >>
>> >> Note the absence of + and the fact that it's a single string value
>> with
>> inlined EL expreseeions.
>> >>
>> >>
>> >> Regards,
>> >>
>> >> ~ Simon
>> >>
>> >> On 1/25/07, Thomas Chang wrote: Hi,
>> >>
>> >> Is it possible to put more values in the value="#{...}" such like:
>> >>
>> >>
>> >>
>> >> Thanks
>> >>
>> >> Thomas
>> >>
>> >>
>> >> ---------------------------------
>> >> NEU: Fragen stellen - Wissen, Meinungen und Erfahrungen teilen.
>> Jetzt
>> auf Yahoo! Clever.
>> >>
>> >>
>> >>
>> >>
>> >>
>> >> ---------------------------------
>> >> Was Sie schon immer wissen wollten aber nie zu Fragen trauten? Yahoo!
>> Clever hilft Ihnen.
>> >>
>> >>
>> >
>> >
>> >
>> >
>> > ---------------------------------
>> > Yahoo! 360° – Bloggen und Leute treffen. Erstellen Sie jetzt Ihre
>> eigene
>> Seite – kostenlos!.
>> >
>>
>>
>
Re: Again a qQuestion about value="#{......}
Posted by Jay Balunas <ba...@gmail.com>.
FYI - It came though fine the first time for me :)
On 1/26/07, David Delbecq <de...@oma.be> wrote:
>
> Somehow, something in the mailing list server has stripped my text,
> thinking it was html tags :s
>
> Here they are again, without their respective opening, closing bracket :s
>
> h:outputText value="#{myBean.myFirstname} " style="color: #eeeeee"
> h:outputText value="#{myBean.mySurname}" style="color: #ffffee"
>
>
> En l'instant précis du 01/26/07 10:07, Thomas Chang s'exprimait en ces
> termes:
> > Thanks!
> >
> >
> > David Delbecq <de...@oma.be> schrieb: you can't have several 'style' in
> a same outputtext.
> >
> > The output text has 1 value and 1 style.
> > if you want several style, your have to split your outputtext:
> >
> >
> >
> >
> > (notice i included the space in first value)
> >
> >
> > En l'instant précis du 01/26/07 09:33, Thomas Chang s'exprimait en ces
> > termes:
> >
> >> How can I set the color of each value? Such as following?
> >>
> >> value="#{myBean.myFirstname} color="#eeeeee" #{myBean.mySurname}
> color="#ffffee"..."/>.
> >>
> >> Thomas
> >>
> >>
> >> Simon Lessard schrieb: Hello Thomas,
> >>
> >> Yes, you can do it using .
> >>
> >> Note the absence of + and the fact that it's a single string value with
> inlined EL expreseeions.
> >>
> >>
> >> Regards,
> >>
> >> ~ Simon
> >>
> >> On 1/25/07, Thomas Chang wrote: Hi,
> >>
> >> Is it possible to put more values in the value="#{...}" such like:
> >>
> >>
> >>
> >> Thanks
> >>
> >> Thomas
> >>
> >>
> >> ---------------------------------
> >> NEU: Fragen stellen - Wissen, Meinungen und Erfahrungen teilen. Jetzt
> auf Yahoo! Clever.
> >>
> >>
> >>
> >>
> >>
> >> ---------------------------------
> >> Was Sie schon immer wissen wollten aber nie zu Fragen trauten? Yahoo!
> Clever hilft Ihnen.
> >>
> >>
> >
> >
> >
> >
> > ---------------------------------
> > Yahoo! 360° – Bloggen und Leute treffen. Erstellen Sie jetzt Ihre eigene
> Seite – kostenlos!.
> >
>
>
Re: Again a qQuestion about value="#{......}
Posted by David Delbecq <de...@oma.be>.
Somehow, something in the mailing list server has stripped my text,
thinking it was html tags :s
Here they are again, without their respective opening, closing bracket :s
h:outputText value="#{myBean.myFirstname} " style="color: #eeeeee"
h:outputText value="#{myBean.mySurname}" style="color: #ffffee"
En l'instant précis du 01/26/07 10:07, Thomas Chang s'exprimait en ces
termes:
> Thanks!
>
>
> David Delbecq <de...@oma.be> schrieb: you can't have several 'style' in a same outputtext.
>
> The output text has 1 value and 1 style.
> if you want several style, your have to split your outputtext:
>
>
>
>
> (notice i included the space in first value)
>
>
> En l'instant précis du 01/26/07 09:33, Thomas Chang s'exprimait en ces
> termes:
>
>> How can I set the color of each value? Such as following?
>>
>> value="#{myBean.myFirstname} color="#eeeeee" #{myBean.mySurname} color="#ffffee"..."/>.
>>
>> Thomas
>>
>>
>> Simon Lessard schrieb: Hello Thomas,
>>
>> Yes, you can do it using .
>>
>> Note the absence of + and the fact that it's a single string value with inlined EL expreseeions.
>>
>>
>> Regards,
>>
>> ~ Simon
>>
>> On 1/25/07, Thomas Chang wrote: Hi,
>>
>> Is it possible to put more values in the value="#{...}" such like:
>>
>>
>>
>> Thanks
>>
>> Thomas
>>
>>
>> ---------------------------------
>> NEU: Fragen stellen - Wissen, Meinungen und Erfahrungen teilen. Jetzt auf Yahoo! Clever.
>>
>>
>>
>>
>>
>> ---------------------------------
>> Was Sie schon immer wissen wollten aber nie zu Fragen trauten? Yahoo! Clever hilft Ihnen.
>>
>>
>
>
>
>
> ---------------------------------
> Yahoo! 360° – Bloggen und Leute treffen. Erstellen Sie jetzt Ihre eigene Seite – kostenlos!.
>
Re: Again a qQuestion about value="#{......}
Posted by Thomas Chang <th...@yahoo.de>.
Thanks!
David Delbecq <de...@oma.be> schrieb: you can't have several 'style' in a same outputtext.
The output text has 1 value and 1 style.
if you want several style, your have to split your outputtext:
(notice i included the space in first value)
En l'instant précis du 01/26/07 09:33, Thomas Chang s'exprimait en ces
termes:
> How can I set the color of each value? Such as following?
>
> value="#{myBean.myFirstname} color="#eeeeee" #{myBean.mySurname} color="#ffffee"..."/>.
>
> Thomas
>
>
> Simon Lessard schrieb: Hello Thomas,
>
> Yes, you can do it using .
>
> Note the absence of + and the fact that it's a single string value with inlined EL expreseeions.
>
>
> Regards,
>
> ~ Simon
>
> On 1/25/07, Thomas Chang wrote: Hi,
>
> Is it possible to put more values in the value="#{...}" such like:
>
>
>
> Thanks
>
> Thomas
>
>
> ---------------------------------
> NEU: Fragen stellen - Wissen, Meinungen und Erfahrungen teilen. Jetzt auf Yahoo! Clever.
>
>
>
>
>
> ---------------------------------
> Was Sie schon immer wissen wollten aber nie zu Fragen trauten? Yahoo! Clever hilft Ihnen.
>
---------------------------------
Yahoo! 360° Bloggen und Leute treffen. Erstellen Sie jetzt Ihre eigene Seite kostenlos!.
Re: Again a qQuestion about value="#{......}
Posted by David Delbecq <de...@oma.be>.
you can't have several 'style' in a same outputtext.
The output text has 1 value and 1 style.
if you want several style, your have to split your outputtext:
<h:outputText value="#{myBean.myFirstname} " style="color: #eeeeee"/>
<h:outputText value="#{myBean.mySurname}" style="color: #ffffee"/>
(notice i included the space in first value)
En l'instant précis du 01/26/07 09:33, Thomas Chang s'exprimait en ces
termes:
> How can I set the color of each value? Such as following?
>
> value="#{myBean.myFirstname} color="#eeeeee" #{myBean.mySurname} color="#ffffee"..."/>.
>
> Thomas
>
>
> Simon Lessard <si...@gmail.com> schrieb: Hello Thomas,
>
> Yes, you can do it using <t:outputText value="#{myBean.myFirstname} #{myBean.mySurname} ..."/>.
>
> Note the absence of + and the fact that it's a single string value with inlined EL expreseeions.
>
>
> Regards,
>
> ~ Simon
>
> On 1/25/07, Thomas Chang <th...@yahoo.de> wrote: Hi,
>
> Is it possible to put more values in the value="#{...}" such like:
>
> <t:outputText value="#{myBean.myFirstname} + " " + #{myBean.mySurname } + ..."/>
>
> Thanks
>
> Thomas
>
>
> ---------------------------------
> NEU: Fragen stellen - Wissen, Meinungen und Erfahrungen teilen. Jetzt auf Yahoo! Clever.
>
>
>
>
>
> ---------------------------------
> Was Sie schon immer wissen wollten aber nie zu Fragen trauten? Yahoo! Clever hilft Ihnen.
>
Again a qQuestion about value="#{......}
Posted by Thomas Chang <th...@yahoo.de>.
How can I set the color of each value? Such as following?
value="#{myBean.myFirstname} color="#eeeeee" #{myBean.mySurname} color="#ffffee"..."/>.
Thomas
Simon Lessard <si...@gmail.com> schrieb: Hello Thomas,
Yes, you can do it using <t:outputText value="#{myBean.myFirstname} #{myBean.mySurname} ..."/>.
Note the absence of + and the fact that it's a single string value with inlined EL expreseeions.
Regards,
~ Simon
On 1/25/07, Thomas Chang <th...@yahoo.de> wrote: Hi,
Is it possible to put more values in the value="#{...}" such like:
<t:outputText value="#{myBean.myFirstname} + " " + #{myBean.mySurname } + ..."/>
Thanks
Thomas
---------------------------------
NEU: Fragen stellen - Wissen, Meinungen und Erfahrungen teilen. Jetzt auf Yahoo! Clever.
---------------------------------
Was Sie schon immer wissen wollten aber nie zu Fragen trauten? Yahoo! Clever hilft Ihnen.
Re: Question about value="#{......}
Posted by Simon Lessard <si...@gmail.com>.
Hello Thomas,
Yes, you can do it using <t:outputText value="#{myBean.myFirstname} #{
myBean.mySurname} ..."/>.
Note the absence of + and the fact that it's a single string value with
inlined EL expreseeions.
Regards,
~ Simon
On 1/25/07, Thomas Chang <th...@yahoo.de> wrote:
>
> Hi,
>
> Is it possible to put more values in the value="#{...}" such like:
>
> <t:outputText value="#{myBean.myFirstname} + " " + #{myBean.mySurname} +
> ..."/>
>
> Thanks
>
> Thomas
>
> ------------------------------
> NEU: Fragen stellen - Wissen, Meinungen und Erfahrungen teilen. Jetzt auf
> Yahoo! Clever<http://de.rd.yahoo.com/xx/searchpromo/i/tagline/cleverfp/*http://de.answers.yahoo.com>.
>
>
>
Question about value="#{......}
Posted by Thomas Chang <th...@yahoo.de>.
Hi,
Is it possible to put more values in the value="#{...}" such like:
<t:outputText value="#{myBean.myFirstname} + " " + #{myBean.mySurname} + ..."/>
Thanks
Thomas
---------------------------------
NEU: Fragen stellen - Wissen, Meinungen und Erfahrungen teilen. Jetzt auf Yahoo! Clever.
Re: [Tobago] Problem with progress bar and PDF download
Posted by Bernd Bohmann <be...@atanion.com>.
Hello Helmut,
Udo commited the latest changes for progressbar.
You can disable the progressbar with the attribute transition of button
or link.
Regards
Bernd
H. Swaczinna wrote:
> Hello,
>
> now to the problem with the progress bar I mentioned earlier.
>
> I want to download a PDF file as the result of an action. I found code
> on the net for doing this (http://www.nabble.com/download-file-breaks-lifecycle-t2893828.html).
> This works fine. The browser options a dialog box, where you can choose
> to open or to store the PDF file. The content of the page remains
> unchanged.
>
> But the page remains disabled and with the progress bar running for
> ever, because the page waits for the result of the action, which never
> comes. Because there's no target attribute in this case, Tobago can not
> know, that there will be no result from the action. So I think, we need
> some kind of switch, to switch the progress bar off for some special
> cases.
>
> Regards
> Helmut
>
> P.S. Sorry for the many (bug) postings and thank you for quick bug fixes
> and the fantastic support so far.
>