Hi Erik,

You are right, the src AttributeModifier overwrites params values. If I am
not using the src AttributeModifier then the params has values and if I use
it then the params are empty.

But it seem that I must use the src AttributeModifier since I am using
sitemesh decorators to decorate my pages according to the url, so I need to
identify the iframes url from their container url. I need to decorate all my
pages but I don't want to decorate the iframes (no need for headers and
footers there).

The src AttributeModifier is the only way I found how set the iframes url to
what i want. Is there another way?

Thanks alot,
  Itay


Erik van Oosten wrote:
> 
> 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]
> 
> 
> 

-- 
View this message in context: 
http://www.nabble.com/Empty-PageParametyers-when-using-HybridUrlCodingStrategy-tp19666330p20008835.html
Sent from the Wicket - User mailing list archive at Nabble.com.


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

Reply via email to