Menu
  • HOME
  • TAGS

Validator for aui: select with autofield in Liferay

jquery,liferay,alloy-ui,liferay-aui,autofield

Assuming some "template" <aui:select> exists within your form similar to: <aui:select id="elementIdPrefix0" name="elementIdPrefix0" label="Number" showEmptyOption='true' > <!-- options go here --></aui:select> In your auto-fields, you would need to provide an on event listener for the clone event. Within the callback you lookup the <aui:select> from within the row container node...

How do I trigger a onclick javascript of a link with AUI?

javascript,yui,liferay-aui

You need to use the 'node-event-simulate' module and call it as A.one('a.deleteSelectedSearch').simulate('click'); Here is the modified code var AUI = YUI; AUI().use('event', 'node-event-simulate', function(A) { var deleteButton = 46; A.one('.searchNameSelect').on('keyup', function(e) { if(e.button == deleteButton){ A.one('a.deleteSelectedSearch').simulate('click'); } }); }); Working Fiddle...

How to execute renderURL in aui script or javascript in Liferay

jquery,liferay,liferay-6,alloy-ui,liferay-aui

AUI().use('liferay-portlet-url', function(A) { var url=Liferay.PortletURL.createRenderURL(); url.setPortletId('currentPortletId'); url.setParameter('name','value'); A.one(document.createElement('a')).attr('href',url).simulate('click'); }) The code above would be helpful to you to achieve your requirement. Put it in click event handler function of row of your data-table. NOTE: Just replace currentPortletId, name and value in above code as per your requirement, you may...

How to use superscript HTML code with radio button label with AUI

html,radio-button,superscript,liferay-aui

LifeRay code <aui:input cssClass="radio-btn" type="radio" name="radio" value="radio" label="Radio Button"></aui:input> AUI Script AUI().use('aui-autocomplete', function(A) { A.one('.radio-btn label').append("<sup>15</sup>"); }); ...

How do I activate a YUI Datepicker only by a seperate Icon, not by the referenced input field?

javascript,yui,liferay-aui

Unless I'm mistaken, it sounds like you want the icon to be the trigger for the DatePicker and you want it to update the input. If so, the following code should do the trick: var AUI = YUI; AUI().use('aui-datepicker', function(A) { var input = A.one('#input'); var datePicker = new A.DatePicker({...

closethick button disappear liferay popup 6.2

popup,liferay,alloy-ui,liferay-aui

Using the modal dialog example as a comparison, the X close button is removed when using the toolbars property. Reviewing the source code for the toolbars property (line 309 at time of writing this) indicates that if you use this property directly, you'll need to include your own X close...

Loading a video inside a toggler through Alloy UI (Liferay 6.2)

javascript,video,liferay,alloy-ui,liferay-aui

When I run your code I get: Uncaught TypeError: undefined is not a function This is due to the fact that, TogglerDelegate does not have a render() method. Also, you should not put a div into a p element. Instead, just make the toggler content into a div. See below...

Liferay 6.2 - Web Content > Add Translation shows blank popup

java,liferay,liferay-6,liferay-aui

OK, I found what was wrong : one of our hooks had an impact on this popup (causing the ArrayIndexOutOfBoundsException). @Pawel : thanks for your concern anyway....

Unable to retrieve the value from DB using Liferay Service Builder

liferay,liferay-6,liferay-ide,liferay-velocity,liferay-aui

There is an issue in your code part below: List <LMSBook> books = LMSBookLocalServiceUtil.getLMSBooks(0, -1); It says limit 0 to -1 which is not correct. In order to get all records you should use below code: List <LMSBook> books = LMSBookLocalServiceUtil.getLMSBooks(-1, -1); If you use -1 as start and end,...

liferay-ui input date clear value

java,html,liferay,liferay-aui

In Liferay 6.2 InputDateTag has only one *nullable parameter - nullable. There's no monthNullable, dayNullable or yearNullable parameter. Hence the exception "Attribute *Nullable invalid for tag input-date according to TLD". All you need is to set nullable="true" and the initial value will be an empty String. The tag does the...

Auto complete not working Liferay 6.2

jquery,ajax,json,liferay,liferay-aui

