Could it be too bad to implement it as a tag?

Discussion in 'Java' started by Rhett Liu, Sep 16, 2004.

  1. Rhett Liu

    Rhett Liu Guest

    Hi,Kind guys!

    I'm in troulbe with a choice of custom tag.
    The situation is:
    I have some record stored in database,but not much records,just like a
    catalog,less than 30,there's need to display them all in a web page as a
    list,I want to write a custome tag to display them,fill them in a
    <select><option></option></select>'s options;If I don't do like
    this,however,I have to refill all them in to a java bean in a action
    bean,consider that first we get it from an edit-action,next we submit it
    to the save-action,if save-action fill and have to redirect back to edit
    page,hear we have to refill all them in to a java bean(which is stored
    in request not session,i think this is more suitable).
    Which method should i do?One of my mates considers it is bad design,he
    seems don't like write custom tag,it is dangerous,not clear!

    How about your ideas?

    Thanks
    Rhett Liu, Sep 16, 2004
    #1
    1. Advertising

  2. Rhett Liu

    Sudsy Guest

    Rhett Liu wrote:
    > Hi,Kind guys!
    >
    > I'm in troulbe with a choice of custom tag.
    > The situation is:
    > I have some record stored in database,but not much records,just like a
    > catalog,less than 30,there's need to display them all in a web page as a
    > list,I want to write a custome tag to display them,fill them in a
    > <select><option></option></select>'s options;If I don't do like
    > this,however,I have to refill all them in to a java bean in a action
    > bean,consider that first we get it from an edit-action,next we submit it
    > to the save-action,if save-action fill and have to redirect back to edit
    > page,hear we have to refill all them in to a java bean(which is stored
    > in request not session,i think this is more suitable).


    I'd use the html:eek:ptionsCollection tag and store the options (assuming
    the list doesn't change frequently) in session scope.
    Sudsy, Sep 16, 2004
    #2
    1. Advertising

Want to reply to this thread or ask your own question?

It takes just 2 minutes to sign up (and it's free!). Just click the sign up button to choose a username and then you can ask your own questions on the forum.
Similar Threads
  1. Replies:
    0
    Views:
    864
  2. shruds
    Replies:
    1
    Views:
    783
    John C. Bollinger
    Jan 27, 2006
  3. Eric Anderson

    Bad Transform or Bad Engine?

    Eric Anderson, Oct 4, 2005, in forum: XML
    Replies:
    1
    Views:
    375
    Peter Flynn
    Oct 5, 2005
  4. rantingrick
    Replies:
    44
    Views:
    1,204
    Peter Pearson
    Jul 13, 2010
  5. Stefan Rusterholz
    Replies:
    38
    Views:
    389
    Rick DeNatale
    Dec 28, 2007
Loading...

Share This Page