Re: Markup not found when upgrading from 1.4.18 to 1.5

2012-03-02 Thread rawe
Hi,

you wrote
/  ... you should pass the
  form as parent container of the fragment instance. /

The problem is that I have multiple fragments within my form.
And if I pass the form as parent container for each fragment I get an
... child already exists... exception.

That's why I'm inserted additional div tags before each fragment which works
fine in Wicket 1.4
/div wicket:id=contentFragment1 /
wicket:fragment wicket:id=orderFragment1
fieldset .../fieldset
/wicket:fragment/

When I try to embed the fragment in my div
/div wicket:id=contentFragment1  ...here fragment ... /div/

I get the exception:
/Close tag not found for tag: div wicket:id=contentFragment1. For
OrderFragment1 Components only raw markup is allow in between the tags but
not other Wicket Component
/

I'm without an idea :-(

ralph

--
View this message in context: 
http://apache-wicket.1842946.n4.nabble.com/Markup-not-found-when-upgrading-from-1-4-18-to-1-5-tp4431186p4437937.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



Re: Markup not found when upgrading from 1.4.18 to 1.5

2012-03-02 Thread Martin Grigorov
Hi,

By 'parent' I really meant 'markupProvider'. See the javadoc of
org.apache.wicket.markup.html.panel.Fragment#Fragment(String, String,
MarkupContainer).
See the source of for the example at
http://www.wicket-library.com/wicket-examples/compref/wicket/bookmarkable/org.apache.wicket.examples.compref.FragmentPage
to see how to use it.

I'm not aware of any other change between 1.4 to 1.5 related to
Fragments except:

In 1.4 it was possible to do:
wicket:panel
...
/wicket:panel
wicket:fragment .../wicket:fragment

In 1.5 wicket:fragment should be somewhere inside wicket:panel.
Same for wicket:extend and wicket:border.

On Fri, Mar 2, 2012 at 11:32 AM, rawe ralph.wey...@dachser.com wrote:
 Hi,

 you wrote
 /  ... you should pass the
  form as parent container of the fragment instance. /

 The problem is that I have multiple fragments within my form.
 And if I pass the form as parent container for each fragment I get an
 ... child already exists... exception.

 That's why I'm inserted additional div tags before each fragment which works
 fine in Wicket 1.4
 /div wicket:id=contentFragment1 /
 wicket:fragment wicket:id=orderFragment1
    fieldset .../fieldset
 /wicket:fragment/

 When I try to embed the fragment in my div
 /div wicket:id=contentFragment1  ...here fragment ... /div/

 I get the exception:
 /Close tag not found for tag: div wicket:id=contentFragment1. For
 OrderFragment1 Components only raw markup is allow in between the tags but
 not other Wicket Component
 /

 I'm without an idea :-(

 ralph

 --
 View this message in context: 
 http://apache-wicket.1842946.n4.nabble.com/Markup-not-found-when-upgrading-from-1-4-18-to-1-5-tp4431186p4437937.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




-- 
Martin Grigorov
jWeekend
Training, Consulting, Development
http://jWeekend.com

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



Re: Markup not found when upgrading from 1.4.18 to 1.5

2012-03-02 Thread rawe
Thanks for your hints, Martin!
Now I found the solution.
Two changes I had to do:

*1)*
The difference now is, that the parent component passed to the fragment must
be the exact parent.
e.g.
I used the same fragments for display and edit mode.
I passed the page as parentComponent to fragment.
/new Fragment(id, markupId, parentComponent);/

But in edit mode there was also a form component in the page.
So in Wicket 1.5 I have to pass the form as parentComponent to the fragment
In Wicket 1.4 it worked also with the page as parentComponent!

*2)* second change is in the markup:
In Wicket 1.4 I did:
/div wicket:id=contentFragment1 /
wicket:fragment wicket:id=orderFragment1/

In Wicket 1.5 it's now:
/wicket:container wicket:id=containerFragment1/wicket:container
wicket:fragment wicket:id=orderFragment1/


ralph

--
View this message in context: 
http://apache-wicket.1842946.n4.nabble.com/Markup-not-found-when-upgrading-from-1-4-18-to-1-5-tp4431186p4438539.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



Markup not found when upgrading from 1.4.18 to 1.5

2012-02-29 Thread rawe
I changed my app from wicket 1.4.18 to 1.5.4
 Now I get a MarkupNotFound Exception.
In 1.4. the app was running without warnings/errors

Does somebody have a hint?

I'm using a form within a page. The form has a fragment child.

*MarkupCode*:

/div wicket:id=contentFragment1/
wicket:fragment wicket:id=orderFragment1
fieldset
...
   /fieldset
/wicket:fragment
/

*JavaCode:*

f/orm.add(new OrderFragment1(contentFragment1));

