001 /*
002 * Apache License
003 * Version 2.0, January 2004
004 * http://www.apache.org/licenses/
005 *
006 * Copyright 2008 by chenillekit.org
007 *
008 * Licensed under the Apache License, Version 2.0 (the "License");
009 * you may not use this file except in compliance with the License.
010 * You may obtain a copy of the License at
011 *
012 * http://www.apache.org/licenses/LICENSE-2.0
013 */
014
015 package org.chenillekit.tapestry.core.mixins;
016
017 import org.apache.tapestry5.annotations.Parameter;
018
019 import org.chenillekit.tapestry.core.base.AbstractEventMixin;
020
021 /**
022 * OnChange mixin catch the browser event "onChange" from a select component
023 * and redirect it to your application via tapestry event "change".
024 *
025 * @version $Id: OnEvent.java 594 2009-12-05 15:17:26Z mlusetti $
026 */
027 public class OnEvent extends AbstractEventMixin
028 {
029 @Parameter(required = true, defaultPrefix = "literal")
030 private String event;
031
032 /**
033 * set the event name.
034 *
035 * @return the event name
036 */
037 public String getEventName()
038 {
039 return event;
040 }
041 }