if you have em's wrapped around the link, its probably disabled.

Eg, from
  if(poll.getStatus().equals(VidgetStatus.ACTIVE))
                                        deleteLink.setEnabled(false); 

Rgds

Ned



itayh wrote:
> 
> Hi Charlie,
> You are correct, I removed some not relevant data.
> Here is my table full markup:
> 
> <table class="table" id="pollList">
>       <thead>
>               <tr>
>                       <th wicket:id="orderById"><wicket:message
> key="poll.id">[id]</wicket:message></th>
>                       <th wicket:id="orderByName"><wicket:message
> key="poll.name">[name]</wicket:message></th>
>                       <th wicket:id="orderByDescription"><wicket:message
>                               
> key="poll.description">[description]</wicket:message></th>
>                       <th wicket:id="orderByQuestion"><wicket:message
>                               
> key="poll.question">[question]</wicket:message></th>
>                       <th wicket:id="orderByMaxVotes"><wicket:message
>                               
> key="poll.maxVotes">[maxVotes]</wicket:message></th>
>                       <th wicket:id="orderByActive"><wicket:message
> key="poll.active">[active]</wicket:message></th>
>                       <th wicket:id="orderByDelete"><wicket:message
> key="poll.delete">[delete]</wicket:message></th>
>               </tr>
>       </thead>
>       <tbody>
>               <tr wicket:id="polls">
>                       <td>< a href="#" wicket:id="edit-link">[id] </td>
>                       <td>< span wicket:id="poll.name">[name]</td>
>                       <td>< span 
> wicket:id="poll.description">[description]</td>
>                       <td>< span wicket:id="poll.question">[question]</td>
>                       <td>< span wicket:id="poll.maxVotes">[maxVotes]</td>
>                       <td>< a href="#" wicket:id="active-link">[active] </td>
>                       <td>< a href="#" wicket:id="delete-link">< img  src = 
> "images/delete_icon.png" /> </td>                     
>               </tr>
>       </tbody>
> </table>
> 
> here is the javacode parts that create the onclick actions for all the
> links. It work ok for all links except the delete link that I try to use
> image:
>                               Link link = new Link("edit-link", 
> item.getModel()) {
>                                       public void onClick() {
>                                               onEditPoll((Poll) 
> getModelObject());
>                                       }
>                               };
>                               link.add(new Label("poll.id", 
> String.valueOf(poll.getId())));
>                               item.add(link);
>                                                                       
>                               item.add(new Label("poll.name", 
> poll.getName()));
>                               item.add(new Label("poll.description", 
> poll.getDescription()));
>                               item.add(new Label("poll.question", 
> poll.getQuestion()));
>                               item.add(new Label("poll.maxVotes",
> String.valueOf(poll.getMaxVotes())));
>                               //second link
>                               Link activeLink = new Link("active-link", 
> item.getModel()) {
>                                       public void onClick() {
>                                               onActivePoll((Poll) 
> getModelObject());
>                                       }                                       
>                               };
>                               if 
> (poll.getStatus().equals(VidgetStatus.ACTIVE))
>                                       activeLink.add(new Label("poll.active", 
> "deactivate"));
>                               else
>                                       activeLink.add(new Label("poll.active", 
> "activate"));
>                               item.add(activeLink);
>                               
>                               Link deleteLink = new Link("delete-link", 
> item.getModel()) {
>                                       public void onClick() {
>                                               onDeletePoll((Poll) 
> getModelObject());
>                                       }                                       
>                               };
>                               
>                       
>                               if(poll.getStatus().equals(VidgetStatus.ACTIVE))
>                                       deleteLink.setEnabled(false);
>                               item.add(deleteLink);
> 
> In the generated html page I dont see the delete link. All the other links
> in the generated html  look like:
> <td>< a href="?wicket:interface=:2:polls:9:edit-link::ILinkListener::">2
> </td>
> 
> while for the delete I have:
> <td><em>< img src="../images/delete_icon.png"/></em></td>                     
> 
> Igor, I did not understand your comment.
> 
> Thanks in advance,
>   Itay
> 
> 
> Charlie Dobbie wrote:
>> 
>> That can't be your real markup - you've not closed the span or anchor
>> tags,
>> and Wicket won't accept that at all.
>> 
>> Please post your real markup!
>> 
>> Charlie.
>> 
>> 
>> 
>> 
>> 
>> 2008/11/11 Igor Vaynberg <[EMAIL PROTECTED]>
>> 
>>> what url is generated for that link (look in source). how is the url
>>> different from what it is supposed to be? you need to learn how to
>>> provide more *useful* information if you want help.
>>>
>>> -igor
>>>
>>> On Tue, Nov 11, 2008 at 8:09 AM, itayh <[EMAIL PROTECTED]> wrote:
>>> >
>>> > Hi,
>>> >
>>> > I am having a table with deactivate and delete link columns. In the
>>> delete
>>> > column I want to have delete image, so pressing on the image will
>>> activate
>>> > the delete function on the server.
>>> >
>>> > My html code:
>>> > <td>< a href="#" wicket:id="active-link" >< span
>>> wicket:id="poll.active"
>>> >
>>> > </td>
>>> > <td>< a href="#" wicket:id="delete-link" >< img
>>> src="images/delete_icon.png"
>>> > /> </td>
>>> >
>>> > My java code:
>>> > Link activeLink = new Link("active-link", item.getModel()) {
>>> >        public void onClick() {
>>> >                onActivePoll((Poll) getModelObject());
>>> >       }
>>> > };
>>> > activeLink.add(new Label("poll.active", "activate"));
>>> > item.add(activeLink);
>>> >
>>> > Link deleteLink = new Link("delete-link", item.getModel()) {
>>> >        public void onClick() {
>>> >                onDeletePoll((Poll) getModelObject());
>>> >        }
>>> > };
>>> > item.add(deleteLink);
>>> >
>>> > While the activate link work ok, the delete link which use the image
>>> is
>>> not
>>> > appearing in the html and I see just the image with no link.
>>> > Any idea what I am doing wrong?
>>> >
>>> > Thanks in advance,
>>> >  Itay
>>> >
>>> > --
>>> > View this message in context:
>>> http://www.nabble.com/image-link-inside-of-table-problem-tp20442713p20442713.html
>>> > Sent from the Wicket - User mailing list archive at Nabble.com.
>>> >
>>> >
>>> > ---------------------------------------------------------------------
>>> > 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]
>>>
>>>
>> 
>> 
> 
> 

-- 
View this message in context: 
http://www.nabble.com/image-link-inside-of-table-problem-tp20442713p20448098.html
Sent from the Wicket - User mailing list archive at Nabble.com.


---------------------------------------------------------------------
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]

Reply via email to