实现设计模式所需的帮助 [英] help needed in implementing design pattern

查看:65
本文介绍了实现设计模式所需的帮助的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

嗨朋友们,

我正在尝试实现工厂设计模式。我很困惑如何把它放在这里。让我试试。我有一些html选项包含像示例--->

[HTML]< html:select property =" branch" size =" 1">

< html:option value =" California">< / html:option>

< html:option value ="纽约"< / html:选项>

等......

[/ HTML]

这里的选项值是lage。所以我被告知实施工厂模式。我一直在谷歌搜索如何做到这一点,但没有找到帮助。我不知道如何开始这个现在我完全失去了。谁能帮助我如何实现关于html选项值的工厂模式?你的任何意见都会有所帮助和赞赏....等待你的回复。

问候,

ajos

解决方案


朋友们,

我正在尝试实施一个工厂设计模式。我很困惑如何把它放在这里。让我试试。我有一些html选项包含值如示例--->

[HTML]< H T ml:select property =" branch" size =" 1">

< html:option value =" California">< / html:option>

< html:option value ="纽约"< / html:选项>

等......

[/ HTML]

这里的选项值是lage。所以我被告知实施工厂模式。我一直在谷歌搜索如何做到这一点,但没有找到帮助。我不知道如何开始这个现在我完全失去了。谁能帮助我如何实现关于html选项值的工厂模式?你的任何意见都会有所帮助和赞赏....等待你的回复。

问候,

ajos



你的意思是什么?这里的选项值很大?



你是什么意思这里的选项值很大?



i意味着我的html选项中有很多html选项,比如说...

[HTML]

< html:option value =" California">< / html:option>

< html:option value =" New york">< / html:选项>

i有20个,而jsp中的代码看起来太大了。

[/ HTML]

这样的每个页面我有3个html选项tag.so我想实现工厂模式。

问候,

ajos


是吗可以从ArrayList填充选项。

i做了类似的事情--->

展开 | 选择 | Wrap | 行号< /跨度>

Hi friends,
I am trying to implement a factory design pattern.I''m quite confused on how to put it down here.Let me try.I have certain html option containing values like example--->
[HTML]<html:select property="branch" size="1">
<html:option value="California"></html:option>
<html:option value="New York"></html:option>
and so on....
[/HTML]
the option value here is lage.so ive been told to implement the factory pattern.I''ve been searching on google on how to do this,but found no help.I dont know how to start with this n im lost now completely.Can anyone please help me on how to implement the factory pattern with respect to html option values?Any input from you will be helpful and appreciated....Awaiting your response.
regards,
ajos

解决方案

Hi friends,
I am trying to implement a factory design pattern.I''m quite confused on how to put it down here.Let me try.I have certain html option containing values like example--->
[HTML]<html:select property="branch" size="1">
<html:option value="California"></html:option>
<html:option value="New York"></html:option>
and so on....
[/HTML]
the option value here is lage.so ive been told to implement the factory pattern.I''ve been searching on google on how to do this,but found no help.I dont know how to start with this n im lost now completely.Can anyone please help me on how to implement the factory pattern with respect to html option values?Any input from you will be helpful and appreciated....Awaiting your response.
regards,
ajos

What do you mean by "the option value here is large"?


What do you mean by "the option value here is large"?

i meant that i have lots of html option in my html select like for say...
[HTML]
<html:option value="California"></html:option>
<html:option value="New york"></html:option>
i have some 20 of them and the code in jsp looks too big because of this.
[/HTML]
this way in each page i have 3 html option tag.so i want to implement the factory pattern.
regards,
ajos


Is it possible to populate the option from a ArrayList.
i have done something like this--->

Expand|Select|Wrap|Line Numbers


这篇关于实现设计模式所需的帮助的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

查看全文
登录 关闭
扫码关注1秒登录
发送“验证码”获取 | 15天全站免登陆