Laliwala IT Services

Laliwala IT Services
Website Development

Thursday, February 24, 2011

multiple browser, how browser starts automatically, lifeary basic, liferay launche, liferay application, liferay use, liferay runtime

Sandeep Nair : Hi,








I am just curious and it may be but silly and very obvious to most you guys/gals, but i want to know as to how when i start tomcat the liferay website opens on it own in new browser?








Regards,

Sandeep






Mazhar Anwar : Hi Sandeep,








This is defined in Global startup event of portal and you can find the code in GlobalStartupAction.java of portal source.








You can check the following property in portal.properties as well.








browser.launcher.url=http://localhost:8080








Regards,

Mazhar






Sandeep Nair : aah i see the code now.Basically a thread being launched which opens application using java.lang.Runtime. thanks friend.








Regards,

Sandeep

Communications link failure, database, preferences values, portlet, portlet.xml, mysql, portlet solution, liferay issue


Rishi Dev Gupta : I have read almost all the posts but could not find the permanent fix for the issue








I am still getting








I am using LFR 5.2.3 with mysql mysql 5.0 on tomcat 6.0.18








If any one of you any solution, please respond.














Mazhar Anwar : Can you verify database(portletPreferences table) for all preferences values for your portlet?








It seems you have missed <preferences> in your portlet.xml.








Regards,

Mazhar






Rishi Dev Gupta :
This is not regarding any particular portlet. The tomcat just stops rendering the pages and the site goes down although the tomcat is running is background and there is no major load on mysql.






Rishi Dev Gupta : check this out for solution








http://issues.liferay.com/browse/LPS-4578

Config Portlet in Plugins-SDK, config button, plugins sdk, config.jsp, liferay-portlet, action url, portal configuration

Liferay portal portlet tutorial
Liferay portlet development trianing



Iván Rodríguez Bautista : Hi everybody,





I´m developing a config portlet through "Config" button.








This portlet is in Plugins-SDK, and I get to my config.jsp right. I insert this tag "<configuration-action-class>" in "liferay-portlet.xml", and this class extends "BaseConfigurationAction".








In config.jsp I have somethig like this:
















The problem is that the text I see in the browser is this:





.....





" class="uni-form" method="post" name="_86_fm" id="_86_fm">





.....








When I submit the form, Liferay gives me an error.








In all the manuals and forums I see the form definition like I write.








Somebody can help me?








Thak you very much, greetings!!






Faris Abdulla : Hi Ivan,








Can you please check the syntax written in your .jsp.








The error seems like Syntax error.








Just try the complete statement in single line.








<form form action="<liferay-portlet:actionURL portletConfiguration="true" />" class="u.." >






Iván Rodríguez Bautista
Hi Faris,





Thak you for answer me, I´ve done that you say, but it doesn´t work emoticon








Is like the form finish when I close the liferay-portlet:actionURL tab.






Faris Abdulla : Hi Ivan,








Are you using any javascript functions over it?








I'll give you my code how I used the <form> in config.jsp and its working..








I'm not using the form name..








Dont know whether this will help you. Just try..






Mazhar Anwar : Hi,








You can try in this way?








<form action='<liferay-portlet:actionURL portletConfiguration="true" />' method="post" name="<portlet:namespace />fm">








Use single quetes rather than double quotes, HTH..








emoticon

Regards,

Mazhar






Iván Rodríguez Bautista
Thank you very much for answer.








If I put all in the same line without name or id, like Farid said the problem persist emoticon








if I put it like Mazhar write, the form appears a well formed emoticon, but when I clic the submit button I can see this exception:








With debug I can see that the excpetion jumps before the code get to the Configuration class.








The steps that i follow are the next:








1. Define in portlet.xml, in the main portlet, the tag:













2. Define in liferay-portlet.xml, in the main portlet, the tag:










3. Create PortlelConfigure like this:













I get to the "configuration.jsp" correctly, but when in it I clic the submit button, becames the exception.








Any idea to resolve the problem??








Again, thank you very much.

Greetings!!!






Mazhar Anwar : Hi,








Add the following taglibs in your jsp.








And verify the configuration.jsp path in your render method. HTH,






Iván Rodríguez Bautista
Ooooooh yeah!!








Thank you so much Mazhar! I didn´t write the declaration of liferay-portlet tag. I had not realized because Eclipse didn´t give me errors emoticon, but now I can get to the processAction method of my configure class.








Thanks again!!

Wednesday, February 23, 2011

mazhar anwar

liferay developer tutorial

H K : Hi








When I add a portlet and remove its border, the "look and feel" icon is removed as well, making it impossible to add the border again.








How can I prevent this icon from disappearing?








In my theme, I have specified that the following icons should be included:














Lisa Simpson :
You should still have the look & feel text links if the border is removed. That is how you turn the border back on.






