Image above shown the default Liferay Language portlet.
to change the default display option, please follow the steps below.
1. Login to Liferay as Administrator
2. navigate to the portlet setting to open the Language configuration.
Sunday, March 19, 2017
Friday, March 17, 2017
How to post json to Liferay OSGI restful service
To post a json to a Liferay OSGI restful service,
the service method itself must be able to accept String as the input parameter.
the service method is then parse the json string to a json object
follow by the required function process
and lastly return the response to the service consumer
@POST
@Path("/addPerson")
@Consumes(MediaType.APPLICATION_JSON)
@Produces(MediaType.APPLICATION_JSON)
public Response addPerson(final String personJsonString) {
ObjectMapper mapper = new ObjectMapper();
JsonNode personJson = mapper.readTree(personJsonString);
/**
* Process person json
*
*/
return Response.status(Response.Status.OK).build();
}
Done!!
Wednesday, February 22, 2017
How to setup Eclipse for Play framework
1. open <play-project-home>\project\plugins.sbt (c:\play-java\project\plugins.sbt)
add the following line.
2. Open <play-project-home>\build.sbt
add the following lines
3. restart the play sbt console, so that sbt performs update for the new plugins.
4. in sbt console, type "eclipse"
5. import the new project into eclipse workspace
File > Import > Existing Projects into Workspace > Next > Select root directory > browse <play-project-home>, Finish.
source: https://www.playframework.com/documentation/2.5.x/IDE
Done!!
add the following line.
addSbtPlugin("com.typesafe.sbteclipse" % "sbteclipse-plugin" % "4.0.0")
2. Open <play-project-home>\build.sbt
add the following lines
EclipseKeys.preTasks := Seq(compile in Compile)
EclipseKeys.projectFlavor := EclipseProjectFlavor.Java
EclipseKeys.createSrc := EclipseCreateSrc.ValueSet(EclipseCreateSrc.ManagedClasses, EclipseCreateSrc.ManagedResources)
3. restart the play sbt console, so that sbt performs update for the new plugins.
4. in sbt console, type "eclipse"
5. import the new project into eclipse workspace
File > Import > Existing Projects into Workspace > Next > Select root directory > browse <play-project-home>, Finish.
source: https://www.playframework.com/documentation/2.5.x/IDE
Done!!
Thursday, January 12, 2017
Tuesday, January 10, 2017
How to export Database connections from Oracle SQL Developer to XML
This article shows how to export the configured database connections in Oracle SQL Developer so that it is easily share the connections with other team members.
1. R-click on Connections root, a small context menu appears.
2. click on "Export Connections".
1. R-click on Connections root, a small context menu appears.
2. click on "Export Connections".
Subscribe to:
Posts (Atom)
Popular Posts
- How to create database view with Oracle SQL Developer Data Modeler
- How to add/remove row in datatable
- Velocity without template(.vm) file
- How to easily embed a Google Map in your website
- How to handle multilingual error messages for jQuery validation plugins
- How to add Sequence Generator to a table in Oracle SQL Developer Data Modeler
- How to edit Liferay email notification templates
- How to switch EJB client to local or remote interface without changing code
- How to enable CKEditor in PrimeFaces Extension
- How to create relational data model with Oracle SQL Developer Data Modeler



