Can you post the exact error you get? assuming exception stacktrace.

Doug Leeper wrote:
> 
> Sorry for duplicate post...selected the wrong button.
> 
> I have a DataView and for each 'row', I add a different fragment based on
> the object model type.
> 
> However, in each fragment I have a link (edit). The page displays fine. 
> But when I select on the link, wicket indicates that that link interface
> is not found.  What is even more interesting, when I had the link as an
> AjaxLink, the first click produces the same error.. but when I back button
> and select again, the AjaxLink works. 
> 
> If anyone knows what I need to look at, please let me know.  I am
> perplexed where to start looking.
> 
> Thanks
> - Doug
> 
> FYI...some additional information that may be handy...
> 
> The resultant interface path is:
> 
> replacements:replacement:1:replacementFragment:editPhone where editPhone
> is the link.
> 
> The replacementFragment is actually replaced with a phoneFragment to
> display the editPhone link.
> 
> The offending code is as follows: (only applicable code and hopefully the
> HTML will be displayed nicely)
> 
>               dataView = new DataView("replacement", new 
> ListDataProvider(dataList)) {
>                       public void populateItem(Item item) {
>                               item.setRenderBodyOnly(true);
> 
>                               ReplacementElement data = (ReplacementElement) 
> item
>                                               .getModelObject();
> 
>                               if (data instanceof PhoneReplacement) {
>                                       item.add(new 
> PhoneFragment("replacementFragment",
>                                                       
> NewCampaignReplacementsEditPanel.this,
>                                                       (PhoneReplacement) 
> data));
>                               } else if (data instanceof ImageReplacement) {
>                                       item.add(new 
> ImageFragment("replacementFragment",
>                                                       
> NewCampaignReplacementsEditPanel.this,
>                                                       (ImageReplacement) 
> data));
>                               } else if (data instanceof FlashReplacement) {
>                                       item.add(new 
> FlashFragment("replacementFragment",
>                                                       
> NewCampaignReplacementsEditPanel.this,
>                                                       (FlashReplacement) 
> data));
>                               } else {
>                                       throw new RuntimeException(
>                                                       "Unexpected replacement 
> element: " + data);
>                               }
>                       }
>               };
>               add(dataView);
> 
> 
>       private class PhoneFragment extends Fragment {
> 
>               public PhoneFragment(String id, MarkupContainer markupProvider,
>                               final PhoneReplacement phone) {
>                       super(id, "phoneFragment", markupProvider);
>                       this.setRenderBodyOnly(true);
> 
>                       add(new ListSelectAjaxCheckBox<Integer>("id",
>                                       new 
> ListSelectCheckBoxModel<Integer>(selectedIds, phone
>                                                       .getTransformID())));
> 
>                       add(new Label("from", new PropertyModel(phone,
>                                       "fromPhone.formatted")));
>                       add(new Label("type", new PropertyModel(phone, 
> "phoneType.label")));
>                       add(new Label("to", new PropertyModel(phone, 
> "toPhone.formatted")));
> 
>                       Link edit = new Link("editPhone") {
>                               public void onClick() {
>                                       setResponsePage(new 
> PhoneReplacementDetailPage(getPage(),
>                                                       phone));
>                               }
>                       };
>                       add(edit);
>               }
> 
>       }
> 
> 
> < table>
>               < tr>
>                       < td class="tableHeader">Use</td>
>                       < td class="tableHeader" width="50">Type</td>
>                       < td class="tableHeader" width="100">From</td>
>                       < td class="tableHeader" width="100">To</td>
>                       < td class="tableHeader" width="50">&nbsp;</td>
>               <  /tr>
> 
>               < div wicket:id="replacement">
>               < tr wicket:id="replacementFragment"></tr>
>               < /div>
>       < /table>
> 
> 
>       < wicket:fragment wicket:id="phoneFragment">
>               < tr>
>                       < td><input type="checkbox" wicket:id="id"></td>
>                       < td>Phone</td>
>                       < td></td>
>                       < td>[] &nbsp; </td>
>                       < td align="center"> # Edit </td>
>               < /tr>
>       < /wicket:fragment>
> 
> 
> 

-- 
View this message in context: 
http://www.nabble.com/Fragment-issue-tp17116545p17117161.html
Sent from the Wicket - User mailing list archive at Nabble.com.


---------------------------------------------------------------------
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]

Reply via email to