PDA

View Full Version : My 1st post - Trying to get the identification of the selected row (list of product)



Caroline Alow
19 Nov 2010, 8:30 AM
Hey boys, nice to meet you, a co-worker've recommended this website to solve troubles... I hope
we can help each other... Let me introduce myself, this is Carol, 22, I am an internship at Walmart I love EXTjs however I must learn a lot before thinking to be expert like my manager hahaha...

Look at:
Inside of the code that has


if (gsm.hasSelection()){


I put



Ext.getCmp('productsGrid).getStore().baseParams = {'productId' : Ext.getCmp('productIdField).getValue()}; //How productId know to get access of the Java Action class?

Ext.getCmp(''What name I have to put on this?").getStore().reload();



Kisses,

matt617
19 Nov 2010, 10:43 AM
getCmp gets a EXT Component. An invididual row is not an EXT component. It sounds like you want a grouping grid or some kind of product creator. there are examples of this on the EXT samples page.


http://dev.sencha.com/deploy/dev/examples/grid/totals.html

Caroline Alow
22 Nov 2010, 2:32 AM
Hello dear,

I did following now:


if (sm.hasSelection()){
var holdValue = Ext.getCmp('personGrid').getSelectionModel().getSelected().get('personId');
alert(holdValue );

However instead of show the personId it should be sent to the Java Action... What EXT event would you recommend me, and why?

Caroline Alow
22 Nov 2010, 3:26 AM
I am using an event now but still not working, look:


Ext.getCmp('productForm').on("click", function(){
conn.request({
url: 'url!method.action',
params: {
'productId': Ext.getCmp('productIdField').getValue()
},
});
});