Open an external link in a wicket modal window - wicket

I'm pretty new to wicket, so apologies if this is very easy - I'd like to open an external link in a modal window. The url is fixed and isn't a lot more than a static page - how should I go about doing this?

My money would be on the Include component. Javadoc. Example in wicket examples
I'm afraid I didn't ever have to use this particular component, so I can't provide any more information, but it looks like you should be able to use it like any other wicket component with no particular complications.
Hope this helps!

you should have a look at ExternalLink. You can use it like so:
java:
ExternalLink link = new ExternalLink("linkid", "http://www.google.com");
add(link);
with html
Link
btw. Google is your friend when developing wicket. Lots of questions have already been asked, inlcuding this one.

Related

Page Navigation in GWT Application

I want to navigate to another page in my application. I don't want the page to reload(i.e.. application should be a single URL application).
I know only one way to accomplish this by changing the proper div attached in the RootPanel by whatever data I want to display. But I fell that might get cumbersome if there are many navigations(I haven't tried it though :P).
Is there any other way to accomplish this or make the above said approach better?
Thanks in advance.
I guess you need GWT Development with Activities and Places
Well ,its time to have a look on MVP
With that you can do
History.newItem(tokenOfYourPresenterScreen);
A nice single EntryPoint demo app is here : (BrowserHistoryExample.java)
http://www.gwtproject.org/doc/latest/DevGuideCodingBasicsHistory.html
I added the below to the example to demonstrate links.
vertPanel.add(new Label("Access history via Hyperlinks"));
vertPanel.add(new Hyperlink("External Page 0","page0"));
vertPanel.add(new Hyperlink("External Page 1","page1"));
vertPanel.add(new Hyperlink("External Page 2","page2"));

Which is good modal popup working code?

I would like to have AJAX modal way of pop up box for my website need. I tried this, http://www.ericmmartin.com/simplemodal-login-released/
It does not work to me well while passing the query strings etc.,
Is there better plugin ? I found this website, www.bnet.com (click join / log in) ... it looks good.. Is there any plugin to do like this.
My website is mysql and php
Thanks
Check out http://jqueryui.com/demos/dialog/
I use it on a lot of my websites. Easy to implement and simple plug and play with jquery. They are skinnable and with themeroller you can easily mix and match the colors etc to easily implement it within your existing website theme.

How should I use <a href> tag to access other templates in lift?

According the Lift wiki, I know the "View First" concept of Lift. That's very different from any framework I used. Take the basic JSP things as the example, I could write
Create a new post
in the page, and write the logic in a servlet. How can I do things like this with lift? I wrote the same tag in a template and when I accessed this page I got 404 error. But if I add a Menu to the SiteMap, things goes well. Is there any possible to make a link without making a new Menu? I am a beginner of Lift and Scala. Thanks in advance.
When everything is declared in your SiteMap, you can have Lift generate the links for you.
Yes, it is possible.
Just don't call LiftRules.setSiteMap at your boot class, then Lift will let you access every pages under your webapp/ directory. You could test your code in this mode.
But this will also lead to no access control, so be careful.
It is also possible to do what I think you asked, which is to make the link accessible, but not visible in the SiteMap (if you don't want the SiteMap at all, go with Brian's answer), with code like this:
SiteMap(Menu("PreClass") / "preClass" >> Hidden)
We prefer to leave the SiteMap enabled as tightly controlling access seems like a good idea in our case.

Simple hyperlink in GWT?

This should be simple, but somehow I can't find a way to create simple hyperlink in GWT. Basically, I want to load another page when users clicks on something.
Hyperlink seems to point to internal GWT application state only. I guess I could put the link in HTML code itself, but how do I create it in Java?
Anchor
this.add(new Anchor("www.stackoverflow.com"));
You're looking for Anchor.

How can I search in an UIWebView?

I need to perform search in an html page displayed in a UIWebView control. The functionality I need is something that Safari has, when you hit command/ctrl F for searching the document for some word and the program highlights the hits for you. Is there any easy solution for this problem?
I know it's been a long time since you asked this question, but it's still a pretty common question people have so I put together a sample project in case anyone else is asking the same question. The project is a super simple app that loads an HTML file and can search and highlight any keyword. You can download the sample project here:
https://www.dropbox.com/s/jietctrvrtnec28/TheSearcher.zip?dl=0
Scott
Edit: changed link above as the old one had broken.
You could do this with javascript. Check out the "Find in this page" bookmarklet:
http://www.lifeclever.com/17-powerful-bookmarklets-for-your-iphone/
Something like that, combined with:
http://developer.apple.com/iphone/library/documentation/uikit/reference/UIWebView_Class/Reference/Reference.html#//apple_ref/occ/instm/UIWebView/stringByEvaluatingJavaScriptFromString:
might do the trick.