http://redmine.emweb.be/http://redmine.emweb.be/favicon.ico?16934085252013-09-23T12:00:31ZRedmineWt - Support #2243: Do NOT display imagehttp://redmine.emweb.be/issues/2243?journal_id=67692013-09-23T12:00:31ZWim Dumonwim@emweb.be
<ul></ul><p>Hello,</p>
<p>Your code looks ok, apart from a reparenting that is probably not intentional. See my comments in the code below.</p>
<p>Does your browser fetch the images? Can you take a look with your browser's debugger (firebug, or chrome's inspect element, or IE developer tools) to see if the browser requests the image? It is possible that it fetches it from an unexpected path.</p>
<pre><code>public class HelloApplication extends WApplication {
public HelloApplication(WEnvironment env) {
super(env);
// Line below looks ok
getRoot().addWidget(new WImage(new WLink("icons/wt_powered.jpg")));
getRoot().addWidget(new WText("yeah Your name, please --0po0 ? "));
final WLineEdit nameEdit = new WLineEdit(getRoot());
nameEdit.setFocus();
WAnchor anchor = new WAnchor(new WLink(http://www.webtoolkit.eu/&quot;), "Wt");
anchor.setTarget(AnchorTarget.TargetNewWindow);
// Here you add an image to the anchor, so it will be a clickable image
WImage image = new WImage(new WLink("icons/emweb.jpg"), anchor);
// But the line below reparents the image, so that it no longer clickable
// as anchor image. It becomes a normal image in the dom tree. This is
// probably not what you want - just remove this line.
getRoot().addWidget(image);
WPushButton button = new WPushButton("yeah Greet me.", getRoot());
button.setMargin(5, Side.Left);
getRoot().addWidget(new WBreak());
final WText greeting = new WText(getRoot());
button.clicked().addListener(this, new Signal.Listener() {
public void trigger() {
greeting.setText("yeah Hello many many there, " + nameEdit.getText());
}
});
}
}
</code></pre>
<p>BR,<br><br>
Wim.</p>
Wt - Support #2243: Do NOT display imagehttp://redmine.emweb.be/issues/2243?journal_id=108932015-03-09T21:48:41ZKoen Deforchekoen@emweb.be
<ul><li><strong>Tracker</strong> changed from <i>Feature</i> to <i>Support</i></li><li><strong>Status</strong> changed from <i>New</i> to <i>Resolved</i></li><li><strong>Assignee</strong> set to <i>Wim Dumon</i></li></ul> Wt - Support #2243: Do NOT display imagehttp://redmine.emweb.be/issues/2243?journal_id=108942015-03-09T21:48:52ZKoen Deforchekoen@emweb.be
<ul><li><strong>Status</strong> changed from <i>Resolved</i> to <i>Closed</i></li></ul>