Laliwala IT Services

Laliwala IT Services
Website Development

Monday, February 28, 2011

database connection in liferay 5.2.3, liferay tutorial, liferay mysql, liferay jdk, liferay tomcat, liferay database

How to Make Database connection in Liferay-5.2.3

In this example we are going to see the database connectivity with MySQL and a simple example of it. Here the Prerequisite for doing connection with database.

• Install the JDK and set the Path JAVA_HOME variable .
• Set the Path for Ant ANT_HOME variable .
• Install MySQL (remember the port number, username and pasward).
• Make a Folder For your Workspace where the Liferay folders you are going to keep like EXT and Tomcat etc.
• You must know the how to make simple struts Portlet with action file.

Make sure that above things have been done accordingly and check your Liferay is working properly.Now follow the following steps to do a connection with database.

Step 1 : Set the following code in portal-ext.properties under path(~\liferay-portal-ext-5.2.3\ext-impl\src\ portal-ext.properties) in your Liferay folder.
This step you may have done at time of liferay setup if you have then check it out.

Code :
jdbc.default.driverClassName=com.mysql.jdbc.Driver
jdbc.default.url=jdbc:mysql://localhost:3309/test?useUnicode=true&characterEncoding=UTF-8&useFastDateParsing=false
jdbc.default.username=root
jdbc.default.password=root

Make sure that the port number you have given is correct in default url and the username, password, and database/schema name is correct.

Step 2 : Now ant deploy from ext-impl and from ext, make sure that it’s done successfully now restart the tomcat and check in MySQL database name as you given in this example we used the name test.

Step 3 : Make the table with your need for this example we are taking the table for testing called book the following statement is for creating the table.

create table Book (
bookId bigint(10) not null primary key,
title VARCHAR(75) null,
dateAdded datetime
);

Write the above statement in MySQL screen than perform the transaction, refresh the Database and check the table.

Step 4 : Make service.xml on this /ext/ext-impl/src/com/ext/portlet/library path here the Library is the folder of your portlet where this file you have to place. Write the following is the service.xml





Library











Step 5 : Now do the following steps to build the service for above table.

• Go to "/ext/ext-impl"
• Execute "ant build-service -Dservice.file=src/com/ext/portlet/library/service.xml"
• Make sure the build is successful
• Confirm all the service layer files are generated as per the Spring/Hibernate framework. check under
o ext/ext-impl/src/com/ext/portlet/library
o ext/ext-service/src/com/ext/portlet/library

Step 6 : Updating service layer class – 1

file location : ext\ext-
impl\src\com\ext\portlet\library\service\impl\BookLocalServiceImpl.java

now write the functionality for database insert. insert this method.

import com.ext.portlet.library.model.Book;
import com.ext.portlet.library.model.impl.BookImpl;

import java.rmi.RemoteException;
import com.liferay.portal.PortalException;
import com.liferay.portal.SystemException;
import com.liferay.counter.service.CounterServiceUtil;
public Book create(String title)
throws PortalException, SystemException, RemoteException {

// create a primary key
long bookId = CounterServiceUtil.increment(Book.class.getName());

// instantiate an empty object
Book book = new BookImpl();
book.setBookId(bookId);
book.setTitle(title);

// persist the book object
book = bookPersistence.update(book, false);

// return the object to caller
return book;
}
Step 7 : Run ant build-service again to re-generate the corresponding Util interfaces. Do the following steps.

• execute "ant build-service -Dservice.file=src/com/ext/portlet/library/service.xml"
• execute "ant compile" to compile all the generated file and make sure the build is SUCCESSFUL.

Step 8 : Now Update the action file which is made at location "ext/ext-impl/src/com/ext/portlet/library/action". The following is the code to written in Action file name as AddBookAction.java

package com.ext.portlet.library.action;

