Fórum
how to show user information using theme
vaibhav gawali, modificado 7 Anos atrás.
how to show user information using theme
Junior Member Postagens: 25 Data de Entrada: 29/11/16 Postagens Recentes
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
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
Amos Fong, modificado 7 Anos atrás.
RE: how to show user information using theme
Liferay Legend Postagens: 2047 Data de Entrada: 07/10/08 Postagens Recentes
I assume you're working in the velocity template?
I would skip step 2 and do this in your 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 7 Anos atrás.
RE: how to show user information using theme
Junior Member Postagens: 25 Data de Entrada: 29/11/16 Postagens RecentesAmos 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
Andrew Jardine, modificado 7 Anos atrás.
RE: how to show user information using theme
Liferay Legend Postagens: 2416 Data de Entrada: 22/12/10 Postagens Recentes
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 7 Anos atrás.
RE: how to show user information using theme
Junior Member Postagens: 25 Data de Entrada: 29/11/16 Postagens RecentesAndrew 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
Andrew Jardine, modificado 7 Anos atrás.
RE: how to show user information using theme
Liferay Legend Postagens: 2416 Data de Entrada: 22/12/10 Postagens Recentes
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.
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 7 Anos atrás.
RE: how to show user information using theme
Junior Member Postagens: 25 Data de Entrada: 29/11/16 Postagens RecentesAndrew 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