RE: Dynamically show and edit a textarea in a table

2008-12-29 Thread Claudio Miranda


Thanks Heikki, it works!


Heikki Uotinen wrote:
> 
> if you put extra div around textarea and add it to the target it should
> work
> 


-
Claudio Miranda
http://weblogs.java.net/blog/claudio
http://www.claudius.com.br/blog
-- 
View this message in context: 
http://www.nabble.com/Dynamically-show-and-edit-a-textarea-in-a-table-tp21197799p21202544.html
Sent from the Wicket - User 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: Dynamically show and edit a textarea in a table

2008-12-28 Thread Heikki Uotinen
Hi,

if you put extra div around textarea and add it to the target it should work


final TextArea rejectComment2 = new TextArea("rejectComment2", new 
Model("aaa"));
rejectComment2.setEnabled(false);
rejectComment2.setVisible(false);
rejectComment2.setOutputMarkupId(true);

final WebMarkupContainer rejectComment2Div = new 
WebMarkupContainer("rejectComment2Div");
rejectComment2.setOutputMarkupId(true);

final AjaxFallbackLink enableRejectComment = new 
AjaxFallbackLink("enableRejectComment", new Model(
"Enable comment textarea ")) {

@Override
public void onClick(AjaxRequestTarget target)
{
rejectComment2.setEnabled(true);
rejectComment2.setVisible(true);
target.addComponent(rejectComment2Div);
log.debug("AjaxFallbackLink  onClick");
}
};

item.add(rejectComment1);

rejectComment2Div.add(rejectComment2);
item.add(rejectComment2Div);



-Heikki


-Original Message-
From: Claudio Miranda [mailto:clau...@claudius.com.br] 
Sent: 29. joulukuuta 2008 3:50
To: users@wicket.apache.org
Subject: Re: Dynamically show and edit a textarea in a table


To let you know, the AjaxEditableMultiLineLabel.onEdit and
AjaxFallbackLink.onClick are called and debug messages logged.

Tried with wicket 1.3.5, same results, no textarea displayed.



Claudio Miranda wrote:
> 
> I need to dynamically show a textarea in a row of a table. 
> The textarea should only be displayed if the user wants to, as he needs to
> click at some link.
> I developed 2 tests using an AjaxEditableMultiLineLabel and a not visible
> textarea. See the runnable code below, to take a look at.
> 
> The wicket id is: rejectComment1 and rejectComment2
> 
> HTML Code (lines 53 and 60,61)
> http://pastebin.com/m2492afac
> 
> Java Code (lines 33 and 48)
> http://pastebin.com/m490aa72b
> 
> But none of them works!
> 
> If I click at any of them, the textarea is not displayed.
> 
> Are there issues to use them inside a table ?
> 
> My system: 
> Wicket 1.4 RC1
> Firefox 3.0.4
> Glassfish v2 ur2
> Java 6 u11
> 


-
Claudio Miranda
http://weblogs.java.net/blog/claudio
http://www.claudius.com.br/blog
-- 
View this message in context: 
http://www.nabble.com/Dynamically-show-and-edit-a-textarea-in-a-table-tp21197799p21198096.html
Sent from the Wicket - User 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



Re: Dynamically show and edit a textarea in a table

2008-12-28 Thread Claudio Miranda

To let you know, the AjaxEditableMultiLineLabel.onEdit and
AjaxFallbackLink.onClick are called and debug messages logged.

Tried with wicket 1.3.5, same results, no textarea displayed.



Claudio Miranda wrote:
> 
> I need to dynamically show a textarea in a row of a table. 
> The textarea should only be displayed if the user wants to, as he needs to
> click at some link.
> I developed 2 tests using an AjaxEditableMultiLineLabel and a not visible
> textarea. See the runnable code below, to take a look at.
> 
> The wicket id is: rejectComment1 and rejectComment2
> 
> HTML Code (lines 53 and 60,61)
> http://pastebin.com/m2492afac
> 
> Java Code (lines 33 and 48)
> http://pastebin.com/m490aa72b
> 
> But none of them works!
> 
> If I click at any of them, the textarea is not displayed.
> 
> Are there issues to use them inside a table ?
> 
> My system: 
> Wicket 1.4 RC1
> Firefox 3.0.4
> Glassfish v2 ur2
> Java 6 u11
> 


-
Claudio Miranda
http://weblogs.java.net/blog/claudio
http://www.claudius.com.br/blog
-- 
View this message in context: 
http://www.nabble.com/Dynamically-show-and-edit-a-textarea-in-a-table-tp21197799p21198096.html
Sent from the Wicket - User 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