锘??xml version="1.0" encoding="utf-8" standalone="yes"?>韩日精品一区,在线视频2区,91看片在线观看http://www.aygfsteel.com/onlykeke/category/14117.html綰㈠皹鏈鍙瑧錛屾垜鑷箰閫嶉仴zh-cnTue, 27 Feb 2007 08:50:41 GMTTue, 27 Feb 2007 08:50:41 GMT60Wicket Notes [闅忔椂鏇存柊]http://www.aygfsteel.com/onlykeke/archive/2006/12/14/87751.html濂囪憶鏍?/dc:creator>濂囪憶鏍?/author>Thu, 14 Dec 2006 09:04:00 GMThttp://www.aygfsteel.com/onlykeke/archive/2006/12/14/87751.htmlhttp://www.aygfsteel.com/onlykeke/comments/87751.htmlhttp://www.aygfsteel.com/onlykeke/archive/2006/12/14/87751.html#Feedback0http://www.aygfsteel.com/onlykeke/comments/commentRss/87751.htmlhttp://www.aygfsteel.com/onlykeke/services/trackbacks/87751.html
2.Form涓殑緇勪歡錛岀撼鍏ompoundPropertyModel錛屼技涔庢柟鍙緱鍒皉awinput銆傛湁寰呯‘璁ゃ?br />
3.Form濡傛灉涓嶄嬌鐢–ompoundPropertyModel錛屾敞鎰忕粰鎺т歡璁劇疆model銆?br />
4.dropdownchoice,鏈夋嫨鎯呭喌涓嬫彁浜わ紝鍗抽変腑浜嗏滆閫夋嫨鈥濄傛湇鍔″櫒绔緱鍒幫細
聽聽聽getValue():-1
聽聽聽getInput():
聽聽聽getModelObjectAsString():

5.涓涓猰odel紺轟緥錛?br />int cols=5;
int rows=5;

final String[][] values=new String[rows][cols];

