Fórumok

How to override LocalService to save / update expando values?

German Tugores, módosítva 12 év-val korábban

How to override LocalService to save / update expando values?

Junior Member Bejegyzések: 33 Csatlakozás dátuma: 2012.03.01. Legújabb bejegyzések
Hi again everyone,

Now I managed to create the expando attribute in the expandotable and expandocolumn with the code I shared in my previous post, however I can't figure out how to save / update values in the hook.

I added an aui:input field and wrapper to the jsp file where I want to show the expando value to edit it like this (rutaImagen is the name of expando column in database)

<aui:input name="ExpandoAttributeName--rutaImagen--" type="hidden" value="rutaImagen" />
		<aui:field-wrapper>
			<aui:input label="rutaImagen" name="ExpandoAttributeName--rutaImagen--" type="text" />
		</aui:field-wrapper>


As I understand it the next step would be to override the AnnouncementsEntryLocalService service with my own implementation so I put it in the
hook:

	<service>
		<service-type>
			com.liferay.portlet.announcements.service.AnnouncementsEntryLocalService
		</service-type>
		<service-impl>
			com.ag.avisoshook.service.AvisosAGLocalServiceImpl
		</service-impl>
	</service>


But I'm stuck at this point, I suppose next I have to create my AvisosAGLocalServiceImpl class and override the methods I need right? But do I have to implement AnnouncementsEntryLocalService in my class? Or extend the AnnouncementsEntryLocalServiceBaseImpl? Besides I've seen LR javados for 6.1 for the AnnouncementsEntryLocalService, do I have to override all methods for that? I think I'll only need the add / create, delete and update methods.

Sorry if the question is a bit messy but I still don't fully understand all the classes and interfaces LR persistence model creates.

Regards,
Germán