Posts

Showing posts with the label searchcontainer

Getting the search container checkbox values in the Liferay

In liferay if we see the search container they have the chexkboxes which default liferay creates. So how do we reterive the those checkbox values in the javascript? Here is the code to retrieve the chexkbox values in javascript. Liferay.provide( window, '<portlet:namespace />updateStatus',  // Name of the javascript function . function(cmd) {       var updateStatus = true;        var updateUserIds = Liferay.Util.listCheckedExcept(document.<portlet:namespace />fm, "<portlet:namespace />allRowIds");  // Getting the checked checkboxes values , Here "fm" is the form name .       if (!updateUserIds) {            updateStatus = false;       } // Here based on the user click we are displaying the message . else if (cmd == "deActive") {      if (!confirm('<%= UnicodeLanguageUtil.get(pageContext, "are-you-sure-you-want-to-deac...

Removing prefix value for table created by service builder

In Liferay , Whenever we are writing the service bulider we specify the "namespace" in  service.xml so that table will be created as prefix namespace. If you look into the below service.xml , In DB it creates as test_library . <service-builder package-path="com.test"> <author>BNG</author> <namespace>test</namespace> <entity name=" library " local-service="true" remote-service="false"> <column name="libraryId" type="long" primary="true" />    ----------------    </entity> </service-builder>  If you want to remove the prefix while creating the table in DB. we need to keep auto-namespace-tables = "false". <service-builder package-path="com.test" auto-namespace-tables="false" > Thats it!!!