You are viewing a plain text version of this content. The canonical link for it is here.
Posted to users@wicket.apache.org by Peter Diefenthaeler <pd...@csc.com> on 2009/04/08 08:36:50 UTC
Update DropDownChoice
Hallo,
I'm trying to update a DropDownChoice from a Ajax Callback. The new value
is correctly added to the choice of selectable values, but I can't set the
new added value as the selected value, only new choice is shown ...
Any ideas are welcome.
Thanks, Peter
---------------------------------------------------------------------
To unsubscribe, e-mail: users-unsubscribe@wicket.apache.org
For additional commands, e-mail: users-help@wicket.apache.org
Re: Update DropDownChoice
Posted by Roman Zechner <ro...@Liland.at>.
what does the final html of the DDC look like after updating?
Peter Diefenthaeler wrote:
> Hallo,
> I'm trying to update a DropDownChoice from a Ajax Callback. The new value
> is correctly added to the choice of selectable values, but I can't set the
> new added value as the selected value, only new choice is shown ...
> Any ideas are welcome.
> Thanks, Peter
>
>
> ---------------------------------------------------------------------
> To unsubscribe, e-mail: users-unsubscribe@wicket.apache.org
> For additional commands, e-mail: users-help@wicket.apache.org
>
>
--
Liland ...does IT better
Liland IT GmbH
Creative Master
email: Roman.Zechner@Liland.at
office: +43 (0)463 220-111 | fax: +43 (0)463 220-288 http://www.Liland.at
---------------------------------------------------------------------
To unsubscribe, e-mail: users-unsubscribe@wicket.apache.org
For additional commands, e-mail: users-help@wicket.apache.org
RE: Montable PDF creating page
Posted by Stefan Lindner <li...@visionet.de>.
Thanks Igor! Works fine!
-----Ursprüngliche Nachricht-----
Von: Igor Vaynberg [mailto:igor.vaynberg@gmail.com]
Gesendet: Donnerstag, 9. April 2009 18:09
An: users@wicket.apache.org
Betreff: Re: Montable PDF creating page
why would you want a mounted page to create pdfs? servlets are so much
better at that.
that said you can do
getrequestcycle().setrequesttarget(new sometargetthatstreamspdfs());
throw new restartresponseexception();
-igor
On Thu, Apr 9, 2009 at 12:39 AM, Stefan Lindner <li...@visionet.de> wrote:
> I need some trick to turn the response into a PDF stream. E. g. I have a
> Bookmarkable Page PdfPAge
>
> public class PdfPage extends WebPage {
>
> public PdfPage (final PageParameters parameters) {
> // Respond with PDF content.
> }
> }
>
>
> Application.init() {
> mountBookmarkablePage("/PdfGenerator", PdfPage.class);
>
> Is it possible to let a WebPage create a pdfOutput? If I try to do the
> following
>
> Response r = getResponse();
> if (r instanceof WebResponse) {
> WebResponse wr = (WebResponse)r;
> wr.reset();
> OutputStream os = wr.getOutputStream();
> try {
> os.write(/*PDFcontent*/);
> } catch (Exception e) {
> e.printStackTrace();
> }
> }
> }
>
> I can see the Exception java.lang.IllegalStateException:
> getOutputStream() has already been called for this response
>
> The reason for this is: I did not find something like
> BookmarkableResource in wicket. It is no problem to have a
> DynaicResourceLink in a page but the displayes content is not
> bookmarkable. Any Ideas?
>
> ---------------------------------------------------------------------
> To unsubscribe, e-mail: users-unsubscribe@wicket.apache.org
> For additional commands, e-mail: users-help@wicket.apache.org
>
>
---------------------------------------------------------------------
To unsubscribe, e-mail: users-unsubscribe@wicket.apache.org
For additional commands, e-mail: users-help@wicket.apache.org
---------------------------------------------------------------------
To unsubscribe, e-mail: users-unsubscribe@wicket.apache.org
For additional commands, e-mail: users-help@wicket.apache.org
Re: Montable PDF creating page
Posted by Igor Vaynberg <ig...@gmail.com>.
why would you want a mounted page to create pdfs? servlets are so much
better at that.
that said you can do
getrequestcycle().setrequesttarget(new sometargetthatstreamspdfs());
throw new restartresponseexception();
-igor
On Thu, Apr 9, 2009 at 12:39 AM, Stefan Lindner <li...@visionet.de> wrote:
> I need some trick to turn the response into a PDF stream. E. g. I have a
> Bookmarkable Page PdfPAge
>
> public class PdfPage extends WebPage {
>
> public PdfPage (final PageParameters parameters) {
> // Respond with PDF content.
> }
> }
>
>
> Application.init() {
> mountBookmarkablePage("/PdfGenerator", PdfPage.class);
>
> Is it possible to let a WebPage create a pdfOutput? If I try to do the
> following
>
> Response r = getResponse();
> if (r instanceof WebResponse) {
> WebResponse wr = (WebResponse)r;
> wr.reset();
> OutputStream os = wr.getOutputStream();
> try {
> os.write(/*PDFcontent*/);
> } catch (Exception e) {
> e.printStackTrace();
> }
> }
> }
>
> I can see the Exception java.lang.IllegalStateException:
> getOutputStream() has already been called for this response
>
> The reason for this is: I did not find something like
> BookmarkableResource in wicket. It is no problem to have a
> DynaicResourceLink in a page but the displayes content is not
> bookmarkable. Any Ideas?
>
> ---------------------------------------------------------------------
> To unsubscribe, e-mail: users-unsubscribe@wicket.apache.org
> For additional commands, e-mail: users-help@wicket.apache.org
>
>
---------------------------------------------------------------------
To unsubscribe, e-mail: users-unsubscribe@wicket.apache.org
For additional commands, e-mail: users-help@wicket.apache.org
Montable PDF creating page
Posted by Stefan Lindner <li...@visionet.de>.
I need some trick to turn the response into a PDF stream. E. g. I have a
Bookmarkable Page PdfPAge
public class PdfPage extends WebPage {
public PdfPage (final PageParameters parameters) {
// Respond with PDF content.
}
}
Application.init() {
mountBookmarkablePage("/PdfGenerator", PdfPage.class);
Is it possible to let a WebPage create a pdfOutput? If I try to do the
following
Response r = getResponse();
if (r instanceof WebResponse) {
WebResponse wr = (WebResponse)r;
wr.reset();
OutputStream os = wr.getOutputStream();
try {
os.write(/*PDFcontent*/);
} catch (Exception e) {
e.printStackTrace();
}
}
}
I can see the Exception java.lang.IllegalStateException:
getOutputStream() has already been called for this response
The reason for this is: I did not find something like
BookmarkableResource in wicket. It is no problem to have a
DynaicResourceLink in a page but the displayes content is not
bookmarkable. Any Ideas?
---------------------------------------------------------------------
To unsubscribe, e-mail: users-unsubscribe@wicket.apache.org
For additional commands, e-mail: users-help@wicket.apache.org
Re: Update DropDownChoice
Posted by PDiefent <pd...@csc.com>.
Hi Dariusz,
thank you very much, that's the solution for my problem.
Peter
Dariusz Wojtas wrote:
>
> Try to update the ddc model, then call:
> ddc.modelChanged();
> before rendering.
>
> Regards,
>
> Dariusz Wojtas
>
> On Wed, Apr 8, 2009 at 8:36 AM, Peter Diefenthaeler <pd...@csc.com>
> wrote:
>>
>> Hallo,
>> I'm trying to update a DropDownChoice from a Ajax Callback. The new value
>> is correctly added to the choice of selectable values, but I can't set
>> the
>> new added value as the selected value, only new choice is shown ...
>> Any ideas are welcome.
>> Thanks, Peter
>
> ---------------------------------------------------------------------
> To unsubscribe, e-mail: users-unsubscribe@wicket.apache.org
> For additional commands, e-mail: users-help@wicket.apache.org
>
>
>
--
View this message in context: http://www.nabble.com/Update-DropDownChoice-tp22944165p22964826.html
Sent from the Wicket - User mailing list archive at Nabble.com.
---------------------------------------------------------------------
To unsubscribe, e-mail: users-unsubscribe@wicket.apache.org
For additional commands, e-mail: users-help@wicket.apache.org
Re: Update DropDownChoice
Posted by Dariusz Wojtas <dw...@gmail.com>.
Try to update the ddc model, then call:
ddc.modelChanged();
before rendering.
Regards,
Dariusz Wojtas
On Wed, Apr 8, 2009 at 8:36 AM, Peter Diefenthaeler <pd...@csc.com> wrote:
>
> Hallo,
> I'm trying to update a DropDownChoice from a Ajax Callback. The new value
> is correctly added to the choice of selectable values, but I can't set the
> new added value as the selected value, only new choice is shown ...
> Any ideas are welcome.
> Thanks, Peter
---------------------------------------------------------------------
To unsubscribe, e-mail: users-unsubscribe@wicket.apache.org
For additional commands, e-mail: users-help@wicket.apache.org