Foros de discusión

how to show user information using theme

vaibhav gawali, modificado hace 7 años.

how to show user information using theme

Junior Member Mensajes: 25 Fecha de incorporación: 29/11/16 Mensajes recientes
hi everyone
i have created one theme but i want to show different users like firstname ,lastname role in theme

1.i have created one MOR_portlet in that i created service.xml(note:-i have created 1 table "Retailer " i want to show that Retailer firstname ,lastname)
2)i builded service and copied my MOR-portlet-service.jar file in tomcat-7.0.27\lib\ext i.e G:\liferay1\liferay-portal-6.2-ce-ga4\tomcat-7.0.42\lib\ext folder

3) also deployed theme but how can show the user information after user login
i refer this link http://www.liferaysavvy.com/2013/12/access-liferay-database-services-in.html
but unable to show user information please help
thumbnail
Amos Fong, modificado hace 7 años.

RE: how to show user information using theme

Liferay Legend Mensajes: 2047 Fecha de incorporación: 7/10/08 Mensajes recientes
I assume you're working in the velocity template?

I would skip step 2 and do this in your template:
#set ($morLocalService = $serviceLocator.findService("mor-portlet", "com.liferay.mor.service.MorLocalService"))
vaibhav gawali, modificado hace 7 años.

RE: how to show user information using theme

Junior Member Mensajes: 25 Fecha de incorporación: 29/11/16 Mensajes recientes
Amos Fong:
I assume you're working in the velocity template?

I would skip step 2 and do this in your template:
#set ($morLocalService = $serviceLocator.findService("mor-portlet", "com.liferay.mor.service.MorLocalService"))


hi amos
yea i am using velocity theme in liferay portal 6.2 ce ga4
i did that in portal_normal.vm
after i run the project
it shows only $vendorName()
but not getting vendor actual name
and console i got error:--------> BeanLocator is null for servlet context mor-portlet

i did what u suggested. below is changes
 #set ($morLocalService = $serviceLocator.findService("mor-portlet", "com.liferay.mor.service.MorLocalService"))
#set ($vendorName= $vendorList.getVendorName())
<span class="VendorList">$vendorName()</span><br>

is this right???
note:my project name is MOR-portlet and in that service.xml i have many tables like vendor,retailer,distributor etc..but i want to show vendor name,address ,email etc..




here is my "service.xml" for VendorList

<!--?xml version="1.0" encoding="UTF-8"?-->

<service-builder package-path="com.mor">
<author>vaibhav</author>
<namespace>MOR</namespace>
<entity name="VendorList" local-service="true" remote-service="true">
<column name="vendorid" type="long" primary="true" />
<column name="VendorIdentity" type="String" />
<column name="VendorName" type="String" />
<column name="mobileNo" type="String" />
<column name="Address" type="String" />
<column name="City" type="String" />
<column name="EmailId" type="String" />
<column name="Zipcode" type="String" />
<column name="State" type="String" />
<column name="Country" type="String" />
<column name="AppVersion" type="String" />
<column name="LocationId" type="String" />
<column name="Orgid" type="long" />
<column name="LocId" type="long" />
<order by="asc">
<order-column name="VendorName" case-sensitive="false" />
</order>
<finder return-type="Collection" name="LocationId">
<finder-column name="LocationId" />
<finder-column name="Orgid" />
</finder>
<finder return-type="Collection" name="LocId">
<finder-column name="LocId" />
<finder-column name="Orgid" />
</finder>
</entity>
</service-builder>

please help and thanks in advance
thumbnail
Andrew Jardine, modificado hace 7 años.

RE: how to show user information using theme

Liferay Legend Mensajes: 2416 Fecha de incorporación: 22/12/10 Mensajes recientes
You've already asked this question on another thread. Why are you writing the same question on a new thread rather than answering the questions posted back to you on your original post?
vaibhav gawali, modificado hace 7 años.

RE: how to show user information using theme

Junior Member Mensajes: 25 Fecha de incorporación: 29/11/16 Mensajes recientes
Andrew Jardine:
You've already asked this question on another thread. Why are you writing the same question on a new thread rather than answering the questions posted back to you on your original post?



sorry for that.im a new in liferay
i didnt know about that
thumbnail
Andrew Jardine, modificado hace 7 años.

RE: how to show user information using theme

Liferay Legend Mensajes: 2416 Fecha de incorporación: 22/12/10 Mensajes recientes
I noticed that you are asking a lot of questions (which is great! probably the quickest way to get up to speed on the product -- and we've all been in your shoes at one point or another).

With that said, when you are asking 2 or 3 questions at one time (with many more waiting to be asked) I realize that it can be tricky to keep track of what you asked and what you haven't. I would suggest leveraging the "My Posts" button to get a list of the threads you have been active on. At this stage, yours probably only includes the questions you have been asking.
vaibhav gawali, modificado hace 7 años.

RE: how to show user information using theme

Junior Member Mensajes: 25 Fecha de incorporación: 29/11/16 Mensajes recientes
Andrew Jardine:
I noticed that you are asking a lot of questions (which is great! probably the quickest way to get up to speed on the product -- and we've all been in your shoes at one point or another).

With that said, when you are asking 2 or 3 questions at one time (with many more waiting to be asked) I realize that it can be tricky to keep track of what you asked and what you haven't. I would suggest leveraging the "My Posts" button to get a list of the threads you have been active on. At this stage, yours probably only includes the questions you have been asking.


thanks for the reply
yea.. i will