Re: Button with 3 images and issues

2011-11-24 Thread D0m3
Ok eventually I have made a behavior which extends
AbstractTransformerBehavior, because I wanted to add the markup to Link,
Button, AjaxButton, etc.
About the disabled part, I check in the behavior whether the component is
enabled and I add Disabled to my classes if not.
Don't hesitate if you have comments.
At least I hope it can help someone.

--
View this message in context: 
http://apache-wicket.1842946.n4.nabble.com/Button-with-3-images-and-issues-tp4082830p4103246.html
Sent from the Users forum mailing list archive at Nabble.com.

-
To unsubscribe, e-mail: users-unsubscr...@wicket.apache.org
For additional commands, e-mail: users-h...@wicket.apache.org



Re: Button with 3 images and issues

2011-11-23 Thread D0m3
I did some more research, and I found out how to solve my second problem.
I  have extended AjaxButton and overriden onComponentTagBody.



Simple actually, but difficult to find out that I could use this method when
I have never used it.

About the disable part, I think I will override the setEnable method.

--
View this message in context: 
http://apache-wicket.1842946.n4.nabble.com/Button-with-3-images-and-issues-tp4082830p4099458.html
Sent from the Users forum mailing list archive at Nabble.com.

-
To unsubscribe, e-mail: users-unsubscr...@wicket.apache.org
For additional commands, e-mail: users-h...@wicket.apache.org



Re: Button with 3 images and issues

2011-11-21 Thread D0m3
Oh sorry, on the forum I used the raw tag and it looks good. What should I
actually use ?
I added spaces, hope it works.



Hello everybody,
I am starting a wicket project for the first time, and I created a button
made of 3 images with html css. Here is my html :

 button class=buttonLeft
   span class=buttonRight
 span class=buttonMid
  my text
 /span
   /span
 /button

I want this button to be disableable. In Java, I only declare 1 AjaxButton,
which is linked to the button tag. When I use setEnabled(false), it only
adds the disabled tag to the button tag. I would need to add the disabled
tag to the 2 other spans.
While searching for an answer, I realized I could either create a custom
component or add a behavior to automatically add the markup necessary to
create this button. Thus, in my html I would only write :

 button wicket:id=myId
   wicket:message key=button.text /wicket:message
 /button

And all the class and span stuff would be added by wicket.
However I have no idea how to do that. beforeRender and afterRender add
markup before and after if I understood correctly, and onComponentTag adds
attributes.
It would be great if you could provide links or hints on how to do that.
Thanks in advance.

Florian

--
View this message in context: 
http://apache-wicket.1842946.n4.nabble.com/Button-with-3-images-and-issues-tp4082830p4090888.html
Sent from the Users forum mailing list archive at Nabble.com.

-
To unsubscribe, e-mail: users-unsubscr...@wicket.apache.org
For additional commands, e-mail: users-h...@wicket.apache.org



Button with 3 images and issues

2011-11-18 Thread D0m3
Hello everybody,
I am starting a wicket project for the first time, and I created a button
made of 3 images with html css. Here is my html :

I want this button to be disableable. In Java, I only declare 1 AjaxButton,
which is linked to the button tag. When I use setEnabled(false), it only
adds the disabled tag to the button tag. I would need to add the disabled
tag to the 2 other spans.
While searching for an answer, I realized I could either create a custom
component or add a behavior to automatically add the markup necessary to
create this button. Thus, in my html I would only write :

And all the class and span stuff would be added by wicket.
However I have no idea how to do that. beforeRender and afterRender add
markup before and after if I understood correctly, and onComponentTag adds
attributes.
It would be great if you could provide links or hints on how to do that.
Thanks in advance.

Florian

--
View this message in context: 
http://apache-wicket.1842946.n4.nabble.com/Button-with-3-images-and-issues-tp4082830p4082830.html
Sent from the Users forum mailing list archive at Nabble.com.

-
To unsubscribe, e-mail: users-unsubscr...@wicket.apache.org
For additional commands, e-mail: users-h...@wicket.apache.org



Re: Button with 3 images and issues

2011-11-18 Thread Igor Vaynberg
your html got eaten...

-igor

On Fri, Nov 18, 2011 at 2:52 AM, D0m3 florian.bern...@orange.com wrote:
 Hello everybody,
 I am starting a wicket project for the first time, and I created a button
 made of 3 images with html css. Here is my html :

 I want this button to be disableable. In Java, I only declare 1 AjaxButton,
 which is linked to the button tag. When I use setEnabled(false), it only
 adds the disabled tag to the button tag. I would need to add the disabled
 tag to the 2 other spans.
 While searching for an answer, I realized I could either create a custom
 component or add a behavior to automatically add the markup necessary to
 create this button. Thus, in my html I would only write :

 And all the class and span stuff would be added by wicket.
 However I have no idea how to do that. beforeRender and afterRender add
 markup before and after if I understood correctly, and onComponentTag adds
 attributes.
 It would be great if you could provide links or hints on how to do that.
 Thanks in advance.

 Florian

 --
 View this message in context: 
 http://apache-wicket.1842946.n4.nabble.com/Button-with-3-images-and-issues-tp4082830p4082830.html
 Sent from the Users forum mailing list archive at Nabble.com.

 -
 To unsubscribe, e-mail: users-unsubscr...@wicket.apache.org
 For additional commands, e-mail: users-h...@wicket.apache.org



-
To unsubscribe, e-mail: users-unsubscr...@wicket.apache.org
For additional commands, e-mail: users-h...@wicket.apache.org