import javax.portlet.ActionRequest;
import javax.portlet.ActionResponse;
import javax.portlet.PortletConfig;
import javax.portlet.RenderRequest;
import javax.portlet.RenderResponse;

import org.apache.struts.action.ActionForm;
import org.apache.struts.action.ActionForward;
import org.apache.struts.action.ActionMapping;

import com.liferay.portal.struts.PortletAction;
import com.liferay.portal.kernel.util.Validator;
import com.ext.portlet.library.service.BookLocalServiceUtil;

public class AddBookAction extends PortletAction {

public void processAction(
ActionMapping mapping, ActionForm form, PortletConfig config,
ActionRequest req, ActionResponse res)
throws Exception {

String bookTitle = req.getParameter("book_title");

if (Validator.isNull(bookTitle)) {
setForward(req, "portlet.ext.library.failure");
} else {
// new line to be inserted
BookLocalServiceUtil.create(bookTitle);
setForward(req, "portlet.ext.library.success");
}
}

public ActionForward render(ActionMapping mapping, ActionForm form,
PortletConfig config, RenderRequest req, RenderResponse res)
throws Exception {
if (getForward(req) != null && !getForward(req).equals("")) {
return mapping.findForward(getForward(req));
} else {
return mapping.findForward("portlet.ext.library.view");
}
}
}

Step 9 : Now do run "ant deploy" from "ext" for this do the following steps.

• go back to /ext folder and execute "ant deploy"

• make sure the build is SUCCESSFUL.

• check the newly generated jar files "ext-impl.jar" and "ext-service.jar"

Step 10 : Start tomcat and check the portlet. try to add some books and make sure the values are getting saved in the database.

Note : the structs portlet steps was not shown in this section so do that steps by ur self before doing this steps.


_________________________________________________________________________________
Laliwala IT Services
Mangal Girdhar Compund, Nr. B.G.Tower, Dehli Darwaja, 
 Ahmedabad - 380004
Gujarat, India
Email : imran@laliwalait.com
Telephone: +91-9904245322

spring framework, spring application, spring training

spring framework is an open source application framework.
spring help to j2ee developer.
j2ee application famous in 1999.
spring is applicable in a wide range of environments not just server side j2ee app. the original motivation for spring was the j2ee environment, and spring offers many valuable services, for use in j2ee applications.
spring is lightweight frameworks

oriented programming framework
data access abstraction
jdbc simplification
transaction management
mvc web framework
simplification for working with jndi, jta, j2eeapis
lightweight rmoting

Saturday, February 26, 2011

jbpm tutorial, elipse tutorial, jbpm training, liferay jbpm training, liferay tutorial

JBPM Double Approver in liferay portal download

Steps for creating double approver

1.Download jbpm-jpdl-designer-site-3.1.7 from here Download

2.open Eclipse goto->help->Install New Software and in archive select the zip file downloaded

3.go through the following site:-http://www.redhat.com/developer_studio/guides/jbpm/html_single/

4.After creating the definition copy the xml file in jbpm-web -> definitions folder in webs.

5.Change the biuld file in jbpm-web chnage the following
//------------------------------------------------------------------------------------------------------------------//






--- To ---




//-------------------------------------------------------------------------------------------------------------------//




--- To ---




//------------------------------------------------------------------------------------------------------------------//

6. And then perform the steps as for the previous jbpm-web


___________________________________________


Double entries Workflow Configuration

Workflow Configuration portlet

double entry fields

4.0.23 + MySQL 5. 6.1



Irshad Masuri

Magento Development, magento integration, magento solution, magento develpoment services, magento support, magento theme development

Magento Development

Magento is a feature-rich, professional Open Source eCommerce platform solution, Laliwala IT Services offers Magento Development, Magento integration to merchants / online shoppers a complete flexibility and control over the user experience, content, and functionality of their online channel. Magento’s intuitive administration interface features powerful marketing tools, a catalog-management engine and also an SEO optimized to give merchants the power to create sites that provide an unrivalled and rich online shopping experience for their customers, and Laliwala IT Services assures a customized / tailored solution to their unique business needs. The ground-breaking Magento platform is the fastest growing eCommerce platform on the market with over 1,000,000+ downloads up to date.









