That combination is wrong. If you use the IndexedHybridUrlCodingStrategy the first parameter is called "0". Secondly the AttributeModifier probably overwrites the generated src attribute.

This should work (not tested):

PageParameters params = new PageParameters();
params.put("0", myUrl);            // changed to put, just to be sure
InlineFrame myFrame = new InlineFrame("MyFrame", this.getPageMap(), 
MyFrame.class, params);
add(myFrame);

public MyFrame(PageParameters params){
   String url = params.getString("0");  // changed to getString
   doSomething(url);
}

mount(new IndexedHybridUrlCodingStrategy("iframe/MyFrame", MyFrame.class));  // 
removed leading /


Good luck!
   Erik.


itayh wrote:
Creating the InlineFrame component:
PageParameters params = new PageParameters();
params.add("url", myUrl);
InlineFrame myFrame = new InlineFrame("MyFrame", this.getPageMap(),
MyFrame.class, params);
myFrame.add(new AttributeModifier("src", new
Model("/myapp/app/iframe/MyFrame)));
add(myFrame);

Creating MyFrame:
public MyFrame(PageParameters params ){
    String url = params.get("url"); //the problem is that this params are
empty
    doSomething(url);
}

Url mounting:
mount(new IndexedHybridUrlCodingStrategy(/iframe/MyFrame, MyFrame.class));

I tried also for the url mounting:
mount(new HybridUrlCodingStrategy(/iframe/MyFrame, MyFrame.class));

In all cases the params inside the constructor of MyFrame class has no
values in them (size = 0)

Thanks,
  Itay



--
Erik van Oosten
http://www.day-to-day-stuff.blogspot.com/


---------------------------------------------------------------------
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]

Reply via email to