H K :
The look & feel text link is unfortunately removed when the border is removed, I don't know why emoticon






Bavithra Rajendran : Hi !








Check the Toggle Edit Controls in the Dock. If it is unchecked, then you wont get the Look and Feel text links. You need to check the check box in the Dock.








Thanks,





Bavithra Rajendran






H K : The Toggle Edit Controls is already checked. I can only see a configuration icon, a minimize icon, maximize icon and a close icon, but no Look-and-Feel text link.








Please see the attached screenshot as a proof emoticon














Bavithra Rajendran : Hi !








Try to add $theme.iconOptions() in your portlet.vm file. Hope it will solve your problem.








Thanks,

Bavithra Rajendran






H K :
Hm.. that brought forth an icon containing three white dots. However nothing happens when I click on that icon.






Bavithra Rajendran : Hi !








Can you give me a snippet of your portlet.vm file?








Thanks,

Bavithra Rajendran






H K : Hi! Here is the full contents of my portlet.vm file:














H K :
Do anyone know how to solve the problem? I should add that the look-and-feel link doesn't even if the portlet has a border (see the screenshot above where the "navigera" portlet has a border).






Mazhar Anwar : Hey H K,








can you please lemme know what exactly you want?








Regards,

Mazhar






H K : Hi!








I want to be able to change the look and feel of my portlets, either through a "look and feel" text link, or through a look and feel icon emoticon






Mazhar Anwar : Hi,








You can use the following in your JSP.








emoticon HTH






H K : Thanks! I wasn't really sure where to place your code, but the part with "getURLPortletCss()" made me experiment adding the following to my portlet.vm file:








.. which worked - I now have a look-and-feel icon - problem solved! emoticon

Invoke a Java class in portal_normal.vm, liferay configure, liferay environment, community, forums, message, liferay works, liferay developer

Sam w : Hi,








Can anyone tell me how to invoke a java class in portal_normal.vm or in any *.vm?








eg. in portal_normal.vm, I want to do something like this:
















In order to call MyProductUtil.class, how to configure liferay environment so that the reference of its class is found in portal_normal.vm file?








Thanks

Sam






Mazhar Anwar :
You can achieve it by extending VelocityVariables.java in portal source.






Shagul Khajamohideen : Hi Sam,








The below links may help.








http://www.liferay.com/community/forums/-/message_boards/message/3376997








http://www.liferay.com/community/wiki/-/wiki/Main/Access+to+Liferay+services+in+Velocity






Sam w : The second link (ServiceLocator) might be something that I am looking for.








I think I can write something like this:
















Thanks very much for the reference.





I will try it out see if it works.








Thanks

Sam

submit button css in a portlet, specific button, mouse over effect, forms.css, developer tutorail


G L :


We have a custom theme in place that works well. My particular problem is a specific portlet with form buttons that are disabled at times. We have a portlet css file but I can't get the CSS to stop the button background from changing to a light blue color on a mouse over. It looks disabled until you hover over it with the mouse then the background changes giving the illusion of an active button. Below is my current CSS. It works with the exception of the mouse-over effect I'd like to disable for this specific button. Thanks.











Mazhar Anwar : You can override the following styles in your custom.css








For reference, check out forms.css in theme_folder/css folder.








HTH,

override util class, ldap portal util class, liferay requirement, extending




francesco scamarcio : Hi all I have to overwrite the rider ldapPortalUtil class.





What I have done is create ext Environment in the same package with the same class, overwriting my method. The problem is that in windos me take my class in the ext hai but in unix as two classes with the same package in the classpath I will always pick the one in the portal-impl and not the one I have in the ext-impl .








I wonder if there is another way to extend the useful clse of liferay.



Mazhar Anwar : Server will always pick ext-impl Instance of your class no matter whether it is Windows or Linux.








If you are extending the Class then you have to just override the necessary methods in it. And If you are overwriting the Class then copy all the methods in your ext instance, and then modify as your requirement.

ServiceBuilder and Utils classes, journal articale, update, create, finds, example




Carlo Cavallieri : Hi all,





i can see that for Liferay Services there are various *Utils classes, for example JournalArticale has its own JournalArticleUtil and all the update, create, finds ecc...








go through these methods








If i use service builder these Utils won't be created, so my question is:








if i need to add a method, for example i have an entity "MyEntity" and want to add the method createWithMyParams(); where is the right place to add it?








in the "mypackage.model.impl.MyEntityImpl" class? or is better to create an Util for these cases?






Mazhar Anwar : You can build service classes either in ext or in plugins-sdk.








So, whenever you build service in ext using service builder, Liferay creates its Util classes in ext-service. And in case of Plugins it will be in your portlet-folder/WEB_INF/service folder.








You have to write all your methods in Impl Classes and need to build-service again, and your Util classes will be generated.








HTH.






Mazhar Anwar : You can get more information at






Carlo Cavallieri : thanks