Here is the question I am trying to solve:
Here is a trial for the solution that I do not really follow it:
Is the trial of the solution above correct? what are the sequence of ideas required to solve this problem? Are there any more elegant and succinct solution? what is the general idea that should be used in proving that a certain complex function is constant?



Since $\lim_{z \to 0} z f(z) = 0$ we see that $f$ has a removable singularity at $z=0$, so we may assume $f$ is analytic on $D$.
Let $c=f(z)$ for $|z|=1$. Suppose $z_0 \in D$ and let $|z_0|<r<1$ and $\gamma_r(t) = r e^{it}$, then $f(z_0) = {1 \over 2 \pi i} \int_{\gamma_r} {f(z) \over z-z_0} dz$. Taking the limit $r \to 1$ we get $f(z_0) = c$.
Elaboration:
$f(z_0) = {1 \over 2 \pi } \int_0^{2 \pi} {f(r e^{it}) \over re^{it}-z_0} r e^{it} dt$. Note that the function $z \mapsto z{f(z) \over z-z_0}$ is uniformly continuous on the compact $\{ z | \rho \le |z| \le 1 \}$, where $\rho$ is some number in $(|z_0|,1)$. It follows that $\lim_{r \uparrow 1} {1 \over 2 \pi } \int_0^{2 \pi} {f(r e^{it}) \over re^{it}-z_0} r e^{it} dt= {1 \over 2 \pi } \int_0^{2 \pi} {f(e^{it}) \over e^{it}-z_0} r e^{it} dt = c{1 \over 2 \pi i} \int_{\gamma_1} {1 \over z-z_0} dz = c$.