0

Passing param with Iframe

asked 2010-07-30 04:32:33 +0800

SHERKHAN gravatar image SHERKHAN
231 3

updated 2010-07-30 04:40:31 +0800

Hi all,

I would like passing params to the composer of the created zulFile... Is it possible?

For exemple:

Composer1:

public void onClick() {
   Iframe myIFrame = new Iframe();
   myIFrame.setSrc("http://anotherServer/test.zul");
   // How I can pass params? And is it possible to pass object as param?
}

Composer test.zul of another server:

@Override
    public void doAfterCompose(Component comp) throws Exception {
        super.doAfterCompose(comp);
       // How can I retrieve params?
}

Thanks for your help,

Regards,

SHERKHAN

delete flag offensive retag edit

11 Replies

Sort by ยป oldest newest

answered 2010-07-30 04:40:39 +0800

vinhvo gravatar image vinhvo
369 3

Here is what I used with an include component . Probably it will work with iframe too.

myIFrame.setSrc("http://anotherServer/test.zul?paramName=value")

Composer test.zul
 Executions.getCurrent().getParameter(paramName)

link publish delete flag offensive edit

answered 2010-07-30 04:46:05 +0800

SHERKHAN gravatar image SHERKHAN
231 3

updated 2010-07-30 04:47:27 +0800

Thanks vinhvo,

but is it possible to pass object instead string?

Thanks for your help,

Best regards,

SHERKHAN

link publish delete flag offensive edit

answered 2010-07-30 05:41:50 +0800

vinhvo gravatar image vinhvo
369 3

In my opinion. Yes : here. But i think it is not gonna be easy.

link publish delete flag offensive edit

answered 2010-07-30 07:16:06 +0800

SHERKHAN gravatar image SHERKHAN
231 3

Thanks a lot!

But yes it is not an easy way... I will use string :D!

Best regards,

SHERKHAN

link publish delete flag offensive edit

answered 2010-08-01 20:27:25 +0800

samchuang gravatar image samchuang
4084 4

Hi

you can refer to this thread about how to save params

link publish delete flag offensive edit

answered 2010-08-02 02:54:28 +0800

SHERKHAN gravatar image SHERKHAN
231 3

Hi samchuang,

In my case I would like passing an parameter to another ZK application on another server. So I think I can't use createComponent() or include... But with include I don't know how we can pass object parameter...

Best regards,

SHERKHAN

link publish delete flag offensive edit

answered 2010-08-02 03:09:01 +0800

samchuang gravatar image samchuang
4084 4

Hi

if you need to pass param to another server, maybe you can append the param as String in the url, is it a possible work around ?

for example

http://xxx/demo/index.zul?topic=demo

just as @vinhvo suggest

link publish delete flag offensive edit

answered 2010-08-02 03:14:04 +0800

SHERKHAN gravatar image SHERKHAN
231 3

updated 2010-08-02 03:20:29 +0800

Yes you are right, but in this case I can just pass string param. It's OK for me, but is it another (easy) way to pass Object param as we can do with createComponents()? It is just for my zk knowledge :).

Thanks for you help,

SHERKHAN

link publish delete flag offensive edit

answered 2010-08-02 19:44:28 +0800

samchuang gravatar image samchuang
4084 4

Hi

I don't have environment for two application, I have a question,

Can you use createComponents() in different application? I though it won't work ?

link publish delete flag offensive edit

answered 2010-08-03 02:49:33 +0800

SHERKHAN gravatar image SHERKHAN
231 3

Hi samchuang,

I think it won't work too... Maybe someone will be able to explain us why?

link publish delete flag offensive edit
Your reply
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

Follow

RSS

Stats

Asked: 2010-07-30 04:32:33 +0800

Seen: 875 times

Last updated: Aug 03 '10

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