public class OrderFragment1 extends AbstractOrderFragment1 {

public OrderFragment1(String id) {
super(id, orderFragment1, 
OrderDetailPagePartEdit.this, orderWrkBean);
...

}/

*
The exception:*
/Last cause: No Markup found for Fragment orderFragment1 in providing markup
container [Page class = com.dachser.uitrosend.order.OrderDetailPagePartEdit,
id = 21, render count = 1]

Root cause:

org.apache.wicket.markup.MarkupNotFoundException: No Markup found for
Fragment orderFragment1 in providing markup container [Page class =
com.dachser.uitrosend.order.OrderDetailPagePartEdit, id = 21, render count =
1]
at
org.apache.wicket.markup.html.panel.FragmentMarkupSourcingStrategy.getMarkup(FragmentMarkupSourcingStrategy.java:143)
at
org.apache.wicket.markup.html.panel.FragmentMarkupSourcingStrategy.onComponentTagBody(FragmentMarkupSourcingStrategy.java:74)
at org.apache.wicket.Component.internalRenderComponent(Component.java:2528)
at org.apache.wicket.MarkupContainer.onRender(MarkupContainer.java:1576)
at org.apache.wicket.Component.internalRender(Component.java:2358)
...
/

Thanks!

--
View this message in context: 
http://apache-wicket.1842946.n4.nabble.com/Markup-not-found-when-upgrading-from-1-4-18-to-1-5-tp4431186p4431186.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



Re: Markup not found when upgrading from 1.4.18 to 1.5

2012-02-29 Thread Martin Grigorov
Hi,

Make sure that wicket:fragment is inside wicket:child

On Wed, Feb 29, 2012 at 1:03 PM, rawe ralph.wey...@dachser.com wrote:
 I changed my app from wicket 1.4.18 to 1.5.4
  Now I get a MarkupNotFound Exception.
 In 1.4. the app was running without warnings/errors

 Does somebody have a hint?

 I'm using a form within a page. The form has a fragment child.

 *MarkupCode*:

 /div wicket:id=contentFragment1/
 wicket:fragment wicket:id=orderFragment1
    fieldset
    ...
   /fieldset
 /wicket:fragment
 /

 *JavaCode:*

 f/orm.add(new OrderFragment1(contentFragment1));

 public class OrderFragment1 extends AbstractOrderFragment1 {

                public OrderFragment1(String id) {
                        super(id, orderFragment1, 
 OrderDetailPagePartEdit.this, orderWrkBean);
 ...

 }/

 *
 The exception:*
 /Last cause: No Markup found for Fragment orderFragment1 in providing markup
 container [Page class = com.dachser.uitrosend.order.OrderDetailPagePartEdit,
 id = 21, render count = 1]

 Root cause:

 org.apache.wicket.markup.MarkupNotFoundException: No Markup found for
 Fragment orderFragment1 in providing markup container [Page class =
 com.dachser.uitrosend.order.OrderDetailPagePartEdit, id = 21, render count =
 1]
 at
 org.apache.wicket.markup.html.panel.FragmentMarkupSourcingStrategy.getMarkup(FragmentMarkupSourcingStrategy.java:143)
 at
 org.apache.wicket.markup.html.panel.FragmentMarkupSourcingStrategy.onComponentTagBody(FragmentMarkupSourcingStrategy.java:74)
 at org.apache.wicket.Component.internalRenderComponent(Component.java:2528)
 at org.apache.wicket.MarkupContainer.onRender(MarkupContainer.java:1576)
 at org.apache.wicket.Component.internalRender(Component.java:2358)
 ...
 /

 Thanks!

 --
 View this message in context: 
 http://apache-wicket.1842946.n4.nabble.com/Markup-not-found-when-upgrading-from-1-4-18-to-1-5-tp4431186p4431186.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




-- 
Martin Grigorov
jWeekend
Training, Consulting, Development
http://jWeekend.com

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



Re: Markup not found when upgrading from 1.4.18 to 1.5

2012-02-29 Thread rawe
Martin, do you mean something like ??

/
div wicket:id=contentFragment1/
wicket:child
wicket:fragment wicket:id=orderFragment1

fieldset
  ...
/fieldset
/wicket:fragment
/wicket:child
/

Doesn't work!

But normally I don't need a child tag due I don't include markup from a
subclass

My fragment class is extended from an AbstractFragment class which extends
Fragment
I' m using just one markup file.

Ralph

--
View this message in context: 
http://apache-wicket.1842946.n4.nabble.com/Markup-not-found-when-upgrading-from-1-4-18-to-1-5-tp4431186p4431304.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



Re: Markup not found when upgrading from 1.4.18 to 1.5

2012-02-29 Thread Martin Grigorov
I mean that wicket:fragment should be in wicket:extend,
wicket:panel or wicket:border if any of those is used.

Your pasted code is not easy to follow but I think you should pass the
form as parent container of the fragment instance.

On Wed, Feb 29, 2012 at 2:12 PM, rawe ralph.wey...@dachser.com wrote:
 Martin, do you mean something like ??

 /
 div wicket:id=contentFragment1/
 wicket:child
 wicket:fragment wicket:id=orderFragment1

    fieldset
  ...
    /fieldset
 /wicket:fragment
 /wicket:child
 /

 Doesn't work!

 But normally I don't need a child tag due I don't include markup from a
 subclass

 My fragment class is extended from an AbstractFragment class which extends
 Fragment
 I' m using just one markup file.

 Ralph

 --
 View this message in context: 
 http://apache-wicket.1842946.n4.nabble.com/Markup-not-found-when-upgrading-from-1-4-18-to-1-5-tp4431186p4431304.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




-- 
Martin Grigorov
jWeekend
Training, Consulting, Development
http://jWeekend.com

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