Foren

Home » Liferay Portal » English » 3. Development

Kombinierte Ansicht Flache Ansicht Baumansicht
Threads [ Zurück | Nächste ]
toggle
piyush liferay
How to insert data in User table through own portlet ??
30. Januar 2013 02:54
Antwort

piyush liferay

Rang: Junior Member

Nachrichten: 40

Eintrittsdatum: 1. Januar 2013

Neue Beiträge

Hello ,

How to insert data in User table which is already present in liferay..

can you suggest me best solution for that...
Siby Mathew
RE: How to insert data in User table through own portlet ??
30. Januar 2013 03:23
Antwort

Siby Mathew

Rang: Expert

Nachrichten: 259

Eintrittsdatum: 4. März 2011

Neue Beiträge

Use methods from UserLocalServiceUtil.java like addUser, updateUser etc.

Thanks,
Siby
Hitoshi Ozawa
RE: How to insert data in User table through own portlet ??
30. Januar 2013 03:37
Antwort

Hitoshi Ozawa

Rang: Liferay Legend

Nachrichten: 7990

Eintrittsdatum: 23. März 2010

Neue Beiträge

Use UserLocalServiceImpl.addUser

http://docs.liferay.com/portal/6.1/javadocs-all/com/liferay/portal/service/impl/UserLocalServiceImpl.html

OR

UserLocalServiceUtil.AddUser

http://docs.liferay.com/portal/6.1/javadocs/com/liferay/portal/service/UserLocalServiceUtil.html
piyush liferay
RE: How to insert data in User table through own portlet ??
30. Januar 2013 04:12
Antwort

piyush liferay

Rang: Junior Member

Nachrichten: 40

Eintrittsdatum: 1. Januar 2013

Neue Beiträge

Hitoshi Ozawa:
Use UserLocalServiceImpl.addUser

http://docs.liferay.com/portal/6.1/javadocs-all/com/liferay/portal/service/impl/UserLocalServiceImpl.html

OR

UserLocalServiceUtil.AddUser

http://docs.liferay.com/portal/6.1/javadocs/com/liferay/portal/service/UserLocalServiceUtil.html


Liferay User Class contain some of few fields but i have more fields so i have to insert some field in User Class and Some Field in Own Class..

so how to insert such entries in both the User and Own class.

Thanks..
Jitendra Rajput
RE: How to insert data in User table through own portlet ??
30. Januar 2013 04:14
Antwort

Jitendra Rajput

Rang: Liferay Master

Nachrichten: 647

Eintrittsdatum: 7. Januar 2011

Neue Beiträge

For the extra fields you can create custom fields .
http://www.liferay.com/community/wiki/-/wiki/Main/Custom+fields
Hitoshi Ozawa
RE: How to insert data in User table through own portlet ??
30. Januar 2013 04:19
Antwort

Hitoshi Ozawa

Rang: Liferay Legend

Nachrichten: 7990

Eintrittsdatum: 23. März 2010

Neue Beiträge

For you own fields, just use expando

http://www.liferay.com/community/wiki/-/wiki/Main/Developing+with+Expando
piyush liferay
RE: How to insert data in User table through own portlet ??
30. Januar 2013 04:25
Antwort

piyush liferay

Rang: Junior Member

Nachrichten: 40

Eintrittsdatum: 1. Januar 2013

Neue Beiträge

can we insert data without using expando ??
Hitoshi Ozawa
RE: How to insert data in User table through own portlet ??
30. Januar 2013 04:30
Antwort

Hitoshi Ozawa

Rang: Liferay Legend

Nachrichten: 7990

Eintrittsdatum: 23. März 2010

Neue Beiträge

can we insert data without using expando ??


Insert data where? You need a database table column to enter data. Which column do you want to enter you data?
piyush liferay
RE: How to insert data in User table through own portlet ??
30. Januar 2013 04:35
Antwort

piyush liferay

Rang: Junior Member

Nachrichten: 40

Eintrittsdatum: 1. Januar 2013

Neue Beiträge

i have column for inserting a data but not using expando..

i am inserting a data normally ..

can we insert data in database ??
Hitoshi Ozawa
RE: How to insert data in User table through own portlet ??
30. Januar 2013 04:40
Antwort

Hitoshi Ozawa

Rang: Liferay Legend

Nachrichten: 7990

Eintrittsdatum: 23. März 2010

Neue Beiträge

have column for inserting a data but not using expando..


So, use your api to enter data into your column. I'm not sure what the problem is. If you created a column, creating a method to insert/change/delete data from that column is dependent on you code not liferay's.
piyush liferay
RE: How to insert data in User table through own portlet ??
30. Januar 2013 04:46
Antwort

piyush liferay

Rang: Junior Member

Nachrichten: 40

Eintrittsdatum: 1. Januar 2013

Neue Beiträge

Hitoshi Ozawa:
have column for inserting a data but not using expando..


So, use your api to enter data into your column. I'm not sure what the problem is. If you created a column, creating a method to insert/change/delete data from that column is dependent on you code not liferay's.



Sir i write down my complete problem here ....

i have fileds like :-

name,email,password,mobileno,address etc.

but in User class contain only name,email and password field so i want to insert mobileno and address field in my class Register

so give me the solution for that problem... but i am not using a expando.
Siby Mathew
RE: How to insert data in User table through own portlet ??
30. Januar 2013 04:50
Antwort

Siby Mathew

Rang: Expert

Nachrichten: 259

Eintrittsdatum: 4. März 2011

Neue Beiträge

Hi Piyush,
The easiest way to achieve this is to store it in the expando.
But if you really want another table, use servicebuilder to generate a new table. All the CRUD operations will be autogenerated by Liferay.
After inserting the user, you can use these APIs to update your custom table.

Thanks,
Siby
piyush liferay
RE: How to insert data in User table through own portlet ??
30. Januar 2013 04:52
Antwort

piyush liferay

Rang: Junior Member

Nachrichten: 40

Eintrittsdatum: 1. Januar 2013

Neue Beiträge

but for inserting a user i want to require a userId which is autoincrement so how can i do ...
Hitoshi Ozawa
RE: How to insert data in User table through own portlet ??
30. Januar 2013 05:00
Antwort

Hitoshi Ozawa

Rang: Liferay Legend

Nachrichten: 7990

Eintrittsdatum: 23. März 2010

Neue Beiträge

but for inserting a user i want to require a userId which is autoincrement so how can i do ...


The subject of this thread has nothing to do with the question you're asking now.
Close this thread and create a new thread with the question you've just asked - "How to modify liferay addUser method to autoincrement userId"