form.add(new Loop("rows", rows) {
聽聽 populateitem(Item item) {
聽聽聽聽 final int row=item.getindex();
聽聽聽聽 item.add(new Loop("cols", cols) {
聽聽聽聽聽聽聽聽聽 populateitem(Item item) {
聽聽聽聽聽聽聽聽聽聽聽聽聽聽 final int col=item.getindex();
聽聽聽聽聽聽聽聽聽聽聽聽聽聽 IModel model=new Model() {
聽聽聽聽聽聽聽聽聽聽聽聽聽聽聽聽聽聽聽 setobject(Component c, Object o) {
聽聽聽聽聽聽聽聽聽聽聽聽聽聽聽聽聽聽聽聽聽聽聽聽聽聽 values[row][col]=o;
聽聽聽聽聽聽聽聽聽聽聽聽聽聽聽聽聽聽聽 }

聽聽聽聽聽聽聽聽聽聽聽聽聽聽聽聽聽聽聽 Object getObject(Component c) {
聽聽聽聽聽聽聽聽聽聽聽聽聽聽聽聽聽聽聽聽聽聽聽聽聽聽聽聽聽 return values[row][col];
聽聽聽聽聽聽聽聽聽聽聽聽聽聽聽聽聽聽聽 }};
聽聽聽聽聽聽聽聽聽聽聽聽聽聽聽聽聽聽聽 item.add(new TextField("cell", model));

聽聽 });

<table>
<tr wicket:id="rows"><td wicket:id="cols"><input type="text" wicket:id="cell"/></td></tr>
</table>


]]>
setDefaultFormProcessing(false) & type="submit"http://www.aygfsteel.com/onlykeke/archive/2006/09/11/68997.html濂囪憶鏍?/dc:creator>濂囪憶鏍?/author>Mon, 11 Sep 2006 09:40:00 GMThttp://www.aygfsteel.com/onlykeke/archive/2006/09/11/68997.htmlhttp://www.aygfsteel.com/onlykeke/comments/68997.htmlhttp://www.aygfsteel.com/onlykeke/archive/2006/09/11/68997.html#Feedback0http://www.aygfsteel.com/onlykeke/comments/commentRss/68997.htmlhttp://www.aygfsteel.com/onlykeke/services/trackbacks/68997.htmlTextField productTag = null;
褰撲嬌鐢細
form.add(new Button("verifyTag"){
聽聽聽public void onSubmit() {
聽聽聽System.out.println("verifyTag錛歱roductTag.getRawInput:"+productTag.getRawInput());
聽聽聽......
聽聽聽聽if(true)
聽聽聽聽聽info("璇ヤ駭鍝佹爣璇嗗彲浠ヤ嬌鐢?);
聽聽聽}
聽聽}.setDefaultFormProcessing(false));

榪欐牱鐨勫崟涓form澶氭寜閽椂錛岄渶瑕佹敞鎰忕殑鏄痟tml妯℃澘涓殑input type 搴旇璁劇疆涓簊ubmit,鍚﹀垯澶辨晥錛?br />
<input wicket:id="verifyTag" type="submit" value="媯嫻嬪敮涓鎬? size="30"/>

鍙﹀錛屾兂寰楀埌杈撳叆鍊鹼紝鍙互浣跨敤getRawInput()鏂規硶鑾峰緱錛屼絾鏄湪form鐨刼nSubmit()涓鏂規硶浼間箮寰椾笉鍒板鹼紝鏈夊緟榪涗竴姝ュ疄楠屻?/p>

]]>
getParent().getModelObject(); http://www.aygfsteel.com/onlykeke/archive/2006/09/11/68969.html濂囪憶鏍?/dc:creator>濂囪憶鏍?/author>Mon, 11 Sep 2006 07:24:00 GMThttp://www.aygfsteel.com/onlykeke/archive/2006/09/11/68969.htmlhttp://www.aygfsteel.com/onlykeke/comments/68969.htmlhttp://www.aygfsteel.com/onlykeke/archive/2006/09/11/68969.html#Feedback0http://www.aygfsteel.com/onlykeke/comments/commentRss/68969.htmlhttp://www.aygfsteel.com/onlykeke/services/trackbacks/68969.html
聽聽聽 聽聽聽 聽聽聽 add(new Button("saveButton")

聽聽聽 聽聽聽 聽聽聽 {
聽聽聽 聽聽聽 聽聽聽 聽聽聽 public void onSubmit()
聽聽聽 聽聽聽 聽聽聽 聽聽聽 {
聽聽聽 聽聽聽 聽聽聽 聽聽聽 聽聽聽 //save form values, redirect
@@ 聽聽 聽聽聽 聽聽聽 聽聽聽 聽聽聽 Product product = (Product)getModelObject();
聽聽聽 聽聽聽 聽聽聽 聽聽聽 聽聽聽 ProductProxy.addProduct(product);
聽聽聽 聽聽聽 聽聽聽 聽聽聽 聽聽聽 setResponsePage(new EditProduct());
聽聽聽 聽聽聽 聽聽聽 聽聽聽 }
聽聽聽 聽聽聽 聽聽聽 });

The line marked @@ is wrong. You ask from the submit button the modelobject. Because the button doesn't have a model (model == null), and the form has a compound model, it will use the component id "saveButton" as an OGNL expression with the form modelobject as base.

This happened because you create an anonymous subclass on the Button. The event handler 'onSubmit' has a this pointer to the button.

This can be solved by changing the line to the following:
Product product = (Product)getParent().getModelObject();

Martijn


On 3/20/06, Vincent Jenks <scientifik.com@...> wrote:
OK, believe it or not, I did just that and *still* cannot get it to work.

Here's my Form class:

聽聽聽 private static class EditProductForm extends Form
聽聽聽 {
聽聽聽 聽聽聽 public EditProductForm(String name, Product product)
聽聽聽 聽聽聽 {
聽聽聽 聽聽聽 聽聽聽 super(name, new CompoundPropertyModel(product));
聽聽聽 聽聽聽 聽聽聽
聽聽聽 聽聽聽 聽聽聽 //get collection of Category items
聽聽聽 聽聽聽 聽聽聽 IModel catsModel = new LoadableDetachableModel()
聽聽聽 聽聽聽 聽聽聽 {
聽聽聽 聽聽聽 聽聽聽 聽聽聽 protected Object load()
聽聽聽 聽聽聽 聽聽聽 聽聽聽 {
聽聽聽 聽聽聽 聽聽聽 聽聽聽 聽聽聽 return ProductProxy.getAllCategories(); //via proxy
聽聽聽 聽聽聽 聽聽聽 聽聽聽 }
聽聽聽 聽聽聽 聽聽聽 };
聽聽聽 聽聽聽 聽聽聽
聽 聽 聽聽聽 聽聽聽 //add form components
聽聽聽 聽聽聽 聽聽聽 add(new TextField("productCode").add(RequiredValidator.getInstance()));
聽聽聽 聽聽聽 聽聽聽 add(new TextField("name").add(RequiredValidator.getInstance()));
聽聽聽 聽聽聽 聽聽聽 add(new TextArea("summary").add( RequiredValidator.getInstance()));
聽聽聽 聽聽聽 聽聽聽 add(new TextArea("description").add(RequiredValidator.getInstance()));
聽聽聽 聽聽聽 聽聽聽 add(new TextField("unitPrice"));
聽聽聽 聽聽聽 聽聽聽 add(new TextField("weight"));
聽聽聽 聽聽聽 聽聽聽 add(new TextField("height"));
聽聽聽 聽聽聽 聽聽聽 add(new TextField("width"));
聽聽聽 聽聽聽 聽聽聽 add(new TextField("length"));
聽聽聽 聽聽聽 聽聽聽 add(new TextField("insuredValue"));
聽聽聽 聽聽聽 聽聽聽 add(new CheckBox("freeShipping"));
聽聽聽 聽聽聽 聽聽聽 add(new TextField("thumbnail").add(RequiredValidator.getInstance()));
聽聽聽 聽聽聽 聽聽聽 add(new TextField("photo").add(RequiredValidator.getInstance ()));
聽聽聽 聽聽聽 聽聽聽
聽聽聽 聽聽聽 聽聽聽 //add reset button
聽聽聽 聽聽聽 聽聽聽 add(new Button("cancelButton")
聽聽聽 聽聽聽 聽聽聽 {
聽聽聽 聽聽聽 聽聽聽 聽聽聽 public void onSubmit()
聽聽聽 聽聽聽 聽聽聽 聽聽聽 {
聽聽聽 聽聽聽 聽聽聽 聽聽聽 聽聽聽
聽聽聽 聽聽聽 聽聽聽 聽聽聽 聽聽聽 setResponsePage(new EditProduct());
聽聽聽 聽聽聽 聽聽聽 聽聽聽 }
聽聽聽 聽聽聽 聽聽聽 }.setDefaultFormProcessing(false));
聽聽聽 聽聽聽 聽聽聽
聽聽聽 聽聽聽 聽聽聽 //add reset button
聽聽聽 聽聽聽 聽聽聽 add(new Button("saveButton")
聽聽聽聽聽聽聽聽聽聽聽 {
聽聽聽 聽聽聽 聽聽聽 聽聽聽 public void onSubmit()
聽聽聽 聽聽聽 聽聽聽 聽聽聽 {
聽聽聽 聽聽聽 聽聽聽 聽聽聽 聽聽聽 //save form values, redirect
聽聽聽 聽聽聽 聽聽聽 聽聽聽 聽聽聽 Product product = (Product)getModelObject();
聽聽聽 聽聽聽 聽聽聽 聽聽聽 聽聽聽 ProductProxy.addProduct(product);
聽聽聽 聽聽聽 聽聽聽 聽聽聽 聽聽聽 setResponsePage(new EditProduct());
聽聽聽 聽聽聽 聽聽聽 聽聽聽 }
聽聽聽 聽聽聽 聽聽聽 });
聽聽聽 聽聽聽 }
聽聽聽 }

The cancel button works now but the save button is now throwing an exception:

wicket.WicketRuntimeException : Method public abstract void wicket.markup.html.form.IFormSubmitListener.onFormSubmitted () of interface java.lang.reflect.Method threw an exception ...
...
Caused by: java.lang.reflect.InvocationTargetException ...
...
Caused by: wicket.WicketRuntimeException: OGNL Exception: expression='saveButton'; path='4:editProductForm:saveButton'
...
Caused by: ognl.NoSuchPropertyException: com.myapp.model.Product.saveButton
...

Here's the form HTML just in case I'm goofing something there:

<form wicket:id="editProductForm" id="editProductForm">
...
聽聽聽 聽聽聽 聽聽聽 聽聽聽 聽聽聽 聽聽聽 聽聽聽 聽聽聽 聽聽聽 <tr>
聽聽聽 聽聽聽 聽聽聽 聽聽聽 聽聽聽 聽聽聽 聽聽聽 聽聽聽 聽聽聽 聽聽聽 <td colspan="2">
聽聽聽 聽聽聽 聽聽聽 聽聽聽 聽聽聽 聽聽聽 聽聽聽 聽聽聽 聽聽聽 聽聽聽 聽聽聽 <input type="submit" wicket:id="saveButton" value="Save" />
聽聽聽 聽聽聽 聽聽聽 聽聽聽 聽聽聽 聽聽聽 聽聽聽 聽聽聽 聽聽聽 聽聽聽 聽聽聽 &nbsp;
聽聽聽 聽聽聽 聽聽聽 聽聽聽 聽聽聽 聽聽聽 聽聽聽 聽聽聽 聽聽聽 聽聽聽 聽聽聽 <input type="submit" wicket:id="cancelButton" value="Cancel" />
聽聽聽 聽聽聽 聽聽聽 聽聽聽 聽聽聽 聽聽聽 聽聽聽 聽聽聽 聽聽聽 聽聽聽 聽聽聽 <br />
聽聽聽 聽聽聽 聽聽聽 聽聽聽 聽聽聽 聽聽聽 聽聽聽 聽聽聽 聽聽聽 聽聽聽 聽聽聽 <br />
聽聽聽 聽聽聽 聽聽聽 聽聽聽 聽聽聽 聽聽聽 聽聽聽 聽聽聽 聽聽聽 聽聽聽 </td>
聽聽聽 聽聽聽 聽聽聽 聽聽聽 聽聽聽 聽聽聽 聽聽聽 聽聽聽 聽聽聽 </tr>
聽聽聽 聽聽聽 聽聽聽 聽聽聽 聽聽聽 聽聽聽 聽聽聽 聽聽聽 聽聽聽 </form>

What's wrong w/ this?

Thanks!


]]>
鑷畾涔夊甫鏈夋牎楠屽姛鑳界殑榪囨護瀛楁http://www.aygfsteel.com/onlykeke/archive/2006/09/08/68598.html濂囪憶鏍?/dc:creator>濂囪憶鏍?/author>Fri, 08 Sep 2006 12:41:00 GMThttp://www.aygfsteel.com/onlykeke/archive/2006/09/08/68598.htmlhttp://www.aygfsteel.com/onlykeke/comments/68598.htmlhttp://www.aygfsteel.com/onlykeke/archive/2006/09/08/68598.html#Feedback0http://www.aygfsteel.com/onlykeke/comments/commentRss/68598.htmlhttp://www.aygfsteel.com/onlykeke/services/trackbacks/68598.htmlpublic class TextFilteredPropertyColumnIntConvert extends TextFilteredPropertyColumn{
聽聽public TextFilteredPropertyColumnIntConvert(IModel displayModel, String propertyExpression) {
聽聽聽super(displayModel, propertyExpression);
聽聽}
聽聽public Component getFilter(String componentId, FilterForm form) {
聽聽聽return new TextFilterIntConvert(componentId,getFilterModel(form),form);
聽聽}聽聽
聽}聽
聽public class TextFilterIntConvert extends AbstractFilter{
聽聽private static final long serialVersionUID = 1L;
聽聽private final TextField filter;
聽聽public TextFilterIntConvert(String id, IModel model, FilterForm form){
聽聽聽super(id, form);
聽聽聽filter = new TextField("filter", model){
聽聽聽聽public IConverter getConverter() {
聽聽聽聽聽return new SimpleConverterAdapter(){
聽聽聽聽聽聽public String toString(Object value){
聽聽聽聽聽聽聽聽聽return value != null ? value.toString() : null;
聽聽聽聽聽聽}
聽聽聽聽聽聽public Object toObject(String value) {
聽聽聽聽聽聽聽Long l = new Long(0);
聽聽聽聽聽聽聽try{
聽聽聽聽聽聽聽聽l = Long.valueOf(value);
聽聽聽聽聽聽聽}catch(Exception e){
聽聽聽聽聽聽聽聽e.printStackTrace();
聽聽聽聽聽聽聽}
聽聽聽聽聽聽聽return l;
聽聽聽聽聽聽}
聽聽聽聽聽};
聽聽聽聽}
聽聽聽};
聽聽聽filter.setConvertEmptyInputStringToNull(false);//TextField榛樿璁句負true錛屽鏋滄病鏈夎緭鍏ワ紝杞負null銆傛澶勮涓虹┖瀛楃涓?"
聽聽聽enableFocusTracking(filter);
聽聽聽add(filter);
聽聽}
聽聽public final TextField getFilter(){
聽聽聽return filter;
聽聽}聽聽
聽}

]]>
wicket Q&Ahttp://www.aygfsteel.com/onlykeke/archive/2006/09/07/68172.html濂囪憶鏍?/dc:creator>濂囪憶鏍?/author>Thu, 07 Sep 2006 01:09:00 GMThttp://www.aygfsteel.com/onlykeke/archive/2006/09/07/68172.htmlhttp://www.aygfsteel.com/onlykeke/comments/68172.htmlhttp://www.aygfsteel.com/onlykeke/archive/2006/09/07/68172.html#Feedback0http://www.aygfsteel.com/onlykeke/comments/commentRss/68172.htmlhttp://www.aygfsteel.com/onlykeke/services/trackbacks/68172.html> I have a requirement that I need to cofigure the language encoding based on
> the Request Header "accept-charset". If this is not available than we have
> our default charset.

