swf.setValue("flashvars", "somevar=" + "somevalue"+ "&currency="
+ curr);

^ that should instead take an IModel so that it renders a fresh value
on each new request instead of always rendering the value you passed
in at page construction. in fact, it should take the same model
instance as is use by the ddc.

-igor

On Jan 30, 2008 5:10 AM, Sébastien Piller <[EMAIL PROTECTED]> wrote:
> Yes, no problem, but it's really trivial...
>
> My Flash object is added here (I use the ShockWaveComponent, little
> modified, from the wiki):
>
>             ShockWaveComponent swf = new ShockWaveComponent("swf",
> "ShirtDesignerV2.swf", "770", "480");
>         swf.setValue("quality", "high");
>         swf.setValue("bgcolor", "#869ca7");
>         swf.setValue("id", "editor");
>         swf.setValue("name", "editor");
>         ...
>         String curr = getCurrentCurrency();
>         swf.setValue("flashvars", "somevar=" + "somevalue"+ "&currency="
> + curr);
>         swf.setValue("allowScriptAccess", "sameDomain");
>         swf.setValue("type", "application/x-shockwave-flash");
>         add(swf);
>
> And here I change the currency with the DDC:
>                 DropDownChoice currencies = new
> DropDownChoice("currencies", new PropertyModel(this, "currentCurrency"),
> Arrays.asList(new String[] { "CHF", "EUR", "USD" })) {
>             @Override
>             protected boolean wantOnSelectionChangedNotifications() {
>                 return true;
>             }
>
>             @Override
>             protected void onSelectionChanged(Object newSelection) {
>                 //System.out.println("SETTED: " + newSelection);
>                 setCurrency(newSelection + "");
>             }
>         };
>         add(currencies);
>
> There is nothing special here....
>
> But when the onSelectionChanged is fired, the flashvars doesn't change....
>
> Thanks ;)
>
>
> Edvin Syse a écrit :
>
> > I think it would be easier to help you if you supplied some code :)
> >
> > -- Edvin
>
>
> ---------------------------------------------------------------------
> To unsubscribe, e-mail: [EMAIL PROTECTED]
> For additional commands, e-mail: [EMAIL PROTECTED]
>
>

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

Reply via email to