def paintContent(self, target):
        """Paints the content of this component.

        @param target:
                   Target to paint the content on.
        @raise PaintException:
                    if the paint operation failed.
        """
        if self._notStarted:
            target.addAttribute('notStarted', True)
            self._notStarted = False
            return

        if self._forceSubmit:
            target.addAttribute('forceSubmit', True)
            self._forceSubmit = True
            return

        # The field should be focused
        if self._focus:
            target.addAttribute('focus', True)

        # The tab ordering number
        if self._tabIndex >= 0:
            target.addAttribute('tabindex', self._tabIndex)

        target.addAttribute('state', self._isUploading)

        if self._buttonCaption is not None:
            target.addAttribute('buttoncaption', self._buttonCaption)

        target.addAttribute('nextid', self._nextid)

        # Post file to this strean variable
        target.addVariable(self, 'action', self.getStreamVariable())
dataset/ETHPy150Open rwl/muntjac/muntjac/ui/upload.py/Upload.paintContent/original