It is already implemented The default is UTF-8 and can be configured
via getRequestCycleSettings().setResponseRequestEncoding(String)

2
> Why there's no setConverter(IConverter c) just like add(IValidator v) returning the object itself?

to elaborate a little
lets say we did let you use a setter
then we have to keep a reference to the converter in the Component, so when serialized it is one more object - that almost never changes - that has to be serialized. making components session footprint even bigger.
also if we let you use a setter we have to version the changes - so thats yet another object we have to add to session (the undo object)
by making getconverter() overridible we eliminate the two scenarios above.
-Igor

3
>I'm getting unpredictable exceptions about expired pages, so I'm requesting some information about them.聽 I'm using the >latest snapshot of 1.2 (core and extensions).
>What causes pages to be expired?
>How can I prevent pages from throwing expiration exceptions?
>If a page is expired, how can I present a custom page to the user?

when a url is accessed for a page that cannot be found in the pagemap it is considered an expired page.

so basically you create a page, some time passes and that page is removed from the pagemap via the page eviction strategy. so if you go back to that page and click a link, that url will try to retrieve the page from the pagemap, and since the page cannot be found you get the page expired page.
you can set your own via Application.getApplicationSettings().setPageExpiredErrorPage()




]]>
filtertable form http://www.aygfsteel.com/onlykeke/archive/2006/09/04/67654.html濂囪憶鏍?/dc:creator>濂囪憶鏍?/author>Mon, 04 Sep 2006 10:57:00 GMThttp://www.aygfsteel.com/onlykeke/archive/2006/09/04/67654.htmlhttp://www.aygfsteel.com/onlykeke/comments/67654.htmlhttp://www.aygfsteel.com/onlykeke/archive/2006/09/04/67654.html#Feedback0http://www.aygfsteel.com/onlykeke/comments/commentRss/67654.htmlhttp://www.aygfsteel.com/onlykeke/services/trackbacks/67654.html鍦ㄧ敤wicket瀹炵幇榪囨護琛ㄦ牸涓姞鍏ヨ〃鍗?榪欐牱鐨勫姛鑳芥椂錛岃揪涓嶅埌棰勬湡鏁堟灉銆傞潪甯擱珮鍏碔gor緇欏嚭浜嗚鏄庡拰寤鴻錛?br />
filter toolbar was not meant to be embedded in another form because it uses a form of its own, so for right now i would say that usecase is not supported. please add an rfe for it.

