You are viewing a plain text version of this content. The canonical link for it is here.
Posted to user@turbine.apache.org by brian janaszek <ja...@collaborativefusion.com> on 2003/05/09 20:53:58 UTC
Generating New Tables within Web App
Hi
I'm currently working through the redesign of a web app running on
Turbine 2.2/Torque 3.0. The app currently uses the concept of groups
(not in the TURBINE_GROUP sense of a group) to organize users. A new
requirement of the redesigned app is to allow new groups to sign up
through the application, and these groups can require that additional
data be collected from users wishing to join that group. My thought at
the momemnt is that if a new group requires additional data, the system
user that acts as the admistrative user of the group could specify
additional attributes, and these attributes could be translated into a
schema for a new database table.
Using the Torque SQL tasks, it would be fairly straightforward to
generate the new tables from an XML file (which would be generated based
upon the group administrator's requested attributes). My question is,
how do I access the new tables in a meaningful and useful way? I know I
could also generate the OM classes for the new table, but is there an
issue with Tomcat seeing brand new classes without a server restart?
I'm thinking that if the classes are visible without a restart, I could
use reflection (based on some sort of naming convention for the new
table(s)) to use the new classes and access the data and write to the
tables.
Just curious if anyone has implemented anything along these lines.
TIA
brian
---------------------------------------------------------------------
To unsubscribe, e-mail: turbine-user-unsubscribe@jakarta.apache.org
For additional commands, e-mail: turbine-user-help@jakarta.apache.org
Re: t2.1 and tomcat 4.1.24?
Posted by "Dan K." <da...@yorku.ca>.
Hi,
So no one has done this before or has everyone upgraded to turbine 2.2
and higher? Nothing in the mail archive seems to help the situation...
Well thanks anyway.
Regards,
Dan
On Thu, 15 May 2003, Dan K. wrote:
>
> Hi,
>
> Has anyone migrated a T2.1 app from Tomcat 4.0.x to Tomcat 4.1.x,
> specifically, TC4.1.24? If so, what were your steps?
>
> I keep getting a horrible ClassNotFoundException... Uncommenting the
> invoker mapping didn't help.
>
> Horrible Exception: java.lang.ClassNotFoundException:
>
> Requested Screen not found:
> Turbine looked in the following modules.packages path:
> [ca.yorku.webapp.modules, org.apache.turbine.modules]
>
>
> Regards,
> Dan
>
>
> ---------------------------------------------------------------------
> To unsubscribe, e-mail: turbine-user-unsubscribe@jakarta.apache.org
> For additional commands, e-mail: turbine-user-help@jakarta.apache.org
>
---------------------------------------------------------------------
To unsubscribe, e-mail: turbine-user-unsubscribe@jakarta.apache.org
For additional commands, e-mail: turbine-user-help@jakarta.apache.org
t2.1 and tomcat 4.1.24?
Posted by "Dan K." <da...@yorku.ca>.
Hi,
Has anyone migrated a T2.1 app from Tomcat 4.0.x to Tomcat 4.1.x,
specifically, TC4.1.24? If so, what were your steps?
I keep getting a horrible ClassNotFoundException... Uncommenting the
invoker mapping didn't help.
Horrible Exception: java.lang.ClassNotFoundException:
Requested Screen not found:
Turbine looked in the following modules.packages path:
[ca.yorku.webapp.modules, org.apache.turbine.modules]
Regards,
Dan
---------------------------------------------------------------------
To unsubscribe, e-mail: turbine-user-unsubscribe@jakarta.apache.org
For additional commands, e-mail: turbine-user-help@jakarta.apache.org
RE: Need help with cookies
Posted by Quinton McCombs <qm...@nequalsone.com>.
Thanks to everyone who responded about my problem with cookies. My
problem was that the cookie was being set incorrectly. The path being
used for the cookie was missing the context path. This has now been
fixed in 2.3-dev
--------------------------------------------
Quinton McCombs
NequalsOne - HealthCare marketing tools
mailto:qmccombs@NequalsOne.com
http://www.NequalsOne.com
> -----Original Message-----
> From: Eric Emminger [mailto:eric@ericemminger.com]
> Sent: Thursday, May 15, 2003 12:38 PM
> To: Turbine Users List
> Subject: Re: Need help with cookies
>
>
> Turbine 2.2 has a bug in DefaultCookieParser that throws a
> NullPointerException if no cookies exist in the request. I think it's
> fixed in 2.3.
>
> > // Setting the cookie
> > Cookie cookie = new Cookie(cookieApplLogged,"true");
> > cookie.setMaxAge(maxage);
> > cookie.setComment(comment);
> > //cookie.setDomain(domain);
> > cookie.setPath(path);
> >
> > data.getResponse().addCookie(cookie);
>
> I do the same to set a cookie. You have more flexibility setting the
> properties of the Cookie and you don't have to check for a NPE.
>
> Quinton, you could do this.
>
> Cookie cookie = new Cookie("NeoUserName", user.getName());
> cookie.setMaxAge(Integer.MAX_VALUE);
> cookie.setPath("/");
> data.getResponse().addCookie(cookie);
>
> That's a javax.servlet.http.Cookie above.
>
> Eric
>
>
> ---------------------------------------------------------------------
> To unsubscribe, e-mail: turbine-user-unsubscribe@jakarta.apache.org
> For additional commands, e-mail: turbine-user-help@jakarta.apache.org
>
>
>
---------------------------------------------------------------------
To unsubscribe, e-mail: turbine-user-unsubscribe@jakarta.apache.org
For additional commands, e-mail: turbine-user-help@jakarta.apache.org
Re: Need help with cookies
Posted by Eric Emminger <er...@ericemminger.com>.
Turbine 2.2 has a bug in DefaultCookieParser that throws a
NullPointerException if no cookies exist in the request. I think it's
fixed in 2.3.
> // Setting the cookie
> Cookie cookie = new Cookie(cookieApplLogged,"true");
> cookie.setMaxAge(maxage);
> cookie.setComment(comment);
> //cookie.setDomain(domain);
> cookie.setPath(path);
>
> data.getResponse().addCookie(cookie);
I do the same to set a cookie. You have more flexibility setting the
properties of the Cookie and you don't have to check for a NPE.
Quinton, you could do this.
Cookie cookie = new Cookie("NeoUserName", user.getName());
cookie.setMaxAge(Integer.MAX_VALUE);
cookie.setPath("/");
data.getResponse().addCookie(cookie);
That's a javax.servlet.http.Cookie above.
Eric
---------------------------------------------------------------------
To unsubscribe, e-mail: turbine-user-unsubscribe@jakarta.apache.org
For additional commands, e-mail: turbine-user-help@jakarta.apache.org
Re: Need help with cookies
Posted by Edgar González <eg...@valhallaproject.com>.
Quinton,
I was read in Jetspeed that Turbine don't handle properly the cookies,
following are some examples of code that set and read cookies:
// Setting the cookie
String cookieApplLogged = TurbineResources.getString(
AtuinConstants.COOKIE_APPL_LOGGED);
if (cookieApplLogged != null && cookieApplLogged.length() > 0)
{
int maxage = -1;
String comment = "";
String domain = "." + data.getServerName();
String path = "/";
Cookie cookie = new Cookie(cookieApplLogged,"true");
cookie.setMaxAge(maxage);
cookie.setComment(comment);
//cookie.setDomain(domain);
cookie.setPath(path);
data.getResponse().addCookie(cookie);
}
// Checking the cooike
String cookieApplLogged = TurbineResources.getString(
AtuinConstants.COOKIE_APPL_LOGGED);
if (cookieApplLogged != null && cookieApplLogged.length() > 0)
{
// check exist cookies - turbine don't handle this currently
if ( data.getRequest().getCookies() != null )
{
String cookie = data.getCookies()
.getString(cookieApplLogged);
if (cookie!=null && cookie.equals("true"))
{
atuinR.setAlertMessage(TurbineResources.getString(
AtuinConstants.SESSION_EXPIRED_MESSAGE));
}
}
}
Hope this help
----------------------------------------------------------------------------
Edgar Gonzalez Gonzalez
VALHALLA Project, s.a.
Chief Technology Officer
Web: www.valhallaproject.com
E-mail: egg@valhallaproject.com
Phone: +58-212-242.4379 / 6662 / 4055 / 6475
Fax: +58-212-242.6809
"The limits of my language mean the limits of my world."
Ludwig Wittgenstein
----------------------------------------------------------------------------
----- Original Message -----
From: "Quinton McCombs" <qm...@nequalsone.com>
To: "'Turbine Users List'" <tu...@jakarta.apache.org>
Sent: Thursday, May 15, 2003 10:38 AM
Subject: Need help with cookies
> I am trying to get and set cookies using DefaultCookieParser. The
> cookie appears to be set corrrectly but it is not being read. Bear in
> mind, this is the first time I have ever tried to use cookies....
>
>
> As the final step in my login action, I write an encrypted version to
> the username and password to two cookies. In my secure screen code, if
> the user is not logged in, I try to read the cookies. The idea here is
> that if the user is not logged in, I will read the cookie and use the
> info to log the user in without ever having to send them to the login
> screen.
>
> Code to write the cookie: (encryption omitted ATM)
>
> CookieParser cp = data.getCookies();
> cp.set("NeoUserName", user.getName(), Integer.MAX_VALUE);
> cp.set("NeoPassword", user.getPassword(), Integer.MAX_VALUE);
>
> The above code should set two cookies. Each are perm cookies and should
> be set for the max duration.
>
> Code to read the cookies: (encryption omitted ATM)
>
> CookieParser cp = data.getCookies();
> String userName = cp.getString("NeoUserName");
> String password = cp.getString("NeoPassword");
> log.debug("userName = "+userName);
> log.debug("password = "+password);
>
> The log indicates that the username and password are both null. I
> verfied that the cookie were created. They also contained the data I
> expected to see.
>
> Another interesting thing to see in the log file was the following line:
>
> 2003-05-14 17:54:05,784 [Thread-4] DEBUG
> org.apache.turbine.util.parser.DefaultCookieParser- Number of Cookies: 1
> 2003-05-14 17:54:05,784 [Thread-4] DEBUG
> org.apache.turbine.util.parser.DefaultCookieParser- Adding
> jsessionid=CB507FCF4534205924779A3B8F84AF32
>
> It found the jsessionid cookie and read it. It just ignored my cookies.
>
> Any ideas?
> --------------------------------------------
> Quinton McCombs
> NequalsOne - HealthCare marketing tools
> mailto:qmccombs@NequalsOne.com
> http://www.NequalsOne.com
>
>
> ---------------------------------------------------------------------
> To unsubscribe, e-mail: turbine-user-unsubscribe@jakarta.apache.org
> For additional commands, e-mail: turbine-user-help@jakarta.apache.org
>
>
>
---------------------------------------------------------------------
To unsubscribe, e-mail: turbine-user-unsubscribe@jakarta.apache.org
For additional commands, e-mail: turbine-user-help@jakarta.apache.org
RE: Need help with cookies
Posted by James Cooper <ja...@maxware.nl>.
Quinton
I had a few problems reading, and unsetting cookies myself, especially if I
was checking to see if a cookie existed. This is the old tried a tested.
Setting works fine mind..
// I use the HttpServletRequest.getCookies() as data.getCookies threw
NullPointerExceptions
// if the cookie was not set. Personally I'd class this as a bug
Cookie[] lCookie = aData.getRequest().getCookies();
if (lCookie != null)
{
for (int i = 0; i < lCookie.length; i++)
{
// If the cookie was set, initialise the Locale with its
contents
if ((lCookie[i].getName().equals(aCookieName)) &&
(!lCookie[i].getValue().equals("false")))
{
gCookie = lCookie[i];
break;
}
}
}
-----Original Message-----
From: Quinton McCombs [mailto:qmccombs@nequalsone.com]
Sent: 15 May 2003 16:38
To: 'Turbine Users List'
Subject: Need help with cookies
I am trying to get and set cookies using DefaultCookieParser. The
cookie appears to be set corrrectly but it is not being read. Bear in
mind, this is the first time I have ever tried to use cookies....
As the final step in my login action, I write an encrypted version to
the username and password to two cookies. In my secure screen code, if
the user is not logged in, I try to read the cookies. The idea here is
that if the user is not logged in, I will read the cookie and use the
info to log the user in without ever having to send them to the login
screen.
Code to write the cookie: (encryption omitted ATM)
CookieParser cp = data.getCookies();
cp.set("NeoUserName", user.getName(), Integer.MAX_VALUE);
cp.set("NeoPassword", user.getPassword(), Integer.MAX_VALUE);
The above code should set two cookies. Each are perm cookies and should
be set for the max duration.
Code to read the cookies: (encryption omitted ATM)
CookieParser cp = data.getCookies();
String userName = cp.getString("NeoUserName");
String password = cp.getString("NeoPassword");
log.debug("userName = "+userName);
log.debug("password = "+password);
The log indicates that the username and password are both null. I
verfied that the cookie were created. They also contained the data I
expected to see.
Another interesting thing to see in the log file was the following line:
2003-05-14 17:54:05,784 [Thread-4] DEBUG
org.apache.turbine.util.parser.DefaultCookieParser- Number of Cookies: 1
2003-05-14 17:54:05,784 [Thread-4] DEBUG
org.apache.turbine.util.parser.DefaultCookieParser- Adding
jsessionid=CB507FCF4534205924779A3B8F84AF32
It found the jsessionid cookie and read it. It just ignored my cookies.
Any ideas?
--------------------------------------------
Quinton McCombs
NequalsOne - HealthCare marketing tools
mailto:qmccombs@NequalsOne.com
http://www.NequalsOne.com
---------------------------------------------------------------------
To unsubscribe, e-mail: turbine-user-unsubscribe@jakarta.apache.org
For additional commands, e-mail: turbine-user-help@jakarta.apache.org
---------------------------------------------------------------------
To unsubscribe, e-mail: turbine-user-unsubscribe@jakarta.apache.org
For additional commands, e-mail: turbine-user-help@jakarta.apache.org
Need help with cookies
Posted by Quinton McCombs <qm...@nequalsone.com>.
I am trying to get and set cookies using DefaultCookieParser. The
cookie appears to be set corrrectly but it is not being read. Bear in
mind, this is the first time I have ever tried to use cookies....
As the final step in my login action, I write an encrypted version to
the username and password to two cookies. In my secure screen code, if
the user is not logged in, I try to read the cookies. The idea here is
that if the user is not logged in, I will read the cookie and use the
info to log the user in without ever having to send them to the login
screen.
Code to write the cookie: (encryption omitted ATM)
CookieParser cp = data.getCookies();
cp.set("NeoUserName", user.getName(), Integer.MAX_VALUE);
cp.set("NeoPassword", user.getPassword(), Integer.MAX_VALUE);
The above code should set two cookies. Each are perm cookies and should
be set for the max duration.
Code to read the cookies: (encryption omitted ATM)
CookieParser cp = data.getCookies();
String userName = cp.getString("NeoUserName");
String password = cp.getString("NeoPassword");
log.debug("userName = "+userName);
log.debug("password = "+password);
The log indicates that the username and password are both null. I
verfied that the cookie were created. They also contained the data I
expected to see.
Another interesting thing to see in the log file was the following line:
2003-05-14 17:54:05,784 [Thread-4] DEBUG
org.apache.turbine.util.parser.DefaultCookieParser- Number of Cookies: 1
2003-05-14 17:54:05,784 [Thread-4] DEBUG
org.apache.turbine.util.parser.DefaultCookieParser- Adding
jsessionid=CB507FCF4534205924779A3B8F84AF32
It found the jsessionid cookie and read it. It just ignored my cookies.
Any ideas?
--------------------------------------------
Quinton McCombs
NequalsOne - HealthCare marketing tools
mailto:qmccombs@NequalsOne.com
http://www.NequalsOne.com
---------------------------------------------------------------------
To unsubscribe, e-mail: turbine-user-unsubscribe@jakarta.apache.org
For additional commands, e-mail: turbine-user-help@jakarta.apache.org
Re: Using java bean in a turbine application
Posted by Pavel Kusch <pa...@icecentric.com>.
This is how you can get the name of the file you uploaded:
**********************************
FileItem fileItem = data.getParameters().getFileItem("file");
if (fileItem != null)
{
String fileName = fileItem.getFileName();
StringTokenizer toker=new StringTokenizer(fileName, "\\");
while (toker.hasMoreTokens() )
{
fileName= toker.nextToken();
}
}
*********************************
fileName then holds the name of the file. You save the file in database or
in your file system or ...
With regards,
Pavel Kusch
iceCentric
309.685.7900
309.264.2674
----- Original Message -----
From: "Keshava Murthy" <ke...@bigtec.org>
To: "Turbine Users List" <tu...@jakarta.apache.org>
Sent: Thursday, May 15, 2003 8:02 AM
Subject: Re: Using java bean in a turbine application
> Hi,
>
> I need to upload multiple images, files etc. From turbine application I
can
> upload one file at a time and when I upload next time that file is
replaced.
>
> Is there a way wherein I can upload multiple fies at a time and at the
same
> time save it with the same name as the uploaded ones. I just want the
> uploaded files to be added to the earlier uploaded files.
>
> I am using turbine 2.2 and if anybody has code for doing this kindly
forward
> it to me.
>
> regards,
> Keshava Murthy. S
> ----- Original Message -----
> From: "Peter Courcoux" <pe...@courcoux.biz>
> To: "Turbine Users List" <tu...@jakarta.apache.org>
> Sent: Thursday, May 15, 2003 4:04 PM
> Subject: Re: Using java bean in a turbine application
>
>
> > Turbine has its own upload service for turbine 2.2 which is replaced by
> > commons-fileupload for turbine 2.3. Both work well. These are integrated
> > services. Would they meet your needs?
> >
> > On Thu, 2003-05-15 at 11:19, Keshava Murthy wrote:
> > > Hi,
> > >
> > > I have downloaded a upload bean from www.javazoom.net and works fine
as
> an
> > > application. I want to use this bean in my turbine application. Can
some
> one
> > > guide me how can I do it ?
> > >
> > > regards,
> > > Keshava Murthy. S
> > >
> > >
> > > ---------------------------------------------------------------------
> > > To unsubscribe, e-mail: turbine-user-unsubscribe@jakarta.apache.org
> > > For additional commands, e-mail: turbine-user-help@jakarta.apache.org
> > --
> > Peter Courcoux <pe...@courcoux.biz>
> >
> > ---------------------------------------------------------------------
> > To unsubscribe, e-mail: turbine-user-unsubscribe@jakarta.apache.org
> > For additional commands, e-mail: turbine-user-help@jakarta.apache.org
> >
> >
>
>
> ---------------------------------------------------------------------
> To unsubscribe, e-mail: turbine-user-unsubscribe@jakarta.apache.org
> For additional commands, e-mail: turbine-user-help@jakarta.apache.org
>
---------------------------------------------------------------------
To unsubscribe, e-mail: turbine-user-unsubscribe@jakarta.apache.org
For additional commands, e-mail: turbine-user-help@jakarta.apache.org
Re: Using java bean in a turbine application
Posted by Keshava Murthy <ke...@bigtec.org>.
Hi,
I need to upload multiple images, files etc. From turbine application I can
upload one file at a time and when I upload next time that file is replaced.
Is there a way wherein I can upload multiple fies at a time and at the same
time save it with the same name as the uploaded ones. I just want the
uploaded files to be added to the earlier uploaded files.
I am using turbine 2.2 and if anybody has code for doing this kindly forward
it to me.
regards,
Keshava Murthy. S
----- Original Message -----
From: "Peter Courcoux" <pe...@courcoux.biz>
To: "Turbine Users List" <tu...@jakarta.apache.org>
Sent: Thursday, May 15, 2003 4:04 PM
Subject: Re: Using java bean in a turbine application
> Turbine has its own upload service for turbine 2.2 which is replaced by
> commons-fileupload for turbine 2.3. Both work well. These are integrated
> services. Would they meet your needs?
>
> On Thu, 2003-05-15 at 11:19, Keshava Murthy wrote:
> > Hi,
> >
> > I have downloaded a upload bean from www.javazoom.net and works fine as
an
> > application. I want to use this bean in my turbine application. Can some
one
> > guide me how can I do it ?
> >
> > regards,
> > Keshava Murthy. S
> >
> >
> > ---------------------------------------------------------------------
> > To unsubscribe, e-mail: turbine-user-unsubscribe@jakarta.apache.org
> > For additional commands, e-mail: turbine-user-help@jakarta.apache.org
> --
> Peter Courcoux <pe...@courcoux.biz>
>
> ---------------------------------------------------------------------
> To unsubscribe, e-mail: turbine-user-unsubscribe@jakarta.apache.org
> For additional commands, e-mail: turbine-user-help@jakarta.apache.org
>
>
---------------------------------------------------------------------
To unsubscribe, e-mail: turbine-user-unsubscribe@jakarta.apache.org
For additional commands, e-mail: turbine-user-help@jakarta.apache.org
Re: Using java bean in a turbine application
Posted by Peter Courcoux <pe...@courcoux.biz>.
Turbine has its own upload service for turbine 2.2 which is replaced by
commons-fileupload for turbine 2.3. Both work well. These are integrated
services. Would they meet your needs?
On Thu, 2003-05-15 at 11:19, Keshava Murthy wrote:
> Hi,
>
> I have downloaded a upload bean from www.javazoom.net and works fine as an
> application. I want to use this bean in my turbine application. Can some one
> guide me how can I do it ?
>
> regards,
> Keshava Murthy. S
>
>
> ---------------------------------------------------------------------
> To unsubscribe, e-mail: turbine-user-unsubscribe@jakarta.apache.org
> For additional commands, e-mail: turbine-user-help@jakarta.apache.org
--
Peter Courcoux <pe...@courcoux.biz>
---------------------------------------------------------------------
To unsubscribe, e-mail: turbine-user-unsubscribe@jakarta.apache.org
For additional commands, e-mail: turbine-user-help@jakarta.apache.org
Using java bean in a turbine application
Posted by Keshava Murthy <ke...@bigtec.org>.
Hi,
I have downloaded a upload bean from www.javazoom.net and works fine as an
application. I want to use this bean in my turbine application. Can some one
guide me how can I do it ?
regards,
Keshava Murthy. S
---------------------------------------------------------------------
To unsubscribe, e-mail: turbine-user-unsubscribe@jakarta.apache.org
For additional commands, e-mail: turbine-user-help@jakarta.apache.org
Re: Generating New Tables within Web App
Posted by Matt Koranda <ma...@orkan.no>.
----- Original Message -----
From: "brian janaszek" <bm...@anklebiter.net>
To: "Turbine Users List" <tu...@jakarta.apache.org>; "Eric Emminger"
<er...@ericemminger.com>
Sent: Wednesday, May 14, 2003 10:09 PM
Subject: Re: Generating New Tables within Web App
>
> > Matt Koranda wrote:
> > > I had a similar problem with creating a product catalog. Different
> > > products would have different types of info associated with them so
when
> > > the product was being entered, it would require different fields to
> > > appear in the form.
> > >
> > > The way I solved this was to make a separate XML file that would
describe
> > > the different products and the fields required for each, along with a
> > > service that would handle this file. When a product is being entered,
a
> > > standard product entry form appears but the service is also queried to
> > > find what additional fields are needed, and those fields are added to
the
> > > bottom of the form.
> >
>
> That was another approach I was considering. Are you storing the data in
the
> XML file as well?
I am just storing it in a hashtable that gets deserialized when when the
first attempt to pull info out of it is made. This way it doesn't take much
overhead unless any of that particular info is needed.
I did it this way because it was in that form in the first place and I
didn't see any reason to take the extra processing time to convert it to XML
if it would never be used in that form, and data is only being received
through an html form. However, I am thinking about doing even more with XML
in the near future because I would also like to be able to receive entries
from other sources using XML (XML-RPC or Xopus). In that case it may be best
to store it as XML but it would then have to create a DOM tree each time you
wanted to use it.
>
> > Interesting approach. Can you give a few examples of the "different
> > types of info associated with" the products?
> >
>
> Eric, you wanted examples of the additional information....a new group
could
> ask for someone's driving experience, what sort of car they own, what
color
> it is, etc, and another group could need to know if the member has a
> computer, the type of computer (if they own one), and if they have
internet
> access. The sky's the limit for the additional information required.
I think this sounds exactly the same as the problems I was encountering.
HTH,
Matt
>
> tia
> bmj
>
> ---------------------------------------------------------------------
> To unsubscribe, e-mail: turbine-user-unsubscribe@jakarta.apache.org
> For additional commands, e-mail: turbine-user-help@jakarta.apache.org
>
---------------------------------------------------------------------
To unsubscribe, e-mail: turbine-user-unsubscribe@jakarta.apache.org
For additional commands, e-mail: turbine-user-help@jakarta.apache.org
Re: Generating New Tables within Web App
Posted by brian janaszek <bm...@anklebiter.net>.
> Matt Koranda wrote:
> > I had a similar problem with creating a product catalog. Different
> > products would have different types of info associated with them so when
> > the product was being entered, it would require different fields to
> > appear in the form.
> >
> > The way I solved this was to make a separate XML file that would describe
> > the different products and the fields required for each, along with a
> > service that would handle this file. When a product is being entered, a
> > standard product entry form appears but the service is also queried to
> > find what additional fields are needed, and those fields are added to the
> > bottom of the form.
>
That was another approach I was considering. Are you storing the data in the
XML file as well?
> Interesting approach. Can you give a few examples of the "different
> types of info associated with" the products?
>
Eric, you wanted examples of the additional information....a new group could
ask for someone's driving experience, what sort of car they own, what color
it is, etc, and another group could need to know if the member has a
computer, the type of computer (if they own one), and if they have internet
access. The sky's the limit for the additional information required.
tia
bmj
---------------------------------------------------------------------
To unsubscribe, e-mail: turbine-user-unsubscribe@jakarta.apache.org
For additional commands, e-mail: turbine-user-help@jakarta.apache.org
Re: Generating New Tables within Web App
Posted by Matt Koranda <ma...@orkan.no>.
----- Original Message -----
From: "Eric Emminger" <er...@ericemminger.com>
To: "Turbine Users List" <tu...@jakarta.apache.org>
Sent: Monday, May 12, 2003 6:54 PM
Subject: Re: Generating New Tables within Web App
> Matt
>
> Matt Koranda wrote:
> > I had a similar problem with creating a product catalog. Different
products
> > would have different types of info associated with them so when the
product
> > was being entered, it would require different fields to appear in the
form.
> >
> > The way I solved this was to make a separate XML file that would
describe
> > the different products and the fields required for each, along with a
> > service that would handle this file. When a product is being entered, a
> > standard product entry form appears but the service is also queried to
find
> > what additional fields are needed, and those fields are added to the
bottom
> > of the form.
>
> Interesting approach. Can you give a few examples of the "different
> types of info associated with" the products?
Any type of information that is not global to all items. As an example, if a
company carries shirts and video games you would want to have certain items
"hard-coded" in the schema like name, part number, and description. Other
items would be needed only by a certain catagory such as size, and color for
the shirts, and maybe platform, and age restrictions for the games. The
content of these fields could be just about anything you can retrieve
through an html form.
Matt
>
> Eric
>
>
> ---------------------------------------------------------------------
> To unsubscribe, e-mail: turbine-user-unsubscribe@jakarta.apache.org
> For additional commands, e-mail: turbine-user-help@jakarta.apache.org
>
---------------------------------------------------------------------
To unsubscribe, e-mail: turbine-user-unsubscribe@jakarta.apache.org
For additional commands, e-mail: turbine-user-help@jakarta.apache.org
Re: Generating New Tables within Web App
Posted by Eric Emminger <er...@ericemminger.com>.
Matt
Matt Koranda wrote:
> I had a similar problem with creating a product catalog. Different products
> would have different types of info associated with them so when the product
> was being entered, it would require different fields to appear in the form.
>
> The way I solved this was to make a separate XML file that would describe
> the different products and the fields required for each, along with a
> service that would handle this file. When a product is being entered, a
> standard product entry form appears but the service is also queried to find
> what additional fields are needed, and those fields are added to the bottom
> of the form.
Interesting approach. Can you give a few examples of the "different
types of info associated with" the products?
Eric
---------------------------------------------------------------------
To unsubscribe, e-mail: turbine-user-unsubscribe@jakarta.apache.org
For additional commands, e-mail: turbine-user-help@jakarta.apache.org
Re: Generating New Tables within Web App
Posted by Matt Koranda <ma...@orkan.no>.
I had a similar problem with creating a product catalog. Different products
would have different types of info associated with them so when the product
was being entered, it would require different fields to appear in the form.
The way I solved this was to make a separate XML file that would describe
the different products and the fields required for each, along with a
service that would handle this file. When a product is being entered, a
standard product entry form appears but the service is also queried to find
what additional fields are needed, and those fields are added to the bottom
of the form.
The standard fields are stored normally in the database but the dynamic
fields are added to a hashtable or an XML structure which is then stored in
a BLOB (similar to the turbine_user objectdata field).
The only thing you would have to do differently is instead of having an XML
file, you could get the structure from the database by, for example, adding
a BLOB field to your "groups" table that stores the extra field info.
I hope this makes sense. This method has worked quite well for us and I look
forward to any thoughts people may have on it.
Matt
----- Original Message -----
From: "brian janaszek" <bj...@collaborativefusion.com>
To: "Turbine Users List" <tu...@jakarta.apache.org>
Sent: Sunday, May 11, 2003 5:01 AM
Subject: Re: Generating New Tables within Web App
> Eric--
>
> > You could add tables at runtime. However, designing your schema to be
> > extensible is probably *much* easier than adding tables at runtime, and
> > would be a better overall application design, IMHO. I encourage you to
> > handle this requirement at design time, if possible.
> >
>
> Thanks. I agree that designing the tables to be extensible would be the
best
> of all worlds, but unfortunately, the spec is just so wide open at this
> point, we can't design a schema to take every option into account. I need
to
> exhaust the options of creating tables at runtime before we can scratch
it.
>
> bmj
>
> ---------------------------------------------------------------------
> To unsubscribe, e-mail: turbine-user-unsubscribe@jakarta.apache.org
> For additional commands, e-mail: turbine-user-help@jakarta.apache.org
>
---------------------------------------------------------------------
To unsubscribe, e-mail: turbine-user-unsubscribe@jakarta.apache.org
For additional commands, e-mail: turbine-user-help@jakarta.apache.org
Re: Generating New Tables within Web App
Posted by Eric Emminger <er...@ericemminger.com>.
Brian
> Thanks. I agree that designing the tables to be extensible would be the best
> of all worlds, but unfortunately, the spec is just so wide open at this
> point, we can't design a schema to take every option into account. I need to
> exhaust the options of creating tables at runtime before we can scratch it.
Can you give a few examples? Extremes would be good.
Eric
---------------------------------------------------------------------
To unsubscribe, e-mail: turbine-user-unsubscribe@jakarta.apache.org
For additional commands, e-mail: turbine-user-help@jakarta.apache.org
Re: Generating New Tables within Web App
Posted by brian janaszek <bj...@collaborativefusion.com>.
Eric--
> You could add tables at runtime. However, designing your schema to be
> extensible is probably *much* easier than adding tables at runtime, and
> would be a better overall application design, IMHO. I encourage you to
> handle this requirement at design time, if possible.
>
Thanks. I agree that designing the tables to be extensible would be the best
of all worlds, but unfortunately, the spec is just so wide open at this
point, we can't design a schema to take every option into account. I need to
exhaust the options of creating tables at runtime before we can scratch it.
bmj
---------------------------------------------------------------------
To unsubscribe, e-mail: turbine-user-unsubscribe@jakarta.apache.org
For additional commands, e-mail: turbine-user-help@jakarta.apache.org
Re: Generating New Tables within Web App
Posted by Eric Emminger <er...@ericemminger.com>.
Brian
brian janaszek wrote:
> Hi
>
> I'm currently working through the redesign of a web app running on
> Turbine 2.2/Torque 3.0. The app currently uses the concept of groups
> (not in the TURBINE_GROUP sense of a group) to organize users. A new
> requirement of the redesigned app is to allow new groups to sign up
> through the application, and these groups can require that additional
> data be collected from users wishing to join that group. My thought at
> the momemnt is that if a new group requires additional data, the system
> user that acts as the admistrative user of the group could specify
> additional attributes, and these attributes could be translated into a
> schema for a new database table.
You could add tables at runtime. However, designing your schema to be
extensible is probably *much* easier than adding tables at runtime, and
would be a better overall application design, IMHO. I encourage you to
handle this requirement at design time, if possible.
Eric
---------------------------------------------------------------------
To unsubscribe, e-mail: turbine-user-unsubscribe@jakarta.apache.org
For additional commands, e-mail: turbine-user-help@jakarta.apache.org