.. well to be clear, we update the current object, but in fact the Layout
was actually updated by external code. Let's explore the correct course a
little more as we continue.


On Mon, Jun 3, 2013 at 4:59 PM, Raymond Auge <raymond.auge@liferay.com>wrote:

> Yeah, we did this already in other cases so we should follow that pattern.
>
>
> On Mon, Jun 3, 2013 at 4:56 PM, Tomáš Polešovský <notifications@github.com
> > wrote:
>
>> In
>> portal-impl/src/com/liferay/portal/model/impl/LayoutTypePortletImpl.java:
>>
>> > @@ -100,6 +105,96 @@ public LayoutTypePortletImpl(Layout layout) {
>> >  	}
>> >
>> >  	@Override
>> > +	public boolean addEmbeddedPortletId(
>> > +			HttpServletRequest request, String portletId)
>> > +		throws PortalException, SystemException {
>> > +
>> > +		Set<String> portletAddDefaultResourceCheckWhiteList =
>> > +			PortletContainerSecurityUtil.getWhitelist();
>> > +
>> > +		if (portletAddDefaultResourceCheckWhiteList.contains(portletId)) {
>> > +			return false;
>> > +		}
>> > +
>> > +		Layout freshLayout = LayoutLocalServiceUtil.getLayout(getPlid());
>> > +		LayoutTypePortlet layoutTypePortlet =
>> > +			(LayoutTypePortlet)freshLayout.getLayoutType();
>> > +
>>
>> The layout in LayoutTypePortletImpl is cloned. I wasn't sure if it's OK
>> to update & push this layout into DB? If so then I don't need a new layout
>> and I can send current layout to DB.
>>
>> —
>> Reply to this email directly or view it on GitHub<https://github.com/rotty3000/liferay-portal/pull/227/files#r4509808>
>> .
>>
>
>
>
> --
> *Raymond Augé* <http://www.liferay.com/web/raymond.auge/profile>
>  (@rotty3000)
> Senior Software Architect
> *Liferay, Inc.* <http://www.liferay.com> (@Liferay)
>
>


-- 
*Raymond Augé* <http://www.liferay.com/web/raymond.auge/profile>
 (@rotty3000)
Senior Software Architect
*Liferay, Inc.* <http://www.liferay.com> (@Liferay)