if you want one right now then you have to create your own variant that doesnt use an embedded form. it would be pretty much a copy and paste job of the current toolbar but w/out the form.

-Igor

鍐嶄竴嬈℃劅璋gor錛屾瘡嬈¢兘鏄繖浣嶈佸ぇ甯垜瑙e喅鐩稿叧闂銆?br />http://www.nabble.com/filtertable-and-checkgroup-cannot-work-together-tf2195268.html



]]>
璁劇疆Wicket璧勬簮璺緞http://www.aygfsteel.com/onlykeke/archive/2006/08/15/63683.html濂囪憶鏍?/dc:creator>濂囪憶鏍?/author>Tue, 15 Aug 2006 07:08:00 GMThttp://www.aygfsteel.com/onlykeke/archive/2006/08/15/63683.htmlhttp://www.aygfsteel.com/onlykeke/comments/63683.htmlhttp://www.aygfsteel.com/onlykeke/archive/2006/08/15/63683.html#Feedback0http://www.aygfsteel.com/onlykeke/comments/commentRss/63683.htmlhttp://www.aygfsteel.com/onlykeke/services/trackbacks/63683.html
浣跨敤Eclipse鐨勭紪璇戣緭鍑虹殑include鍜宔xclude
涓嶅皢HTML鏂囦歡緙栬瘧鍒癱lasses涓嬮潰鍘?

