when I click an row, then I can get some value from this row, then use the value to update google Map!

Hi!
I have a problem!
I have a listGrid, I want to do somethig:
when I click an row, then I can get some value from this row, then use the value to update google Map!

how can I get the value from the row ,then use JavaScript to update google Map!

I try, use SelectListener,but can not invoke javaScript Function!

in Backbase JSF, use what to get JSF compoent's value, javaScript or backBase' script (eg: bb.document)

SelectListener on listgrid

Hi txj301,

The SelectListener on the bjsf:listgrid will invoke the BackingBean Select method, from there you can get the current selectedRow and get the values, after that invoke the javascript function to update your google map.

But it might be easier to see the real problem if you pasted your code here.

Cheers!

Andys

Hi guys, I also have similar

Hi guys,

I also have similar problem while using backbase JSF listgrid.

<bjsf:listGrid value="#{searchpage.list}" var="to" id="listGridID"      binding="#{searchpage.listgrid}"
                                                  rows="5" height="75%" rowClasses="rowClass1, rowClass2" editable="true"
                                                  updateListener="#{searchpage.update}" >

</bjsf:listGrid>                                                                
                         
<bjsf:pager for="listGridID" width="260px" showButtons="true" showLinks="true"  numberOfLinks="5" />

Here columns get added dynamicaly. I have given one of column data to be displayed as commandlink. But i'm unable to click on the link. Instead whole row gets selected.

Could you please suggest. I am suffering a lot because of this problem
Also i keep posting message on forum but never get replies...saw this thread active so thought of asking for help.
Hope you guys will help.

Priyanka

HI! I put my code , here!

Hi!
my code:

......

setTimeout( function(){

----------------------------------
I click a row, "trackByVehicleBean.selectRow" is invoked. but the javaScript is not inviked, I use the javascript to update GoogleMap, and "locationX","locationY" is param used by the javaScript.

"locationX","locationY" 's Value is seted in trackByVehicleBean.selectRow:

below is the code of "trackByVehicleBean.selectRow":
public void selectRow(SelectEvent event)
{
if(event != null)
{
List list = event.getSelectedRows();
if(list!=null && list.size()>0)
{
ChinaMessage message = list.get(0);
if(message!=null && message.getLocation()!=null)
{
this.locationX = Double.toString(message.getLocation().getLat());
this.locationY = Double.toString(message.getLocation().getLog());

//get display div
this.displayMsg = Presentation.renderMessageHTML(message);

// trim "
if(this.displayMsg!=null && this.displayMsg.length()>2)
{
//this.displayMsg = this.displayMsg.substring(1, this.displayMsg.length()-1);
}

}
}
}

}

---------------------

thanks!

jsp code

jsp code

I Paste my code,but when I submit,I can not see them?

DeltaActionJavaScript

Hi,

You could use DeltaActionJavaScript to inject custom JavaScript into the sever response.

Please see the following link for an example.

http://bdn.backbase.com/node/5594

Hope this helps.

in Jsp, Err: 1: GENERIC: Javascript error: "Expected ')'".

public void updateGoogleMap()
{
BackbaseContext context = BackbaseContext.getCurrentInstance();
UIComponent destComp = ComponentUtils.findComponent(context.getViewRoot(),this.summaryListGrid.getClientId(FacesContext.getCurrentInstance()));
String command = "var temp='123';";

DeltaActionJavaScript jsAction = new DeltaActionJavaScript(destComp, command);
context.addDeltaAction(jsAction);
}

in Jsp, Err:
1: GENERIC: Javascript error: "Expected ')'".

there is no "(", in "var temp='123';"???