Forums

Home » Alloy UI » English

Combination View Flat View Tree View
Threads [ Previous | Next ]
toggle
Aritra Ghosh
Validation message is not showing in aui dialog
November 24, 2011 10:36 AM
Answer

Aritra Ghosh

Rank: Junior Member

Posts: 63

Join Date: November 8, 2011

Recent Posts

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
RE: Validation message is not showing in aui dialog
December 28, 2012 11:20 AM
Answer

Brijesh Desai

Rank: New Member

Posts: 6

Join Date: April 13, 2011

Recent Posts

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
Yatin Patel
RE: Validation message is not showing in aui dialog
January 9, 2013 10:07 PM
Answer

Yatin Patel

Rank: New Member

Posts: 24

Join Date: October 12, 2011

Recent Posts

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
RE: Validation message is not showing in aui dialog
February 18, 2014 4:41 AM
Answer

sadhan paul

Rank: New Member

Posts: 2

Join Date: October 23, 2013

Recent Posts

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
RE: Validation message is not showing in aui dialog
August 7, 2014 1:47 AM
Answer

Norbert Ferchen

Rank: New Member

Posts: 3

Join Date: May 15, 2014

Recent Posts

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.