鐒跺悗鍐欎竴涓嚜宸辯殑Application綾?緇ф壙WebApplication

public AuthenticateApplication()
{
String t_ClassFolder = AuthenticateApplication.class.getResource("http://").getPath();
Folder t_BaseFolder = new Folder(t_ClassFolder);
Folder t_Folder = new Folder(t_BaseFolder.getParent() + "\\src\\java\\");
Path t_Path = new Path(t_Folder);

// this.getSettings().setResourceFinder(t_Path);
this.getSettings().setSourcePath(t_Path);

this.getSettings().setResourcePollFrequency(Duration.ONE_MINUTE);
// 灝哱WEB-INF\src\java鐩綍涔熶綔涓烘煡鎵綡tml鏂囦歡鐨勮礬寰?
// 騫舵瘡闅旀瘡縐掓鏌ヤ竴嬈℃枃浠舵槸鍚﹁淇敼
// 濡傛灉淇敼浜嗗氨閲嶆柊杞藉叆

}



]]>
主站蜘蛛池模板: 福清市| 邵武市| 辽阳县| 蒙山县| 卢氏县| 贵港市| 汉寿县| 和顺县| 桐城市| 射洪县| 略阳县| 贺兰县| 伊春市| 响水县| 洮南市| 左权县| 杨浦区| 勃利县| 右玉县| 通榆县| 延寿县| 邢台市| 兰坪| 仁寿县| 平果县| 凌海市| 易门县| 五原县| 江北区| 宁安市| 宕昌县| 隆昌县| 柯坪县| 永州市| 靖州| 额尔古纳市| 泸西县| 定襄县| 通榆县| 扎赉特旗| 齐河县|