Display a web page within iDempiere

610 views
Skip to first unread message

Nicolas Micoud

unread,
Feb 19, 2014, 11:09:59 AM2/19/14
to idem...@googlegroups.com
Hi,

Is it possible to open a web page within iDempiere ?
The goal would be to open webmail, wiki, ...

Thanks,

Regards,

Nicolas

Carlos Antonio Ruiz Gomez

unread,
Feb 19, 2014, 4:20:23 PM2/19/14
to idem...@googlegroups.com
Yes Nicolas, is possible with some restrictions, related to our research
at https://idempiere.atlassian.net/browse/IDEMPIERE-319

Regards,

Carlos Ruiz
> --

Nicolas Micoud

unread,
Feb 20, 2014, 3:57:02 AM2/20/14
to idem...@googlegroups.com
Hi Carlos,

I think i haven't understand what you meant.
If i click on the URL button in the Business Partner window, it open a new tab in the browser.
I would like to open it within iDempiere (means in a tab like Home, other windows ; or in a specific form).

Regards,

Nicolas

Heng Sin Low

unread,
Feb 20, 2014, 6:46:00 AM2/20/14
to idem...@googlegroups.com
Hi,

Unfortunately, that's not configurable at the moment. We change it to open a new browser tab since some web site doesn't work inside an iframe. It would be nice to add a way to make that configurable. A global configuration flag is probably undesirable here though due to the issue above.

Regards.
Low


--
You received this message because you are subscribed to the Google Groups "iDempiere" group.
To unsubscribe from this group and stop receiving emails from it, send an email to idempiere+...@googlegroups.com.
To view this discussion on the web visit https://groups.google.com/d/msgid/idempiere/a9749996-1817-40f9-8127-39ee64f5790d%40googlegroups.com.

For more options, visit https://groups.google.com/groups/opt_out.

Nicolas Micoud

unread,
Feb 20, 2014, 7:48:52 AM2/20/14
to idem...@googlegroups.com
Hi,

Can you indicate where the changes were done please ?

Thanks,

Nicolas

Nicolas Micoud

unread,
Feb 20, 2014, 8:10:18 AM2/20/14
to idem...@googlegroups.com
For the record, just found this :

Seems there is the necessary to display a web page within a form.

Regards,

Nicolas

Heng Sin Low

unread,
Feb 20, 2014, 8:39:28 AM2/20/14
to idem...@googlegroups.com
WUrlEditor and Urlbox


Hiep Lq

unread,
Feb 20, 2014, 8:55:40 AM2/20/14
to idem...@googlegroups.com

I think need add a way to add filter (rule or plug-in).
example:
at event to open url.
check if has rule, call rule to check url is open by iframe or open by new browser tab.
if has no rule, check config value. and open by config value.

VuongCT

unread,
Feb 21, 2014, 6:08:41 AM2/21/14
to idem...@googlegroups.com
Found a work-around :

URL frameUrl;
try {
HttpURLConnection uCon = (HttpURLConnection)frameUrl.openConnection();
String frameSupport = uCon.getHeaderField("X-Frame-Options");
        uCon.disconnect();  
if(frameSupport==null)
iframe.setSrc(frameUrl.toString());
else{
log.log(Level.WARNING,"* FRAME NOT SUPPORTED, URL WILL BE OPENED IN NEW TAB *",e);
Executions.getCurrent().sendRedirect(frameUrl.toString(), "_blank");
}
} catch (WrongValueException e) {
log.log(Level.WARNING,"* WRONG URL VALUE *",e);
} catch (MalformedURLException e) {
log.log(Level.WARNING,"* INVALID URL FORMAT *",e);
} catch (IOException e) {
log.log(Level.WARNING,"* CAN NOT CONNECT TO URL *",e);
}

However, it's not an efficient solution in terms of performance since it sends request to URL destination to get a Http Response and check its Header to decide opening URL in iframe or new browser tab.
BTW, using Executions.getCurrent().sendRedirect(url,"_blank") , i ran into 2 problems:
- Browsers block popups and i had to configure browser setting to allow popup from my test site.
- Firefox seems to handle well when it opened url in new tab but Chrome was messed up opening url in a new popup window.

So it should be a better solution to find another method to open link in new tab instead of using Executions.getCurrent().sendRedirect(url,"_blank").
Reply all
Reply to author
Forward
0 new messages