Load content into iframe

asked 2018-03-18 09:25:25 +0800

psinalberth gravatar image psinalberth
52 6


I'm trying to put a file into an iframe by using <iframe width="100%" vflex="true" src="@load(vm.content)" />.

When I put some static source like src="http://www.axmag.com/download/pdfurl-guide.pdf" the content is loaded, but not when I do something like content="http://www.axmag.com/download/pdfurl-guide.pdf".

Does anyone know why? My method has the @NotifyChange("content") annotation. I intend to use iframe to show some reports but I'm facing this situation.

delete flag offensive retag edit


why you try the content attribute as the src attribute works? maybe you need to show your code, or create a fiddle of it. btw, @NotifyChange only works on Commands or setters, try using BindUtils.postNotifyChange to be sure you that the notifyChange works.

chillworld ( 2018-03-18 14:46:53 +0800 )edit

Hi. This is the fiddle I've created: http://zkfiddle.org/sample/3un7l4r/5-zk-iframe. Inside init() there are some other properties, and they are loaded with no problem and I can see its values on .zul, but not this one.

psinalberth ( 2018-03-18 17:10:20 +0800 )edit

1 Answer

Sort by ยป oldest newest most voted

answered 2018-03-19 14:20:05 +0800

chillworld gravatar image chillworld flag of Belgium
5337 4 9

updated 2018-03-19 14:20:54 +0800

Thx for the fiddle.

Well, under ZK 8+(because you don't add the bindcomposer, what is ZK 8 or higher), it does work as long you specify your viewmodel attribute correct :

viewModel and not viewmodel.

Here is the updated fiddle.


link publish delete flag offensive edit


well spotted typo!

cor3000 ( 2018-03-21 15:23:52 +0800 )edit
Your answer
Please start posting your answer anonymously - your answer will be saved within the current session and published after you log in or create a new account. Please try to give a substantial answer, for discussions, please use comments and please do remember to vote (after you log in)!

[hide preview]

Question tools




Asked: 2018-03-18 09:25:25 +0800

Seen: 17 times

Last updated: Mar 19 '18

Support Options
  • Email Support
  • Training
  • Consulting
  • Outsourcing
Learn More