Quando o usuario acessa uma pagina, eu verifico se ele está logado no site
ou não.
Quando o usuario está logado, eu exibo varias informações sobre o status
dele na rede e algumas outras coisas.
Caso ele não esteja logado na aplicação, eu exibo para o usuario 2 caixas de
texto ( usuario e senha ) para que ele possa efetuar o login no site.
Como pode perceber, o layout do site é dinamico, de acordo com o estado do
usuario no site ( logado ou não ).
sendo um layout dinamico, como eu conseguiria fazer?
por exemplo:
<span wicket:id="myComponent"></span>
seria transformado nisso:
<div id="content-gadget" title="Status na rede">
<div id="content-gadget-header"><span><span>
<h3>Login</h3>
</span></span></div>
<div id="content-gadget-body">
<input type="text" id="user" />
<input type="text" id="password" />
<input type="button" id="btnLogin" onclick="submit();" />
</div>
<div
id="content-gadget-footer"><span><span></span></span></div>
</div>
ou isso dependendo do estado do usuario no site
<div id="content-gadget" title="Status na rede">
<div id="content-gadget-header"><span><span>
<h3>Status na rede</h3>
</span></span></div>
<div id="content-gadget-body">
<p>2.475 posição</p>
<p>80º pontos</p>
<p>Atividade: <span class="high">alta</span></p>
<p>Influência: <span class="medium">baixa</span></p>
</div>
<div
id="content-gadget-footer"><span><span></span></span></div>
</div>
Muito obrigado ( thanks )!!!
2008/1/16, Martin Makundi <[EMAIL PROTECTED]>:
>
> Hi!
>
> I am not sure I understand what you mean. For simple changes see this
> example: http://wicketstuff.org/wicket13/echo/ It has sources with it.
>
> If this does not help, you can try to explain me your problem in your
> own language (Portuguese?)?
>
> **
> Martin
>
> 2008/1/16, Danilo Barsotti <[EMAIL PROTECTED]>:
> > Imagine the following situation:
> >
> > The user accessing a page of the site, I noticed that it is signed or
> not,
> > if it is, I display this:
> >
> > <div id="content-gadget" title="Status na rede">
> > <div id="content-gadget-header"><span><span>
> > <h3>Status na rede</h3>
> >
> > </span></span></div>
> > <div id="content-gadget-body">
> > <p>2.475 posição</p>
> > <p>80º pontos</p>
> > <p>Atividade: <span class="high">alta</span></p>
> > <p>Influência: <span class="medium">baixa</span></p>
> > </div>
> > <div
> > id="content-gadget-footer"><span><span></span></span></div>
> > </div>
> >
> > But I display this:
> >
> > <div id="content-gadget" title="Status na rede">
> > <div id="content-gadget-header"><span><span>
> > <h3>Login</h3>
> >
> > </span></span></div>
> > <div id="content-gadget-body">
> > <input type="text" id="user" />
> > <input type="text" id="password" />
> > <input type="button" id="btnLogin"
> onclick="submit();" />
> > </div>
> > <div
> > id="content-gadget-footer"><span><span></span></span></div>
> > </div>
> >
> > The problem is how do I make this layout, and I am obliged to declare
> all my
> > fields in html.
> > They vary according to the user on the site, that is the problem.
> >
> > Sorry for my English
> >
> >
> > 2008/1/15, Martin Makundi <[EMAIL PROTECTED]>:
> > >
> > > Can you get the example running?
> > >
> > > If yes, then just edit the "corresponding markup" and you should be
> quite
> > > close.
> > >
> > > t. Martin
> > >
> > >
> > > 2008/1/15, Danilo Barsotti <[EMAIL PROTECTED]>:
> > > > Hi all!!!
> > > >
> > > > I need to write a component that makes it:
> > > >
> > > > <code>
> > > >
> > > > <div id="content-gadget" title="Status na rede">
> > > > <div id="content-gadget-header"><span><span>
> > > > <h3>Status na rede</h3>
> > > >
> > > > </span></span></div>
> > > > <div id="content-gadget-body">
> > > > <input type="text" id="senha"/>
> > > > <p>2.475 posição</p>
> > > > <p>80º pontos</p>
> > > > <p>Atividade: <span class="high">alta</span></p>
> > > > <p>Influência: <span
> class="medium">baixa</span></p>
> > > > <input type="button" onclick="submit();"/>
> > > > </div>
> > > > <div
> > > > id="content-gadget-footer"><span><span></span></span></div>
> > > > </div>
> > > >
> > > > </code>
> > > >
> > > > I need because this component will change according to the status of
> the
> > > > user, if the user signed, this component access data base and
> retrive
> > > all
> > > > information as you can see.
> > > >
> > > > I read the article stockquote (
> > > > http://wicket.apache.org/examplestockquote.html) but I don't know
> how I
> > > make
> > > > this.
> > > >
> > > > Thanks and sorry for my english.
> > > >
> > >
> > > ---------------------------------------------------------------------
> > > To unsubscribe, e-mail: [EMAIL PROTECTED]
> > > For additional commands, e-mail: [EMAIL PROTECTED]
> > >
> > >
> >
>
> ---------------------------------------------------------------------
> To unsubscribe, e-mail: [EMAIL PROTECTED]
> For additional commands, e-mail: [EMAIL PROTECTED]
>
>