I think you no need to signify the response as you are already getting response in JSON format. There might be some data mismatch... Try this: <aui:script> AUI().use('autocomplete-list','aui-base','aui-io-request','autocomplete-filters','autocomplete-highlighters',function (A) { A.io.request('<%=getRoles%>',{ dataType: 'json', method: 'GET', on: { success: function(event, id, obj) { try { new A.AutoCompleteList( { allowBrowserAutocomplete: 'false', activateFirstItem:...

AUIScript Val().length is Undefined

javascript,jquery,liferay-aui

The problem here is the selector used for radio buttons. You are trying to get all elements with class 1, but if what you need is the selected radio so you have to use .1:checked. Without the html it is difficult to form a proper selector, but assuming those are...

The type com.sun.portal.portletcontainer.taglib.PropertyBaseTag cannot be resolved

java,liferay,liferay-aui

You have't class com.sun.portal.portletcontainer.taglib.PropertyBaseTag in your classpath, try to add the jar with this class in your classpath.

customize error message for required field with in liferay

validation,liferay,liferay-6,liferay-aui

You can validate an aui:select with custom message as following (Tested Code): HTML <aui:form method="post" name="fm"> <aui:select name="sampleDropdown" label=""> <aui:option selected="true" value="">Select an Option</aui:option> <aui:option value="1">Option 1</aui:option> <aui:option value="2">Option 2</aui:option> <aui:option value="3">Option 3</aui:option> </aui:select> <aui:button value="Save" type="submit"></aui:button> <aui:form> Script:...

How to add a custom section to the User Edit Screen in Liferay?

liferay,liferay-6,liferay-aui,liferay-ide

What you are looking for is a hook. You use the file WEB-INF/liferay-hook.xml as deployment descriptor: <!DOCTYPE hook PUBLIC "-//Liferay//DTD Hook 6.2.0//EN" "http://www.liferay.com/dtd/liferay-hook_6_2_0.dtd"> <hook> <portal-properties>portal.properties</portal-properties> <language-properties>Language.properties</language-properties> <custom-jsp-dir>/WEB-INF/custom_jsps</custom-jsp-dir> </hook> And you define your additional section in the file...

Liferay.Upload Component Usage for Multi-file Upload

file-upload,liferay,liferay-6,jsp-tags,liferay-aui

It looks like this component is reused all over in Liferay. I think you could reuse it as well. I've found following documentation of initial parameters. I hope it'll help you progress. Good luck!

How can I change the zIndex attribute of aui-datepicker in Liferay Portlet 6.2

datepicker,liferay,z-index,liferay-aui,alloy-ui

You need to change the zIndex on the DatePicker's internal Popover: new Y.DatePicker({ // ... popover: { zIndex: 1 } }); See the example page and API docs for more details....

typeerror undefined is not a function liferay

javascript,jquery,liferay,liferay-6,liferay-aui

Actually the above code works fine in Liferay-6.06, I am trying to migrate it to Liferay-6.2, so the AUI version in 6.06 is not works in 6.2: AUI().ready('aui-textboxlist-deprecated', function (A) { // code that uses A.TextboxList goes here }); the code is for 6.2. For 6.1, we have to use...

Liferay.PortletURL is undefined

liferay,liferay-6,liferay-aui

Update: I resolved the issue by brute force. Before: <a href="" onclick="openCDPPage('${individual.individualId}')">${individual.individualName} After : <a onclick="openCDPPage('${individual.individualId}')">${individual.individualName}</a> Changes in the script: <script> function openCompanyPage(companyId) { AUI().use(**'liferay-portlet-url'**, function(A) { var navigationURL; var portletURL = Liferay.PortletURL.createRenderURL(); var url = themeDisplay.getLayoutURL(); portletURL.setParameter("employerId",...

AUI input keyup detection does't work

input,liferay,alloy-ui,liferay-aui

Your code has multiple issues: You do not need to specify an AUI().use(//... if you are using <aui:script> with the use attribute. You only need to specify the aui-node module as an argument to the use attribute. You most likely do not want to set inputObject equal to the return...

YUI on IE8: Argument not valid on dom-style.js

internet-explorer-8,yui,liferay-aui,alloy-ui

Ok this is WAY more simple than i thought. For some reason all the modern browsers (including IE9) don't have any problems when you initialize Alloy UI with : YUI({ lang: 'ca-ES' }).use( 'aui-node', 'aui-datatable', 'aui-pagination', 'datatype-date', function(Y) {... But IE8 (of course) will give you a series of really...