Hi Vinod,

I tried it without ' '. But then, it wont invokes the JavaScript function.

Thanks.

On Mon, Jul 6, 2015 at 6:32 PM, Vinod Kavinda <[email protected]> wrote:

> Hi Rajith,
>
> Have you tried,
> paginationFunction="submitForm({0},<%=order%>)".
> ' ' may force to have a string.
>
> Thanks,
> Vinod.
>
> On Mon, Jul 6, 2015 at 6:19 PM, Rajith Roshan <[email protected]> wrote:
>
>> Hi Devs,
>>
>> In most WSO2 products, following  code snippet is used to show paginated
>> results.
>>
>> <carbon:resourcePaginator pageNumber="<%=pageNumber%>" 
>> numberOfPages="<%=numberOfPages%>"
>>                           
>> resourceBundle="org.wso2.carbon.------.------.ui.i18n.Resources"
>>                           nextKey="next" prevKey="prev"
>>                           paginationFunction="submitForm({0})" />
>>
>>
>>
>> According to above example, when a user clicks on a particular page
>> number "submitForm()" JavaScript method will be invoked.
>> Lets say if i have a JSP String variable called "order" and wants to pass
>> it when a user clicks on the page number, then I need to change pagination
>> function as follows.
>>
>> paginationFunction="submitForm({0},'<%=order%>')"
>>
>>
>> But this method passes the value to the JavaScript function as a raw string.
>>
>> So the retrieved value will be a string which equals to "<%=order%>" .
>>
>> So how to pass a JSP variable inside this pagination function?
>>
>> Any help on this matter is highly appreciated
>>
>>
>> Thanks,
>> Rajith
>>
>>
>> Rajith Roshan
>> Software Engineer, WSO2 Inc.
>> Mobile: +94-72-642-8350 <%2B94-71-554-8430>
>>
>> _______________________________________________
>> Dev mailing list
>> [email protected]
>> http://wso2.org/cgi-bin/mailman/listinfo/dev
>>
>>
>
>
> --
> Vinod Kavinda
> Software Engineer
> *WSO2 Inc. - lean . enterprise . middleware <http://www.wso2.com>.*
> Mobile : +94 (0) 712 415544
> Blog : http://soatechflicks.blogspot.com/
>
>


-- 
Rajith Roshan
Software Engineer, WSO2 Inc.
Mobile: +94-72-642-8350 <%2B94-71-554-8430>
_______________________________________________
Dev mailing list
[email protected]
http://wso2.org/cgi-bin/mailman/listinfo/dev

Reply via email to