can I apply an after save hook for a sub panel?

I want to do an after save hook for a sub panel, I tried adding it like what you would do for the main module but when I tried in when it in the sub panel it didn't work, but when I tried it using its main module it did work. So I'm guessing there is a different approach here if I want to implement an after save hook. Or this isn't possible and I need to use ajax to do this?