Laliwala IT Services Magento Developer have hands on experience to Design Magento to be completely scalable and backed by our extensive support team, Magento is the ultimate eCommerce solution. This list will provide you with an in depth look at the Magento feature set.

Magento Site Management


Control multiple websites and stores from one Administration Panel with ability to share as much or as little information as needed
Administration Permission System Roles and Users
Web Services API for easy integration between
Magento and any third-party application
Fully 100% customizable design using templates
Customer Groups
One-Click Upgrades
Content Management System for Informational Pages
Google Website Optimizer Integration for A/B and Multivariate Testing

Magento International Support

Support for localization, multiple currencies and Tax rates
Configurable List of Allowed Countries for:
Site Registration
Shipping Destination Addresses with ability to specify per shipping method
Billing Addresses with ability to specify per payment method

Magento Analytics and Reporting


Integrated with Google Analytics
Admin Dashboard for Report Overview
Sales Report
RSS feed for New Orders
Tax Report
Abandoned Shopping Cart Report
Best Viewed Products Report
Best Purchased Products Report
Low Stock Report
Search Terms Report
Product Reviews Report
RSS feed for New Reviews
Tags Report
RSS feed for New Tags
Coupon Usage Report
Total Sales Invoiced
Total Sales Refunded






Magento Marketing Promotions and Tools


Polls
Newsletter Management
Landing Page Tool for Campaigns
Catalog Promotional Pricing by percentage or fixed amount with ability to restrict to stores, categories, products
Flexible Coupons (pricing rules) with ability to restrict to stores, customer groups, time period, products, and categories
Free Shipping Options
Multi-Tier Pricing for quantity discounts
Bundled Products Options
Customer Group-specific pricing and group-specific tier pricing
Recently Viewed Products
Recently Compared Items
New Items Promotional Tool
Up-sells in Shopping Cart
Cross-sells on product pages
Send Wishlist to a Friend by Email or RSS
RSS Feeds for New Products, New Specials and New Tags
Google Site Map

Magento Search Engine Optimization


100% Search Engine Friendly
Google Site Map
Search Engine Friendly URL’s
URL Rewrites give full control of URL’s
Meta-information for products and categories
Auto-generated Site Map for display on site
Auto-Generated Popular Search Terms Page

Magento Checkout, Payment and Shipping


One-Page Checkout
Integrated for real-time shipping rates from:
UPS, UPS XML (account rates), FedEx (account rates), USPS and DHL
Configurable to authorize and charge, or authorize only and charge on creation of invoices
Integrated with Amazon Payments
Integrated with multiple PayPal gateways
Integrated with Authorize.net
Integrated with Google Checkout (Level 2)
Saved Credit Card method for offline payments
Accept Checks/Money Orders
Accept Purchase Orders
Payment Extensions Available through Magento Connect
SSL security support for orders on both front-end back-end
Guest Checkout and Checkout with account to use address book
Shopping Cart with tax and shipping estimates
Option for account creation at beginning of checkout
Accept gift messages per order and per item
Saved Shopping Carts with configurable expiration time
Shipping to multiple addresses in one order
On-site order tracking from customer accounts
Multiple shipments per order
Ability to specify allowed destination countries per method
Flat rate shipping per order
Flat rate shipping per item
Free Shipping
Table rates for weight and destination
Table rates for product sub-totals and destination
Table rates for number of items and destination Free

Magento Marketing Promotions and Tools


iPhone Optimized Theme

Magento Order Management


