'Get the next item in the parent\'s component list with these flags
@param flags: dictionary of flags'

def get_next(self, **flags):

    following = self.following()
    for item in following:
        if ((not flags) or all([(getattr(item, f) == flags[f]) for f in flags])):
            return item
    return None
