Scrollable DataTable won't show any data!

UI Components for JSF
Post Reply
Step
Posts: 11
Joined: 18 Apr 2012, 16:23

03 May 2012, 19:01

I'm trying to add scroll feature to my datatable, but the result is that now the table i empty!
Funny thing is that the data i shown for just a second and after that it disappear.
I've got the data on my html source, but it won't be shown!

Here's the code of my page :

Code: Select all

<pou:dataTable scrollable="true" liveScroll="true" scrollHeight="400" scrollRows="100" value="#{postListBean_1.posts}" var="post">
    <pou:column>
        #{post.testo}
        <hr/>
    </pou:column>                        
</pou:dataTable>
and here's the one of my bean :

Code: Select all

@ManagedBean
@RequestScoped
public class PostListBean_1 implements Serializable {

    @EJB
    private PostManagerLocal postManager;
    private List<Post> posts;
    private int limit = 0;

    /**
     * Get the value of posts
     *
     * @return the value of posts
     */
    public List<Post> getPosts() {
        limit+=4;
        makePosts();
        return posts;
    }

    /**
     * Set the value of posts
     *
     * @param posts new value of posts
     */
    public void setPosts(List<Post> posts) {
        this.posts = posts;
    }

    public PostListBean_1() {
    }

    @PostConstruct
    public void makePosts() {
        int[] range = {0, limit};
        posts = postManager.findRangeReverse(range);
    }
}
What's wrong with it?
Removing all the scrolling references make my table work again!
PF 3.3-SNAPSHOT | Glassfish 3.1.2 | Mojarra 2.1.6 (SNAPSHOT 20111206)

User avatar
T.dot
Expert Member
Posts: 620
Joined: 01 Feb 2012, 15:39
Location: Vienna/Austria

04 May 2012, 09:13

You didn't mention any version information. So read this:
viewtopic.php?f=3&t=1194

Please compare your source with the example from the showcase:
http://www.primefaces.org/showcase-labs ... olling.jsf

I don't use scrolling, but maybe it's a problem with request scope? You can try view scope instead.

Step
Posts: 11
Joined: 18 Apr 2012, 16:23

04 May 2012, 15:10

I've got all the needed info in my signature ;)

Changing the bean into ViewScoped doesn't help!
PF 3.3-SNAPSHOT | Glassfish 3.1.2 | Mojarra 2.1.6 (SNAPSHOT 20111206)

hiho
Posts: 6
Joined: 12 May 2012, 13:22

12 May 2012, 13:36

Bonjour,
j'ai à projet à developper avec primefaces3.2 , j'ai utilisé le composant <p:layout> avec des includes (<ui:include>) mais j'ai des problèmes au niveau des actions sur les liens ou les bouttons des pages incluses dans les layout, je dois relancer la page plusieurs fois pour que les actions ça marche.
Merci d'avance :(

kukeltje
Expert Member
Posts: 9605
Joined: 17 Jun 2010, 13:34
Location: Netherlands

12 May 2012, 22:59

Can you respond in dutch please? Not everybody speaks french...

Step
Posts: 11
Joined: 18 Apr 2012, 16:23

13 May 2012, 12:00

...or maybe in english because not everyone understands dutch :D
and this is MY thread, you should consider opening a new one.

Anyway, I've solved my problem.

To have a live scrolling table you CAN'T have an invisible column header :(
PF 3.3-SNAPSHOT | Glassfish 3.1.2 | Mojarra 2.1.6 (SNAPSHOT 20111206)

kukeltje
Expert Member
Posts: 9605
Joined: 17 Jun 2010, 13:34
Location: Netherlands

13 May 2012, 13:07

The content is not even related... (I do understand french and dutch and german and english and a little spanish, but don't tell anyone)

Post Reply

Return to “PrimeFaces”

  • Information
  • Who is online

    Users browsing this forum: No registered users and 44 guests