You are viewing a plain text version of this content. The canonical link for it is here.
Posted to users@wicket.apache.org by Duy Do <do...@gmail.com> on 2010/07/03 03:28:38 UTC

Wicket links does not work in Firefox/IE?

Hi all,

I built a web app with Wicket and it works fine in Chrome, Safari but it
does not work in Firefox and IE.
In Firefox/IE after clicking on links of navigation, the corresponding page
does not display but if I click refresh ( or F5) it is OK.

Could you give me a solution to get rid of this problem?

Thanks and regards,
Duy

Re: Wicket links does not work in Firefox/IE?

Posted by Duy Do <do...@gmail.com>.
Thanks a lot for your reply, Martijn.

I use Wicket in normal way but it seems that I had some problems.

*This is code for rendering view,the navigation (IndexPanel) included:*

public class ViewWidgetPanel extends CardWidgetPanel<WidgetBuilder<?>, View>
> implements ViewWidgetBuilder<Panel> {
>
> private ListView<PresentationElement> indexPanel;
>
> private List<ChapterWidgetBuilder<?>> chapterWidgets = new
> ArrayList<ChapterWidgetBuilder<?>>();
>
> public ViewWidgetPanel(String id) {
> super(id);
> }
>
> @SuppressWarnings("serial")
> @Override
> protected void doInit() {
>
> super.doInit();
> indexPanel = new ListView<PresentationElement>("index",
> new Model<ArrayList<PresentationElement>>(
> new ArrayList<PresentationElement>())) {
>
> @Override
> protected void populateItem(final ListItem<PresentationElement> item) {
>
> item.add(new LabelledIconLink("chapterReference") {
>
> ListItem<PresentationElement> thisItem = item;
>
> @Override
> protected Link<Void> createLink(String linkId) {
> return new Link<Void>(linkId) {
> @Override
> public void onClick() {
> select(thisItem.getModel().getObject());
> }
> };
> }
>
> @Override
> protected Label createLabel(String labelId) {
>
> return new Label(labelId, item.getModel().getObject()
> .getLabel(getLocale()));
> }
> });
>
> }
> };
>
> add(indexPanel);
>
> }
>
> protected void select(PresentationElement chapter) {
>
> ChapterWidgetBuilder<?> chapterWidgetBuilder = WidgetBuilder.Utils
> .findByPresentationModel(chapterWidgets, chapter);
>
> addOrReplaceContent((Component) chapterWidgetBuilder
> .getNativeToolkitObject());
>
> }
>
> @Override
> public void addChild(ChapterWidgetBuilder<?> contentType) {
>
> indexPanel.getModel().getObject().add(
> contentType.getPresentationElement());
>
> chapterWidgets.add(contentType);
>
> if (chapterWidgets.size() == 1) {
> select(contentType.getPresentationElement());
> }
> }
>

}

*And this is CardWidgetPanel, super class of ViewWidgetPanel:*

public class CardWidgetPanel<T_ContentType extends WidgetBuilder<?>, T_PE
> extends PresentationElement>
>         extends BasicWicketWidgetPanel<T_ContentType, T_PE> {
>
>     public static final String CONTENT_ID = "content";
>
>     public CardWidgetPanel(String id) {
>         super(id);
>     }
>
>     @Override
>     protected void doInit() {
>         add(createEmptyContent());
>     }
>
>     protected Panel createEmptyContent() {
>         return new EmptyPanel(CONTENT_ID);
>     }
>
>     protected void addOrReplaceContent(Component c) {
>
>         if (!c.getId().equals(CONTENT_ID)) {
>             throw new IllegalArgumentException(
>                     "Id of child must be 'content'. It was '" + c.getId() +
> "'");
>         }
>         Component currentComponent = get(CONTENT_ID);
>
>         if (currentComponent == null) {
>             add(c);
>         } else {
>             currentComponent.replaceWith(c);
>         }
>     }
>
> }
>


Do you have any suggestion?

Thanks,
Duy

On Sun, Jul 4, 2010 at 2:43 AM, Martijn Dashorst <ma...@gmail.com>
wrote:
>
> Unless you provide some code we can't help you. We all have
> applications deployed towards millions of users using Wicket, and yet
> they all work fine in all browsers.
>
> Martijn
>
> On Sun, Jul 4, 2010 at 11:34 AM, Duy Do <do...@gmail.com> wrote:
> > I still can not solve this issue, do you have any solution?
> >
> > Duy
> >
> > On Fri, Jul 2, 2010 at 6:28 PM, Duy Do <do...@gmail.com> wrote:
> >
> >> Hi all,
> >>
> >> I built a web app with Wicket and it works fine in Chrome, Safari but
it
> >> does not work in Firefox and IE.
> >> In Firefox/IE after clicking on links of navigation, the corresponding
page
> >> does not display but if I click refresh ( or F5) it is OK.
> >>
> >> Could you give me a solution to get rid of this problem?
> >>
> >> Thanks and regards,
> >> Duy
> >>
> >>
> >>
> >
>
>
>
> --
> Become a Wicket expert, learn from the best: http://wicketinaction.com
> Apache Wicket 1.4 increases type safety for web applications
> Get it now: http://www.apache.org/dyn/closer.cgi/wicket/1.4.8
>
> ---------------------------------------------------------------------
> To unsubscribe, e-mail: users-unsubscribe@wicket.apache.org
> For additional commands, e-mail: users-help@wicket.apache.org
>

Re: Wicket links does not work in Firefox/IE?

Posted by Martijn Dashorst <ma...@gmail.com>.
Unless you provide some code we can't help you. We all have
applications deployed towards millions of users using Wicket, and yet
they all work fine in all browsers.

Martijn

On Sun, Jul 4, 2010 at 11:34 AM, Duy Do <do...@gmail.com> wrote:
> I still can not solve this issue, do you have any solution?
>
> Duy
>
> On Fri, Jul 2, 2010 at 6:28 PM, Duy Do <do...@gmail.com> wrote:
>
>> Hi all,
>>
>> I built a web app with Wicket and it works fine in Chrome, Safari but it
>> does not work in Firefox and IE.
>> In Firefox/IE after clicking on links of navigation, the corresponding page
>> does not display but if I click refresh ( or F5) it is OK.
>>
>> Could you give me a solution to get rid of this problem?
>>
>> Thanks and regards,
>> Duy
>>
>>
>>
>



-- 
Become a Wicket expert, learn from the best: http://wicketinaction.com
Apache Wicket 1.4 increases type safety for web applications
Get it now: http://www.apache.org/dyn/closer.cgi/wicket/1.4.8

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


Re: Wicket links does not work in Firefox/IE?

Posted by Duy Do <do...@gmail.com>.
I still can not solve this issue, do you have any solution?

Duy

On Fri, Jul 2, 2010 at 6:28 PM, Duy Do <do...@gmail.com> wrote:

> Hi all,
>
> I built a web app with Wicket and it works fine in Chrome, Safari but it
> does not work in Firefox and IE.
> In Firefox/IE after clicking on links of navigation, the corresponding page
> does not display but if I click refresh ( or F5) it is OK.
>
> Could you give me a solution to get rid of this problem?
>
> Thanks and regards,
> Duy
>
>
>