Heat olive oil in a pan.Add onions, sugar and salt.Fry till onions are browned.Remove from heat and keep aside.Heat a heavy non stick pan.Apply butter on side of the bread slice.Simmer the heat to low.Keep the bread slices on the pan with the buttered side down.Grill till nicely browned .Turn one of the slice up side down.Spread 2 tbsp of grated cheese on the bread.Top with half of the caramelized onions and arrange half of the apple wedges on top.Spread 2 tbsp of cheese on top.Cover with the another slice with the grilled side inside.Grill the sandwich from both the sides on very low heat till it is nicely browned and the cheese has melted.Cut into half.Serve hot.