What I am trying to do is:
if menu item is selected (onClick), change the markup li id or class.
However, it doesn't seem to work. Am I missing something?
html
ul id=menu
li class=menuitem wicket:id=menuitem
#
/li
/ul
wicket
ListView listView = new ListView( menuitem, menuItemList )
Why not just use pure JavaScript for this? All you're trying to do is
change a class or id (I'd do class) when something is clicked. Is
there any reason why you need to go server-side for this?
On Sun, Oct 17, 2010 at 2:10 AM, always_rick sh...@hotmail.com wrote:
What I am trying to do is:
I was about to complain about the same thing. I also use
SimpleAttributeModifier to get around the issue.
--
View this message in context:
http://apache-wicket.1842946.n4.nabble.com/Link-onclick-setMarkupId-doesn-t-work-tp2998815p2998836.html
Sent from the Users forum mailing list archive at
BTW before I get into a ball of mis understandings; I'm just complaining
about setMarkupId here in general :)
It works with MarkupContainers like with div tag etc. But not with td, li
etc. id is an attribute that can represent any DOM element to my mind,
hence the complaint.
--
View this message
it seems it doesn't work for list items. did you try to use
.setReuseItems(true) ?
On Sun, Oct 17, 2010 at 9:15 AM, Arjun Dhar dhar...@yahoo.com wrote:
BTW before I get into a ball of mis understandings; I'm just complaining
about setMarkupId here in general :)
It works with MarkupContainers
Hi,
the listView is populated before each render, so it doesn't make sense
to alter a component in onclick().
Sven
On 10/17/2010 08:10 AM, always_rick wrote:
What I am trying to do is:
if menu item is selected (onClick), change the markupli id or class.
However, it doesn't seem to work.
listview.setreuseitems(true)
for what its worth it is better to pull then to push values.
-igor
On Sat, Oct 16, 2010 at 11:10 PM, always_rick sh...@hotmail.com wrote:
What I am trying to do is:
if menu item is selected (onClick), change the markup li id or class.
However, it doesn't seem
James Carman wrote:
Why not just use pure JavaScript for this? All you're trying to do is
change a class or id (I'd do class) when something is clicked. Is
there any reason why you need to go server-side for this?
my javascript skill is limited. could you please show how to do it?
--
Igor Vaynberg-2 wrote:
listview.setreuseitems(true)
for what its worth it is better to pull then to push values.
-igor
thanks a lot.
it still doesn't work. I am using wicket 1.4.12.
--
View this message in context: