As a wrapper of Joomla, how to process the passed parameter via URL from Joomla?

194 views
Skip to first unread message

lanz

unread,
Jun 8, 2010, 10:43:07 PM6/8/10
to GWT-Ext Developer Forum
Hello everyone,

I have created my gwt-ext application as a wrapper of Joomla.Basically
it's an iframe. Now I want to pass the username to my gwt-ext
application via url. Could you give me any idea about this. I have
seen some codes like below:

/*
* Default parameters sent with every request
*/
UrlParam[] arrParam = { new UrlParam("param1", "myvalue1"),
new UrlParam("param2", "myvalue2") };
ConnectionConfig conCfg = new ConnectionConfig();
conCfg.setUrl("myurl.org");
conCfg.setExtraParams(arrParam);
conCfg.setMethod(Connection.POST);

UrlParam[] arrParam2 = { new UrlParam("codigo", 1) };
RequestParam reqParam = new RequestParam();
reqParam.setParams(arrParam2);

Connection con = new Connection(conCfg);
con.request(reqParam);
//==============================

Do you know a better way to do this?

Thanks,
Lanz

Patrizio De Michele

unread,
Jun 9, 2010, 3:58:35 AM6/9/10
to gwt...@googlegroups.com
String myParam=Window.Location.getParameter("myParam");
where myParam is a parameter inside the url
GWT >=1.5

2010/6/9 lanz <allan.z...@gmail.com>

--
You received this message because you are subscribed to the Google Groups "GWT-Ext Developer Forum" group.
To post to this group, send email to gwt...@googlegroups.com.
To unsubscribe from this group, send email to gwt-ext+u...@googlegroups.com.
For more options, visit this group at http://groups.google.com/group/gwt-ext?hl=en.


Allan Zarsuela

unread,
Jun 9, 2010, 4:37:14 AM6/9/10
to gwt...@googlegroups.com
Hi Pat,
 
I had edited the Joomla wrapper.html.php because I am using Joomla 1.0.0
for the passing of parameter as the code below:
//-->>
 <?php echo $row->load; ?>
  id="blockrandom"
  name="iframe"
  src="<?php echo $row->url."?userid=1"; ?>"
  width="<?php echo $params->get( 'width' ); ?>"
  height="<?php echo $params->get( 'height' ); ?>"
  scrolling="<?php echo $params->get( 'scrolling' ); ?>"
  align="top"
  frameborder="0"
  class="wrapper<?php echo $params->get( 'pageclass_sfx' ); ?>">
  <?php echo _CMN_IFRAMES; ?>
  </iframe>
//<<--
Now I implemented your advised codes on the gwt-ext side
as seen below with the import com.google.gwt.user.client.Window;

//-->>

String myParam= Window.Location.getParameter(

"userid");

Label urlPassedValue =

new Label(myParam);

frm.add(urlPassedValue);

//<<--
 
This works! Thanks a lot Pat.
 
Regards,
Lanz

Reply all
Reply to author
Forward
0 new messages