I don't get it. Where in your page constructor do you add a
feedbackmessage? The only place i see is in onsubmit and that is not
called on first page render. So where are the feedbackmessages shown
when you access the page via its mounted path coming from?

Feedbackmessages are cleared after they are rendered, so if somewhere
you add some and then go directly to the mounted path they will show
up on that page. Since you are not adding any feedback in the pagelink
it is perfectly logical that the page will not render feedback when
accessed from the pagelink.

Maurice

On Fri, Apr 11, 2008 at 10:24 AM, Иванов Дмитрий <[EMAIL PROTECTED]> wrote:
> Добрый день.
>
>  Friday, April 11, 2008, 2:00:08 PM, вы писали:
>
>  --- Code Start ----
>  public class DBFUploadPage extends LightUIPage {
>     public DBFUploadPage() {
>         add(new UploadDBFTemplate("upload_dbf_form"));
>         add(new PopupCloseLink("close_window"));
>     }
>
>     public class UploadDBFTemplate extends Form {
>
>         private Folder uploadFolder;
>         private FileUploadField fileUploadField;
>
>         public UploadDBFTemplate(String id) {
>             super(id);
>
>             uploadFolder = new Folder(System.getProperty("java.io.tmpdir"), 
> "nitro-uploads");
>             uploadFolder.mkdirs();
>             setMultiPart(true);
>
>             String tplDate = "";
>             add(new Label("template_date", tplDate));
>             add(fileUploadField = new FileUploadField("new_dbf_template"));
>             add(new UploadProgressBar("progress", this));
>
>             FeedbackPanel feedbackPanel = new 
> FeedbackPanel("feedback_message");
>             add(feedbackPanel);
>         }
>
>         protected void onSubmit() {
>             final FileUpload upload = fileUploadField.getFileUpload();
>             if (upload != null) {
>                 // code skipped for clarity
>             } else {
>                 error("Template not specified");
>             }
>         }
>     }
>  }
>
>  // Code in another page where i add PageLink to DBFUploadPage
>
>         PopupSettings ps = new PopupSettings()
>             .setHeight(200)
>             .setWidth(400)
>             .setTop(50)
>             .setLeft(200)
>             .setWindowName("Upload File");
>
>         BookmarkablePageLink pl = new BookmarkablePageLink("dbf_tpl_link", 
> DBFUploadPage.class);
>         pl.setPopupSettings(ps);
>         frm.add(pl);
>
>  --- Code End ------
>
>  --- Markup Start ----
>  <html>
>  <head>
>  ...
>  </head>
>  <body>
>  <wicket:extend>
>  <table width="100%" margin="5" padding="5">
>  <tr><td>
>  <h3>Template renewing</h3>
>  <form wicket:id="upload_dbf_form" action="">
>         Current template <span wicket:id="template_date">[template 
> date]</span>.
>         <br/>New template:<br/>
>         <input wicket:id="new_dbf_template" type="file" size="30"><input 
> type="submit" value="Refresh" />
>         <span wicket:id="progress">[[ajax upload progressbar]]</span>
>         <span wicket:id="feedback_message">[feedback]</span>
>  </form>
>  <br/>
>  <a wicket:id="close_window" href="#">Close window</a>
>  </td></tr>
>  </table>
>  </wicket:extend>
>  </body>
>  </html>
>  --- Markup End ------
>
>
>  MM> You could try a BookmarkablePageLink, but it should work with a
>  MM> regular pagelink too, can you show us some code?
>
>  The same behaviour with BPL - it does not show any feedback on
>  page instances created via BookmarkablePageLink, but just via mounted path.
>
>
>  MM> Maurice
>
>  MM> 2008/4/11 Иванов Дмитрий <[EMAIL PROTECTED]>:
>
> >> Добрый день.
>  >>
>  >>   I have page with form and feedback on it. Page is mounted under some 
> path.
>  >>
>  >>   When i access this page via mounted path - everything is ok - after
>  >>   processing form feedback panel shows error and/or other messages, as
>  >>   expected.
>  >>
>  >>   But when i create PageLink to this page on the other page and click
>  >>   form submit button - onSubmit method called as usual, but no
>  >>   feedback messages shown up.
>  >>
>  >>   I can't get why this behaviour happens. Any ideas?
>  >>
>  >>  --
>  >>  Greetz,
>  >>   Dmitriy Ivanov
>  >>
>  >>
>  >>
>  >>  ---------------------------------------------------------------------
>  >>  To unsubscribe, e-mail: [EMAIL PROTECTED]
>  >>  For additional commands, e-mail: [EMAIL PROTECTED]
>  >>
>  >>
>
>
>
>  --
>
>
> Greetz,
>   Dmitriy Ivanov
>
>
>
>  ---------------------------------------------------------------------
>  To unsubscribe, e-mail: [EMAIL PROTECTED]
>  For additional commands, e-mail: [EMAIL PROTECTED]
>
>

Reply via email to