I want to fire the customActionListner when ever the pager button is clicked . I am trying this but the action is fired only once, if i click on the pager once again them the action is not fired.
Here is the code snippet:
--------------------------------------
Jsp
--------
<bjsf:column>
<f:facet name="header">
<bjsf:outputText value="firstName" />
</f:facet>
<bjsf:outputText value="#{entity.firstName}" />
<f:facet name="editor">
<bjsf:inputText value="#{entity.firstName}" />
</f:facet>
</bjsf:column>
</bjsf:listGrid>
<bjsf:pager for="listing" id="pager" width="auto"
customActionListener="#{sampleBean.openModal}"
binding="#{sampleBean.pager}">
<f:verbatim>
<e:handler event="click" type="application/javascript">
bb.bjsf.sync(this, 'custom');
</e:handler>
</f:verbatim>
</bjsf:pager>
Bean
---------------
{
System.out.println(" This should fire whenever the pager button is clicked");
}
Tried some alternative
-------------------------------
I have tired using the bb.command.fire(this,custom,false,false) but this does not get fired.
Apart from this i have once more query
-------------------------------------------- -
1) I wanted to refresh the pager , for this i have done the binding of the pager component.
Here is the code snippet:
----------------------------
JSP
----
BEAN
------
public UIBackbasePager getPager()
{
return pager;
}
public void setPager(UIBackbasePager pager)
{
this.pager = pager;
}
public void refreshPager()
{
pager.setStructureDirty(true);
}
If i do the setStructureDirty as 'true' the pager gets invisible.
Seeking for an early reply :-)
--
Thanks in Advance.
Nick :-)

Hi Nick, I created a test
16 January, 2008 - 14:33 — SenakaHi Nick,
I created a test case which contains a listGrid and a pager associated with it. Custom action listner is implanted to the pager. Clicking on the pager invokes backing bean method outputting a string to the server console.
value="#{myBean.users}"
binding="#{myBean.grid}"
width="500px"
height="300px"
editable="true"
rowClasses="cssEven, cssOdd"
>
<bjsf:column show="#{myBean.col1}">
<f:facet name="header">
<bjsf:outputText value="id" />
</f:facet>
<bjsf:outputText value="#{row.id}" />
<f:facet name="editor">
<bjsf:inputText value="#{row.id}" id="edit-id"/>
</f:facet>
</bjsf:column>
<bjsf:column show="#{myBean.col2}">
<f:facet name="header">
<bjsf:outputText value="name" />
</f:facet>
<bjsf:outputText value="#{row.name}" />
<f:facet name="editor">
<bjsf:inputText value="#{row.name}" id="edit-name"/>
</f:facet>
</bjsf:column>
<bjsf:column show="#{myBean.col3}">
<f:facet name="header">
<bjsf:outputText value="age" />
</f:facet>
<bjsf:outputText value="#{row.age}" />
<f:facet name="editor">
<bjsf:inputText value="#{row.age}" id="edit-age"/>
</f:facet>
</bjsf:column>
</bjsf:listGrid>
<bjsf:pager id="pager" for="grid1" customActionListener="#{myBean.openWin}" binding="#{myBean.pager}">
<f:verbatim>
<e:handler event="click" type="text/javascript">
var browserName = navigator.appName;
var currentTime = new Date();
bb.bjsf.sync(this, 'custom', 'param1', browserName, 'param2', currentTime);
</e:handler>
</f:verbatim>
</bjsf:pager>
{
System.out.println(event.getAtts().get("param1"));
System.out.println(event.getAtts().get("param2"));
}
Each time the pager is click I do get the method triggered.
-Senaka
Invoking customActionListner on click of the pager Button
17 January, 2008 - 06:53 — NickHi Senaka,
I have tried your test example , and it worked .
Thanks a lot.
--
Nick