You are viewing a plain text version of this content. The canonical link for it is here.
Posted to user@struts.apache.org by Pat Quinn <pa...@hotmail.com> on 2003/03/24 10:21:17 UTC
[Design] User Customisable Views
Hi Guys,
I have a requirement as follows:
I want each user within my web app to be able to customise their views for
individual screens independently, I want users to be able to customise
attributes such as:
ˇ Turn on/off certain columns when displaying tabular data.
ˇ Customise Header colour, data row colours, onMouseOver colours
ˇ Text Alignment with cells, Font etc
Im thinking I need to persist the above attributes for each user i.e. using
some Tables in my database. My application will have a large number of users
i.e. (600+ but only 200 concurrent users) so Im little concerned at this
approach.
Has anyone out there tried something similar to this before with Struts and
if so should you provide me a few pointers i.e.
How did you persist user view details how did you plug it in with Struts .
I want to avoid adding logic to my view layer to control the displaying of
the above attributes.
Any Ideas gurus by the way Im not looking for a solution just a few
pointers.
Cheers
Pat
_________________________________________________________________
Add photos to your e-mail with MSN 8. Get 2 months FREE*.
http://join.msn.com/?page=features/featuredemail
---------------------------------------------------------------------
To unsubscribe, e-mail: struts-user-unsubscribe@jakarta.apache.org
For additional commands, e-mail: struts-user-help@jakarta.apache.org
Re: Generate
Posted by Adam Sherman <ad...@tritus.ca>.
Just a polite note to let you know that using the Reply function to ask a
new question on a mailing list is bad netiquette. It screws up threading.
A.
--
Adam Sherman
Tritus CG Inc.
http://www.tritus.ca/
+1 (613) 797-6819
---------------------------------------------------------------------
To unsubscribe, e-mail: struts-user-unsubscribe@jakarta.apache.org
For additional commands, e-mail: struts-user-help@jakarta.apache.org
Generate
Posted by Kalaiselvan <ka...@netscape.net>.
Hi,
I have a hashtable having the (countrcode,countrydesc). Is there any
option to use struts taglib to display it in <select> tag.
Thanx
Kalaiselvan
---------------------------------------------------------------------
To unsubscribe, e-mail: struts-user-unsubscribe@jakarta.apache.org
For additional commands, e-mail: struts-user-help@jakarta.apache.org
Re: Object inside another Object
Posted by Nicolas De Loof <ni...@cgey.com>.
You should use the <html:select> tag with <html:options>
Define a form-bean that will have a "contry" property, and two collections that will maintain labels and values for your
options.
Look at tag doc :
http://jakarta.apache.org/struts/doc-1.0.2/struts-html.html#options
This way you will have current selected value automatically set to "select" in generated HTML, and you will
automatically get back selected value form user in form-bean.
Try using tags instead of scriptlets, your JSP will become more readable.
Nico.
> yes. I'm using it in <select> tag.
>
> I have a hashtable that contain countrycode, countrydesc
>
> <select name="country">
> <%if ( countries != null )
> {
> Enumeration keys = countries.keys();
> while ( keys.hasMoreElements() )
> {
> String key = (String)keys.nextElement();
> String selectedFlag = "";
> if( key.equalsIgnoreCase(<bean:write
> name="employee" property="country">) )
> selectedFlag = "selected";
> %>
> <option value="<%=key%>" <%=selectedFlag%>
> ><%=countries.get(key)%></option>
> <% }
> }
> %>
> </select>
>
>
> Thanx
> Kalaiselvan.S
>
> nicolas.deloof@cgey.com wrote:
>
> >Do you want your JSP to look different depending getAllowed() value
> >or do you want your Action to get some checkbox or hidden value from HTML form ?
> >
> >Can you tell me what you want to do, not as technical but as application usage. I could so understand what you're
> >looking for.
> >
> >Nico.
> >
> >
> >
> >>That is getAllowed() is return boolean. If it return true i will do
> >>something. If it returns false, i will do different . So i have to
> >>check values in my jsp page. Also i want to concat 2 or more return
> >>strings in my jsp. So it is must that i have to capture the values into
> >>some jsp varibles.
> >>
> >>Thanx
> >>Kalaiselvan.
> >>
> >>nicolas.deloof@cgey.com wrote:
> >>
> >>
> >>
> >>>If you wan't the user to edit some datas, you should build a form-bean, put your model datas into it (use
> >>>common-beanutil copyProperties, or an Adapter class) and use it in your JSP.
> >>>When user submits, get the form-bean back with all updated datas inside it.
> >>>
> >>>What do you wan't to do (not technically but in term of use case)?
> >>>
> >>>Nico.
> >>>
> >>>
> >>>
> >>>
> >>>
> >>>
> >>>>Hai Nicolas
> >>>> Great. Mr. Nicolas. Thanx for your help. This is exactly what i
> >>>>want. Thank you very much.
> >>>>I need another help. That' is i want to assiagn the return value into a
> >>>>varibale. how it is possible?
> >>>><%
> >>>>String empName = null;
> >>>>%>
> >>>><bean:write name="data" property="employee_name"> i want to assigan that
> >>>>value to empName.
> >>>>
> >>>>Thanx
> >>>>Kalaiselvan.
> >>>>
> >>>>
> >>>>
> >>>>nicolas.deloof@cgey.com wrote:
> >>>>
> >>>>
> >>>>
> >>>>
> >>>>
> >>>>><logic:iterate id="data" name="sample">
> >>>>>City : <bean write name="data" property="address.city">
> >>>>>State : <bean write name="data" property="address.state">
> >>>>>Country : <bean write name="data" property="address.country">
> >>>>></logic:iterate>
> >>>>>
> >>>>>Nico.
> >>>>>
> >>>>>
> >>>>>
> >>>>>
> >>>>>
> >>>>>
> >>>>>
> >>>>>>Hai Nicolas
> >>>>>> Thanx for your reply. My problem is that bean propery return a Object.
> >>>>>> That's public Object getSampe() {
> >>>>>> }
> >>>>>>ie public address getAddress() {
> >>>>>>}
> >>>>>>
> >>>>>>public class Address {
> >>>>>> private String _city;
> >>>>>> private String _state;
> >>>>>> private String _country;
> >>>>>>
> >>>>>> public String getCity()
> >>>>>> {
> >>>>>> return _city;
> >>>>>> }
> >>>>>> public void setCity(String aCity)
> >>>>>> {
> >>>>>> _city = aCity;
> >>>>>> }
> >>>>>> public String getState()
> >>>>>> {
> >>>>>> return _state;
> >>>>>> }
> >>>>>> public void setState(String aState)
> >>>>>> {
> >>>>>> _state = aState;
> >>>>>> }
> >>>>>> public String getCountry()
> >>>>>> {
> >>>>>> return _country;
> >>>>>> }
> >>>>>> public void setCountry(String aCountry)
> >>>>>> {
> >>>>>> _country = aCountry;
> >>>>>> }
> >>>>>>
> >>>>>>}
> >>>>>>
> >>>>>>I want to write city,state, country.
> >>>>>>
> >>>>>>hope you understand my need
> >>>>>>
> >>>>>>Thanx
> >>>>>>Kalaiselvan.
> >>>>>>
> >>>>>>
> >>>>>>
> >>>>>>nicolas.deloof@cgey.com wrote:
> >>>>>>
> >>>>>>
> >>>>>>
> >>>>>>
> >>>>>>
> >>>>>>
> >>>>>>
> >>>>>>>You can use <logic:iterate> to get the content of your Vector, and then <bean:write> to get properties from
your
> >>>>>>>
> >>>>>>>
> >>>>>>>
> >>>>>>>
> >>>bean
> >>>
> >>>
> >>>
> >>>
> >>>>>>>
> >>>>>>>
> >>>>>:
> >>>>>
> >>>>>
> >>>>>
> >>>>>
> >>>>>
> >>>>>
> >>>>>>><logic:iterate id="data" name="sample">
> >>>>>>><bean write name="data" property="foo">
> >>>>>>></logic:iterate>
> >>>>>>>
> >>>>>>>Nico.
> >>>>>>>
> >>>>>>>
> >>>>>>>
> >>>>>>>
> >>>>>>>
> >>>>>>>
> >>>>>>>
> >>>>>>>
> >>>>>>>
> >>>>>>>>Hi All,
> >>>>>>>> I want a help from you guys. I have created a sampleAction.class
> >>>>>>>>using extend the Action class. This Action class create a Vector and put
> >>>>>>>>it into Session. I have retrieve using <bean:write property="sample"
> >>>>>>>>scope="session">. But here i have some problem, because this getSample()
> >>>>>>>>method return vector. This vector has another bean. Where how can i
> >>>>>>>>retrieve the properties from this bean. Please help.
> >>>>>>>>
> >>>>>>>>thanx
> >>>>>>>>Kalai
> >>>>>>>>
> >>>>>>>>
> >>>>>>>>---------------------------------------------------------------------
> >>>>>>>>To unsubscribe, e-mail: struts-user-unsubscribe@jakarta.apache.org
> >>>>>>>>For additional commands, e-mail: struts-user-help@jakarta.apache.org
> >>>>>>>>
> >>>>>>>>
> >>>>>>>>
> >>>>>>>>
> >>>>>>>>
> >>>>>>>>
> >>>>>>>>
> >>>>>>>>
> >>>>>>>---------------------------------------------------------------------
> >>>>>>>To unsubscribe, e-mail: struts-user-unsubscribe@jakarta.apache.org
> >>>>>>>For additional commands, e-mail: struts-user-help@jakarta.apache.org
> >>>>>>>
> >>>>>>>
> >>>>>>>
> >>>>>>>
> >>>>>>>
> >>>>>>>
> >>>>>>>
> >>>>>>>
> >>>>>>>
> >>>>>>--
> >>>>>>Your favorite stores, helpful shopping tools and great gift ideas.
> >>>>>>Experience the convenience of buying online with Shop@Netscape!
> >>>>>>http://shopnow.netscape.com/
> >>>>>>
> >>>>>>
> >>>>>>
> >>>>>>
> >>>>>>
> >>>>>>
> >>>>>>
> >>>>>>
> >>>>>---------------------------------------------------------------------
> >>>>>To unsubscribe, e-mail: struts-user-unsubscribe@jakarta.apache.org
> >>>>>For additional commands, e-mail: struts-user-help@jakarta.apache.org
> >>>>>
> >>>>>
> >>>>>
> >>>>>
> >>>>>
> >>>>>
> >>>>>
> >>>>--
> >>>>Your favorite stores, helpful shopping tools and great gift ideas.
> >>>>Experience the convenience of buying online with Shop@Netscape!
> >>>>http://shopnow.netscape.com/
> >>>>
> >>>>
> >>>>
> >>>>
> >>>>
> >>>>
> >>>---------------------------------------------------------------------
> >>>To unsubscribe, e-mail: struts-user-unsubscribe@jakarta.apache.org
> >>>For additional commands, e-mail: struts-user-help@jakarta.apache.org
> >>>
> >>>
> >>>
> >>>
> >>>
> >>--
> >>Your favorite stores, helpful shopping tools and great gift ideas.
> >>Experience the convenience of buying online with Shop@Netscape!
> >>http://shopnow.netscape.com/
> >>
> >>
> >>
> >>
> >
> >
> >---------------------------------------------------------------------
> >To unsubscribe, e-mail: struts-user-unsubscribe@jakarta.apache.org
> >For additional commands, e-mail: struts-user-help@jakarta.apache.org
> >
> >
> >
>
> --
> Your favorite stores, helpful shopping tools and great gift ideas.
> Experience the convenience of buying online with Shop@Netscape!
> http://shopnow.netscape.com/
>
>
---------------------------------------------------------------------
To unsubscribe, e-mail: struts-user-unsubscribe@jakarta.apache.org
For additional commands, e-mail: struts-user-help@jakarta.apache.org
Re: Object inside another Object
Posted by Kalaiselvan <ka...@netscape.net>.
yes. I'm using it in <select> tag.
I have a hashtable that contain countrycode, countrydesc
<select name="country">
<%if ( countries != null )
{
Enumeration keys = countries.keys();
while ( keys.hasMoreElements() )
{
String key = (String)keys.nextElement();
String selectedFlag = "";
if( key.equalsIgnoreCase(<bean:write
name="employee" property="country">) )
selectedFlag = "selected";
%>
<option value="<%=key%>" <%=selectedFlag%>
><%=countries.get(key)%></option>
<% }
}
%>
</select>
Thanx
Kalaiselvan.S
nicolas.deloof@cgey.com wrote:
>Do you want your JSP to look different depending getAllowed() value
>or do you want your Action to get some checkbox or hidden value from HTML form ?
>
>Can you tell me what you want to do, not as technical but as application usage. I could so understand what you're
>looking for.
>
>Nico.
>
>
>
>>That is getAllowed() is return boolean. If it return true i will do
>>something. If it returns false, i will do different . So i have to
>>check values in my jsp page. Also i want to concat 2 or more return
>>strings in my jsp. So it is must that i have to capture the values into
>>some jsp varibles.
>>
>>Thanx
>>Kalaiselvan.
>>
>>nicolas.deloof@cgey.com wrote:
>>
>>
>>
>>>If you wan't the user to edit some datas, you should build a form-bean, put your model datas into it (use
>>>common-beanutil copyProperties, or an Adapter class) and use it in your JSP.
>>>When user submits, get the form-bean back with all updated datas inside it.
>>>
>>>What do you wan't to do (not technically but in term of use case)?
>>>
>>>Nico.
>>>
>>>
>>>
>>>
>>>
>>>
>>>>Hai Nicolas
>>>> Great. Mr. Nicolas. Thanx for your help. This is exactly what i
>>>>want. Thank you very much.
>>>>I need another help. That' is i want to assiagn the return value into a
>>>>varibale. how it is possible?
>>>><%
>>>>String empName = null;
>>>>%>
>>>><bean:write name="data" property="employee_name"> i want to assigan that
>>>>value to empName.
>>>>
>>>>Thanx
>>>>Kalaiselvan.
>>>>
>>>>
>>>>
>>>>nicolas.deloof@cgey.com wrote:
>>>>
>>>>
>>>>
>>>>
>>>>
>>>>><logic:iterate id="data" name="sample">
>>>>>City : <bean write name="data" property="address.city">
>>>>>State : <bean write name="data" property="address.state">
>>>>>Country : <bean write name="data" property="address.country">
>>>>></logic:iterate>
>>>>>
>>>>>Nico.
>>>>>
>>>>>
>>>>>
>>>>>
>>>>>
>>>>>
>>>>>
>>>>>>Hai Nicolas
>>>>>> Thanx for your reply. My problem is that bean propery return a Object.
>>>>>> That's public Object getSampe() {
>>>>>> }
>>>>>>ie public address getAddress() {
>>>>>>}
>>>>>>
>>>>>>public class Address {
>>>>>> private String _city;
>>>>>> private String _state;
>>>>>> private String _country;
>>>>>>
>>>>>> public String getCity()
>>>>>> {
>>>>>> return _city;
>>>>>> }
>>>>>> public void setCity(String aCity)
>>>>>> {
>>>>>> _city = aCity;
>>>>>> }
>>>>>> public String getState()
>>>>>> {
>>>>>> return _state;
>>>>>> }
>>>>>> public void setState(String aState)
>>>>>> {
>>>>>> _state = aState;
>>>>>> }
>>>>>> public String getCountry()
>>>>>> {
>>>>>> return _country;
>>>>>> }
>>>>>> public void setCountry(String aCountry)
>>>>>> {
>>>>>> _country = aCountry;
>>>>>> }
>>>>>>
>>>>>>}
>>>>>>
>>>>>>I want to write city,state, country.
>>>>>>
>>>>>>hope you understand my need
>>>>>>
>>>>>>Thanx
>>>>>>Kalaiselvan.
>>>>>>
>>>>>>
>>>>>>
>>>>>>nicolas.deloof@cgey.com wrote:
>>>>>>
>>>>>>
>>>>>>
>>>>>>
>>>>>>
>>>>>>
>>>>>>
>>>>>>>You can use <logic:iterate> to get the content of your Vector, and then <bean:write> to get properties from your
>>>>>>>
>>>>>>>
>>>>>>>
>>>>>>>
>>>bean
>>>
>>>
>>>
>>>
>>>>>>>
>>>>>>>
>>>>>:
>>>>>
>>>>>
>>>>>
>>>>>
>>>>>
>>>>>
>>>>>>><logic:iterate id="data" name="sample">
>>>>>>><bean write name="data" property="foo">
>>>>>>></logic:iterate>
>>>>>>>
>>>>>>>Nico.
>>>>>>>
>>>>>>>
>>>>>>>
>>>>>>>
>>>>>>>
>>>>>>>
>>>>>>>
>>>>>>>
>>>>>>>
>>>>>>>>Hi All,
>>>>>>>> I want a help from you guys. I have created a sampleAction.class
>>>>>>>>using extend the Action class. This Action class create a Vector and put
>>>>>>>>it into Session. I have retrieve using <bean:write property="sample"
>>>>>>>>scope="session">. But here i have some problem, because this getSample()
>>>>>>>>method return vector. This vector has another bean. Where how can i
>>>>>>>>retrieve the properties from this bean. Please help.
>>>>>>>>
>>>>>>>>thanx
>>>>>>>>Kalai
>>>>>>>>
>>>>>>>>
>>>>>>>>---------------------------------------------------------------------
>>>>>>>>To unsubscribe, e-mail: struts-user-unsubscribe@jakarta.apache.org
>>>>>>>>For additional commands, e-mail: struts-user-help@jakarta.apache.org
>>>>>>>>
>>>>>>>>
>>>>>>>>
>>>>>>>>
>>>>>>>>
>>>>>>>>
>>>>>>>>
>>>>>>>>
>>>>>>>---------------------------------------------------------------------
>>>>>>>To unsubscribe, e-mail: struts-user-unsubscribe@jakarta.apache.org
>>>>>>>For additional commands, e-mail: struts-user-help@jakarta.apache.org
>>>>>>>
>>>>>>>
>>>>>>>
>>>>>>>
>>>>>>>
>>>>>>>
>>>>>>>
>>>>>>>
>>>>>>>
>>>>>>--
>>>>>>Your favorite stores, helpful shopping tools and great gift ideas.
>>>>>>Experience the convenience of buying online with Shop@Netscape!
>>>>>>http://shopnow.netscape.com/
>>>>>>
>>>>>>
>>>>>>
>>>>>>
>>>>>>
>>>>>>
>>>>>>
>>>>>>
>>>>>---------------------------------------------------------------------
>>>>>To unsubscribe, e-mail: struts-user-unsubscribe@jakarta.apache.org
>>>>>For additional commands, e-mail: struts-user-help@jakarta.apache.org
>>>>>
>>>>>
>>>>>
>>>>>
>>>>>
>>>>>
>>>>>
>>>>--
>>>>Your favorite stores, helpful shopping tools and great gift ideas.
>>>>Experience the convenience of buying online with Shop@Netscape!
>>>>http://shopnow.netscape.com/
>>>>
>>>>
>>>>
>>>>
>>>>
>>>>
>>>---------------------------------------------------------------------
>>>To unsubscribe, e-mail: struts-user-unsubscribe@jakarta.apache.org
>>>For additional commands, e-mail: struts-user-help@jakarta.apache.org
>>>
>>>
>>>
>>>
>>>
>>--
>>Your favorite stores, helpful shopping tools and great gift ideas.
>>Experience the convenience of buying online with Shop@Netscape!
>>http://shopnow.netscape.com/
>>
>>
>>
>>
>
>
>---------------------------------------------------------------------
>To unsubscribe, e-mail: struts-user-unsubscribe@jakarta.apache.org
>For additional commands, e-mail: struts-user-help@jakarta.apache.org
>
>
>
--
Your favorite stores, helpful shopping tools and great gift ideas.
Experience the convenience of buying online with Shop@Netscape!
http://shopnow.netscape.com/
Re: Object inside another Object
Posted by Nicolas De Loof <ni...@cgey.com>.
Do you want your JSP to look different depending getAllowed() value
or do you want your Action to get some checkbox or hidden value from HTML form ?
Can you tell me what you want to do, not as technical but as application usage. I could so understand what you're
looking for.
Nico.
> That is getAllowed() is return boolean. If it return true i will do
> something. If it returns false, i will do different . So i have to
> check values in my jsp page. Also i want to concat 2 or more return
> strings in my jsp. So it is must that i have to capture the values into
> some jsp varibles.
>
> Thanx
> Kalaiselvan.
>
> nicolas.deloof@cgey.com wrote:
>
> >If you wan't the user to edit some datas, you should build a form-bean, put your model datas into it (use
> >common-beanutil copyProperties, or an Adapter class) and use it in your JSP.
> >When user submits, get the form-bean back with all updated datas inside it.
> >
> >What do you wan't to do (not technically but in term of use case)?
> >
> >Nico.
> >
> >
> >
> >
> >>Hai Nicolas
> >> Great. Mr. Nicolas. Thanx for your help. This is exactly what i
> >>want. Thank you very much.
> >>I need another help. That' is i want to assiagn the return value into a
> >>varibale. how it is possible?
> >><%
> >>String empName = null;
> >>%>
> >><bean:write name="data" property="employee_name"> i want to assigan that
> >>value to empName.
> >>
> >>Thanx
> >>Kalaiselvan.
> >>
> >>
> >>
> >>nicolas.deloof@cgey.com wrote:
> >>
> >>
> >>
> >>><logic:iterate id="data" name="sample">
> >>> City : <bean write name="data" property="address.city">
> >>> State : <bean write name="data" property="address.state">
> >>> Country : <bean write name="data" property="address.country">
> >>></logic:iterate>
> >>>
> >>>Nico.
> >>>
> >>>
> >>>
> >>>
> >>>
> >>>>Hai Nicolas
> >>>> Thanx for your reply. My problem is that bean propery return a Object.
> >>>> That's public Object getSampe() {
> >>>> }
> >>>>ie public address getAddress() {
> >>>>}
> >>>>
> >>>>public class Address {
> >>>> private String _city;
> >>>> private String _state;
> >>>> private String _country;
> >>>>
> >>>> public String getCity()
> >>>> {
> >>>> return _city;
> >>>> }
> >>>> public void setCity(String aCity)
> >>>> {
> >>>> _city = aCity;
> >>>> }
> >>>> public String getState()
> >>>> {
> >>>> return _state;
> >>>> }
> >>>> public void setState(String aState)
> >>>> {
> >>>> _state = aState;
> >>>> }
> >>>> public String getCountry()
> >>>> {
> >>>> return _country;
> >>>> }
> >>>> public void setCountry(String aCountry)
> >>>> {
> >>>> _country = aCountry;
> >>>> }
> >>>>
> >>>>}
> >>>>
> >>>>I want to write city,state, country.
> >>>>
> >>>>hope you understand my need
> >>>>
> >>>>Thanx
> >>>>Kalaiselvan.
> >>>>
> >>>>
> >>>>
> >>>>nicolas.deloof@cgey.com wrote:
> >>>>
> >>>>
> >>>>
> >>>>
> >>>>
> >>>>>You can use <logic:iterate> to get the content of your Vector, and then <bean:write> to get properties from your
> >>>>>
> >>>>>
> >bean
> >
> >
> >>>>>
> >>>>>
> >>>:
> >>>
> >>>
> >>>
> >>>
> >>>>><logic:iterate id="data" name="sample">
> >>>>><bean write name="data" property="foo">
> >>>>></logic:iterate>
> >>>>>
> >>>>>Nico.
> >>>>>
> >>>>>
> >>>>>
> >>>>>
> >>>>>
> >>>>>
> >>>>>
> >>>>>>Hi All,
> >>>>>> I want a help from you guys. I have created a sampleAction.class
> >>>>>>using extend the Action class. This Action class create a Vector and put
> >>>>>>it into Session. I have retrieve using <bean:write property="sample"
> >>>>>>scope="session">. But here i have some problem, because this getSample()
> >>>>>>method return vector. This vector has another bean. Where how can i
> >>>>>>retrieve the properties from this bean. Please help.
> >>>>>>
> >>>>>>thanx
> >>>>>>Kalai
> >>>>>>
> >>>>>>
> >>>>>>---------------------------------------------------------------------
> >>>>>>To unsubscribe, e-mail: struts-user-unsubscribe@jakarta.apache.org
> >>>>>>For additional commands, e-mail: struts-user-help@jakarta.apache.org
> >>>>>>
> >>>>>>
> >>>>>>
> >>>>>>
> >>>>>>
> >>>>>>
> >>>>>---------------------------------------------------------------------
> >>>>>To unsubscribe, e-mail: struts-user-unsubscribe@jakarta.apache.org
> >>>>>For additional commands, e-mail: struts-user-help@jakarta.apache.org
> >>>>>
> >>>>>
> >>>>>
> >>>>>
> >>>>>
> >>>>>
> >>>>>
> >>>>--
> >>>>Your favorite stores, helpful shopping tools and great gift ideas.
> >>>>Experience the convenience of buying online with Shop@Netscape!
> >>>>http://shopnow.netscape.com/
> >>>>
> >>>>
> >>>>
> >>>>
> >>>>
> >>>>
> >>>---------------------------------------------------------------------
> >>>To unsubscribe, e-mail: struts-user-unsubscribe@jakarta.apache.org
> >>>For additional commands, e-mail: struts-user-help@jakarta.apache.org
> >>>
> >>>
> >>>
> >>>
> >>>
> >>--
> >>Your favorite stores, helpful shopping tools and great gift ideas.
> >>Experience the convenience of buying online with Shop@Netscape!
> >>http://shopnow.netscape.com/
> >>
> >>
> >>
> >>
> >
> >
> >---------------------------------------------------------------------
> >To unsubscribe, e-mail: struts-user-unsubscribe@jakarta.apache.org
> >For additional commands, e-mail: struts-user-help@jakarta.apache.org
> >
> >
> >
>
> --
> Your favorite stores, helpful shopping tools and great gift ideas.
> Experience the convenience of buying online with Shop@Netscape!
> http://shopnow.netscape.com/
>
>
---------------------------------------------------------------------
To unsubscribe, e-mail: struts-user-unsubscribe@jakarta.apache.org
For additional commands, e-mail: struts-user-help@jakarta.apache.org
Re: Object inside another Object
Posted by Kalaiselvan <ka...@netscape.net>.
That is getAllowed() is return boolean. If it return true i will do
something. If it returns false, i will do different . So i have to
check values in my jsp page. Also i want to concat 2 or more return
strings in my jsp. So it is must that i have to capture the values into
some jsp varibles.
Thanx
Kalaiselvan.
nicolas.deloof@cgey.com wrote:
>If you wan't the user to edit some datas, you should build a form-bean, put your model datas into it (use
>common-beanutil copyProperties, or an Adapter class) and use it in your JSP.
>When user submits, get the form-bean back with all updated datas inside it.
>
>What do you wan't to do (not technically but in term of use case)?
>
>Nico.
>
>
>
>
>>Hai Nicolas
>> Great. Mr. Nicolas. Thanx for your help. This is exactly what i
>>want. Thank you very much.
>>I need another help. That' is i want to assiagn the return value into a
>>varibale. how it is possible?
>><%
>>String empName = null;
>>%>
>><bean:write name="data" property="employee_name"> i want to assigan that
>>value to empName.
>>
>>Thanx
>>Kalaiselvan.
>>
>>
>>
>>nicolas.deloof@cgey.com wrote:
>>
>>
>>
>>><logic:iterate id="data" name="sample">
>>> City : <bean write name="data" property="address.city">
>>> State : <bean write name="data" property="address.state">
>>> Country : <bean write name="data" property="address.country">
>>></logic:iterate>
>>>
>>>Nico.
>>>
>>>
>>>
>>>
>>>
>>>>Hai Nicolas
>>>> Thanx for your reply. My problem is that bean propery return a Object.
>>>> That's public Object getSampe() {
>>>> }
>>>>ie public address getAddress() {
>>>>}
>>>>
>>>>public class Address {
>>>> private String _city;
>>>> private String _state;
>>>> private String _country;
>>>>
>>>> public String getCity()
>>>> {
>>>> return _city;
>>>> }
>>>> public void setCity(String aCity)
>>>> {
>>>> _city = aCity;
>>>> }
>>>> public String getState()
>>>> {
>>>> return _state;
>>>> }
>>>> public void setState(String aState)
>>>> {
>>>> _state = aState;
>>>> }
>>>> public String getCountry()
>>>> {
>>>> return _country;
>>>> }
>>>> public void setCountry(String aCountry)
>>>> {
>>>> _country = aCountry;
>>>> }
>>>>
>>>>}
>>>>
>>>>I want to write city,state, country.
>>>>
>>>>hope you understand my need
>>>>
>>>>Thanx
>>>>Kalaiselvan.
>>>>
>>>>
>>>>
>>>>nicolas.deloof@cgey.com wrote:
>>>>
>>>>
>>>>
>>>>
>>>>
>>>>>You can use <logic:iterate> to get the content of your Vector, and then <bean:write> to get properties from your
>>>>>
>>>>>
>bean
>
>
>>>>>
>>>>>
>>>:
>>>
>>>
>>>
>>>
>>>>><logic:iterate id="data" name="sample">
>>>>><bean write name="data" property="foo">
>>>>></logic:iterate>
>>>>>
>>>>>Nico.
>>>>>
>>>>>
>>>>>
>>>>>
>>>>>
>>>>>
>>>>>
>>>>>>Hi All,
>>>>>> I want a help from you guys. I have created a sampleAction.class
>>>>>>using extend the Action class. This Action class create a Vector and put
>>>>>>it into Session. I have retrieve using <bean:write property="sample"
>>>>>>scope="session">. But here i have some problem, because this getSample()
>>>>>>method return vector. This vector has another bean. Where how can i
>>>>>>retrieve the properties from this bean. Please help.
>>>>>>
>>>>>>thanx
>>>>>>Kalai
>>>>>>
>>>>>>
>>>>>>---------------------------------------------------------------------
>>>>>>To unsubscribe, e-mail: struts-user-unsubscribe@jakarta.apache.org
>>>>>>For additional commands, e-mail: struts-user-help@jakarta.apache.org
>>>>>>
>>>>>>
>>>>>>
>>>>>>
>>>>>>
>>>>>>
>>>>>---------------------------------------------------------------------
>>>>>To unsubscribe, e-mail: struts-user-unsubscribe@jakarta.apache.org
>>>>>For additional commands, e-mail: struts-user-help@jakarta.apache.org
>>>>>
>>>>>
>>>>>
>>>>>
>>>>>
>>>>>
>>>>>
>>>>--
>>>>Your favorite stores, helpful shopping tools and great gift ideas.
>>>>Experience the convenience of buying online with Shop@Netscape!
>>>>http://shopnow.netscape.com/
>>>>
>>>>
>>>>
>>>>
>>>>
>>>>
>>>---------------------------------------------------------------------
>>>To unsubscribe, e-mail: struts-user-unsubscribe@jakarta.apache.org
>>>For additional commands, e-mail: struts-user-help@jakarta.apache.org
>>>
>>>
>>>
>>>
>>>
>>--
>>Your favorite stores, helpful shopping tools and great gift ideas.
>>Experience the convenience of buying online with Shop@Netscape!
>>http://shopnow.netscape.com/
>>
>>
>>
>>
>
>
>---------------------------------------------------------------------
>To unsubscribe, e-mail: struts-user-unsubscribe@jakarta.apache.org
>For additional commands, e-mail: struts-user-help@jakarta.apache.org
>
>
>
--
Your favorite stores, helpful shopping tools and great gift ideas.
Experience the convenience of buying online with Shop@Netscape!
http://shopnow.netscape.com/
Re: Object inside another Object
Posted by Nicolas De Loof <ni...@cgey.com>.
If you wan't the user to edit some datas, you should build a form-bean, put your model datas into it (use
common-beanutil copyProperties, or an Adapter class) and use it in your JSP.
When user submits, get the form-bean back with all updated datas inside it.
What do you wan't to do (not technically but in term of use case)?
Nico.
> Hai Nicolas
> Great. Mr. Nicolas. Thanx for your help. This is exactly what i
> want. Thank you very much.
> I need another help. That' is i want to assiagn the return value into a
> varibale. how it is possible?
> <%
> String empName = null;
> %>
> <bean:write name="data" property="employee_name"> i want to assigan that
> value to empName.
>
> Thanx
> Kalaiselvan.
>
>
>
> nicolas.deloof@cgey.com wrote:
>
> ><logic:iterate id="data" name="sample">
> > City : <bean write name="data" property="address.city">
> > State : <bean write name="data" property="address.state">
> > Country : <bean write name="data" property="address.country">
> ></logic:iterate>
> >
> >Nico.
> >
> >
> >
> >>Hai Nicolas
> >> Thanx for your reply. My problem is that bean propery return a Object.
> >> That's public Object getSampe() {
> >> }
> >>ie public address getAddress() {
> >>}
> >>
> >>public class Address {
> >> private String _city;
> >> private String _state;
> >> private String _country;
> >>
> >> public String getCity()
> >> {
> >> return _city;
> >> }
> >> public void setCity(String aCity)
> >> {
> >> _city = aCity;
> >> }
> >> public String getState()
> >> {
> >> return _state;
> >> }
> >> public void setState(String aState)
> >> {
> >> _state = aState;
> >> }
> >> public String getCountry()
> >> {
> >> return _country;
> >> }
> >> public void setCountry(String aCountry)
> >> {
> >> _country = aCountry;
> >> }
> >>
> >>}
> >>
> >>I want to write city,state, country.
> >>
> >>hope you understand my need
> >>
> >>Thanx
> >>Kalaiselvan.
> >>
> >>
> >>
> >>nicolas.deloof@cgey.com wrote:
> >>
> >>
> >>
> >>>You can use <logic:iterate> to get the content of your Vector, and then <bean:write> to get properties from your
bean
> >>>
> >>>
> >:
> >
> >
> >>><logic:iterate id="data" name="sample">
> >>> <bean write name="data" property="foo">
> >>></logic:iterate>
> >>>
> >>>Nico.
> >>>
> >>>
> >>>
> >>>
> >>>
> >>>>Hi All,
> >>>> I want a help from you guys. I have created a sampleAction.class
> >>>>using extend the Action class. This Action class create a Vector and put
> >>>>it into Session. I have retrieve using <bean:write property="sample"
> >>>>scope="session">. But here i have some problem, because this getSample()
> >>>>method return vector. This vector has another bean. Where how can i
> >>>>retrieve the properties from this bean. Please help.
> >>>>
> >>>>thanx
> >>>>Kalai
> >>>>
> >>>>
> >>>>---------------------------------------------------------------------
> >>>>To unsubscribe, e-mail: struts-user-unsubscribe@jakarta.apache.org
> >>>>For additional commands, e-mail: struts-user-help@jakarta.apache.org
> >>>>
> >>>>
> >>>>
> >>>>
> >>>---------------------------------------------------------------------
> >>>To unsubscribe, e-mail: struts-user-unsubscribe@jakarta.apache.org
> >>>For additional commands, e-mail: struts-user-help@jakarta.apache.org
> >>>
> >>>
> >>>
> >>>
> >>>
> >>--
> >>Your favorite stores, helpful shopping tools and great gift ideas.
> >>Experience the convenience of buying online with Shop@Netscape!
> >>http://shopnow.netscape.com/
> >>
> >>
> >>
> >>
> >
> >
> >---------------------------------------------------------------------
> >To unsubscribe, e-mail: struts-user-unsubscribe@jakarta.apache.org
> >For additional commands, e-mail: struts-user-help@jakarta.apache.org
> >
> >
> >
>
> --
> Your favorite stores, helpful shopping tools and great gift ideas.
> Experience the convenience of buying online with Shop@Netscape!
> http://shopnow.netscape.com/
>
>
---------------------------------------------------------------------
To unsubscribe, e-mail: struts-user-unsubscribe@jakarta.apache.org
For additional commands, e-mail: struts-user-help@jakarta.apache.org
Re: Object inside another Object
Posted by Kalaiselvan <ka...@netscape.net>.
Hai Nicolas
Great. Mr. Nicolas. Thanx for your help. This is exactly what i
want. Thank you very much.
I need another help. That' is i want to assiagn the return value into a
varibale. how it is possible?
<%
String empName = null;
%>
<bean:write name="data" property="employee_name"> i want to assigan that
value to empName.
Thanx
Kalaiselvan.
nicolas.deloof@cgey.com wrote:
><logic:iterate id="data" name="sample">
> City : <bean write name="data" property="address.city">
> State : <bean write name="data" property="address.state">
> Country : <bean write name="data" property="address.country">
></logic:iterate>
>
>Nico.
>
>
>
>>Hai Nicolas
>> Thanx for your reply. My problem is that bean propery return a Object.
>> That's public Object getSampe() {
>> }
>>ie public address getAddress() {
>>}
>>
>>public class Address {
>> private String _city;
>> private String _state;
>> private String _country;
>>
>> public String getCity()
>> {
>> return _city;
>> }
>> public void setCity(String aCity)
>> {
>> _city = aCity;
>> }
>> public String getState()
>> {
>> return _state;
>> }
>> public void setState(String aState)
>> {
>> _state = aState;
>> }
>> public String getCountry()
>> {
>> return _country;
>> }
>> public void setCountry(String aCountry)
>> {
>> _country = aCountry;
>> }
>>
>>}
>>
>>I want to write city,state, country.
>>
>>hope you understand my need
>>
>>Thanx
>>Kalaiselvan.
>>
>>
>>
>>nicolas.deloof@cgey.com wrote:
>>
>>
>>
>>>You can use <logic:iterate> to get the content of your Vector, and then <bean:write> to get properties from your bean
>>>
>>>
>:
>
>
>>><logic:iterate id="data" name="sample">
>>> <bean write name="data" property="foo">
>>></logic:iterate>
>>>
>>>Nico.
>>>
>>>
>>>
>>>
>>>
>>>>Hi All,
>>>> I want a help from you guys. I have created a sampleAction.class
>>>>using extend the Action class. This Action class create a Vector and put
>>>>it into Session. I have retrieve using <bean:write property="sample"
>>>>scope="session">. But here i have some problem, because this getSample()
>>>>method return vector. This vector has another bean. Where how can i
>>>>retrieve the properties from this bean. Please help.
>>>>
>>>>thanx
>>>>Kalai
>>>>
>>>>
>>>>---------------------------------------------------------------------
>>>>To unsubscribe, e-mail: struts-user-unsubscribe@jakarta.apache.org
>>>>For additional commands, e-mail: struts-user-help@jakarta.apache.org
>>>>
>>>>
>>>>
>>>>
>>>---------------------------------------------------------------------
>>>To unsubscribe, e-mail: struts-user-unsubscribe@jakarta.apache.org
>>>For additional commands, e-mail: struts-user-help@jakarta.apache.org
>>>
>>>
>>>
>>>
>>>
>>--
>>Your favorite stores, helpful shopping tools and great gift ideas.
>>Experience the convenience of buying online with Shop@Netscape!
>>http://shopnow.netscape.com/
>>
>>
>>
>>
>
>
>---------------------------------------------------------------------
>To unsubscribe, e-mail: struts-user-unsubscribe@jakarta.apache.org
>For additional commands, e-mail: struts-user-help@jakarta.apache.org
>
>
>
--
Your favorite stores, helpful shopping tools and great gift ideas.
Experience the convenience of buying online with Shop@Netscape!
http://shopnow.netscape.com/
Re: Object inside another Object
Posted by Nicolas De Loof <ni...@cgey.com>.
<logic:iterate id="data" name="sample">
City : <bean write name="data" property="address.city">
State : <bean write name="data" property="address.state">
Country : <bean write name="data" property="address.country">
</logic:iterate>
Nico.
> Hai Nicolas
> Thanx for your reply. My problem is that bean propery return a Object.
> That's public Object getSampe() {
> }
> ie public address getAddress() {
> }
>
> public class Address {
> private String _city;
> private String _state;
> private String _country;
>
> public String getCity()
> {
> return _city;
> }
> public void setCity(String aCity)
> {
> _city = aCity;
> }
> public String getState()
> {
> return _state;
> }
> public void setState(String aState)
> {
> _state = aState;
> }
> public String getCountry()
> {
> return _country;
> }
> public void setCountry(String aCountry)
> {
> _country = aCountry;
> }
>
> }
>
> I want to write city,state, country.
>
> hope you understand my need
>
> Thanx
> Kalaiselvan.
>
>
>
> nicolas.deloof@cgey.com wrote:
>
> >You can use <logic:iterate> to get the content of your Vector, and then <bean:write> to get properties from your bean
:
> >
> ><logic:iterate id="data" name="sample">
> > <bean write name="data" property="foo">
> ></logic:iterate>
> >
> >Nico.
> >
> >
> >
> >>Hi All,
> >> I want a help from you guys. I have created a sampleAction.class
> >>using extend the Action class. This Action class create a Vector and put
> >>it into Session. I have retrieve using <bean:write property="sample"
> >>scope="session">. But here i have some problem, because this getSample()
> >>method return vector. This vector has another bean. Where how can i
> >>retrieve the properties from this bean. Please help.
> >>
> >>thanx
> >>Kalai
> >>
> >>
> >>---------------------------------------------------------------------
> >>To unsubscribe, e-mail: struts-user-unsubscribe@jakarta.apache.org
> >>For additional commands, e-mail: struts-user-help@jakarta.apache.org
> >>
> >>
> >
> >---------------------------------------------------------------------
> >To unsubscribe, e-mail: struts-user-unsubscribe@jakarta.apache.org
> >For additional commands, e-mail: struts-user-help@jakarta.apache.org
> >
> >
> >
>
> --
> Your favorite stores, helpful shopping tools and great gift ideas.
> Experience the convenience of buying online with Shop@Netscape!
> http://shopnow.netscape.com/
>
>
---------------------------------------------------------------------
To unsubscribe, e-mail: struts-user-unsubscribe@jakarta.apache.org
For additional commands, e-mail: struts-user-help@jakarta.apache.org
Re: Object inside another Object
Posted by Kalaiselvan <ka...@netscape.net>.
Hai Nicolas
Thanx for your reply. My problem is that bean propery return a Object.
That's public Object getSampe() {
}
ie public address getAddress() {
}
public class Address {
private String _city;
private String _state;
private String _country;
public String getCity()
{
return _city;
}
public void setCity(String aCity)
{
_city = aCity;
}
public String getState()
{
return _state;
}
public void setState(String aState)
{
_state = aState;
}
public String getCountry()
{
return _country;
}
public void setCountry(String aCountry)
{
_country = aCountry;
}
}
I want to write city,state, country.
hope you understand my need
Thanx
Kalaiselvan.
nicolas.deloof@cgey.com wrote:
>You can use <logic:iterate> to get the content of your Vector, and then <bean:write> to get properties from your bean :
>
><logic:iterate id="data" name="sample">
> <bean write name="data" property="foo">
></logic:iterate>
>
>Nico.
>
>
>
>>Hi All,
>> I want a help from you guys. I have created a sampleAction.class
>>using extend the Action class. This Action class create a Vector and put
>>it into Session. I have retrieve using <bean:write property="sample"
>>scope="session">. But here i have some problem, because this getSample()
>>method return vector. This vector has another bean. Where how can i
>>retrieve the properties from this bean. Please help.
>>
>>thanx
>>Kalai
>>
>>
>>---------------------------------------------------------------------
>>To unsubscribe, e-mail: struts-user-unsubscribe@jakarta.apache.org
>>For additional commands, e-mail: struts-user-help@jakarta.apache.org
>>
>>
>
>---------------------------------------------------------------------
>To unsubscribe, e-mail: struts-user-unsubscribe@jakarta.apache.org
>For additional commands, e-mail: struts-user-help@jakarta.apache.org
>
>
>
--
Your favorite stores, helpful shopping tools and great gift ideas.
Experience the convenience of buying online with Shop@Netscape!
http://shopnow.netscape.com/
Re: Object inside another Object
Posted by Nicolas De Loof <ni...@cgey.com>.
You can use <logic:iterate> to get the content of your Vector, and then <bean:write> to get properties from your bean :
<logic:iterate id="data" name="sample">
<bean write name="data" property="foo">
</logic:iterate>
Nico.
> Hi All,
> I want a help from you guys. I have created a sampleAction.class
> using extend the Action class. This Action class create a Vector and put
> it into Session. I have retrieve using <bean:write property="sample"
> scope="session">. But here i have some problem, because this getSample()
> method return vector. This vector has another bean. Where how can i
> retrieve the properties from this bean. Please help.
>
> thanx
> Kalai
>
>
> ---------------------------------------------------------------------
> To unsubscribe, e-mail: struts-user-unsubscribe@jakarta.apache.org
> For additional commands, e-mail: struts-user-help@jakarta.apache.org
---------------------------------------------------------------------
To unsubscribe, e-mail: struts-user-unsubscribe@jakarta.apache.org
For additional commands, e-mail: struts-user-help@jakarta.apache.org
Object inside another Object
Posted by Kalaiselvan <ka...@netscape.net>.
Hi All,
I want a help from you guys. I have created a sampleAction.class
using extend the Action class. This Action class create a Vector and put
it into Session. I have retrieve using <bean:write property="sample"
scope="session">. But here i have some problem, because this getSample()
method return vector. This vector has another bean. Where how can i
retrieve the properties from this bean. Please help.
thanx
Kalai
---------------------------------------------------------------------
To unsubscribe, e-mail: struts-user-unsubscribe@jakarta.apache.org
For additional commands, e-mail: struts-user-help@jakarta.apache.org
RE: [Design] User Customisable Views
Posted by Andrew Hill <an...@gridnode.com>.
IMHO you would probably want to create bean(s) that contain the relevant
preferences. Ie:
getFavouriteMouseOverColour()
getPreferredAlignment()
isShowColumnX()
In your business tier of course these get persisted to / retrieved from the
database (a few hundred rows isnt going to hurt much (I think)).
If these prefs dont get changed on the fly by other users (ie: only that
user changes them usually) then the best place to retrieve is when the user
does a login and you can cache the bean(s) for that user in their session.
In your JSP (or velocity template or whatever you use for rendering) you can
access the getters to provide you the appropriate values you need, and of
course make use of such things as the equals / notEquals tags etc... (this
isnt 'logic' its just hiding/showing stuff depending on whats set in your
prefs...)
If attributes of the prefs beans need to be passed as attributes to jsp tags
Id suggest you look into making the jump to JSTL (or struts EL) if you
havent done so as the expression language will save you a lot of hassle
writing the JSP code...
Havent had to do user prefs yet in my app so cant tell you from experience
how well this will work, but I cant think of a simpler way! (Though I
suppose for a lot of the simpler prefs, such as colours, you could handle
it by generating on the fly (and caching) a css style sheet customised for
that particular user.)
-----Original Message-----
From: Pat Quinn [mailto:pat_quinn2009@hotmail.com]
Sent: Monday, 24 March 2003 17:21
To: struts-user@jakarta.apache.org
Subject: [Design] User Customisable Views
Hi Guys,
I have a requirement as follows:
I want each user within my web app to be able to customise their views for
individual screens independently, I want users to be able to customise
attributes such as:
· Turn on/off certain columns when displaying tabular data.
· Customise Header colour, data row colours, onMouseOver colours
· Text Alignment with cells, Font etc
Im thinking I need to persist the above attributes for each user i.e. using
some Tables in my database. My application will have a large number of users
i.e. (600+ but only 200 concurrent users) so Im little concerned at this
approach.
Has anyone out there tried something similar to this before with Struts and
if so should you provide me a few pointers i.e.
How did you persist user view details how did you plug it in with Struts .
I want to avoid adding logic to my view layer to control the displaying of
the above attributes.
Any Ideas gurus by the way Im not looking for a solution just a few
pointers.
Cheers
Pat
_________________________________________________________________
Add photos to your e-mail with MSN 8. Get 2 months FREE*.
http://join.msn.com/?page=features/featuredemail
---------------------------------------------------------------------
To unsubscribe, e-mail: struts-user-unsubscribe@jakarta.apache.org
For additional commands, e-mail: struts-user-help@jakarta.apache.org
---------------------------------------------------------------------
To unsubscribe, e-mail: struts-user-unsubscribe@jakarta.apache.org
For additional commands, e-mail: struts-user-help@jakarta.apache.org