Re: [appfuse-user] delete icon/button

2010-11-11 Thread Vanessa Pacheco
Ok, so here's what I did. Still not working, but I know with some help I can 
get it working. I'm using Spring MVC with hibernate (Appfuse 2.x). Error 
attached (from when I run mvn)

--I have created a new pkg "com.xxx.webapp.decorator", in which I have 1 class 
EditDeleteListIcon.java. Attaching the class with this email.

--I then created a bean in src\main\resources\applicationcontext-resources.xml


--Added the property to userController bean in 
"src\main\webapp\WEB-INF\dispatcher-servlet.xml"





--In userList.jsp added the deletelink as below...







Could someone help me please

Thnx
Vanessa
- Original Message -
From: "Josep García" 
To: [email protected]
Sent: Thursday, November 11, 2010 4:22:07 AM (GMT-0500) America/New_York
Subject: Re: [appfuse-user] delete icon/button

You can achieve this with displaytag decorators. There are examples on the net. 
See for instance: 
http://displaytag.sourceforge.net/11/tut_links.html 

Josep 


2010/11/10 Vanessa Pacheco < [email protected] > 


Never mind my previous css question. I found firebug to be a great help there. 
I do have another question though. 

I would like to add a delete icon to every row in the user list so that when i 
click it, it asks whether i really want to delete the userif I click OK, it 
deletes and if I click cancel it does not delete 

Just using trial and error, I added this to the userlist.jsp, 
 
    
       
          
       
    
    

which ofcourse doesn't work (I knew it wouldn't). Could someone guide me please 

Thnx 
Vanessa 


- 
To unsubscribe, e-mail: [email protected] 
For additional commands, e-mail: [email protected] 


package com.bowmansystems.webapp.decorator;

import org.displaytag.decorator.TableDecorator;
import java.util.*;
import com.bowmansystems.model.User;

public class EditDeleteListerIcon extends TableDecorator {
	
public String getUsername() {
	User userData = (User)getCurrentRowObject();
return userData.getUsername();
}

public Long getId() {
	User userData = (User)getCurrentRowObject();
	return userData.getId();
}

public String getDeletelink() {
	User userData = (User)getCurrentRowObject();
	Long id = getId();
	return "Delete";
}
}
+ Error stacktraces are turned on.
[INFO] Scanning for projects...
[INFO] 
[INFO] Building AppFuse Spring MVC Application
[INFO]task-segment: [install]
[INFO] 
[INFO] [aspectj:compile {execution: default}]
[INFO] [native2ascii:native2ascii {execution: native2ascii-utf8}]
[INFO] [native2ascii:native2ascii {execution: native2ascii-8859_1}]
[INFO] [resources:resources {execution: default-resources}]
[INFO] Using 'UTF-8' encoding to copy filtered resources.
[INFO] Copying 25 resources
[INFO] Copying 1 resource
[INFO] Copying 93 resources
[INFO] Copying 93 resources
[INFO] [compiler:compile {execution: default-compile}]
[INFO] Nothing to compile - all classes are up to date
[INFO] [resources:testResources {execution: default-testResources}]
[INFO] Using 'UTF-8' encoding to copy filtered resources.
[INFO] Copying 18 resources
[INFO] Copying 15 resources
[INFO] Preparing hibernate3:hbm2ddl
[WARNING] Removing: hbm2ddl from forked lifecycle, to prevent recursive 
invocation.
[INFO] [aspectj:compile {execution: default}]
[INFO] [native2ascii:native2ascii {execution: native2ascii-utf8}]
[INFO] [native2ascii:native2ascii {execution: native2ascii-8859_1}]
[INFO] [resources:resources {execution: default-resources}]
[INFO] Using 'UTF-8' encoding to copy filtered resources.
[INFO] Copying 25 resources
[INFO] Copying 1 resource
[INFO] Copying 93 resources
[INFO] Copying 93 resources
[INFO] Copying 93 resources
[INFO] Copying 93 resources
[INFO] [hibernate3:hbm2ddl {execution: default}]
[INFO] Configuration XML file loaded: 
file:/C:/Source/SyncPt/src/main/resources/hibernate.cfg.xml
[INFO] Configuration XML file loaded: 
file:/C:/Source/SyncPt/src/main/resources/hibernate.cfg.xml
[INFO] Configuration Properties file loaded: 
C:\Source\SyncPt\target\classes\jdbc.properties
alter table user_role drop constraint FK143BF46A58DC64E6;
alter table user_role drop constraint FK143BF46AFE0728C6;
drop table app_user;
drop table role;
drop table user_role;
drop sequence hibernate_sequence;
create table app_user (id int8 not null, account_expired bool not null, 
account_locked bool not null, address varchar(150), city varchar(50), country 
varchar(100), postal_code varchar(15), province varchar(100), 
credentials_expired bool not null, email varchar(255) not null unique, 
account_enabled bool, first_name varchar(50) not 

Re: [appfuse-user] delete icon/button

2010-11-11 Thread Josep García
You can achieve this with displaytag decorators. There are examples on the
net.
See for instance:
http://displaytag.sourceforge.net/11/tut_links.html

Josep

2010/11/10 Vanessa Pacheco 

> Never mind my previous css question. I found firebug to be a great help
> there. I do have another question though.
>
> I would like to add a delete icon to every row in the user list so that
> when i click it, it asks whether i really want to delete the userif I
> click OK, it deletes and if I click cancel it does not delete
>
> Just using trial and error, I added this to the userlist.jsp,
>  requestURI=""
>defaultsort="1" id="users" pagesize="25" class="table" export="true">
>
>paramId="username"
>  paramName="RegistrationForm" paramProperty="username">
>  
>   
>
> titleKey="user.username" style="width: 25%"
>url="/userform.html?from=list" paramId="id" paramProperty="id"/>
>
> which ofcourse doesn't work (I knew it wouldn't). Could someone guide me
> please
>
> Thnx
> Vanessa
>
>
> -
> To unsubscribe, e-mail: [email protected]
> For additional commands, e-mail: [email protected]
>
>


[appfuse-user] delete icon/button

2010-11-10 Thread Vanessa Pacheco
Never mind my previous css question. I found firebug to be a great help there. 
I do have another question though.

I would like to add a delete icon to every row in the user list so that when i 
click it, it asks whether i really want to delete the userif I click OK, it 
deletes and if I click cancel it does not delete

Just using trial and error, I added this to the userlist.jsp, 


   
  
   


 
which ofcourse doesn't work (I knew it wouldn't). Could someone guide me please

Thnx
Vanessa


-
To unsubscribe, e-mail: [email protected]
For additional commands, e-mail: [email protected]