coder codey

Greenhorn
+ Follow
since Jan 13, 2011
Merit badge: grant badges
For More
Cows and Likes
Cows
Total received
0
In last 30 days
0
Total given
0
Likes
Total received
0
Received in last 30 days
0
Total given
0
Given in last 30 days
0
Forums and Threads
Scavenger Hunt
expand Ranch Hand Scavenger Hunt
expand Greenhorn Scavenger Hunt

Recent posts by coder codey

My Apologies Johannes that was a typo. I am refering the same property name that i am defining in my Action class.

Thanks
Anshul
13 years ago
Hi Johannes

I tried using the approach you suggested but it didn't work. In my Action Class i have a property called isEditable and i am setting it to true.

Then in my gridColumn i set the column as


but always the column is coming as non editable. Can you suggest what could be wrong here !!

Thanks

13 years ago
Sure Bear

I will be careful from next time ..
13 years ago

Johannes Geppert wrote:with ognl:


Johannes




Hi JOhannes

Thanks for the reply !! ..
I have a question , with ognl you mean i shall have a property called isEditableAttribute in my model(ShipmentResultModel) class and set it to true or false based on whether the trackingNumber is empty or not ?

Anshul
13 years ago
Hi All

I am using the Struts2 jquery grid and I have a requirement where in i have to make a cell editable or non-editable based on the value of that cell whether the value is empty or it has some value.



Above in this grid , my grid model is "shippingDetailResultList ". Now this is a list of beans. So in my action class i have this list defined as :

private List<ShipmentResultModel> shippingDetailResultList; . ShipmentResultModel is the model bean that has the properties that are used for grid (eg: nr, partId, trackingNumber etc.).

Now there are cases where in for one model object the trackingNumber is null . So if the tracking number is null i need to make the tracking Number cell in my grid editable else it has to be non-editable.

I tried to look around all the forums but i couldn't find anything related to it.

Does the "editable" accepts runtime values, if yes how can we do that ?
Also i tried using <s:if><s:else> statements where i tried to check if the value is null then i will have the grid as



But i am not getting as to how to get the values in the "test" attribute i.e how to get hold of the trackingNumber property of the ShipmentResultModel.

Any help is really appreciated as this has become a bottle neck for me.

Thanks
Anshul
13 years ago