Wicket - Add an image to a Modal Dialog - wicket

I want to create a popup window that contains an image.
Following an example, I am able to show a label in the ModalDialog using ModalDialog#setContent(). However, I do not know how to show an image taken from an URL. I believe the issue is that I want to add an img tag to a div.
Has anyone got any ideas on how to implement this?
EDIT:
Tested #Tom's suggestion, and I get this error. I have tried changing the div to img but then the modal does not work. As the error message says, Wicket creates
div wicket:id="content" class="modal-dialog-content"
but I want to add an image to the div which it does not like.
Error Message

Related

Bootstrap 5 Modal does not work properly on scroll, after adding some content dynamically - which cause Modal's height exceeds than earlier

Bootstrap 5 Modal does not work properly on scroll, after adding some content dynamically - which cause Modal's height exceeds than earlier.
Let me explain!
I opened a Bootstrap Modal by clicking on the 'Add Make' button.
Modal just appeared properly, and it have a form having up to 5 inputs.
See attached image
Note: Still modal is working properly on scroll.
Now I just entered values in these inputs. And there are 2 inputs of type 'file', which I am using to upload a Image (One for 'icon' and Other one is for 'thumbnail'). And I am also showing these images underneath each of this input of type file. Which is a kind of preview box for me to show that Image which is going to be uploaded.
As that preview box is hidden by default. And when we select a file then that preview box appears with the selected image.
See attached image
Note: Now, modal height has been exceeded than before. And has gone
out of windows height. And now our modal should scroll along with our
windows scroll-bar on scrolling. (This is the common behavior of
modal)
But, in my case, Modal is not getting scrolled properly. I just scroll down, and it scroll back automatically.
In short, I am facing a scrolling issue with my modal after adding dynamic content to my Bootstrap modal which change modal's dynamic height.
I have tried many solution but still failed to resolve this issue.
I have tried the following:
Adding overflow-y = auto
adding overflow-y = scroll
Note: Even already, I have overflow-y to auto.
I have added following
<div class="modal-dialog modal-dialog-scrollable">
But, still failed !
Finally, I'm here to post my issue!
Please remember to include your code when asking question Bilal. For now you could try adding .modal-dialog-scrollable alongside .modal-dialog in your HTML. Ths will add a scroll bar to the modal.
class=" modal-dialogue modal-dialog-scrollable"

Pikachoose thumbnail carousel not working

I am using the Pikachoose plugin for the image galleries on my website (http://www.clare-eileen-callahan.com/inthehangar/). Everything seems to be working except for the thumbnail carousel. They just pile up on the bottom of the page, where I want the carousel to be horizontally scrollable, so that only x amount of thumbnails are visible. I can't figure out what is going on with the CSS and Javascript that is preventing it from displaying as it should.
Here is the code I'm using: http://codepen.io/anon/pen/ybExq
Sorry there is a lot of it for the plug in!
For whatever reason, there was an unexpected element in the original jquery carousel script. I was able to find it by breaking apart the script into short lines and referring back to the console.

Facebook hide content from non-fans in a unique way

I need to build a tab looking like this one:
https://www.facebook.com/auto.co.il/app_134594493332806
I know how to add an image and a comment box and i know of several "plain" ways to hide the content from non-fans, but i came across the above tab and i really like the way it shows thee content yet you cant engage it until you press the like button.
Any help please?
Thanks in advance.
Oren
Your link didn't work for me, but you can place a absolutely positioned div with a high z-index above the rest of your content to prevent the user from clicking on anything.
Update: Now that the link has been updated I see that they are doing exactly what I described above. In chrome if you right-click the background and select "inspect element" you will see the following computed style for the div:
rgba(0,0,0,0.796);
display:block;
height:1612px;
width:810px;
The content is blacked out simply with a div with a black background and some opacity. Just for fun, you can overcome their like gate (without liking) via chrome's JS console by selecting the iframe context and then entering the following:
$('.like_float_c').detach();
... now call youself a 'hacker' ;)

Liferay: How have chat-portlet disabled it's borders?

Chat portlet is displayed as a long bar at the bottom of the screen. I want to write a similiar portlet.
I can draw my bar anyway on the screen with CSS styles and also I have learned how to make static portlet visible always for all users with portal-ext.propeties.
But along with my bar, Liferay draws standard portlet frame with a title and controls on it. I found that it is named "topper" in HTML code.
So how to disable topper and border for one specific portlet in the way chat-portlet did it? I failed to figure this out from chat-portlet sources.
I found two options which can be relevant to this
<use-default-template>false</use-default-template>
<system>true</system>
but they weren't work.
First one causes ClassNotFoundException and second one causes portlet content not reaching page source.
Thanks.
I was to use
<use-default-template>false</use-default-template>
correctly. It does not work if placed in incorrect order.

Why would a link in a UIWebView leave a gray box behind?

I have a UIWebview that I am loading with custom HTML using loadHtmlString. My HTML has a link that I intercept when tapped so that I can take control and reload the UIWebview with a different HTML string. The code works, but the area where the link text was located is replaced with a gray rectangle that is visible when the new string is loaded.
What could be going on here? How can I get rid of this behavior?
//Scott
Here it is...need to add this style statement to the link reference:
<a href=http://yourlink.com/ style = "-webkit-tap-highlight-color:rgba(0,0,0,0);">
Setting the alpha value (the last parameter to rgba) to 0 disables the tap highlight color.
Although this works, it feels like a hack. I really think the tap highlight should clear itself when my second loadHtmlString reloads new HTML code.
//Scott
You could add onclick="this.blur(); location.href=this.href;" to the link to remove the focus from the link.
I'm sure there's a better less hackish way, but this should work