View, edit, create and fulfill orders from admin panel
Create one or multiple invoices, shipments and credit memos per order to allow for split fulfillment
Print invoices and packing slips
Call Center (phone) order creatio
Includes ability to create new customer, or select existing customer and view shopping cart, wishlist, last ordered items, and compared products list, as well as select addresses, give discounts and assign custom prices.
Create re-orders for customers from administration panel
Email Notifications of Orders
RSS feed of New Orders

Magento Customer Service


Contact Us form
Feature-rich Customer Accounts
Order History with Status Updates
Order Tracking from Account
Password Reset email from front-end and admin panel
Order and Account Update Emails
Customizable Order Emails
Create and Edit Orders from the Admin Panel

Magento Customer Accounts


Order status and history
Re-orders from account
Recently ordered items
Address Book with unlimited addresses
Default Billing and Shipping addresses
Wishlist with ability to add comments
Email or Send RSS feed of Wishlist
Newsletter Subscription management
Product Reviews submitted
Product Tags submitted
Downloadable/Digital Products
Account Dashboard for overview of: recent orders, personal information, newsletter subscription status, primary billing address, primary shipping address, shopping cart, wishlist, recently ordered items, recent reviews and recent tags.

Magento Catalog Management


Inventory Management with Backordered items, Minimum and Maximum quantities
Batch Import and Export of catalog:
Batch Updates to products in admin panel
Google Base Integration
Simple, Configurable (e.g. size, color, etc.), Bundled and Grouped Products
Virtual Products
Downloadable/Digital Products
Customer Personalized Products - upload text for
embroidery, monogramming, etc.
Tax Rates per location, customer group and product type
Attribute Sets for quick product creation of different item types
Create Store-specific attributes on the fly
Media Manager with automatic image resizing and watermarking
Advanced Pricing Rules and support for Special Prices
Search Results rewrites and redirects
Approve, Edit and Delete Product Tags
Approve, Edit and Delete Product Reviews
RSS feed for Low Inventory Alerts
Customer Personalized Products - Upload text for embroidery, monogramming, etc. (this one is already there, but want to have the following shown after it)
Customer Personalized Products – Upload Image
Customer Personalized Products – Select Date/Time options for products
Customer Sorting – Define Attributes for Customer Sorting on category (price, brand, etc.)

Magento Product Browsing


Multiple Images Per Product
Feature-rich Customer Accounts
Product Reviews
Related Products
Stock Availability
Multi-Tier Pricing Upsell
Product Option Selection
Grouped Products View
Add to Wishlist
Send to a Friend with Email

Magento Catalog Browsing


Layered / Faceted Navigation for filtering of products in categories
Layered / Faceted Navigation for filtering of products in search results
Flat Catalog Module for Improved Performance with large catalogs
Static Block tool to create category landing pages
Ability to assign designs on category and product level (unique design per product/category)
Configurable search with auto-suggested terms
Recently viewed products
Product comparisons
Recently compared products
Cross-sells, Up-sells and Related Items
Popular Search Terms Cloud
Filter by Product Tags
Product Reviews
Product listing in grid or list format
Breadcrumbs


magento development, magento developer, magento theme integration, magento consulting, magento support, magento web development, magento india, magnto usa, megento development usa, magento development service, magento developer india, magento payment integration

liferay plugin development, liferay setup, liferay portlet setup, theme developmetn, introduction of module

Understanding Liferay Development
Pluging Environment Setup
Eclipse Setup for Plugin development
JSR 168 and JSR 286 Portlet
Developing Portlet
- JSP
- Struts
- JSF
- Spring
- IPC
Developing Layout Pluging
Theme Development
- CSS
- JQuery
- JavaScript
Introduction of Hooks pluging
Introduction of Web Module Pluging

Liferay Extension Development, liferay portlet development training, liferay portlet developer, liferay Extension portlet, liferay interation, soa

