monolist of Composite problem

25 views
Skip to first unread message

Massimiliano Cosso

unread,
May 13, 2014, 3:30:05 AM5/13/14
to ent...@googlegroups.com
Hi all,
I defined a new model type  in this way:

TitleText
  • jacms:title – The main title of a Content
 
 
AbstractHypertext
 
 
MainBodyHypertext
 
 
PicturesMonolist: Composite
where each element of Pictures is composed by 
Image Image
Caption Text
Description Hypertext


Then I define two content models one  for the list and the other for the detail.
When I try to create a new Page using the new conten type and I post more then one pictures in the Page it doesn't work, in fact I can found just the last pictures inserted but not all the previous.
Where is the mistake?
Can you help me?

cheers
massimiliano

Eugenio Santoboni

unread,
May 13, 2014, 5:30:10 AM5/13/14
to ent...@googlegroups.com
Ciao Massimiliano,

Maybe the problem is in the content model you are using.

Could you attach the source code of the content model?

What version of Entando are you using?

Eu


--
--
_________________________________________________________________________
Entando Group
ent...@googlegroups.com
http://groups.google.com/group/entando/
_________________________________________________________________________
 
Follow us on:
 
Twitter http://twitter.com/Entando/
Facebook https://www.facebook.com/pages/Entando/140204982772024?fref=ts
Linkedin Company Page: http://www.linkedin.com/company/2425557?trk=NUS_CMPY_TWIT
Linkedin Group http://www.linkedin.com/groups?gid=2570784&trk=hb_side_g
Slideshare http://www.slideshare.net/entando
Youtube http://www.youtube.com/channel/UCVvZwxWL3AwLjDOGssxdWLQ
---
You received this message because you are subscribed to the Google Groups "Entando" group.
To unsubscribe from this group and stop receiving emails from it, send an email to entando+u...@googlegroups.com.
For more options, visit https://groups.google.com/d/optout.

Massimiliano Cosso

unread,
May 13, 2014, 6:54:41 AM5/13/14
to ent...@googlegroups.com
Hi Eugenio,

this is the content model for the detail ( I called the composite fields in this way: Picture for the image;  Caption and Abstract for the picture description)

<article>

  <h1 class="text-center" >$content.Title.text</h1>
#if ( $content.Abstract.text != "" )
  <h2 class="text-center" >$content.Abstract.text</h2>
#end  
#if ( $content.MainBody.text != "" )
$content.MainBody.text
#end 

#if ( $content.Pictures.size() >0)
$content.Pictures.size()
<ul>
  #foreach ($pict in $content.Pictures)
      <li>
      <figure class="well well-small text-center">
<img src="$pict.Picture.getImagePath("0")" alt="$pict.Picture.text" />
  #if ( $pict.Caption.text != "" )
  <figcaption><p class="margin-medium-all">$pict.Caption.text</p></figcaption>
  #end
</figure>
       #if ( $pict.Abstract.text != "" )
    <p> $pict.Abstract.text</p>
      #end
    </li>
  #end
</ul>  

#end


I'm using entrando 4.0.0

tnks
massimiliano

Eugenio Santoboni

unread,
May 13, 2014, 12:15:02 PM5/13/14
to ent...@googlegroups.com
Ciao Alessandro,

Into the content model, the names of attributes of the composite element don't match the names you wrote in the first email.

In my definition of content type, each element of Pictures is composed by:
"Picture" of type Image
"Caption" of type Text
"Abstract" of type Hypertext

After I fixed those errors, the model worked well.

Eu



--

Massimiliano Cosso

unread,
May 14, 2014, 3:51:26 AM5/14/14
to ent...@googlegroups.com
Hi Eugenio,

I did a mistake in my first post, the name of Image is Picture as you has written.
So the model is correct for me too. 
The problem arises whenever I create a content where I want to write more then one pictures: 
in this situation after I save the content and I try to re-open it, I get just the last pictures inserted and not all the pictures.


massimiliano


On Tuesday, May 13, 2014 9:30:05 AM UTC+2, Massimiliano Cosso wrote:

Eugenio Santoboni

unread,
May 14, 2014, 6:25:26 AM5/14/14
to ent...@googlegroups.com
Ciao Massimiliano,

This is another problem.
Maybe this is what you need:

https://github.com/entando/entando-core-engine/commit/143bdec57d81db80bfc8d4c6b890b1d052a807f6

What you described before is a little bug, that we've already fixed 3 months ago.

In order to fix it into your project, you have to insert the java class AbstractAttribute (with the fix) in the package com/agiletec/aps/system/common/entity/model/attribute on your project.

Let me know.

Eu


--

Massimiliano Cosso

unread,
May 15, 2014, 4:46:12 AM5/15/14
to ent...@googlegroups.com
Ciao Eugenio,
That's what I needed!
Now it works!

many thanks for your support


cheers
massimiliano
Reply all
Reply to author
Forward
0 new messages