MultiLineHeader is a panel, so it needs its own markup file.

Did you create MultiLineHeader.html?

Sven


On 07/31/2013 10:43 PM, shimin_q wrote:
Thanks for the suggestion!  Yes, I am extending WizardStep.  Here is what I
did to my code following your suggestion (the Header class is a final class,
so I had to create a new MultiLineHeader class extends Panel directly to add
new MultiLineLabel instead of the default new Label line in Header class.
But I am getting error:

2013-07-31 16:35:45,813 [5245418@qtp-15847288-0] ERROR
org.apache.wicket.DefaultExceptionMapper  - Unexpected error occurred
org.apache.wicket.markup.MarkupNotFoundException: Failed to find markup file
associated. MultiLineHeader: [MultiLineHeader [Component id = header]]
        at
org.apache.wicket.markup.html.panel.AssociatedMarkupSourcingStrategy.getMarkup(AssociatedMarkupSourcingStrategy.java:97)
        at org.apache.wicket.MarkupContainer.getMarkup(MarkupContainer.java:447)

Here is the code I put in:

     private final class OXEDetailsStep extends WizardStep implements
ICondition
     {
        private static final long serialVersionUID = 1L;
         /**
          * Construct.
          */
         public OXEDetailsStep()
         {
               ...
          }

        public Component getHeader(final String id, final Component parent,
final IWizard wizard)
        {
                return new MultiLineHeader(id, wizard);
        }
        
        
        private final class MultiLineHeader extends Panel
        {
                private static final long serialVersionUID = 1L;

                /**
                 * Construct.
                 *
                 * @param id
                 *            The component id
                 * @param wizard
                 *            The containing wizard
                 */
                public MultiLineHeader(final String id, final IWizard wizard)
                {
                        super(id);
                        setDefaultModel(new 
CompoundPropertyModel<IWizard>(wizard));
                        add(new MultiLineLabel("title", new 
AbstractReadOnlyModel<String>()
                        {
                                private static final long serialVersionUID = 1L;

                                @Override
                                public String getObject()
                                {
                                        return getTitle();
                                }
                        }));
                        add(new MultiLineLabel("summary", new 
AbstractReadOnlyModel<String>()
                        {
                                private static final long serialVersionUID = 1L;

                                @Override
                                public String getObject()
                                {
                                        return getSummary();
                                }
                        }));
                }
        }
}

Any ideas about the error?

Thanks so much for your help!






--
View this message in context: 
http://apache-wicket.1842946.n4.nabble.com/How-to-add-line-breaks-in-the-summary-text-of-Wizard-properties-file-tp4660589p4660595.html
Sent from the Users forum mailing list archive at Nabble.com.

---------------------------------------------------------------------
To unsubscribe, e-mail: users-unsubscr...@wicket.apache.org
For additional commands, e-mail: users-h...@wicket.apache.org



---------------------------------------------------------------------
To unsubscribe, e-mail: users-unsubscr...@wicket.apache.org
For additional commands, e-mail: users-h...@wicket.apache.org

Reply via email to