留言板

Validation message is not showing in aui dialog

thumbnail
Aritra Ghosh,修改在12 年前。

Validation message is not showing in aui dialog

Junior Member 帖子: 62 加入日期: 11-11-8 最近的帖子
Hi all,
I customized the liferay's in-built sign-in portlet.The portlet is coming as pop-up.For that I changed portal-normal.vm and added the code

#set ($my_url = $portletURLFactory.create($request, "58", $getterUtil.getLong($plid), "RENDER_PHASE"))
$my_url.setWindowState("EXCLUSIVE")

<title>$the_title - $company_name</title>

$theme.include($top_head_include)

<script type="text/javascript" charset="utf-8">

function showPopup() {
AUI().use('aui-dialog', 'aui-io', 'event-custom', 'io-form', function(A) {
window.instance = new A.Dialog({
centered: true,
constrain2view: true,
destroyOnClose: true,
draggable: true,
height: 400,
resizable: false,
modal: false,
stack: true,
title: 'Authentication',
width: 400
}).plug(A.Plugin.IO, {uri: '$my_url'}).render();

});
}
</script>


Now,I can see the log-in portlet as pop-up.But after clicking sign-in button,it can not show validation messages,shows me a blank page emoticon.....Giving right credentials it's working fine...Any suggestion????
Thanks..

Aritra
Brijesh Desai,修改在11 年前。

RE: Validation message is not showing in aui dialog

New Member 帖子: 6 加入日期: 11-4-13 最近的帖子
Did you get the solution for this?
I have same kind of implementation on user registration.
I have already done for the pop up of user registration page, it works for if all fields filled out and save.
But if any one blank and if it is mandatory, then on click of save, it lands me on plain white (without any css) page and losing the pop up state.
Looking to validate registration fields on pop up or in aui dialog.

Regards,
Brijesh
thumbnail
Yatin Patel,修改在11 年前。

RE: Validation message is not showing in aui dialog

New Member 帖子: 24 加入日期: 11-10-12 最近的帖子
Hi Aritra,

create one page call login and add login portlet in that page.

Use http://deploy.alloyui.com/demos/dialog-iframe/ "dialog-iframe" and pass login page url as below code.

AUI().ready('aui-dialog','aui-dialog-iframe', function(A) {
window.myDialog = new A.Dialog(
{
title: 'My Dialog',
width: 640,
// height: 400,
centered: true,
constrain: true
}
).plug(
A.Plugin.DialogIframe,
{
uri: 'assets/content.html',
// bindLoadHandler: function() {
// A.on('iframeReady', A.bind(this.fire, this, 'load'));
// },
// uri: 'http://google.com',
iframeCssClass: 'dialog-iframe',
after: {
load: function(event) {
// console.log('iframe loaded');
}
}
}
).render();

});

It's help you......
sadhan paul,修改在10 年前。

RE: Validation message is not showing in aui dialog

New Member 帖子: 2 加入日期: 13-10-24 最近的帖子
Aritra Ghosh:
Hi all,
I customized the liferay's in-built sign-in portlet.The portlet is coming as pop-up.For that I changed portal-normal.vm and added the code

#set ($my_url = $portletURLFactory.create($request, "58", $getterUtil.getLong($plid), "RENDER_PHASE"))
$my_url.setWindowState("EXCLUSIVE")

<title>$the_title - $company_name</title>

$theme.include($top_head_include)

<script type="text/javascript" charset="utf-8">

function showPopup() {
AUI().use('aui-dialog', 'aui-io', 'event-custom', 'io-form', function(A) {
window.instance = new A.Dialog({
centered: true,
constrain2view: true,
destroyOnClose: true,
draggable: true,
height: 400,
resizable: false,
modal: false,
stack: true,
title: 'Authentication',
width: 400
}).plug(A.Plugin.IO, {uri: '$my_url'}).render();

});
}
</script>


Now,I can see the log-in portlet as pop-up.But after clicking sign-in button,it can not show validation messages,shows me a blank page emoticon.....Giving right credentials it's working fine...Any suggestion????
Thanks..

Aritra




Hi Aritra,

try this...
portal_normal.vm---------
<script type="text/javascript" charset="utf-8">

function showPopup() {
AUI().use('aui-dialog', 'aui-io', 'event-custom', 'io-form', function(A) {
window.instance = new A.Dialog({
centered: true,
constrain2view: true,
destroyOnClose: true,
draggable: true,
height: 330,
resizable: false,
modal: true,
stack: true,
title: 'Authentification',
width: 530
}).plug(A.Plugin.IO, {uri: '$my_url'}).render();
});
}
</script>


call function as----
#set ($my_url = $portletURLFactory.create($request, "58", $getterUtil.getLong($plid), "RENDER_PHASE" $my_url.setParameter("p_p_state", "exclusive")
#if(!$is_signed_in)
<a href="#" id="sign-in" rel="nofollow" onclick="showPopup();">$nav_child.getName()</a>
#end
its working fine for me.....
but validation is working wel ,but if i put wrong password or email it redirect to new white page with
a non css form.i want vadation should be done in the same pop up... so please help me..........
Norbert Ferchen,修改在9 年前。

RE: Validation message is not showing in aui dialog

New Member 帖子: 3 加入日期: 14-5-15 最近的帖子
The validation in the popup does not work, if the form id/name is the same as in the parent window. If you will set name-attribute to something other than 'fm' for the form-tag the validation will work.

It took me a long time to find this.