Skip to main content
Participating Frequently
February 25, 2010
Answered

Passing data from the command

  • February 25, 2010
  • 1 reply
  • 2178 views

Hey im new to cairngorm

How do i pass data back from the command ie from the onResult() in the command back to the component the called it

I know how to put the data in the model, but it is my impression that this is only for data that you want to store and reference in many places

with i have done with some querys

This query however is just a product search result so don't need it to be stored in the model just sent back and displayed in a grid

Thanks


This topic has been closed for replies.
Correct answer

no one knows how to do this?


OK, finally check this link out

http://www.gridlinked.info/cairngorm-secret-tip-3-responders-for-view-notifications/

Thanks

1 reply

Participating Frequently
February 25, 2010

There's no inbuild facility to reach views from within Commands in C3 Integration lib, nor in Parsley 2.2. You could of course inject them into Commands. However, I don't see the extra effort in separating your concerns slightly better and creating a model, do you?

JockMahonAuthor
Participating Frequently
February 25, 2010

im afraid i dont quite understand you. Do u mean that i should not worry about putting this temp data in the model? Or are u saying that i should create another model to store the data - is that possible. sorry as i mentioned i am new to cairngorm as i only started yesterday

JockMahonAuthor
Participating Frequently
February 26, 2010

Also what happens if the view depends on the model, so say you have a log in page and on fail you want to reset the form or something

what then