0

Does anyone know how to initialize Materialize Pagination? I am having a problem here trying to figure out, but Materialize does not have any guides on this.

What JavaScript code or jQuery do I need to put? I am new to programming, and this is my first time including pagination in one of my project. I tried google, but cannot find the answer to this. Hope somebody can guide me on this part.

Materialize Pagination

HTML page:

<div class="col s8" id="threadpage">
    <ul class="collection">
        <s:iterator value="threadList">
            <li class="collection-item row">
                <div class="col s10">
                    <a href="viewThread?threadId=<s:property value="threadId"/>"><s:property value="threadTitle"/></a>
                    <p class="home-thread-title">Posted By: <a href="userProfile?userId=<s:property value="userId"/>"><s:property value="userName"/></a>
                    <span class="datetime">on <s:property value="createTimestamp"/></span></p>
                </div>
                <div class="col s2 center-align thrd-reply-count-box">
                    <s:property value="replyCount"/><br>
                    <span class="reply-count-text">Replies</span>
                </div>
            </li>
        </s:iterator>
    </ul>
    <ul class="pagination">
        <li class=""><a href="#left"><i class="material-icons">chevron_left</i></a></li>
        <li class="waves-effect"><a href="#1">1</a></li>
        <li class="waves-effect"><a href="#2">2</a></li>
        <li class="waves-effect"><a href="#3">3</a></li>
        <li class="waves-effect"><a href="#4">4</a></li>
        <li class="waves-effect"><a href="#5">5</a></li>
        <li class="waves-effect"><a href="#right"><i class="material-icons">chevron_right</i></a></li>
    </ul>
</div>
Jake L.
  • 5
  • 3
  • What is the problem? Did you read the link you've posted in your question? Is it something related to Struts2 or any Javascript? Did you do any action or config it to use I your scenario. Know-how is protected by the low you should know this. A few years ago I have posted the answer [how to implement pagination with Struts2](https://stackoverflow.com/a/14876945/573032). Hope it will help you to solve your problem. You should update the question and clarify it to be more readable here. – Roman C Nov 19 '20 at 20:41
  • The link I posted does not show me how to initialise the pagination as mentioned in my ans. I tried a jquery code that I found it on google, it doesnt work. I am not sure which does it related to either. Thats why I was hoping someone could point me in the direction. I will look into your answer link and figure it out. Thanks! – Jake L. Nov 21 '20 at 02:54

0 Answers0