Understanding Liferay Development
Extension Environment Setup
Eclipse Setup for Extension development
Portal and System properties customization
Lifray JSP Customization
Liferay Action Extension
- Global Startup Action
Custom Attribute & Expando Table
Portlet Preference
- Development time
- Run time
Liferay Permission
- Portlet Resources
- Model Resources
Liferay Action Extension
- Global Startup Action
Introduction to Service builder
- Database interaction
Introduction to SOA in Liferay
- Web Services
- WSRP

Friday, February 25, 2011

esb training, bpm training, soa architecture training

SOA, BPM & ESB - Architecture, Design and Best Practices Training

Objective

This training course teaches and promotes architecture, design and best practices for SOA, BPM and ESB. This is a required training for individuals who wish to become SOA, BPM and ESB solutions architecture. This is useful to Technical Architect, Project Manager and System Integrator. This training is focusing on Web Services, SOA, BPM, BPEL, ESB and composite application architecture design and best practices.

Duration
32 Hrs (8 Hrs * 4 days)


Batch size
Batch size not to exceed 15 participants

Prerequisites
Basic enterprise architecture, design and modeling knowledge

Hardware Requirements
Desktop or Laptop 2.0 GHz, 1GB RAM with Windows XP and internet facility

Commercials Online Training

Course Contents

Web Service (1 Day)
Introduction to Web Services
Advantages of Web Services
Web Services Business Models
XML Overview
XML Schema Basics
Web Services Description Language (WSDL)
Simple Object Access Protocol (SOAP)
Universal Description Discovery & Integration (UDDI)
Overviews of WS‐* standards
Web Services Software Development Methodology
Web Services Support in Eclipse and NetBeans

Service Oriented Architecture (2 Day)
Introduction to Service Oriented Architecture (SOA)
Value of service-oriented architecture
Organizational impact of service-oriented architecture
Service-Oriented Architecture Planning and Realization
SOA Life Cycle
SOA Governance
SOA reference architecture
SOA Security Overview
Technology, standards, and Products
Legacy transformation and infrastructure solutions

Enterprise Service Bus (3 Day)
Basic principles of enterprise application integration (EAI)
Design principles of service-oriented architecture
Enterprise Service Bus
ESB Architecture
Service Container – JBI
Service Mediation
Transformation
Process Flows
Transaction
Security
Communication Reliability
Scalability and Management

Business Process Management (4 Day)
Introduction to BPMN
BPMN Modeling
BPMN Best Practices
Introduction to BPEL
Introduction to Data Management
Service Orchestration
Variable Management
Fault and Exception Handling
Modeling workflow concepts
Process deployment
Introduction to BAM and BRMS

Liferay Jira & Crowd Integration, liferay integration

Liferay Installation

* Installation requirement for liferay : 1GB RAM
* Download liferay distribution with various application server for now
we will use liferay + tomcat6
* Intsall java jdk and environment variable JAVA_HOME set to OS
*
You can Download the desired bundle from

http://www.liferay.com/web/guest/downloads/portal and unzip to
particular folder

* Run Liferay by double-click on the startup.bat. Open a browser and
go tohttp: //l oca lhost:8080
* Liferay have sample data with it (7cogs) to demo application to
remove this, delete seven-cog folder from liferay-dir/tomcat/web-apps/
… in liferay-dir/data/… also delete hsql database folder
* Re-start your application using startup.bat
* Liferay can be configured to use many different databases. i.e. we
will change the default database (Hypersonic) of the Liferay-Tomcat
bundle to point to a MySQL database



-----------------------------------------------

* We are now using Liferay v5.2 unifies the configuration of the

database in a single file for all application servers. As most other configuration options you can set this up in the portal - ext.properties file as follows (example for MySQL):
jdbc.default.driverClassName=com.mysql.jdbc.Driver

jdbc.default.url=jdbc:mysql://localhost/lportal?
useUnicode=true&characterEncoding=UTF-8&useFastDateParsing=false
jdbc.default.username=
jdbc.default.password=
If you don’t have existing portal-ext.pro… file than manually create it
and save it to -{liferay-home}\ {tomcat }\webapps\ROO T\ WEB-INF\ classes
Now you have to make sure that you have already created database
like this - create database lportal character set utf8
* If you want configure extra setting than read full administration pdf
from liferay.com and install appropriate libraries

