On Dec 23, 2006, at 0:12, Nino Wael wrote:

> hmm have you tried the wicket.link class? that generates the link...
>
> I had to learn something similar, you can attach a link wicket java  
> class to a button html markup if you need to for some reason and  
> vice versa. And that goes in general you can attach any component    
> to any markup if you want to, guys please comment on this one since  
> im not completely sure..

        I'm not sure what you mean by wicket.link.  I made a class called  
AppLink whose insides look like this:

        private String relPath=null;

        /**
         * Construct an AppLink with the given label string and destination
         * location.
         *
         [EMAIL PROTECTED] labelStr the link label
         [EMAIL PROTECTED] p the location
         */
        public AppLink(String id, String labelStr, final String p) {
                super(id);
                relPath=p;
                assert relPath != null;
                add(new Label("label", labelStr));
        }

        @Override
        public void onClick() {
                // nothing here, just act like a normal link.
        }

        @Override
        protected CharSequence getURL() {
                return getApplication().getApplicationSettings()
                        .getContextPath() + relPath;
        }


        Seems like this kind of thing might be common -- at least while  
transitioning from another framework.

-- 
Dustin Sallings



-------------------------------------------------------------------------
Take Surveys. Earn Cash. Influence the Future of IT
Join SourceForge.net's Techsay panel and you'll get the chance to share your
opinions on IT & business topics through brief surveys - and earn cash
http://www.techsay.com/default.php?page=join.php&p=sourceforge&CID=DEVDEV
_______________________________________________
Wicket-user mailing list
Wicket-user@lists.sourceforge.net
https://lists.sourceforge.net/lists/listinfo/wicket-user

Reply via email to