------------------------------------------------------------
Jira Installation


*Pre-requisite for Jira Installation
*Browsers – if you have disabled Javascript in your browser or are
using a script blocker like NoScript, you will need to enable Javascript
for JIRA to get the full experience JIRA has to offer.
*Java - JIRA requires a Java Developers Kit (JDK) to be installed on
the server and set java home variable JAVA_HOME
*Application Server – tomcat 5 or 6 or any other server



*Jira available in two distributions – standalone and ear/war
*We will install in war distribution and uses tomcat version 6
*First you download your application distribution from
http://www.atlassian.com/software/jira/JIRADownloadCenter.jspaand
unzip JIRA, Ensure that you download the WAR/EAR version, not the
Standalone version that is recommended on the Downloads page.

Thursday, February 24, 2011

liferay language support, arabic language, portal work, portlets liferay, liferay language solution, language implementation, liferay`s, theme support

LIFERAY MULTIPLE LANGUAGE SUPPORT

liferay arabic language support
> Liferay developer : I need help in Interesting subject who is find in his self ability to help me seriously, please add your post
>I tried to Arabized the liferay (support Arabic language) and liferay users knew the liferay support Arabic language already but there are important point not taken into account that the direction (RIGHT TO LEFT TEXT) of the portlets and the portal not working efficiency.
So, i am looking for best way to make this possible.
Thank you.
I am eagerly waiting for your responses.

> : What help exactly you need in Liferay support language ?

> Dear Liferay Developer,

> I need help in Interesting liferay multiple language support
who is find in his self ability to help

> me seriously, please add your tutorial post  on liferay arabic language solution
> I tried to Arabized the liferay Support Arabic Language and liferay users

> knew the liferay support Arabic language already but there are important

> point not taken into account that the direction (RIGHT TO LEFT TEXT) of the portlets and

>the portal not working efficiency.

> So, i am looking for best way to make this possible.

> Thank you.

> I am eagerly waiting for your responses on liferay tutorial.



I need solution to the direction issues RIGHT TO LEFT TEXT - -LEFT TO RIGHT  of the portlets and the portal is not working efficiency.

Thank you.

> : Hi

If you're looking for tips concerning the classic theme of the 5.3 Liferay version, I found some fixes this morning.

Hello Mohamed

I was working on this this morning and had some interesting results.

I'm working on the classic theme of the 5.3 Liferay version.
I want to be able to display a page in a LTR as well as in a RTL manner depending on the current language.

First of all, check if you're declaring correctly the direction of the HTML tag in your portal_normal.vm template :


Then let's create a css file that will be dedicated to RTL issues. Let's say : "custom_rtl.css" in your css folder.
As classic themes are mostly designed for LTR, RTL styles will be exceptions that are going to override default styles.

Now we can insert in portal_normal.vm a velocity statement that will load the custom_rtl.css depending on your current language.
At the end of the "head" section of your portal_normal.vm, copy/paste this:
#if ($locale.language == "ar")
    #set ($rtlCssURL =  $themeDisplay.getTheme().getCssPath()+"/custom_rtl.css")   
    #css($rtlCssURL)
#end


With this code, if you switch from english to arabic custom_rtl.css rules will be loaded and override default css rules. (be sure you paste this at the end of the head section)

As you can see, the statement's condition is "locale.language=="ar"".
But there are other languages that are RTL.
But I did not figure out how to get the direction of the current language in Velocity. If you have a clue....
If you want to consider Hebrew and Persian you can add OR operators but it would be better to get the language direction directly.


I just did very few fixes in custom_rtl.css in order to display the menu from RTL, the breadcrumb from RTL and portlets titles from RTL. I decided as well to display fonts bigger because I find that default character size for arabic is too small, don't you?
BODY {
    font-size:14px;
}

#navigation li {
    float: right;
}

.breadcrumbs li {
    float:right;
}

.portlet-topper {
    text-align:right;
    float:right;
    width:100%;       
}

.portlet-title {       
    float:right;
}



Now I have to figure out how to move breadcrumbs and menu icons into the right and I think that it will be a good first version.
Please let us know if you find other css fixes for this issue



[EDIT]

A patch to put the company logo to the right :

#banner h1.logo {   
    float: right;       
    margin: 25px;
}

#banner .logo a {
    float: right;   
}


Regards

Mazhar Anwar : Are You still looking for solution? I have done one Liferay's Arabic implementation.

Zuhair Jawish : Hi Mazhar,

please if you can explain the steps to make Liferay support Arabic (RIGHT TO LEFT TEXT for portal and portlets)

I think the liferay is already support arabic (RIGHT TO LEFT TEXT) for portal but not for portlets like (Sign in portlet is not support)

if implement new theme support Arabic (RIGHT TO LEFT TEXT) is the solution please can you give us any example theme support RTL?

___________________________________________________________________



Edit your custom.css Write this Code in CSS for position to right.
.js .lfr-dock.interactive-mode {
right: 0px;
}

check for exact css class for dock.



Hi !

You can set the position of dock in .js .interactive-mode h2{} by giving the values like,
.js .interactive-mode h2{
right:20%;
}

Or else you can also set the values directly in the dock.vm file which is,



___________________________________________________________
Try this in custom_common.css :

.site-breadcrumbs ul{
float:right;
width:100%;
}

.site-beradcrumbs li{
float:right;
}

jQuery Layout integration, jquery.layout.js, javascript, property files, liferay source code, liferay developing plugins, liferay porblem solution



Michael Poznecki : Hello all,





I have built an HTML page using the jQuery Layout. I needed two panes that I can resize. You can see the demo and the code of what I used here:








http://layout.jquery-dev.net/demos/simple.html]








Once it was working the way I needed, I started to port it into a portlet. But when I run it, my jquery.layout.js does not seem to work right.








Has anyone ever used this layout.js? It does not work for some reason.








It might have something to do with the fact that the jquery.layout.js uses the "$" instead of "jQuery" but when I tried to replace them it still does not work.








Has anyone used the jquery.layout.js before? Can someone please help me get this working?








I have attached the files to make it easier to look at.








Thanks so much.








Michael

Attachments






Mazhar Anwar : Hi Micheal,








If you are developing your portlet in ext environment you need to add your jquery-layout.js file into Liferay's jquery framework, and need to update javascript.barebone.files property in portal-ext.properties. For more reference you can see portal.properties in liferay's source code.








And If you are developing in plugins environment, you can put your .js file under any folder and you need to add javascript manually in you jsp.






Michael Poznecki : Please re-read my question.






Hui Deng : Hi Micheal,








I have the same issue as yours, I want to use jquery.layout in liferay too. I have tried it for long time, but I was failed. Have you solved this problem?

Using Locale Language, liferay language portlet, liferay applictions, liferay module, liferay glassfish, liferay webspace, liferay portlet language





































































































































































































Rajesh Babu : Hi,










i had added the language hi_IN in the portal succesfully. In the language portlet, it is showing as hindi(india). now i have 2 modify it to hindi only.








i.e., hindi(india) ---- hindi








i had modified in the view.jsp of the language portlet in the path








\webspace\glassfish2\domains\domain1\applications\j2ee-modules\webspace\html\portlet\language








but it is not modifying.








if u know the achieve it, then plz xplain me 2.






Mazhar Anwar : Hi Rajesh,








There are 3 steps to achieve it.








1) You have to add one more locale in portal-ext.properties.





Please the check the following property in portal.properties of Liferay source.








You need to override locales and add hi_IN for Hindi and India.








2) Add a hi_IN.png image of our flag in your theme folder /images/language folder.








3) Create Language_hi.properties and Language_hi.properties.native in ext-impl/src/content folder.

How Listing children of current page with there URLs, Layout liferay, theme solution, theme.runtime, string liferay, liferay contain, page manages




























































































































































































































































































































































































































































































































































































Al-Mothafar Al-Hasan : Hi





How can I list children of page that visitor inside it , I mean the visitor must see the children of current page he view it








I wrote a vm code for that , but it just listing names without URLs , because .getURL() does not work ...








liferay url tutorial, liferay theme tutorial, liferay admin tutorial








$nav_child.getURL() does not work , it because $layout.getChildren return a list of LayoutImpl not NavItem , how I can do what I want by another way .. !!!






Mazhar Anwar : Hi Mothafar,








liferay page tutorial, liferay string tutorial, liferay iceface tutorial








Please try this code, it will work.






Al-Mothafar Al-Hasan : Thank you very much !





It's work.








emoticon

I'm very thankful






Al-Mothafar Al-Hasan : I have a new problem , its listing the child name for another languages too at the same time , how to solve this ?






Mazhar Anwar : Replace the













Hope this will work...emoticon






Al-Mothafar Al-Hasan :


Thank you very much emoticon , BUT what about private pages , I mean if you have a page that hidden or user have not permission to see this page , this is hard , i trying to find the solution emoticon






Al-Mothafar Al-Hasan : Now I need the solution of this , I used the $theme.runtime("71") to load navigation portlet in my theme , but its does not working it community !








Its retrieve empty in portlet for displayStyle = 6 , I need to be displayStyle = 1 , I was make a JSP hook and made this change to init.jsp








its work well and show me the navigation portlet in guest community , but in another its empty except String displayStyle = "6"; But i don't need this style ,








Anyway the alternative is this way, I mean the code that I wrote it here in this post , but there is 2 problems the language and I think it's solving with ($local) , and the another is the permission !








I need the solution of the permission problem OR the solution of navigation portlet , why displayStyle = "1"; not working in community pages..








Note : sorry for my English emoticon






Archi Madhu : Hi there,





You can use following methods of LayoutLocalServiceUtil.java





you can get public pages using








public static java.util.List<com.liferay.portal.model.Layout> getLayouts(

long groupId, boolean privateLayout, long parentLayoutId)








where groupid and plid you can get it from themeDisplay object.and pass privateLayout=false

and private pages








public static java.util.List<com.liferay.portal.model.Layout> getLayouts(

long groupId, boolean privateLayout, long parentLayoutId)








where groupid and plid you can get it from themeDisplay object.and pass privateLayout=true








and make a combined list of both of them and iterate it.








I haven't tried this but you can give a try.








Let me know if you need more clarification.

HTH!






Al-Mothafar Al-Hasan : Thank you for your hints





Actually i trying to use permission checker ($permissionChecker.contains() usong PortletPermissionUtil) but sometimes return errors and liferay stop too or not work and liferay working but show my sentence as a normal string








may this way was stupid , but I'm newbie in liferay and its just newbie tries emoticon






Archi Madhu : Why you are using PermisionChecker here?





seems it irrelevant






Al-Mothafar Al-Hasan : Why irrelevant !!!!!





I think when you go to page manages and select your page that you want to edit permission of it , and click permission button and disable view and others from community and enable it for others , the first thing you will thinking about it in theme is PermissionChecker !








I think !








i don't know , I feel it is relevant!

about the serverResource() method, mazhar anwar, servlet, respons, tomcat, spring, liferay?






























































Alaa Hendi : Hi all








i am using the serveResource() method to generate a pdf reports








should i have close the OutputStream there? or leave it to the the Liferay?





Thnx






Mazhar Anwar : No need to close if you are using ServletResponseUtil for sending the generated pdf.