text
stringlengths 101
200k
| repo_name
stringlengths 5
73
| stars
stringlengths 3
6
| repo_language
stringlengths 1
24
| file_name
stringlengths 2
57
| mime_type
stringclasses 22
values | hash
int64 -9,223,369,786,400,666,000
9,223,339,290B
|
---|---|---|---|---|---|---|
/*
* Copyright 2014 astamuse company,Ltd.
*
* Licensed under the Apache License, Version 2.0 (the "License");
* you may not use this file except in compliance with the License.
* You may obtain a copy of the License at
*
* http://www.apache.org/licenses/LICENSE-2.0
*
* Unless required by applicable law or agreed to in writing, software
* distributed under the License is distributed on an "AS IS" BASIS,
* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
* See the License for the specific language governing permissions and
* limitations under the License.
*
*/
package com.astamuse.asta4d.web.form.annotation;
import java.lang.annotation.ElementType;
import java.lang.annotation.Retention;
import java.lang.annotation.RetentionPolicy;
import java.lang.annotation.Target;
import com.astamuse.asta4d.util.annotation.ConvertableAnnotation;
import com.astamuse.asta4d.web.form.annotation.convert.FormFieldAnnotationConvertor;
import com.astamuse.asta4d.web.form.field.FormFieldValueRenderer;
@Retention(RetentionPolicy.RUNTIME)
@Target({ ElementType.FIELD, ElementType.METHOD })
@ConvertableAnnotation(FormFieldAnnotationConvertor.class)
public @interface FormField {
String name() default "";
String nameLabel() default "";
String message() default "";
String editSelector() default "";
String displaySelector() default "";
Class<? extends FormFieldValueRenderer> fieldValueRenderer();
}
| astamuse/asta4d | 162 | Java | org.eclipse.core.resources.prefs | text/plain | -195,023,979,078,755,900 |
/*
* Copyright 2014 astamuse company,Ltd.
*
* Licensed under the Apache License, Version 2.0 (the "License");
* you may not use this file except in compliance with the License.
* You may obtain a copy of the License at
*
* http://www.apache.org/licenses/LICENSE-2.0
*
* Unless required by applicable law or agreed to in writing, software
* distributed under the License is distributed on an "AS IS" BASIS,
* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
* See the License for the specific language governing permissions and
* limitations under the License.
*
*/
package com.astamuse.asta4d.web.form.annotation.renderable;
import java.lang.annotation.ElementType;
import java.lang.annotation.Retention;
import java.lang.annotation.RetentionPolicy;
import java.lang.annotation.Target;
import com.astamuse.asta4d.util.annotation.ConvertableAnnotation;
import com.astamuse.asta4d.web.form.annotation.renderable.convert.CommonInputAnnotationConvertor;
import com.astamuse.asta4d.web.form.field.FormFieldValueRenderer;
import com.astamuse.asta4d.web.form.field.impl.SelectMultipleRenderer;
@Retention(RetentionPolicy.RUNTIME)
@Target({ ElementType.FIELD, ElementType.METHOD })
@ConvertableAnnotation(CommonInputAnnotationConvertor.class)
public @interface SelectMultiple {
String name() default "";
String nameLabel() default "";
String message() default "";
String editSelector() default "";
String displaySelector() default "";
Class<? extends FormFieldValueRenderer> fieldValueRenderer() default SelectMultipleRenderer.class;
}
| astamuse/asta4d | 162 | Java | org.eclipse.core.resources.prefs | text/plain | 7,243,212,417,743,475,000 |
/*
* Copyright 2014 astamuse company,Ltd.
*
* Licensed under the Apache License, Version 2.0 (the "License");
* you may not use this file except in compliance with the License.
* You may obtain a copy of the License at
*
* http://www.apache.org/licenses/LICENSE-2.0
*
* Unless required by applicable law or agreed to in writing, software
* distributed under the License is distributed on an "AS IS" BASIS,
* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
* See the License for the specific language governing permissions and
* limitations under the License.
*
*/
package com.astamuse.asta4d.web.form.annotation.renderable;
import java.lang.annotation.ElementType;
import java.lang.annotation.Retention;
import java.lang.annotation.RetentionPolicy;
import java.lang.annotation.Target;
import com.astamuse.asta4d.util.annotation.ConvertableAnnotation;
import com.astamuse.asta4d.web.form.annotation.renderable.convert.CommonInputAnnotationConvertor;
import com.astamuse.asta4d.web.form.field.FormFieldValueRenderer;
import com.astamuse.asta4d.web.form.field.impl.PasswordRenderer;
@Retention(RetentionPolicy.RUNTIME)
@Target({ ElementType.FIELD, ElementType.METHOD })
@ConvertableAnnotation(CommonInputAnnotationConvertor.class)
public @interface Password {
String name() default "";
String nameLabel() default "";
String message() default "";
String editSelector() default "";
String displaySelector() default "";
Class<? extends FormFieldValueRenderer> fieldValueRenderer() default PasswordRenderer.class;
} | astamuse/asta4d | 162 | Java | org.eclipse.core.resources.prefs | text/plain | -6,120,944,600,145,236,000 |
/*
* Copyright 2014 astamuse company,Ltd.
*
* Licensed under the Apache License, Version 2.0 (the "License");
* you may not use this file except in compliance with the License.
* You may obtain a copy of the License at
*
* http://www.apache.org/licenses/LICENSE-2.0
*
* Unless required by applicable law or agreed to in writing, software
* distributed under the License is distributed on an "AS IS" BASIS,
* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
* See the License for the specific language governing permissions and
* limitations under the License.
*
*/
package com.astamuse.asta4d.web.form.annotation.renderable;
import java.lang.annotation.ElementType;
import java.lang.annotation.Retention;
import java.lang.annotation.RetentionPolicy;
import java.lang.annotation.Target;
import com.astamuse.asta4d.util.annotation.ConvertableAnnotation;
import com.astamuse.asta4d.web.form.annotation.renderable.convert.CommonInputAnnotationConvertor;
import com.astamuse.asta4d.web.form.field.FormFieldValueRenderer;
import com.astamuse.asta4d.web.form.field.impl.CheckboxRenderer;
@Retention(RetentionPolicy.RUNTIME)
@Target({ ElementType.FIELD, ElementType.METHOD })
@ConvertableAnnotation(CommonInputAnnotationConvertor.class)
public @interface Checkbox {
String name() default "";
String nameLabel() default "";
String message() default "";
String editSelector() default "";
String displaySelector() default "";
Class<? extends FormFieldValueRenderer> fieldValueRenderer() default CheckboxRenderer.class;
}
| astamuse/asta4d | 162 | Java | org.eclipse.core.resources.prefs | text/plain | -6,029,402,118,289,166,000 |
/*
* Copyright 2014 astamuse company,Ltd.
*
* Licensed under the Apache License, Version 2.0 (the "License");
* you may not use this file except in compliance with the License.
* You may obtain a copy of the License at
*
* http://www.apache.org/licenses/LICENSE-2.0
*
* Unless required by applicable law or agreed to in writing, software
* distributed under the License is distributed on an "AS IS" BASIS,
* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
* See the License for the specific language governing permissions and
* limitations under the License.
*
*/
package com.astamuse.asta4d.web.form.annotation.renderable;
import java.lang.annotation.ElementType;
import java.lang.annotation.Retention;
import java.lang.annotation.RetentionPolicy;
import java.lang.annotation.Target;
import com.astamuse.asta4d.util.annotation.ConvertableAnnotation;
import com.astamuse.asta4d.web.form.annotation.renderable.convert.AvailabeWhenEditOnlyAnnotationConvertor;
@Retention(RetentionPolicy.RUNTIME)
@Target(ElementType.FIELD)
@ConvertableAnnotation(AvailabeWhenEditOnlyAnnotationConvertor.class)
public @interface AvailableWhenEditOnly {
String selector();
}
| astamuse/asta4d | 162 | Java | org.eclipse.core.resources.prefs | text/plain | 7,760,783,053,458,261,000 |
/*
* Copyright 2014 astamuse company,Ltd.
*
* Licensed under the Apache License, Version 2.0 (the "License");
* you may not use this file except in compliance with the License.
* You may obtain a copy of the License at
*
* http://www.apache.org/licenses/LICENSE-2.0
*
* Unless required by applicable law or agreed to in writing, software
* distributed under the License is distributed on an "AS IS" BASIS,
* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
* See the License for the specific language governing permissions and
* limitations under the License.
*
*/
package com.astamuse.asta4d.web.form.annotation.renderable;
import java.lang.annotation.ElementType;
import java.lang.annotation.Retention;
import java.lang.annotation.RetentionPolicy;
import java.lang.annotation.Target;
import com.astamuse.asta4d.util.annotation.ConvertableAnnotation;
import com.astamuse.asta4d.web.form.annotation.renderable.convert.CommonInputAnnotationConvertor;
import com.astamuse.asta4d.web.form.field.FormFieldValueRenderer;
import com.astamuse.asta4d.web.form.field.impl.SelectSingleRenderer;
@Retention(RetentionPolicy.RUNTIME)
@Target({ ElementType.FIELD, ElementType.METHOD })
@ConvertableAnnotation(CommonInputAnnotationConvertor.class)
public @interface Select {
String name() default "";
String nameLabel() default "";
String message() default "";
String editSelector() default "";
String displaySelector() default "";
Class<? extends FormFieldValueRenderer> fieldValueRenderer() default SelectSingleRenderer.class;
}
| astamuse/asta4d | 162 | Java | org.eclipse.core.resources.prefs | text/plain | 1,176,317,435,243,047,400 |
/*
* Copyright 2014 astamuse company,Ltd.
*
* Licensed under the Apache License, Version 2.0 (the "License");
* you may not use this file except in compliance with the License.
* You may obtain a copy of the License at
*
* http://www.apache.org/licenses/LICENSE-2.0
*
* Unless required by applicable law or agreed to in writing, software
* distributed under the License is distributed on an "AS IS" BASIS,
* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
* See the License for the specific language governing permissions and
* limitations under the License.
*
*/
package com.astamuse.asta4d.web.form.annotation.renderable;
import java.lang.annotation.ElementType;
import java.lang.annotation.Retention;
import java.lang.annotation.RetentionPolicy;
import java.lang.annotation.Target;
import com.astamuse.asta4d.util.annotation.ConvertableAnnotation;
import com.astamuse.asta4d.web.form.annotation.renderable.convert.CommonInputAnnotationConvertor;
import com.astamuse.asta4d.web.form.field.FormFieldValueRenderer;
import com.astamuse.asta4d.web.form.field.impl.HiddenRenderer;
@Retention(RetentionPolicy.RUNTIME)
@Target({ ElementType.FIELD, ElementType.METHOD })
@ConvertableAnnotation(CommonInputAnnotationConvertor.class)
public @interface Hidden {
String name() default "";
String nameLabel() default "";
String message() default "";
String editSelector() default "";
String displaySelector() default "";
Class<? extends FormFieldValueRenderer> fieldValueRenderer() default HiddenRenderer.class;
} | astamuse/asta4d | 162 | Java | org.eclipse.core.resources.prefs | text/plain | 6,076,334,796,028,648,000 |
/*
* Copyright 2014 astamuse company,Ltd.
*
* Licensed under the Apache License, Version 2.0 (the "License");
* you may not use this file except in compliance with the License.
* You may obtain a copy of the License at
*
* http://www.apache.org/licenses/LICENSE-2.0
*
* Unless required by applicable law or agreed to in writing, software
* distributed under the License is distributed on an "AS IS" BASIS,
* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
* See the License for the specific language governing permissions and
* limitations under the License.
*
*/
package com.astamuse.asta4d.web.form.annotation.renderable;
import java.lang.annotation.ElementType;
import java.lang.annotation.Retention;
import java.lang.annotation.RetentionPolicy;
import java.lang.annotation.Target;
import com.astamuse.asta4d.util.annotation.ConvertableAnnotation;
import com.astamuse.asta4d.web.form.annotation.renderable.convert.CommonInputAnnotationConvertor;
import com.astamuse.asta4d.web.form.field.FormFieldValueRenderer;
import com.astamuse.asta4d.web.form.field.impl.RadioRenderer;
@Retention(RetentionPolicy.RUNTIME)
@Target({ ElementType.FIELD, ElementType.METHOD })
@ConvertableAnnotation(CommonInputAnnotationConvertor.class)
public @interface Radio {
String name() default "";
String nameLabel() default "";
String message() default "";
String editSelector() default "";
String displaySelector() default "";
Class<? extends FormFieldValueRenderer> fieldValueRenderer() default RadioRenderer.class;
}
| astamuse/asta4d | 162 | Java | org.eclipse.core.resources.prefs | text/plain | -2,846,358,628,905,961,000 |
/*
* Copyright 2014 astamuse company,Ltd.
*
* Licensed under the Apache License, Version 2.0 (the "License");
* you may not use this file except in compliance with the License.
* You may obtain a copy of the License at
*
* http://www.apache.org/licenses/LICENSE-2.0
*
* Unless required by applicable law or agreed to in writing, software
* distributed under the License is distributed on an "AS IS" BASIS,
* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
* See the License for the specific language governing permissions and
* limitations under the License.
*
*/
package com.astamuse.asta4d.web.form.annotation.renderable;
import java.lang.annotation.ElementType;
import java.lang.annotation.Retention;
import java.lang.annotation.RetentionPolicy;
import java.lang.annotation.Target;
import com.astamuse.asta4d.util.annotation.ConvertableAnnotation;
import com.astamuse.asta4d.web.form.annotation.renderable.convert.CommonInputAnnotationConvertor;
import com.astamuse.asta4d.web.form.field.FormFieldValueRenderer;
import com.astamuse.asta4d.web.form.field.impl.TimeRenderer;
@Retention(RetentionPolicy.RUNTIME)
@Target({ ElementType.FIELD, ElementType.METHOD })
@ConvertableAnnotation(CommonInputAnnotationConvertor.class)
public @interface Time {
String name() default "";
String nameLabel() default "";
String message() default "";
String editSelector() default "";
String displaySelector() default "";
Class<? extends FormFieldValueRenderer> fieldValueRenderer() default TimeRenderer.class;
} | astamuse/asta4d | 162 | Java | org.eclipse.core.resources.prefs | text/plain | 6,798,641,319,706,037,000 |
/*
* Copyright 2014 astamuse company,Ltd.
*
* Licensed under the Apache License, Version 2.0 (the "License");
* you may not use this file except in compliance with the License.
* You may obtain a copy of the License at
*
* http://www.apache.org/licenses/LICENSE-2.0
*
* Unless required by applicable law or agreed to in writing, software
* distributed under the License is distributed on an "AS IS" BASIS,
* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
* See the License for the specific language governing permissions and
* limitations under the License.
*
*/
package com.astamuse.asta4d.web.form.annotation.renderable;
import java.lang.annotation.ElementType;
import java.lang.annotation.Retention;
import java.lang.annotation.RetentionPolicy;
import java.lang.annotation.Target;
import com.astamuse.asta4d.util.annotation.ConvertableAnnotation;
import com.astamuse.asta4d.web.form.annotation.renderable.convert.CommonInputAnnotationConvertor;
import com.astamuse.asta4d.web.form.field.FormFieldValueRenderer;
import com.astamuse.asta4d.web.form.field.impl.InputDefaultRenderer;
@Retention(RetentionPolicy.RUNTIME)
@Target({ ElementType.FIELD, ElementType.METHOD })
@ConvertableAnnotation(CommonInputAnnotationConvertor.class)
public @interface Input {
String name() default "";
String nameLabel() default "";
String message() default "";
String editSelector() default "";
String displaySelector() default "";
Class<? extends FormFieldValueRenderer> fieldValueRenderer() default InputDefaultRenderer.class;
}
| astamuse/asta4d | 162 | Java | org.eclipse.core.resources.prefs | text/plain | 1,453,308,842,519,841,500 |
/*
* Copyright 2014 astamuse company,Ltd.
*
* Licensed under the Apache License, Version 2.0 (the "License");
* you may not use this file except in compliance with the License.
* You may obtain a copy of the License at
*
* http://www.apache.org/licenses/LICENSE-2.0
*
* Unless required by applicable law or agreed to in writing, software
* distributed under the License is distributed on an "AS IS" BASIS,
* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
* See the License for the specific language governing permissions and
* limitations under the License.
*
*/
package com.astamuse.asta4d.web.form.annotation.renderable;
import java.lang.annotation.ElementType;
import java.lang.annotation.Retention;
import java.lang.annotation.RetentionPolicy;
import java.lang.annotation.Target;
import com.astamuse.asta4d.util.annotation.ConvertableAnnotation;
import com.astamuse.asta4d.web.form.annotation.renderable.convert.CommonInputAnnotationConvertor;
import com.astamuse.asta4d.web.form.field.FormFieldValueRenderer;
import com.astamuse.asta4d.web.form.field.impl.DateRenderer;
@Retention(RetentionPolicy.RUNTIME)
@Target({ ElementType.FIELD, ElementType.METHOD })
@ConvertableAnnotation(CommonInputAnnotationConvertor.class)
public @interface Date {
String name() default "";
String nameLabel() default "";
String message() default "";
String editSelector() default "";
String displaySelector() default "";
Class<? extends FormFieldValueRenderer> fieldValueRenderer() default DateRenderer.class;
} | astamuse/asta4d | 162 | Java | org.eclipse.core.resources.prefs | text/plain | -3,392,085,666,868,075,000 |
/*
* Copyright 2014 astamuse company,Ltd.
*
* Licensed under the Apache License, Version 2.0 (the "License");
* you may not use this file except in compliance with the License.
* You may obtain a copy of the License at
*
* http://www.apache.org/licenses/LICENSE-2.0
*
* Unless required by applicable law or agreed to in writing, software
* distributed under the License is distributed on an "AS IS" BASIS,
* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
* See the License for the specific language governing permissions and
* limitations under the License.
*
*/
package com.astamuse.asta4d.web.form.annotation.renderable;
import java.lang.annotation.ElementType;
import java.lang.annotation.Retention;
import java.lang.annotation.RetentionPolicy;
import java.lang.annotation.Target;
import com.astamuse.asta4d.util.annotation.ConvertableAnnotation;
import com.astamuse.asta4d.web.form.annotation.renderable.convert.CommonInputAnnotationConvertor;
import com.astamuse.asta4d.web.form.field.FormFieldValueRenderer;
import com.astamuse.asta4d.web.form.field.impl.TextareaRenderer;
@Retention(RetentionPolicy.RUNTIME)
@Target({ ElementType.FIELD, ElementType.METHOD })
@ConvertableAnnotation(CommonInputAnnotationConvertor.class)
public @interface Textarea {
String name() default "";
String nameLabel() default "";
String message() default "";
String editSelector() default "";
String displaySelector() default "";
Class<? extends FormFieldValueRenderer> fieldValueRenderer() default TextareaRenderer.class;
} | astamuse/asta4d | 162 | Java | org.eclipse.core.resources.prefs | text/plain | 5,025,308,862,185,099,000 |
/*
* Copyright 2014 astamuse company,Ltd.
*
* Licensed under the Apache License, Version 2.0 (the "License");
* you may not use this file except in compliance with the License.
* You may obtain a copy of the License at
*
* http://www.apache.org/licenses/LICENSE-2.0
*
* Unless required by applicable law or agreed to in writing, software
* distributed under the License is distributed on an "AS IS" BASIS,
* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
* See the License for the specific language governing permissions and
* limitations under the License.
*
*/
package com.astamuse.asta4d.web.form.annotation.renderable.convert;
import java.lang.annotation.Annotation;
import java.lang.reflect.InvocationTargetException;
import java.lang.reflect.Method;
import com.astamuse.asta4d.util.annotation.AnnotationConvertor;
import com.astamuse.asta4d.web.form.annotation.FormField;
import com.astamuse.asta4d.web.form.field.FormFieldValueRenderer;
public class CommonInputAnnotationConvertor implements AnnotationConvertor<Annotation, FormField> {
@Override
public FormField convert(final Annotation originalAnnotation) {
return new FormField() {
@Override
public Class<? extends Annotation> annotationType() {
return FormField.class;
}
@Override
public String name() {
return getValue(originalAnnotation, "name");
}
public String nameLabel() {
return getValue(originalAnnotation, "nameLabel");
}
public String message() {
return getValue(originalAnnotation, "message");
}
@Override
public String editSelector() {
return getValue(originalAnnotation, "editSelector");
}
@Override
public String displaySelector() {
return getValue(originalAnnotation, "displaySelector");
}
@Override
public Class<? extends FormFieldValueRenderer> fieldValueRenderer() {
return getValue(originalAnnotation, "fieldValueRenderer");
}
};
}
@SuppressWarnings("unchecked")
private <T> T getValue(Annotation originalAnnotation, String name) {
try {
Method m = originalAnnotation.annotationType().getMethod(name);
return (T) m.invoke(originalAnnotation);
} catch (NoSuchMethodException | SecurityException | IllegalAccessException | IllegalArgumentException | InvocationTargetException e) {
throw new RuntimeException(e);
}
}
}
| astamuse/asta4d | 162 | Java | org.eclipse.core.resources.prefs | text/plain | 2,942,796,128,477,859,300 |
/*
* Copyright 2014 astamuse company,Ltd.
*
* Licensed under the Apache License, Version 2.0 (the "License");
* you may not use this file except in compliance with the License.
* You may obtain a copy of the License at
*
* http://www.apache.org/licenses/LICENSE-2.0
*
* Unless required by applicable law or agreed to in writing, software
* distributed under the License is distributed on an "AS IS" BASIS,
* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
* See the License for the specific language governing permissions and
* limitations under the License.
*
*/
package com.astamuse.asta4d.web.form.annotation.renderable.convert;
import java.lang.annotation.Annotation;
import com.astamuse.asta4d.util.annotation.AnnotationConvertor;
import com.astamuse.asta4d.web.form.annotation.FormField;
import com.astamuse.asta4d.web.form.annotation.renderable.AvailableWhenEditOnly;
import com.astamuse.asta4d.web.form.field.FormFieldValueRenderer;
import com.astamuse.asta4d.web.form.field.impl.AvailableWhenEditOnlyRenderer;
public class AvailabeWhenEditOnlyAnnotationConvertor implements AnnotationConvertor<AvailableWhenEditOnly, FormField> {
@Override
public FormField convert(final AvailableWhenEditOnly originalAnnotation) {
return new FormField() {
@Override
public Class<? extends Annotation> annotationType() {
return FormField.class;
}
@Override
public String name() {
return originalAnnotation.selector();
}
@Override
public Class<? extends FormFieldValueRenderer> fieldValueRenderer() {
return AvailableWhenEditOnlyRenderer.class;
}
@Override
public String editSelector() {
return originalAnnotation.selector();
}
@Override
public String displaySelector() {
return originalAnnotation.selector();
}
@Override
public String nameLabel() {
return "";
}
@Override
public String message() {
return "";
}
};
}
}
| astamuse/asta4d | 162 | Java | org.eclipse.core.resources.prefs | text/plain | -6,090,628,570,364,751,000 |
/*
* Copyright 2014 astamuse company,Ltd.
*
* Licensed under the Apache License, Version 2.0 (the "License");
* you may not use this file except in compliance with the License.
* You may obtain a copy of the License at
*
* http://www.apache.org/licenses/LICENSE-2.0
*
* Unless required by applicable law or agreed to in writing, software
* distributed under the License is distributed on an "AS IS" BASIS,
* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
* See the License for the specific language governing permissions and
* limitations under the License.
*
*/
package com.astamuse.asta4d.web.form.annotation.convert;
import java.lang.annotation.Annotation;
import com.astamuse.asta4d.data.TypeUnMacthPolicy;
import com.astamuse.asta4d.util.annotation.AnnotationConvertor;
import com.astamuse.asta4d.web.annotation.QueryParam;
import com.astamuse.asta4d.web.form.annotation.FormField;
public class FormFieldAnnotationConvertor implements AnnotationConvertor<FormField, QueryParam> {
@Override
public QueryParam convert(final FormField originalAnnotation) {
return new QueryParam() {
@Override
public Class<? extends Annotation> annotationType() {
return QueryParam.class;
}
@Override
public TypeUnMacthPolicy typeUnMatch() {
return TypeUnMacthPolicy.DEFAULT_VALUE_AND_TRACE;
}
@Override
public String name() {
return originalAnnotation.name();
}
};
}
}
| astamuse/asta4d | 162 | Java | org.eclipse.core.resources.prefs | text/plain | -6,980,363,681,986,532,000 |
/*
* Copyright 2014 astamuse company,Ltd.
*
* Licensed under the Apache License, Version 2.0 (the "License");
* you may not use this file except in compliance with the License.
* You may obtain a copy of the License at
*
* http://www.apache.org/licenses/LICENSE-2.0
*
* Unless required by applicable law or agreed to in writing, software
* distributed under the License is distributed on an "AS IS" BASIS,
* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
* See the License for the specific language governing permissions and
* limitations under the License.
*
*/
package com.astamuse.asta4d.web.form.annotation.convert;
import java.lang.annotation.Annotation;
import com.astamuse.asta4d.util.annotation.AnnotationConvertor;
import com.astamuse.asta4d.web.form.annotation.CascadeFormField;
import com.astamuse.asta4d.web.form.annotation.FormField;
import com.astamuse.asta4d.web.form.field.FormFieldValueRenderer;
import com.astamuse.asta4d.web.form.field.impl.DoNothingFormFieldRenderer;
public class CascadeFormFieldAnnotationConvertor implements AnnotationConvertor<CascadeFormField, FormField> {
@Override
public FormField convert(final CascadeFormField originalAnnotation) {
return new FormField() {
@Override
public Class<? extends Annotation> annotationType() {
return FormField.class;
}
@Override
public String name() {
return originalAnnotation.name();
}
public String nameLabel() {
return originalAnnotation.nameLabel();
}
public String message() {
return originalAnnotation.message();
}
@Override
public String editSelector() {
return originalAnnotation.containerSelector();
}
@Override
public String displaySelector() {
return originalAnnotation.containerSelector();
}
@Override
public Class<? extends FormFieldValueRenderer> fieldValueRenderer() {
return DoNothingFormFieldRenderer.class;
}
};
}
}
| astamuse/asta4d | 162 | Java | org.eclipse.core.resources.prefs | text/plain | -7,976,393,870,403,119,000 |
/*
* Copyright 2014 astamuse company,Ltd.
*
* Licensed under the Apache License, Version 2.0 (the "License");
* you may not use this file except in compliance with the License.
* You may obtain a copy of the License at
*
* http://www.apache.org/licenses/LICENSE-2.0
*
* Unless required by applicable law or agreed to in writing, software
* distributed under the License is distributed on an "AS IS" BASIS,
* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
* See the License for the specific language governing permissions and
* limitations under the License.
*
*/
package com.astamuse.asta4d.web.form.annotation.convert;
import java.lang.annotation.Annotation;
import com.astamuse.asta4d.data.ContextDataSetFactory;
import com.astamuse.asta4d.data.DefaultContextDataSetFactory;
import com.astamuse.asta4d.data.annotation.ContextDataSet;
import com.astamuse.asta4d.util.annotation.AnnotationConvertor;
import com.astamuse.asta4d.web.form.annotation.Form;
public class FormAnnotationConvertor implements AnnotationConvertor<Form, ContextDataSet> {
@Override
public ContextDataSet convert(Form originalAnnotation) {
return new ContextDataSet() {
@Override
public Class<? extends Annotation> annotationType() {
return ContextDataSet.class;
}
@Override
public boolean singletonInContext() {
return true;
}
@Override
public Class<? extends ContextDataSetFactory> factory() {
return DefaultContextDataSetFactory.class;
}
};
}
}
| astamuse/asta4d | 162 | Java | org.eclipse.core.resources.prefs | text/plain | -4,200,487,941,511,154,700 |
package com.astamuse.asta4d.web.form.flow.ext;
/**
* Currently this is simple help interface to simplify excluding declaration, thus we do not support cascaded form.We will add the full
* support of cascade form in future.
*
*/
public interface IncludingFieldRetrievableForm extends ExcludingFieldRetrievableForm {
default String[] getExcludeFields() {
return ExcludingFieldRetrievableFormHelper.retrieveExcludingFieldsByIncluding(this.getClass(), getIncludeFields());
}
public String[] getIncludeFields();
}
| astamuse/asta4d | 162 | Java | org.eclipse.core.resources.prefs | text/plain | 3,479,956,181,419,699,000 |
/*
* Copyright 2016 astamuse company,Ltd.
*
* Licensed under the Apache License, Version 2.0 (the "License");
* you may not use this file except in compliance with the License.
* You may obtain a copy of the License at
*
* http://www.apache.org/licenses/LICENSE-2.0
*
* Unless required by applicable law or agreed to in writing, software
* distributed under the License is distributed on an "AS IS" BASIS,
* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
* See the License for the specific language governing permissions and
* limitations under the License.
*
*/
package com.astamuse.asta4d.web.form.flow.ext;
import com.astamuse.asta4d.web.form.flow.base.StepAwaredValidatableForm;
public interface MultiInputStepForm extends StepAwaredValidatableForm {
public void mergeInputDataForConfirm(String step, Object inputForm);
}
| astamuse/asta4d | 162 | Java | org.eclipse.core.resources.prefs | text/plain | -1,794,737,162,305,229,300 |
/*
* Copyright 2016 astamuse company,Ltd.
*
* Licensed under the Apache License, Version 2.0 (the "License");
* you may not use this file except in compliance with the License.
* You may obtain a copy of the License at
*
* http://www.apache.org/licenses/LICENSE-2.0
*
* Unless required by applicable law or agreed to in writing, software
* distributed under the License is distributed on an "AS IS" BASIS,
* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
* See the License for the specific language governing permissions and
* limitations under the License.
*
*/
package com.astamuse.asta4d.web.form.flow.ext;
import java.lang.reflect.InvocationTargetException;
import java.util.HashSet;
import java.util.List;
import java.util.Set;
import org.apache.commons.lang3.ArrayUtils;
import com.astamuse.asta4d.util.annotation.AnnotatedPropertyInfo;
import com.astamuse.asta4d.util.annotation.AnnotatedPropertyUtil;
public class ExcludingFieldRetrievableFormHelper {
public static final void copyIncludeFieldsOnly(Object targetForm, ExcludingFieldRetrievableForm... froms) {
try {
for (ExcludingFieldRetrievableForm from : froms) {
List<AnnotatedPropertyInfo> fromProps = AnnotatedPropertyUtil.retrieveProperties(from.getClass());
String[] excludes = from.getExcludeFields();
Set<String> set = new HashSet<>();
for (String s : excludes) {
set.add(s);
}
for (AnnotatedPropertyInfo p : fromProps) {
// do not copy excluded fields
if (set.contains(p.getName())) {
continue;
}
AnnotatedPropertyUtil.assignValueByName(targetForm, p.getName(), p.retrieveValue(from));
}
}
} catch (IllegalAccessException | IllegalArgumentException | InvocationTargetException e) {
throw new RuntimeException(e);
}
}
public static final String[] retrieveExcludingFieldsByIncluding(Class<?> cls, String... includingFields) {
List<AnnotatedPropertyInfo> props = AnnotatedPropertyUtil.retrieveProperties(cls);
return props.stream().filter(p -> !ArrayUtils.contains(includingFields, p.getName())).map(p -> p.getName()).toArray(size -> {
return new String[size];
});
}
}
| astamuse/asta4d | 162 | Java | org.eclipse.core.resources.prefs | text/plain | 2,892,937,587,873,771,500 |
/*
* Copyright 2016 astamuse company,Ltd.
*
* Licensed under the Apache License, Version 2.0 (the "License");
* you may not use this file except in compliance with the License.
* You may obtain a copy of the License at
*
* http://www.apache.org/licenses/LICENSE-2.0
*
* Unless required by applicable law or agreed to in writing, software
* distributed under the License is distributed on an "AS IS" BASIS,
* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
* See the License for the specific language governing permissions and
* limitations under the License.
*
*/
package com.astamuse.asta4d.web.form.flow.ext;
public interface ExcludingFieldRetrievableForm {
public String[] getExcludeFields();
default void copyIncludingFieldsTo(Object targetForm) {
ExcludingFieldRetrievableFormHelper.copyIncludeFieldsOnly(targetForm, this);
}
}
| astamuse/asta4d | 162 | Java | org.eclipse.core.resources.prefs | text/plain | 2,251,866,275,925,207,300 |
/*
* Copyright 2016 astamuse company,Ltd.
*
* Licensed under the Apache License, Version 2.0 (the "License");
* you may not use this file except in compliance with the License.
* You may obtain a copy of the License at
*
* http://www.apache.org/licenses/LICENSE-2.0
*
* Unless required by applicable law or agreed to in writing, software
* distributed under the License is distributed on an "AS IS" BASIS,
* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
* See the License for the specific language governing permissions and
* limitations under the License.
*
*/
package com.astamuse.asta4d.web.form.flow.ext;
import java.util.HashSet;
import java.util.List;
import java.util.Set;
import java.util.stream.Collectors;
import com.astamuse.asta4d.web.form.flow.base.ValidationProcessor;
import com.astamuse.asta4d.web.form.validation.FormValidationMessage;
public interface ExcludingFieldRetrievableFormValidationProcessor extends ValidationProcessor {
default List<FormValidationMessage> postValidate(Object form, List<FormValidationMessage> msgList) {
return filterExcludedFieldsMessages(form, msgList);
}
/**
* include/exclude corresponding field messages according to the {@link SimpleFormFieldIncludeDescription}/
* {@link ExcludingFieldRetrievableForm}
*
* @param form
* @param msgList
* @return
*/
default List<FormValidationMessage> filterExcludedFieldsMessages(Object form, List<FormValidationMessage> msgList) {
if (form instanceof ExcludingFieldRetrievableForm) {
ExcludingFieldRetrievableForm vfe = (ExcludingFieldRetrievableForm) form;
String[] fields = vfe.getExcludeFields();
Set<String> set = new HashSet<>();
for (String f : fields) {
set.add(f);
}
return msgList.stream().filter(fvm -> !set.contains(fvm.getFieldName())).collect(Collectors.toList());
} else {
return msgList;
}
}
}
| astamuse/asta4d | 162 | Java | org.eclipse.core.resources.prefs | text/plain | 3,112,147,800,864,028,000 |
/*
* Copyright 2016 astamuse company,Ltd.
*
* Licensed under the Apache License, Version 2.0 (the "License");
* you may not use this file except in compliance with the License.
* You may obtain a copy of the License at
*
* http://www.apache.org/licenses/LICENSE-2.0
*
* Unless required by applicable law or agreed to in writing, software
* distributed under the License is distributed on an "AS IS" BASIS,
* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
* See the License for the specific language governing permissions and
* limitations under the License.
*
*/
package com.astamuse.asta4d.web.form.flow.ext;
import static com.astamuse.asta4d.render.SpecialRenderer.Clear;
import com.astamuse.asta4d.render.Renderer;
import com.astamuse.asta4d.web.form.flow.base.BasicFormFlowSnippetTrait;
public interface ExcludingFieldRetrievableFormRenderable extends BasicFormFlowSnippetTrait {
@Override
default Renderer preRenderForm(String renderTargetStep, Object form, int[] indexes) {
return formFieldExcludeRendering(renderTargetStep, form, indexes);
}
default Renderer formFieldExcludeRendering(String renderTargetStep, Object form, int[] indexes) {
Renderer renderer = Renderer.create();
if (form instanceof ExcludingFieldRetrievableForm) {
ExcludingFieldRetrievableForm desc = (ExcludingFieldRetrievableForm) form;
String[] fields = desc.getExcludeFields();
for (String field : fields) {
renderer.add(exludeField(field));
}
}
return renderer;
}
default Renderer exludeField(String field) {
Renderer renderer = Renderer.create();
for (String s : clearExcludeFieldsSelectors(field)) {
if (clearExcludeFields()) {
renderer.add(s, Clear);
} else {
renderer.add(s, "display", "none");
}
}
return renderer;
}
default String[] clearExcludeFieldsSelectors(String field) {
return new String[] { "[name=" + field + "]", "#" + field + "-container" };
}
default boolean clearExcludeFields() {
return true;
}
}
| astamuse/asta4d | 162 | Java | org.eclipse.core.resources.prefs | text/plain | -4,800,730,359,193,998,000 |
/*
* Copyright 2016 astamuse company,Ltd.
*
* Licensed under the Apache License, Version 2.0 (the "License");
* you may not use this file except in compliance with the License.
* You may obtain a copy of the License at
*
* http://www.apache.org/licenses/LICENSE-2.0
*
* Unless required by applicable law or agreed to in writing, software
* distributed under the License is distributed on an "AS IS" BASIS,
* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
* See the License for the specific language governing permissions and
* limitations under the License.
*
*/
package com.astamuse.asta4d.web.form.flow.ext;
import java.util.Map;
import com.astamuse.asta4d.web.form.flow.base.FormFlowConstants;
import com.astamuse.asta4d.web.form.flow.base.FormFlowTraceData;
import com.astamuse.asta4d.web.form.flow.classical.ClassicalMultiStepFormFlowHandlerTrait;
/**
* For a form flow with multiple input steps, there are something different from the classical single input step form flow:
* <ul>
* <li>We store the trace data from the first step for later using
* <li>We set the initial form data for each input step by copying the initial step(before first) form data
* <li>We combine the form data of each step to one single instance for confirm page rendering and later process
* <li>We validate the corresponding sub form instance of each input step rather than the parent form instance
* </ul>
*
* @author e-ryu
*
* @param <T>
*/
public interface MultiInputStepFormFlowHandlerTrait<T extends MultiInputStepForm> extends ClassicalMultiStepFormFlowHandlerTrait<T> {
public String[] getInputSteps();
default String firstStepName() {
return getInputSteps()[0];
};
@Override
default boolean skipStoreTraceData(String currentStep, String renderTargetStep, FormFlowTraceData traceData) {
// we will always save trace data when we start the flow because we need to retrieve the init form later.
return completeStepName().equalsIgnoreCase(renderTargetStep);
}
/**
* get the form instance which combined the input data of all the steps. Default is combine all the data of each steps to the first
* input step instance.
*
* @param traceData
* @return
*/
@SuppressWarnings("unchecked")
default void mergeInputStepsToConfirmStep(T confirmStepForm, FormFlowTraceData traceData) {
Map<String, Object> formMap = traceData.getStepFormMap();
String[] inputSteps = getInputSteps();
T mergeForm;
String step;
for (int i = 0; i < inputSteps.length; i++) {
step = inputSteps[i];
mergeForm = (T) formMap.get(step);
confirmStepForm.mergeInputDataForConfirm(step, mergeForm);
}
}
/**
* get the
*
* @param traceData
* @return
*/
@SuppressWarnings("unchecked")
default T getConfirmStepFormStub(FormFlowTraceData traceData) {
// clone or not, we don't matter
Map<String, Object> formMap = traceData.getStepFormMap();
return (T) formMap.get(FormFlowConstants.FORM_STEP_BEFORE_FIRST);
}
@SuppressWarnings("unchecked")
@Override
default void rewriteTraceDataBeforeGoSnippet(String currentStep, String renderTargetStep, FormFlowTraceData traceData) {
Map<String, Object> formMap = traceData.getStepFormMap();
if (confirmStepName().equalsIgnoreCase(renderTargetStep)) {// ? -> confirm
T confirmStepForm = getConfirmStepFormStub(traceData);
mergeInputStepsToConfirmStep(confirmStepForm, traceData);
formMap.put(confirmStepName(), confirmStepForm);
} else if (completeStepName().equalsIgnoreCase(renderTargetStep)) { // confirm -> complete
formMap.put(renderTargetStep, formMap.get(currentStep));
} else {// input x -> input y
// in this else branch, we could believe that the render target must be an input step
/*
* we need to set the form data by the stored before first step data for each step when the form data is not set,
* otherwise we use the existing form data.
*
* we forced to store the before first step data by return false at the method of skipStoreTraceData.
*/
T savedForm = (T) formMap.get(renderTargetStep);
if (savedForm == null) {
// There must be a init form
T initForm = (T) formMap.get(FormFlowConstants.FORM_STEP_BEFORE_FIRST);
formMap.put(renderTargetStep, initForm);
}
}
}
}
| astamuse/asta4d | 162 | Java | org.eclipse.core.resources.prefs | text/plain | -4,459,371,524,338,193,000 |
/*
* Copyright 2016 astamuse company,Ltd.
*
* Licensed under the Apache License, Version 2.0 (the "License");
* you may not use this file except in compliance with the License.
* You may obtain a copy of the License at
*
* http://www.apache.org/licenses/LICENSE-2.0
*
* Unless required by applicable law or agreed to in writing, software
* distributed under the License is distributed on an "AS IS" BASIS,
* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
* See the License for the specific language governing permissions and
* limitations under the License.
*
*/
package com.astamuse.asta4d.web.form.flow.ext;
import com.astamuse.asta4d.web.form.flow.classical.ClassicalMultiStepFormFlowSnippetTrait;
/**
* Even this trait has no implemented logic, the user source which uses {@link MultiInputStepFormFlowHandlerTrait} should introduce this
* trait to the paired snippet class for future possibility of bug fixing.
*
* @author e-ryu
*
*/
public interface MultiInputStepFormFlowSnippetTrait extends ClassicalMultiStepFormFlowSnippetTrait {
}
| astamuse/asta4d | 162 | Java | org.eclipse.core.resources.prefs | text/plain | -4,234,757,994,345,603,000 |
/*
* Copyright 2014 astamuse company,Ltd.
*
* Licensed under the Apache License, Version 2.0 (the "License");
* you may not use this file except in compliance with the License.
* You may obtain a copy of the License at
*
* http://www.apache.org/licenses/LICENSE-2.0
*
* Unless required by applicable law or agreed to in writing, software
* distributed under the License is distributed on an "AS IS" BASIS,
* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
* See the License for the specific language governing permissions and
* limitations under the License.
*
*/
package com.astamuse.asta4d.web.form.flow.classical;
import java.util.Map;
import com.astamuse.asta4d.Context;
import com.astamuse.asta4d.web.WebApplicationContext;
import com.astamuse.asta4d.web.form.flow.base.BasicFormFlowHandlerTrait;
import com.astamuse.asta4d.web.form.flow.base.FormFlowConstants;
import com.astamuse.asta4d.web.form.flow.base.FormFlowTraceData;
import com.astamuse.asta4d.web.form.flow.base.FormProcessData;
/**
* This trait represents a classical flow that contains input/confirm/complete steps.
*
* <p>
*
* By default, this trait can handle a page with classical 3 steps: input, confirm and complete. The developers are required to at least
* implement the following methods:
* <ul>
* <li>{@link #getFormCls()}
* <li>{@link #createInitForm()}
* <li>{@link #updateForm(Object)}
* </ul>
*
* The base folder of template files for each step could be specified in the URL rule by the fixed name of {@link #VAR_TEMPLATE_BASE_PATH}.
*
* <p>
*
* Also, {@link #getTypeUnMatchValidator()} and {@link #getValueValidator()} are recommended to be overridden by a common parent class to
* perform validator configuration.
*
* <p>
*
* Further methods can be overridden for more flexible flow definition. See details of the description of each method.
*
* <p>
* <i>If there are more than one input step, the following methods can (for most cases, should) be overridden to customize the multiple
* steps:
* <ul>
* <li>{@link #generateFormInstanceFromContext(String)}
* <li>{@link #validateForm(FormProcessData, Object)}
* <li>{@link #rewriteTraceDataBeforeGoSnippet(String, String, FormFlowTraceData)}
* <li>{@link #skipStoreTraceData(String, String, FormFlowTraceData)}
* </ul>
* </i>
*
* @author e-ryu
*
* @param <T>
*/
public interface ClassicalMultiStepFormFlowHandlerTrait<T> extends UpdatableFormFlowHandlerTrait<T> {
/**
* The default path var name of template files base path
*/
public static final String VAR_TEMPLATE_BASE_PATH = "TEMPLATE_BASE_PATH#" + ClassicalMultiStepFormFlowHandlerTrait.class;
/**
* Sub classes must override this method to implement update logic.
*
* @param form
*/
public void updateForm(T form);
/**
* @see ClassicalFormFlowConstant#STEP_INPUT
*/
@Override
default String firstStepName() {
return ClassicalFormFlowConstant.STEP_INPUT;
}
/**
* @see ClassicalFormFlowConstant#STEP_CONFIRM
*/
default String confirmStepName() {
return ClassicalFormFlowConstant.STEP_CONFIRM;
}
/**
* @see ClassicalFormFlowConstant#STEP_COMPLETE
*/
default String completeStepName() {
return ClassicalFormFlowConstant.STEP_COMPLETE;
}
/**
* Sub classes should decide whether they want to show a complete page or simply exit current flow.
* <p>
* The default is false, which means the complete page will be shown always.
*
* @return
*/
default boolean treatCompleteStepAsExit() {
return false;
}
/**
* In the parent class {@link BasicFormFlowHandlerTrait}'s implementation of saveTraceMap, it says that the sub class have the
* responsibility to make sure save the trace map well, thus we override it to perform the obligation.
*
* The trace map will not be saved when the flowing cases:
* <ul>
* <li>The form flow starts and the first step is shown as the entry of current flow
* <li>The form flow is returned to the first step from the first step (usually validation failed).
* <li>The form flow is returned to the first step from other step when the {@link #skipSaveTraceMapWhenBackedFromOtherStep()} returns
* true
* <li>The form flow has finished and is moving to the finish step.
* </ul>
*
* From parent:
* <p>
* {@inheritDoc}
*
* @param currentStep
* @param renderTargetStep
* @param traceMap
* @return
*/
@Override
default boolean skipStoreTraceData(String currentStep, String renderTargetStep, FormFlowTraceData traceData) {
if (FormFlowConstants.FORM_STEP_BEFORE_FIRST.equals(currentStep)) {// init -> first
// when the form flow start
return true;
} else if (firstStepName().equalsIgnoreCase(currentStep) && currentStep.equalsIgnoreCase(renderTargetStep)) {// first -> first
// the form flow is stopped at the first step
return true;
} else if (firstStepName().equalsIgnoreCase(renderTargetStep)) { // first <- ?
return true;
} else if (completeStepName().equalsIgnoreCase(renderTargetStep)) {// ? -> complete
// the form flow finished
return true;
} else {
return false;
}
}
/**
* Sub classes can override this method to customize how to translate a step to a target template file path or redirect target URL.
*
* @param step
* @return
*
* @see #getTemplateBasePath()
* @see #createTemplateFilePath(String, String)
*/
@Override
default String createMoveTargetForStep(String step) {
if (step == null) {// exit flow
return null;
}
if (completeStepName().equalsIgnoreCase(step) && treatCompleteStepAsExit()) {
return null;
}
return createTemplateFilePath(getTemplateBasePath(), step);
}
/**
* Sub class can override this method to return the base path of target template files. By default, it retrieves the value from pathvar
* scope of context by key {@link #VAR_TEMPLATE_BASE_PATH}.
*
* @return
*/
default String getTemplateBasePath() {
return Context.getCurrentThreadContext().getData(WebApplicationContext.SCOPE_PATHVAR, VAR_TEMPLATE_BASE_PATH);
}
/**
* Sub class can override this method to customize how to create target template file path by given base path and step.
*
*
* @param templateBasePath
* @param step
* @return
*/
default String createTemplateFilePath(String templateBasePath, String step) {
return templateBasePath + step + ".html";
}
/**
* Whether we should call {@link #updateForm(Object)} when the {@link #processValidation(Object)} returns SUCCESS.
*
* @param processData
* @return
*/
@Override
default boolean doUpdateOnValidationSuccess(FormProcessData processData) {
return confirmStepName().equalsIgnoreCase(processData.getStepCurrent()) &&
completeStepName().equalsIgnoreCase(processData.getStepSuccess());
}
/**
* This method defines the default policy of how to retrieve the form instance for current step. For confirm/complete step, we will
* always retrieve the form instance from the traceMap which have stored the form instance for current step at last step (when
* {@link #passDataToSnippet(String, String, Map)} was invoked), for other steps, the parent's implementation will be invoked.
*
* <p>
* From parent:
* <p>
* {@inheritDoc}
*
*/
@SuppressWarnings("unchecked")
@Override
default T retrieveFormInstance(FormFlowTraceData traceData, String currentStep) {
// for confirm and complete step, the form saved at last step would be used.
if (confirmStepName().equalsIgnoreCase(currentStep) || completeStepName().equalsIgnoreCase(currentStep)) {
return (T) traceData.getStepFormMap().get(currentStep);
} else {
return UpdatableFormFlowHandlerTrait.super.retrieveFormInstance(traceData, currentStep);
}
}
/**
* When the form flow finished, if the complete page rendering is skipped({@link #treatCompleteStepAsExit()} returns true), we have to
* pass data to snippet via flash scope since we have to exit the current flow and the current request will be redirect by a 302
* response.
*
* <p>
* From parent:
* <p>
* {@inheritDoc}
*
* @return true when step is complete and {@link #treatCompleteStepAsExit()} returns true
*/
@Override
default boolean passDataToSnippetByFlash(String currentStep, String renderTargetStep, FormFlowTraceData traceData) {
return completeStepName().equals(renderTargetStep) && treatCompleteStepAsExit();
}
}
| astamuse/asta4d | 162 | Java | org.eclipse.core.resources.prefs | text/plain | 2,979,669,764,401,426,000 |
/*
* Copyright 2016 astamuse company,Ltd.
*
* Licensed under the Apache License, Version 2.0 (the "License");
* you may not use this file except in compliance with the License.
* You may obtain a copy of the License at
*
* http://www.apache.org/licenses/LICENSE-2.0
*
* Unless required by applicable law or agreed to in writing, software
* distributed under the License is distributed on an "AS IS" BASIS,
* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
* See the License for the specific language governing permissions and
* limitations under the License.
*
*/
package com.astamuse.asta4d.web.form.flow.classical;
import java.util.HashSet;
import java.util.Set;
public class ClassicalMultiStepFormFlowTraitHelper {
/**
* Contains the step name of confirm and complete.
*
* @see ClassicalFormFlowConstant#STEP_CONFIRM
* @see ClassicalFormFlowConstant#STEP_COMPLETE
*/
static Set<String> NonEditSteps = new HashSet<>();
static {
NonEditSteps.add(ClassicalFormFlowConstant.STEP_CONFIRM);
NonEditSteps.add(ClassicalFormFlowConstant.STEP_COMPLETE);
}
}
| astamuse/asta4d | 162 | Java | org.eclipse.core.resources.prefs | text/plain | 1,826,210,042,486,715,100 |
/*
* Copyright 2016 astamuse company,Ltd.
*
* Licensed under the Apache License, Version 2.0 (the "License");
* you may not use this file except in compliance with the License.
* You may obtain a copy of the License at
*
* http://www.apache.org/licenses/LICENSE-2.0
*
* Unless required by applicable law or agreed to in writing, software
* distributed under the License is distributed on an "AS IS" BASIS,
* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
* See the License for the specific language governing permissions and
* limitations under the License.
*
*/
package com.astamuse.asta4d.web.form.flow.classical;
import org.slf4j.LoggerFactory;
import com.astamuse.asta4d.web.form.flow.base.BasicFormFlowHandlerTrait;
import com.astamuse.asta4d.web.form.flow.base.CommonFormResult;
import com.astamuse.asta4d.web.form.flow.base.FormProcessData;
public interface UpdatableFormFlowHandlerTrait<T> extends BasicFormFlowHandlerTrait<T> {
/**
*
* This method will call {@link #updateForm(Object)} when the validation is success and the
* {@link #doUpdateOnValidationSuccess(FormProcessData)} returns true.
*
* <p>
*
* From parent:
* <p>
* {@inheritDoc}
*
*/
@Override
default CommonFormResult processForm(FormProcessData processData, T form) {
CommonFormResult result = processValidation(processData, form);
if (result == CommonFormResult.SUCCESS && doUpdateOnValidationSuccess(processData)) {
try {
updateForm(form);
return CommonFormResult.SUCCESS;
} catch (Exception ex) {
LoggerFactory.getLogger(this.getClass()).error("error occured on step:" + processData.getStepCurrent(), ex);
return CommonFormResult.FAILED;
}
} else {
return result;
}
}
/**
* Whether we should call {@link #updateForm(Object)} when the {@link #processValidation(Object)} returns SUCCESS. The default is true.
*
* @param processData
* @return
*/
default boolean doUpdateOnValidationSuccess(FormProcessData processData) {
return true;
}
/**
* Sub classes must override this method to implement update logic.
*
* @param form
*/
public void updateForm(T form);
}
| astamuse/asta4d | 162 | Java | org.eclipse.core.resources.prefs | text/plain | -5,620,207,587,756,386,000 |
/*
* Copyright 2014 astamuse company,Ltd.
*
* Licensed under the Apache License, Version 2.0 (the "License");
* you may not use this file except in compliance with the License.
* You may obtain a copy of the License at
*
* http://www.apache.org/licenses/LICENSE-2.0
*
* Unless required by applicable law or agreed to in writing, software
* distributed under the License is distributed on an "AS IS" BASIS,
* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
* See the License for the specific language governing permissions and
* limitations under the License.
*
*/
package com.astamuse.asta4d.web.form.flow.classical;
import com.astamuse.asta4d.Context;
import com.astamuse.asta4d.web.WebApplicationContext;
import com.astamuse.asta4d.web.form.flow.base.BasicFormFlowHandlerTrait;
import com.astamuse.asta4d.web.form.flow.base.FormFlowTraceData;
/**
*
* This trait represents a classical one step form flow which contains only one input step. The developers are required to at least
* implement the following methods:
* <ul>
* <li>{@link #getFormCls()}
* <li>{@link #createInitForm()}
* <li>{@link #updateForm(Object)}
* </ul>
*
* The target template file for input could be specified in the URL rule by the fixed name of {@link #VAR_INPUT_TEMPLATE_FILE}.
*
* <p>
*
* Also, {@link #getTypeUnMatchValidator()} and {@link #getValueValidator()} are recommended to be overridden by a common parent class to
* perform validator configuration.
*
* @author e-ryu
*
* @param <T>
*/
public interface OneStepFormHandlerTrait<T> extends UpdatableFormFlowHandlerTrait<T> {
/**
* The default path var name of template file path
*/
public static final String VAR_INPUT_TEMPLATE_FILE = "VAR_INPUT_TEMPLATE_FILE#" + OneStepFormHandlerTrait.class.getName();
/**
* @see ClassicalFormFlowConstant#STEP_INPUT
*/
@Override
default String firstStepName() {
return ClassicalFormFlowConstant.STEP_INPUT;
}
/**
* In the parent class {@link BasicFormFlowHandlerTrait}'s implementation of skipSaveTraceMap, it says that the sub class have the
* responsibility to make sure save the trace map well, thus we override it to perform the obligation.
*
* <p>
*
* The trace map will never be saved for a one step form since there is no necessary to keep the trace
*
* @param currentStep
* @param renderTargetStep
* @param traceMap
* @return
*/
default boolean skipStoreTraceData(String currentStep, String renderTargetStep, FormFlowTraceData traceData) {
return true;
}
/**
*
* Do nothing for clear action since we will never store trace map for a one step form flow
*
*/
@Override
default void clearStoredTraceData(String traceId) {
// do nothing
}
/**
* always return null since we will never store trace map for a one step form flow
*/
@Override
default FormFlowTraceData retrieveTraceData(String traceId) {
return null;
}
/**
* Sub classes can override this method to customize how to translate a step to a target template file path or redirect target URL.
*
* @param step
* @return
*/
@Override
default String createMoveTargetForStep(String step) {
// always exit the flow except the target step is the first step
if (firstStepName().equals(step)) {
return getInputTemplateFilePath();
} else {
return null;
}
}
/**
* How to retrieve the target input template file path. The default is retrieving from path var scope by fixed var name
* {@link #VAR_INPUT_TEMPLATE_FILE}.
*
* @return
*/
default String getInputTemplateFilePath() {
return Context.getCurrentThreadContext().getData(WebApplicationContext.SCOPE_PATHVAR, VAR_INPUT_TEMPLATE_FILE);
}
}
| astamuse/asta4d | 162 | Java | org.eclipse.core.resources.prefs | text/plain | -626,715,028,502,327,800 |
/*
* Copyright 2014 astamuse company,Ltd.
*
* Licensed under the Apache License, Version 2.0 (the "License");
* you may not use this file except in compliance with the License.
* You may obtain a copy of the License at
*
* http://www.apache.org/licenses/LICENSE-2.0
*
* Unless required by applicable law or agreed to in writing, software
* distributed under the License is distributed on an "AS IS" BASIS,
* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
* See the License for the specific language governing permissions and
* limitations under the License.
*
*/
package com.astamuse.asta4d.web.form.flow.classical;
public class ClassicalFormFlowConstant {
public static final String STEP_EXIT = "exit";
public static final String STEP_INPUT = "input";
public static final String STEP_CONFIRM = "confirm";
public static final String STEP_COMPLETE = "complete";
}
| astamuse/asta4d | 162 | Java | org.eclipse.core.resources.prefs | text/plain | 841,556,348,627,130,000 |
/*
* Copyright 2014 astamuse company,Ltd.
*
* Licensed under the Apache License, Version 2.0 (the "License");
* you may not use this file except in compliance with the License.
* You may obtain a copy of the License at
*
* http://www.apache.org/licenses/LICENSE-2.0
*
* Unless required by applicable law or agreed to in writing, software
* distributed under the License is distributed on an "AS IS" BASIS,
* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
* See the License for the specific language governing permissions and
* limitations under the License.
*
*/
package com.astamuse.asta4d.web.form.flow.classical;
import org.apache.commons.lang3.StringUtils;
import com.astamuse.asta4d.web.form.flow.base.BasicFormFlowSnippetTrait;
/**
* This trait represents the rendering way of a classical flow that contains input/confirm/complete steps.
*
* @author e-ryu
*
*/
public interface ClassicalMultiStepFormFlowSnippetTrait extends BasicFormFlowSnippetTrait {
/**
*
* We will treat confirm and complete step as non edit step by default.
*
* <p>
* From parent:
* <p>
* {@inheritDoc}
*
* @return true when the step is confirm/complete by default
* @see ClassicalMultiStepFormFlowTraitHelper#NonEditSteps
*/
@Override
default boolean renderForEdit(String step, Object form, String fieldName) {
if (StringUtils.isEmpty(step)) {
return true;
} else {
return !ClassicalMultiStepFormFlowTraitHelper.NonEditSteps.contains(step.toLowerCase());
}
}
}
| astamuse/asta4d | 162 | Java | org.eclipse.core.resources.prefs | text/plain | 2,452,957,695,765,349,000 |
/*
* Copyright 2014 astamuse company,Ltd.
*
* Licensed under the Apache License, Version 2.0 (the "License");
* you may not use this file except in compliance with the License.
* You may obtain a copy of the License at
*
* http://www.apache.org/licenses/LICENSE-2.0
*
* Unless required by applicable law or agreed to in writing, software
* distributed under the License is distributed on an "AS IS" BASIS,
* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
* See the License for the specific language governing permissions and
* limitations under the License.
*
*/
package com.astamuse.asta4d.web.form.flow.classical;
import com.astamuse.asta4d.render.Renderer;
import com.astamuse.asta4d.web.form.flow.base.BasicFormFlowSnippetTrait;
import com.astamuse.asta4d.web.form.flow.base.FormFlowTraceData;
/**
*
* This trait represents the rendering way of a classical one step form flow which contains only one input step.
*
* @author e-ryu
*
*/
public interface OneStepFormSnippetTrait extends BasicFormFlowSnippetTrait {
default boolean renderForEdit(String step, Object form, String fieldName) {
return true;
}
default Renderer renderTraceData(FormFlowTraceData traceData) {
return Renderer.create();
}
}
| astamuse/asta4d | 162 | Java | org.eclipse.core.resources.prefs | text/plain | 33,370,265,980,860,508 |
/*
* Copyright 2014 astamuse company,Ltd.
*
* Licensed under the Apache License, Version 2.0 (the "License");
* you may not use this file except in compliance with the License.
* You may obtain a copy of the License at
*
* http://www.apache.org/licenses/LICENSE-2.0
*
* Unless required by applicable law or agreed to in writing, software
* distributed under the License is distributed on an "AS IS" BASIS,
* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
* See the License for the specific language governing permissions and
* limitations under the License.
*
*/
package com.astamuse.asta4d.web.form.flow.base;
import java.io.IOException;
import java.io.InputStream;
import java.lang.reflect.Array;
import java.nio.charset.StandardCharsets;
import java.util.ArrayList;
import java.util.LinkedList;
import java.util.List;
import org.apache.commons.io.IOUtils;
import org.apache.commons.lang3.ArrayUtils;
import org.apache.commons.lang3.StringUtils;
import org.jsoup.nodes.Element;
import org.jsoup.parser.Tag;
import com.astamuse.asta4d.data.ContextDataHolder;
import com.astamuse.asta4d.data.InjectTrace;
import com.astamuse.asta4d.render.ElementSetter;
import com.astamuse.asta4d.render.Renderer;
import com.astamuse.asta4d.util.ElementUtil;
import com.astamuse.asta4d.util.SelectorUtil;
import com.astamuse.asta4d.util.annotation.AnnotatedPropertyInfo;
import com.astamuse.asta4d.web.form.CascadeArrayFunctions;
import com.astamuse.asta4d.web.form.annotation.CascadeFormField;
import com.astamuse.asta4d.web.form.field.FormFieldPrepareRenderer;
public interface BasicFormFlowSnippetTrait extends CascadeArrayFunctions {
/**
* Sub class should tell us the current rendering mode. Since we have no any information about the concrete cases, we always return true
* by default.
*
* @param step
* @param form
* @param fieldName
* @return
*/
default boolean renderForEdit(String step, Object form, String fieldName) {
return true;
}
/**
* The entry of form rendering. Sub classes could override it in case of necessarily.
*
* @return
* @throws Exception
*/
default Renderer render(FormRenderingData renderingData) throws Exception {
Renderer renderer = preRender(renderingData);
renderer.add(renderTraceId(renderingData.getTraceId()));
Object form = retrieveRenderTargetForm(renderingData);
renderer.add(renderForm(renderingData.getRenderTargetStep(), form, EMPTY_INDEXES));
Element clientJs = retrieveClientCascadeUtilJsContent();
if (clientJs != null) {
renderer.add(":root", (Element elem) -> {
elem.appendChild(clientJs);
});
}
renderer.add(postRender(renderingData));
return renderer;
}
default Renderer preRender(FormRenderingData renderingData) {
return Renderer.create();
}
default Renderer postRender(FormRenderingData renderingData) {
return Renderer.create();
}
/**
* We only render the form trace map when it exists
*
* @return
*/
default Renderer renderTraceId(String traceId) {
if (StringUtils.isEmpty(traceId)) {
return Renderer.create();
} else {
return Renderer.create(":root", new ElementSetter() {
@Override
public void set(Element elem) {
Element hide = new Element(Tag.valueOf("input"), "");
hide.attr("name", FormFlowConstants.FORM_FLOW_TRACE_ID_QUERY_PARAM);
hide.attr("type", "hidden");
hide.attr("value", traceId);
elem.appendChild(hide);
}
});
}
}
default Object retrieveRenderTargetForm(FormRenderingData renderingData) {
return renderingData.getTraceData().getStepFormMap().get(renderingData.getRenderTargetStep());
}
/**
*
* PriorRenderMethod the whole given form instance. All the {@link FormFieldPrepareRenderer}s would be invoked here too.
*
* @param renderTargetStep
* @param form
* @param indexes
* @return
* @throws Exception
*/
default Renderer renderForm(String renderTargetStep, Object form, int[] indexes) throws Exception {
Renderer render = Renderer.create();
if (form == null) {
return render;
}
if (form instanceof StepRepresentableForm) {
String[] formRepresentingSteps = ((StepRepresentableForm) form).retrieveRepresentingSteps();
if (ArrayUtils.contains(formRepresentingSteps, renderTargetStep)) {
// it is OK
} else {
return render;
}
}
render.disableMissingSelectorWarning();
render.add(preRenderForm(renderTargetStep, form, indexes));
List<FormFieldPrepareRenderer> fieldDataPrepareRendererList = retrieveFieldPrepareRenderers(renderTargetStep, form);
for (FormFieldPrepareRenderer formFieldDataPrepareRenderer : fieldDataPrepareRendererList) {
BasicFormFlowTraitHelper.FieldRenderingInfo renderingInfo = BasicFormFlowTraitHelper.getRenderingInfo(this,
formFieldDataPrepareRenderer.targetField(), indexes);
render.add(formFieldDataPrepareRenderer.preRender(renderingInfo.editSelector, renderingInfo.displaySelector));
}
render.add(renderValueOfFields(renderTargetStep, form, indexes));
for (FormFieldPrepareRenderer formFieldDataPrepareRenderer : fieldDataPrepareRendererList) {
BasicFormFlowTraitHelper.FieldRenderingInfo renderingInfo = BasicFormFlowTraitHelper.getRenderingInfo(this,
formFieldDataPrepareRenderer.targetField(), indexes);
render.add(formFieldDataPrepareRenderer.postRender(renderingInfo.editSelector, renderingInfo.displaySelector));
}
render.add(postRenderForm(renderTargetStep, form, indexes));
return render.enableMissingSelectorWarning();
}
default Renderer preRenderForm(String renderTargetStep, Object form, int[] indexes) throws Exception {
return Renderer.create();
}
default Renderer postRenderForm(String renderTargetStep, Object form, int[] indexes) throws Exception {
return Renderer.create();
}
/**
*
* PriorRenderMethod the value of all the given form's fields.The rendering of cascade forms will be done here as well(recursively call
* the {@link #renderForm(String, Object, int)}).
*
* @param renderTargetStep
* @param form
* @param indexes
* @return
* @throws Exception
*/
default Renderer renderValueOfFields(String renderTargetStep, Object form, int[] indexes) throws Exception {
Renderer render = Renderer.create();
List<AnnotatedPropertyInfo> fieldList = BasicFormFlowTraitHelper.retrieveRenderTargetFieldList(form);
for (AnnotatedPropertyInfo field : fieldList) {
Object v = field.retrieveValue(form);
CascadeFormField cff = field.getAnnotation(CascadeFormField.class);
if (cff != null) {
String containerSelector = cff.containerSelector();
if (field.getType().isArray()) {// a cascade form for array
int len = Array.getLength(v);
List<Renderer> subRendererList = new ArrayList<>(len);
int loopStart = 0;
if (renderForEdit(renderTargetStep, form, cff.name())) {
// for rendering a template DOM
loopStart = -1;
}
Class<?> subFormType = field.getType().getComponentType();
Object subForm;
for (int i = loopStart; i < len; i++) {
int[] newIndex = indexes.clone();
// retrieve the form instance
if (i >= 0) {
newIndex = ArrayUtils.add(newIndex, i);
subForm = Array.get(v, i);
} else {
// create a template instance
subForm = createFormInstanceForCascadeFormArrayTemplate(subFormType);
}
Renderer subRenderer = Renderer.create();
// only rewrite the refs for normal instances
if (i >= 0) {
subRenderer.add(rewriteCascadeFormFieldArrayRef(renderTargetStep, subForm, newIndex));
}
subRenderer.add(renderForm(renderTargetStep, subForm, newIndex));
// hide the template DOM
if (i < 0) {
subRenderer.add(":root", hideCascadeFormTemplateDOM(subFormType));
}
subRendererList.add(subRenderer);
}
containerSelector = rewriteArrayIndexPlaceHolder(containerSelector, indexes);
render.add(containerSelector, subRendererList);
} else {// a simple cascade form
if (StringUtils.isNotEmpty(containerSelector)) {
render.add(containerSelector, renderForm(renderTargetStep, v, indexes));
} else {
render.add(renderForm(renderTargetStep, v, indexes));
}
}
continue;
}
if (v == null) {
@SuppressWarnings("rawtypes")
ContextDataHolder valueHolder;
if (field.getField() != null) {
valueHolder = InjectTrace.getInstanceInjectionTraceInfo(form, field.getField());
} else {
valueHolder = InjectTrace.getInstanceInjectionTraceInfo(form, field.getSetter());
}
if (valueHolder != null) {
v = convertRawInjectionTraceDataToRenderingData(field.getName(), field.getType(), valueHolder.getFoundOriginalData());
}
}
BasicFormFlowTraitHelper.FieldRenderingInfo renderingInfo = BasicFormFlowTraitHelper.getRenderingInfo(this, field, indexes);
// render.addDebugger("whole form before: " + field.getName());
if (renderForEdit(renderTargetStep, form, field.getName())) {
render.add(renderingInfo.valueRenderer.renderForEdit(renderingInfo.editSelector, v));
} else {
render.add(renderingInfo.valueRenderer.renderForDisplay(renderingInfo.editSelector, renderingInfo.displaySelector, v));
}
}
return render;
}
default String defaultDisplayElementSelectorForField(String fieldName) {
return SelectorUtil.id(fieldName + "-display");
}
default String defaultEditElementSelectorForField(String fieldName) {
return SelectorUtil.attr("name", fieldName);
}
default Renderer hideCascadeFormTemplateDOM(Class<?> subFormType) {
return Renderer.create(":root", new ElementSetter() {
@Override
public void set(Element elem) {
String style = elem.attr("style");
if (StringUtils.isEmpty(style)) {
style = "display:none";
} else {
if (!style.endsWith(";")) {
style += ";";
}
style += "display:none";
}
elem.attr("style", style);
}
});
}
@SuppressWarnings("rawtypes")
default Object createFormInstanceForCascadeFormArrayTemplate(Class subFormType) throws InstantiationException, IllegalAccessException {
return subFormType.newInstance();
}
/**
* Sub classes could override this method to customize how to rewrite the array index for cascade array forms.
*
* @param renderTargetStep
* @param form
* @param indexes
* @return
*/
default Renderer rewriteCascadeFormFieldArrayRef(final String renderTargetStep, final Object form, final int[] indexes) {
final String[] targetAttrs = rewriteCascadeFormFieldArrayRefTargetAttrs();
String[] attrSelectors = new String[targetAttrs.length];
for (int i = 0; i < attrSelectors.length; i++) {
attrSelectors[i] = SelectorUtil.attr(targetAttrs[i]);
}
return Renderer.create(StringUtils.join(attrSelectors, ","), new ElementSetter() {
@Override
public void set(Element elem) {
String v;
for (String attr : targetAttrs) {
v = elem.attr(attr);
if (StringUtils.isNotEmpty(v)) {
elem.attr(attr, rewriteArrayIndexPlaceHolder(v, indexes));
}
}
}
});
}
/**
* The attributes returned by this method will be rewritten for array index.
* <p>
* The default is {"id", "name", "cascade-ref", "cascade-ref-target", "cascade-ref-info-1", ..., "cascade-ref-info-9"}.
*
* @return
*/
default String[] rewriteCascadeFormFieldArrayRefTargetAttrs() {
return BasicFormFlowTraitHelper.DefaultCascadeFormFieldArrayRefTargetAttrs;
}
/**
* Sub classes should override this method to supply field prepare renderers.
*
* @return
* @throws Exception
*/
default List<FormFieldPrepareRenderer> retrieveFieldPrepareRenderers(String renderTargetStep, Object form) {
return new LinkedList<>();
}
/**
* Sub classes could override this method to customize how to handle the injection trace data for type unmatch errors.
*
* @param fieldName
* @param fieldDataType
* @param rawTraceData
* @return
*/
default Object convertRawInjectionTraceDataToRenderingData(String fieldName, Class<?> fieldDataType, Object rawTraceData) {
if (fieldDataType.isArray() && rawTraceData.getClass().isArray()) {
return rawTraceData;
} else if (rawTraceData.getClass().isArray()) {// but field data type is
// not array
if (Array.getLength(rawTraceData) > 0) {
return Array.get(rawTraceData, 0);
} else {
return null;
}
} else {
return rawTraceData;
}
}
default Element retrieveClientCascadeUtilJsContent() {
String exportName = clientCascadeUtilJsExportName();
if (exportName == null) {
return null;
}
if (BasicFormFlowTraitHelper.ClientCascadeJsContentCache != null) {
return BasicFormFlowTraitHelper.ClientCascadeJsContentCache.clone();
}
StringBuilder jsContent = new StringBuilder(300);
jsContent.append("<script>\n");
jsContent.append("var ").append(exportName).append("=(\n");
try (InputStream jsInput = clientCascadeUtilJsInputStream()) {
jsContent.append(IOUtils.toString(jsInput, StandardCharsets.UTF_8));
} catch (IOException ex) {
throw new RuntimeException(ex);
}
jsContent.append(")();\n");
jsContent.append("</script>");
BasicFormFlowTraitHelper.ClientCascadeJsContentCache = ElementUtil.parseAsSingle(jsContent.toString());
return BasicFormFlowTraitHelper.ClientCascadeJsContentCache.clone();
}
default String clientCascadeUtilJsExportName() {
return null;
}
default InputStream clientCascadeUtilJsInputStream() {
String jsPath = "/com/astamuse/asta4d/web/form/js/ClientCascadeUtil.js";
return this.getClass().getClassLoader().getResourceAsStream(jsPath);
}
}
| astamuse/asta4d | 162 | Java | org.eclipse.core.resources.prefs | text/plain | -2,923,064,564,271,394,000 |
/*
* Copyright 2014 astamuse company,Ltd.
*
* Licensed under the Apache License, Version 2.0 (the "License");
* you may not use this file except in compliance with the License.
* You may obtain a copy of the License at
*
* http://www.apache.org/licenses/LICENSE-2.0
*
* Unless required by applicable law or agreed to in writing, software
* distributed under the License is distributed on an "AS IS" BASIS,
* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
* See the License for the specific language governing permissions and
* limitations under the License.
*
*/
package com.astamuse.asta4d.web.form.flow.base;
public enum CommonFormResult {
SUCCESS, FAILED
}
| astamuse/asta4d | 162 | Java | org.eclipse.core.resources.prefs | text/plain | -604,871,430,391,240,000 |
/*
* Copyright 2016 astamuse company,Ltd.
*
* Licensed under the Apache License, Version 2.0 (the "License");
* you may not use this file except in compliance with the License.
* You may obtain a copy of the License at
*
* http://www.apache.org/licenses/LICENSE-2.0
*
* Unless required by applicable law or agreed to in writing, software
* distributed under the License is distributed on an "AS IS" BASIS,
* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
* See the License for the specific language governing permissions and
* limitations under the License.
*
*/
package com.astamuse.asta4d.web.form.flow.base;
import com.astamuse.asta4d.data.annotation.ContextData;
import com.astamuse.asta4d.data.annotation.ContextDataSet;
@ContextDataSet
public class FormRenderingData {
@ContextData(name = FormFlowConstants.FORM_FLOW_TRACE_ID)
private String traceId;
@ContextData(name = FormFlowConstants.FORM_FLOW_TRACE_DATA)
private FormFlowTraceData traceData;
@ContextData(name = FormFlowConstants.FORM_STEP_RENDER_TARGET)
private String renderTargetStep;
public String getTraceId() {
return traceId;
}
public FormFlowTraceData getTraceData() {
return traceData;
}
public String getRenderTargetStep() {
return renderTargetStep;
}
} | astamuse/asta4d | 162 | Java | org.eclipse.core.resources.prefs | text/plain | -1,053,065,848,705,619,800 |
/*
* Copyright 2016 astamuse company,Ltd.
*
* Licensed under the Apache License, Version 2.0 (the "License");
* you may not use this file except in compliance with the License.
* You may obtain a copy of the License at
*
* http://www.apache.org/licenses/LICENSE-2.0
*
* Unless required by applicable law or agreed to in writing, software
* distributed under the License is distributed on an "AS IS" BASIS,
* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
* See the License for the specific language governing permissions and
* limitations under the License.
*
*/
package com.astamuse.asta4d.web.form.flow.base;
import java.lang.annotation.ElementType;
import java.lang.annotation.Retention;
import java.lang.annotation.RetentionPolicy;
import java.lang.annotation.Target;
/**
* The annotation to suggest validation target
*
* @author e-ryu
*
*/
@Retention(RetentionPolicy.RUNTIME)
@Target({ ElementType.FIELD })
public @interface StepAwaredValidationTarget {
/**
* The representing target step
*
* @return
*/
public String value();
}
| astamuse/asta4d | 162 | Java | org.eclipse.core.resources.prefs | text/plain | -7,346,611,208,995,884,000 |
/*
* Copyright 2016 astamuse company,Ltd.
*
* Licensed under the Apache License, Version 2.0 (the "License");
* you may not use this file except in compliance with the License.
* You may obtain a copy of the License at
*
* http://www.apache.org/licenses/LICENSE-2.0
*
* Unless required by applicable law or agreed to in writing, software
* distributed under the License is distributed on an "AS IS" BASIS,
* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
* See the License for the specific language governing permissions and
* limitations under the License.
*
*/
package com.astamuse.asta4d.web.form.flow.base;
import java.io.Serializable;
import java.util.HashMap;
import java.util.Map;
public class FormFlowTraceData implements Serializable {
/**
*
*/
private static final long serialVersionUID = 1L;
private Map<String, Object> stepFormMap;
public FormFlowTraceData() {
stepFormMap = new HashMap<>();
}
public Map<String, Object> getStepFormMap() {
return stepFormMap;
}
}
| astamuse/asta4d | 162 | Java | org.eclipse.core.resources.prefs | text/plain | -6,140,552,137,726,097,000 |
/*
* Copyright 2016 astamuse company,Ltd.
*
* Licensed under the Apache License, Version 2.0 (the "License");
* you may not use this file except in compliance with the License.
* You may obtain a copy of the License at
*
* http://www.apache.org/licenses/LICENSE-2.0
*
* Unless required by applicable law or agreed to in writing, software
* distributed under the License is distributed on an "AS IS" BASIS,
* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
* See the License for the specific language governing permissions and
* limitations under the License.
*
*/
package com.astamuse.asta4d.web.form.flow.base;
import java.lang.reflect.Field;
import java.util.ArrayList;
import java.util.HashMap;
import java.util.Iterator;
import java.util.List;
import java.util.Map;
import java.util.Optional;
import org.apache.commons.lang3.reflect.FieldUtils;
import com.astamuse.asta4d.Configuration;
import com.astamuse.asta4d.util.ClassUtil;
public class StepAwaredValidationFormHelper {
/**
* We use this cache as copyOnWrite, we do not mind the cache may fail in multiple thread, the content will be cached eventually at
* sometime.
*/
private static Map<String, Optional<Field>> ValidationTargetFieldCache = new HashMap<>();
static final Object getValidationTargetByAnnotation(Object form, String step) {
String cacheKey = step + "@" + form.getClass().getName();
Optional<Field> oField = ValidationTargetFieldCache.get(cacheKey);
if (oField == null) {
List<Field> list = new ArrayList<>(ClassUtil.retrieveAllFieldsIncludeAllSuperClasses(form.getClass()));
Iterator<Field> it = list.iterator();
while (it.hasNext()) {
Field f = it.next();
StepAwaredValidationTarget vtAnno = f.getAnnotation(StepAwaredValidationTarget.class);
if (vtAnno == null) {
continue;
}
String representingStep = vtAnno.value();
if (step.equals(representingStep)) {
oField = Optional.of(f);
break;
}
}
if (oField == null) {
oField = Optional.empty();
}
if (Configuration.getConfiguration().isCacheEnable()) {
Map<String, Optional<Field>> newCache = new HashMap<>(ValidationTargetFieldCache);
newCache.put(cacheKey, oField);
ValidationTargetFieldCache = newCache;
}
}
if (oField.isPresent()) {
try {
return FieldUtils.readField(oField.get(), form, true);
} catch (IllegalAccessException e) {
throw new RuntimeException(e);
}
} else {
return form;
}
}
}
| astamuse/asta4d | 162 | Java | org.eclipse.core.resources.prefs | text/plain | 6,305,595,870,724,084,000 |
/*
* Copyright 2014 astamuse company,Ltd.
*
* Licensed under the Apache License, Version 2.0 (the "License");
* you may not use this file except in compliance with the License.
* You may obtain a copy of the License at
*
* http://www.apache.org/licenses/LICENSE-2.0
*
* Unless required by applicable law or agreed to in writing, software
* distributed under the License is distributed on an "AS IS" BASIS,
* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
* See the License for the specific language governing permissions and
* limitations under the License.
*
*/
package com.astamuse.asta4d.web.form.flow.base;
import java.util.Locale;
import org.jsoup.nodes.Element;
import com.astamuse.asta4d.Context;
import com.astamuse.asta4d.data.ContextDataHolder;
abstract class DelatedContext extends Context {
private Context context;
public DelatedContext(Context context) {
this.context = context;
}
public int hashCode() {
return context.hashCode();
}
public void setCurrentRenderingElement(Element elem) {
context.setCurrentRenderingElement(elem);
}
public Element getCurrentRenderingElement() {
return context.getCurrentRenderingElement();
}
public void setData(String key, Object data) {
context.setData(key, data);
}
public void setData(String scope, String key, Object data) {
context.setData(scope, key, data);
}
protected abstract String convertKey(String scope, String key);
public <T> T getData(String key) {
return context.getData(key);
}
public <T> T getData(String scope, String key) {
return context.getData(scope, convertKey(scope, key));
}
public <T> ContextDataHolder<T> getDataHolder(String key) {
return context.getDataHolder(key);
}
public <T> ContextDataHolder<T> getDataHolder(String scope, String key) {
return context.getDataHolder(scope, convertKey(scope, key));
}
public boolean equals(Object obj) {
return context.equals(obj);
}
public Locale getCurrentLocale() {
return context.getCurrentLocale();
}
public void setCurrentLocale(Locale locale) {
context.setCurrentLocale(locale);
}
public void init() {
context.init();
}
public void clear() {
context.clear();
}
public Context clone() {
return context.clone();
}
public String toString() {
return context.toString();
}
}
| astamuse/asta4d | 162 | Java | org.eclipse.core.resources.prefs | text/plain | -5,051,116,136,994,587,000 |
/*
* Copyright 2016 astamuse company,Ltd.
*
* Licensed under the Apache License, Version 2.0 (the "License");
* you may not use this file except in compliance with the License.
* You may obtain a copy of the License at
*
* http://www.apache.org/licenses/LICENSE-2.0
*
* Unless required by applicable law or agreed to in writing, software
* distributed under the License is distributed on an "AS IS" BASIS,
* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
* See the License for the specific language governing permissions and
* limitations under the License.
*
*/
package com.astamuse.asta4d.web.form.flow.base;
import java.util.HashSet;
import java.util.LinkedList;
import java.util.List;
import java.util.Set;
import com.astamuse.asta4d.web.form.validation.FormValidationMessage;
import com.astamuse.asta4d.web.form.validation.FormValidator;
import com.astamuse.asta4d.web.form.validation.JsrValidator;
import com.astamuse.asta4d.web.form.validation.TypeUnMatchValidator;
import com.astamuse.asta4d.web.util.message.DefaultMessageRenderingHelper;
/**
* This interface holds the functionalities of how to perform validation.
*
* @author e-ryu
*
*/
public interface ValidationProcessor {
/**
* Sub classes can override this method to customize how to handle the validation result
*
* @param form
* @return
*/
default CommonFormResult processValidation(FormProcessData processData, Object form) {
Object validationTarget = getValidationTarget(processData, form);
List<FormValidationMessage> validationMesssages = validate(validationTarget);
validationMesssages = postValidate(validationTarget, validationMesssages);
if (validationMesssages.isEmpty()) {
return CommonFormResult.SUCCESS;
} else {
for (FormValidationMessage msg : validationMesssages) {
outputValidationMessage(msg);
}
return CommonFormResult.FAILED;
}
}
default Object getValidationTarget(FormProcessData processData, Object form) {
if (form instanceof StepAwaredValidatableForm) {
return ((StepAwaredValidatableForm) form).getValidationTarget(processData.getStepCurrent());
} else {
return form;
}
}
/**
* Sub classes can override this method to customize how to output validation messages
*
* @param msg
*/
default void outputValidationMessage(FormValidationMessage msg) {
DefaultMessageRenderingHelper.getConfiguredInstance().err("#" + msg.getFieldName() + "-err-msg", msg.getMessage());
}
/**
*
* Sub classes can override this method to supply customized validation mechanism.
*
* @param form
* @return
*/
default List<FormValidationMessage> validate(Object form) {
List<FormValidationMessage> validationMessages = new LinkedList<>();
Set<String> fieldNameSet = new HashSet<String>();
List<FormValidationMessage> typeMessages = getTypeUnMatchValidator().validate(form);
for (FormValidationMessage message : typeMessages) {
validationMessages.add(message);
fieldNameSet.add(message.getFieldName());
}
List<FormValidationMessage> valueMessages = getValueValidator().validate(form);
// there may be a not null/empty value validation error for the fields which has been validated as type unmatch, we simply remove
// them.
for (FormValidationMessage message : valueMessages) {
if (!fieldNameSet.contains(message.getFieldName())) {
validationMessages.add(message);
}
}
return validationMessages;
}
default List<FormValidationMessage> postValidate(Object form, List<FormValidationMessage> msgList) {
return msgList;
}
/**
* Sub classes can override this method to supply a customized type unmatch validator
*
* @return
*/
default FormValidator getTypeUnMatchValidator() {
return new TypeUnMatchValidator();
}
/**
* Sub classes can override this method to supply a customized value validator
*
* @return
*/
default FormValidator getValueValidator() {
return new JsrValidator();
}
}
| astamuse/asta4d | 162 | Java | org.eclipse.core.resources.prefs | text/plain | 5,021,341,783,239,496,000 |
/*
* Copyright 2014 astamuse company,Ltd.
*
* Licensed under the Apache License, Version 2.0 (the "License");
* you may not use this file except in compliance with the License.
* You may obtain a copy of the License at
*
* http://www.apache.org/licenses/LICENSE-2.0
*
* Unless required by applicable law or agreed to in writing, software
* distributed under the License is distributed on an "AS IS" BASIS,
* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
* See the License for the specific language governing permissions and
* limitations under the License.
*
*/
package com.astamuse.asta4d.web.form.flow.base;
import com.astamuse.asta4d.data.annotation.ContextDataSet;
import com.astamuse.asta4d.web.annotation.QueryParam;
@ContextDataSet
public class SimpleFormProcessData implements FormProcessData {
@QueryParam(name = "step-exit")
private String stepExit;
@QueryParam(name = "step-back")
private String stepBack;
@QueryParam(name = "step-current")
private String stepCurrent;
@QueryParam(name = "step-failed")
private String stepFailed;
@QueryParam(name = "step-success")
private String stepSuccess;
@QueryParam(name = FormFlowConstants.FORM_FLOW_TRACE_ID_QUERY_PARAM)
private String flowTraceId;
public SimpleFormProcessData() {
}
public String getStepCurrent() {
return stepCurrent;
}
public String getStepFailed() {
return stepFailed;
}
public String getStepSuccess() {
return stepSuccess;
}
public String getStepBack() {
return stepBack;
}
public String getFlowTraceId() {
return flowTraceId;
}
@Override
public String getStepExit() {
return stepExit;
}
} | astamuse/asta4d | 162 | Java | org.eclipse.core.resources.prefs | text/plain | 5,722,816,549,353,686,000 |
/*
* Copyright 2014 astamuse company,Ltd.
*
* Licensed under the Apache License, Version 2.0 (the "License");
* you may not use this file except in compliance with the License.
* You may obtain a copy of the License at
*
* http://www.apache.org/licenses/LICENSE-2.0
*
* Unless required by applicable law or agreed to in writing, software
* distributed under the License is distributed on an "AS IS" BASIS,
* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
* See the License for the specific language governing permissions and
* limitations under the License.
*
*/
package com.astamuse.asta4d.web.form.flow.base;
import java.lang.reflect.Array;
import java.util.List;
import java.util.Map;
import org.apache.commons.collections4.CollectionUtils;
import org.apache.commons.lang3.ArrayUtils;
import org.apache.commons.lang3.StringUtils;
import com.astamuse.asta4d.Context;
import com.astamuse.asta4d.data.InjectUtil;
import com.astamuse.asta4d.util.annotation.AnnotatedPropertyInfo;
import com.astamuse.asta4d.util.annotation.AnnotatedPropertyUtil;
import com.astamuse.asta4d.web.WebApplicationContext;
import com.astamuse.asta4d.web.dispatch.RedirectUtil;
import com.astamuse.asta4d.web.dispatch.request.RequestHandler;
import com.astamuse.asta4d.web.form.CascadeArrayFunctions;
import com.astamuse.asta4d.web.form.annotation.CascadeFormField;
import com.astamuse.asta4d.web.form.flow.classical.ClassicalMultiStepFormFlowHandlerTrait;
import com.astamuse.asta4d.web.form.flow.classical.OneStepFormHandlerTrait;
/**
* The basic mechanism of form flow. This interface is implemented as a template which allows developer to override any method for
* customization.
* <p>
* To define a form flow, we need to plan a flow graph which describes how the flow flows.
* <p>
* (before first) --> step 1 <--> step2 <--> step3 <--> ... --> (exit)
* <p>
* Assume we have a flow as above, note that there can be cycles or branches, which means you can go any step from any other step in the
* flow graph, what you need to do is to define how the step should be transfered.
*
* <p>
*
* The {@link FormProcessData} interface defined the basic step information and the default implementation {@link SimpleFormProcessData}
* retrieves the step information from the submitted http query parameters which can be put into the HTML template files as a part of the
* submitting form. However you can always decide how to retrieve the step information by implement your own {@link FormProcessData}.
*
* <p>
*
* The retrieved {@link FormProcessData} will suggest the following things:
* <ul>
* <li>step to exit
* <li>step to back
* <li>current step
* <li>step for failing
* <li>step for success
* <li>flow trace id
* </ul>
*
* The default implementation of {@link #process()} will decide where the flow goes to by following sequence:
* <ol>
* <li>if step to exit does not empty, then exit the current flow by decide the render target step to be null
* <li>if the current step is empty, then treat the current step as "before first" step
* <li>if the current step "before first", then decide the render target step by {@link #firstStepName()}
* <li>if the step to back is not empty, then decide the render target step to be the step to back.
* <li>then calling {@link #processForm(FormProcessData, Object)} to process the submitted form data
* <li>if the result of process is success, then decide the render target step to be the step for success, otherwise to be the step of
* failing
* </ol>
*
* <i>See {@link #process()} for more details of what will be done.</i>
*
* <p>
*
* Then the following things is left for developers to decide as a rule of the flow:
* <ul>
* <li>override {@link #createTemplateFilePathForStep(String)} to decide how to convert a step to the corresponding target template file
* path.
* <li>override {@link #skipStoreTraceData(String, String, FormFlowTraceData)} to decide whether the flow trace data should be stored
* <li>override {@link #passDataToSnippetByFlash(String, String, FormFlowTraceData)} to decide how to pass the form data for rendering to
* snippet
* </ul>
*
* For most common situations, all the above things can be decided as general rules in the user project, so that a common parent class can
* be utilized to perform the common assumption. There are two built-in flows representing the classical situations:
* {@link OneStepFormHandlerTrait} and {@link ClassicalMultiStepFormFlowHandlerTrait}. Those two built-in interfaces can also be considered
* as reference implementation of how to design and decide a form flow. User project is always recommended to extend from those two built-in
* flows rather than this basic trait.
*
* <p>
*
* In user project, a common parent class is always recommended. A project limited common parent class can be used to decide the special
* rules of the project and the following two method is strongly recommended to be overridden to return a configured validator.
* <ul>
* <li>{@link #getTypeUnMatchValidator()}
* <li>{@link #getValueValidator()}
* </ul>
*
*
* @author e-ryu
*
* @param <T>
*
* @see BasicFormFlowSnippetTrait
* @see OneStepFormHandlerTrait
* @see ClassicalMultiStepFormFlowHandlerTrait
*/
@SuppressWarnings({ "rawtypes", "unchecked" })
public interface BasicFormFlowHandlerTrait<T> extends CascadeArrayFunctions, FormFlowTraceDataAccessor, ValidationProcessor {
public static final String FORM_PRE_DEFINED = "FORM_PRE_DEFINED#" + BasicFormFlowHandlerTrait.class.getName();
public static final String FORM_EXTRA_DATA = "FORM_EXTRA_DATA#" + BasicFormFlowHandlerTrait.class.getName();
/**
* Sub classes must tell us the name of first step
*
* @param step
* @return
*/
public String firstStepName();
/**
* translate a step to a target which may be a template file path usually, but a redirect target URL could be possible
*
* @param step
* @return target template file path
*/
public String createMoveTargetForStep(String step);
/**
* Tells the form type of current flow.
*
* @return
*/
public Class<T> getFormCls();
/**
* Tells the concrete type of {@link FormProcessData}, default is {@link SimpleFormProcessData}.
*
* @return
*/
default Class<? extends FormProcessData> getFormProcessDataCls() {
return SimpleFormProcessData.class;
}
/**
* Sub classes could override this method to create the initial form data(eg. query from db)
*
* @return
* @throws Exception
*/
default T createInitForm() throws Exception {
return (T) InjectUtil.retrieveContextDataSetInstance(getFormCls(), FORM_PRE_DEFINED, "");
}
/**
* Convenience for saving some extra data in context in case of being necessary
*
* @param actionInfo
* @see #getExtraDataFromContext()
*/
default <D> void saveExtraDataToContext(D actionInfo) {
Context.getCurrentThreadContext().setData(FORM_EXTRA_DATA, actionInfo);
}
/**
* Convenience for retrieving some extra data in context in case of being necessary
*
* @param actionInfo
* @see #saveExtraDataToContext(Object)
*/
default <D> D getExtraDataFromContext() {
return Context.getCurrentThreadContext().getData(FORM_EXTRA_DATA);
}
/**
* The default implementation as request handler which retrieve the process data and return converted the process result as target
* template file path.
*
* @return
* @throws Exception
*/
@RequestHandler
default String handle() throws Exception {
FormProcessData processData = (FormProcessData) InjectUtil.retrieveContextDataSetInstance(getFormProcessDataCls(),
"not-exist-formProcessData", "");
String targetStep = process(processData);
return createMoveTargetForStep(targetStep);
}
/**
*
* This method implement the basic mechanism which performs following things:
* <ol>
* <li>restore the trace data map which contains all the data in each step
* <li>retrieve instance of target form data which type is specified by {@link #getFormCls()}
* <li>if the current step is before first, set the render target step by {@link #firstStepName()}
* <li>if the back step is not empty, then set the back step name to render target step
* <li>else call {@link #processForm(FormProcessData, Object)} method to process the retrieved form data, currently in the process
* method, only {@link #validateForm(FormProcessData, Object)} is invoked to perform validation.
* <li>call {@link #rewriteTraceDataBeforeGoSnippet(String, String, FormFlowTraceData)} to rewrite trace data
* <li>if {@link #skipStoreTraceData(String, String, FormFlowTraceData)} returns true, call {@link #clearStoredTraceData(String)} to
* clear stored trace data, or call {@link #storeTraceData(String, String, String, FormFlowTraceData)} to store the trace data for next
* step process
* <li>call {@link #passDataToSnippet(String, String, Map)} to store all the retrieved and processed data for page rendering
* <li>return the render target step name
* </ol>
*
* Sub classes could override this method to translate the returned target step to the actual render target template file path.
*
* @return the render target step name
* @throws Exception
*/
default String process(FormProcessData processData) throws Exception {
String traceId = processData.getFlowTraceId();
// clear trace data when exit
if (processData.getStepExit() != null) {
clearStoredTraceData(traceId);
return null;
}
String currentStep = processData.getStepCurrent();
FormFlowTraceData traceData;
if (StringUtils.isEmpty(traceId)) {
traceData = createEmptyTraceData();
} else {
traceData = retrieveTraceData(traceId);
if (traceData == null) {
if (exitWhenTraceDataMissing()) {
return null;
} else {
traceId = "";
traceData = createEmptyTraceData();
currentStep = null;
}
}
}
// the first time access without existing input data or saved tracemap could not be retrieved(usually due to timeout)
if (currentStep == null) {
currentStep = FormFlowConstants.FORM_STEP_BEFORE_FIRST;
// save init form as predefined form
Context.getCurrentThreadContext().setData(FORM_PRE_DEFINED, createInitForm());
}
T form = retrieveFormInstance(traceData, currentStep);
traceData.getStepFormMap().put(currentStep, form);
String renderTargetStep = null;
CommonFormResult formResult = null;
if (FormFlowConstants.FORM_STEP_BEFORE_FIRST.equals(currentStep)) {
renderTargetStep = firstStepName();
} else if (processData.getStepBack() != null) {
renderTargetStep = processData.getStepBack();
} else {
// since the init step will not enter this branch, so the sub classes which override the process method could retrieve
// current step without any concern about null pointer exception.
formResult = processForm(processData, form);
if (formResult == CommonFormResult.SUCCESS) {
renderTargetStep = processData.getStepSuccess();
} else {
renderTargetStep = processData.getStepFailed();
}
}
rewriteTraceDataBeforeGoSnippet(currentStep, renderTargetStep, traceData);
if (skipStoreTraceData(currentStep, renderTargetStep, traceData)) {
clearStoredTraceData(traceId);
traceId = "";
} else {
traceId = storeTraceData(currentStep, renderTargetStep, traceId, traceData);
}
passDataToSnippet(currentStep, renderTargetStep, traceId, traceData);
return renderTargetStep;
}
/**
* Whether the form flow should be exit when the target trace data is not found. The default is true.
*
* @return
*/
default boolean exitWhenTraceDataMissing() {
return true;
}
/**
* The default process will only call the {@link #validateForm(Object)} and sub classes can override this method to add extra process
* logics such as updating form when validation succeeds.
*
* @param processData
* @param form
* @return
*/
default CommonFormResult processForm(FormProcessData processData, T form) {
return processValidation(processData, form);
}
/**
* Sub classes can override this method to customize how to retrieve the form instance by step information. By default, a form instance
* will be retrieved from context by calling {@link #generateFormInstanceFromContext(String)}.
*
* @param traceMap
* @param currentStep
* @return
*/
default T retrieveFormInstance(FormFlowTraceData traceData, String currentStep) {
// The subclass may override this method to retrieving form instance by various ways but we will always generate an instance from
// the context since we have no idea about the concrete logic of sub classes.
return generateFormInstanceFromContext(currentStep);
}
/**
* Sub classes can override this method to do some interception around form instance generation, especially some post processes.
* <p>
* <b>NOTE:</b> DO NOT replace this method completely at sub class, if you want to do some customized form retrieving, override the
* method {@link #retrieveFormInstance(Map, String)} instead.
*
* @param currentStep
* @return
*/
default T generateFormInstanceFromContext(String currentStep) {
try {
final T form = (T) InjectUtil.retrieveContextDataSetInstance(getFormCls(), FORM_PRE_DEFINED, "");
Context currentContext = Context.getCurrentThreadContext();
return assignArrayValueFromContext(getFormCls(), form, currentContext, EMPTY_INDEXES);
} catch (Exception e) {
throw new RuntimeException(e);
}
}
/**
* Assign array value to cascade forms of array type from context by recursively self call.
*
* @param formCls
* @param form
* @param currentContext
* @param indexes
* @return
* @throws Exception
*/
default T assignArrayValueFromContext(Class formCls, T form, Context currentContext, int[] indexes) throws Exception {
List<AnnotatedPropertyInfo> list = AnnotatedPropertyUtil.retrieveProperties(formCls);
for (final AnnotatedPropertyInfo field : list) {
CascadeFormField cff = field.getAnnotation(CascadeFormField.class);
if (cff != null) {
if (field.getType().isArray()) {// a cascade form for array
if (field.retrieveValue(form) != null) {
continue;
}
if (StringUtils.isEmpty(cff.arrayLengthField())) {
continue;
}
List<AnnotatedPropertyInfo> arrayLengthFieldList = AnnotatedPropertyUtil.retrievePropertyByName(formCls,
cff.arrayLengthField());
if (CollectionUtils.isEmpty(arrayLengthFieldList)) {
throw new NullPointerException("specified array length field [" + cff.arrayLengthField() + "] was not found");
}
// we only need one
AnnotatedPropertyInfo arrayLengthField = arrayLengthFieldList.get(0);
Integer len = (Integer) arrayLengthField.retrieveValue(form);
if (len == null) {
// throw new NullPointerException("specified array length field [" + cff.arrayLengthField() + "] is null");
len = 0;
}
final Object[] array = (Object[]) Array.newInstance(field.getType().getComponentType(), len);
for (int i = 0; i < len; i++) {
final int seq = i;
final int[] newIndex = ArrayUtils.add(indexes, seq);
Context.with(new DelatedContext(currentContext) {
protected String convertKey(String scope, String key) {
if (scope.equals(WebApplicationContext.SCOPE_QUERYPARAM)) {
return rewriteArrayIndexPlaceHolder(key, newIndex);
} else {
return key;
}
}
}, new Runnable() {
@Override
public void run() {
try {
Object subform = field.getType().getComponentType().newInstance();
InjectUtil.injectToInstance(subform);
Array.set(array, seq, subform);
} catch (Exception e) {
throw new RuntimeException(e);
}
}
});// end runnable and context.with
assignArrayValueFromContext(field.getType().getComponentType(), (T) array[seq], currentContext, newIndex);
} // end for loop
field.assignValue(form, array);
} else {
// a cascade form for not array
assignArrayValueFromContext(field.getType(), (T) field.retrieveValue(form), currentContext, indexes);
}
}
}
return form;
}
/**
* Always override render target step form data by current step form data
*
* @param currentStep
* @param renderTargetStep
* @param traceData
*/
default void rewriteTraceDataBeforeGoSnippet(String currentStep, String renderTargetStep, FormFlowTraceData traceData) {
Map<String, Object> formMap = traceData.getStepFormMap();
formMap.put(renderTargetStep, formMap.get(currentStep));
}
/**
* Sub classes can override this method to customize how to pass data to snippet.
* <p>
* This method will retrieve the form of render target from trace map and if it does not exists, the form of current step will be used.
* By default, the render target form is not set so the current step form will be used always. The sub classes could override this
* method to store the render target form to trace map before calling super.
*
* @param currentStep
* @param renderTargetStep
* @param traceMap
*/
default void passDataToSnippet(String currentStep, String renderTargetStep, String traceId, FormFlowTraceData traceData) {
WebApplicationContext context = WebApplicationContext.getCurrentThreadWebApplicationContext();
boolean byFlash = passDataToSnippetByFlash(currentStep, renderTargetStep, traceData);
passData(context, byFlash, FormFlowConstants.FORM_FLOW_TRACE_ID, traceId);
passData(context, byFlash, FormFlowConstants.FORM_FLOW_TRACE_DATA, traceData);
passData(context, byFlash, FormFlowConstants.FORM_STEP_RENDER_TARGET, renderTargetStep);
if (byFlash) {
RedirectUtil.registerRedirectInterceptor(this.getClass().getName() + "#passDataToSnippet",
new InjectionTraceDataRedirectInterceptor());
}
}
default void passData(WebApplicationContext context, boolean byFlash, String key, Object data) {
if (byFlash) {
RedirectUtil.addFlashScopeData(key, data);
} else {
context.setData(key, data);
}
}
/**
* Sub classes should tell us whether we should pass data to snippet via flash scope. The default is false.
*
* @param currentStep
* @param renderTargetStep
* @param form
* @param result
* @return
*/
default boolean passDataToSnippetByFlash(String currentStep, String renderTargetStep, FormFlowTraceData traceData) {
return false;
}
}
| astamuse/asta4d | 162 | Java | org.eclipse.core.resources.prefs | text/plain | -6,920,984,910,511,465,000 |
/*
* Copyright 2014 astamuse company,Ltd.
*
* Licensed under the Apache License, Version 2.0 (the "License");
* you may not use this file except in compliance with the License.
* You may obtain a copy of the License at
*
* http://www.apache.org/licenses/LICENSE-2.0
*
* Unless required by applicable law or agreed to in writing, software
* distributed under the License is distributed on an "AS IS" BASIS,
* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
* See the License for the specific language governing permissions and
* limitations under the License.
*
*/
package com.astamuse.asta4d.web.form.flow.base;
public interface FormProcessData {
public abstract String getStepExit();
public abstract String getStepBack();
public abstract String getStepCurrent();
public abstract String getStepFailed();
public abstract String getStepSuccess();
public abstract String getFlowTraceId();
} | astamuse/asta4d | 162 | Java | org.eclipse.core.resources.prefs | text/plain | -4,653,411,783,396,940,000 |
/*
* Copyright 2016 astamuse company,Ltd.
*
* Licensed under the Apache License, Version 2.0 (the "License");
* you may not use this file except in compliance with the License.
* You may obtain a copy of the License at
*
* http://www.apache.org/licenses/LICENSE-2.0
*
* Unless required by applicable law or agreed to in writing, software
* distributed under the License is distributed on an "AS IS" BASIS,
* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
* See the License for the specific language governing permissions and
* limitations under the License.
*
*/
package com.astamuse.asta4d.web.form.flow.base;
import java.util.Map;
import org.apache.commons.lang3.StringUtils;
import com.astamuse.asta4d.web.WebApplicationConfiguration;
import com.astamuse.asta4d.web.form.flow.classical.ClassicalMultiStepFormFlowHandlerTrait;
import com.astamuse.asta4d.web.util.SecureIdGenerator;
/**
* This interface holds the functionalities about trace data persisting.
*
* @author e-ryu
*
*/
public interface FormFlowTraceDataAccessor {
default FormFlowTraceData createEmptyTraceData() {
return new FormFlowTraceData();
}
/**
* <b>Note</b>: In fact, we should not save the trace map when some steps such as init step to avoid unnecessary memory usage, thus we
* call the {@link #skipSaveTraceMap(String, String, Map)} to decide save or not.
* <p>
* In other words ,the sub class have the responsibility to tell us save or not by overriding the method
* {@link #skipSaveTraceData(String, String, FormFlowTraceData)}.
*
* @param currentStep
* @param renderTargetStep
* @param traceData
* @return
*/
default String storeTraceData(String currentStep, String renderTargetStep, String traceId, FormFlowTraceData traceData) {
String storeId = StringUtils.isEmpty(traceId) ? SecureIdGenerator.createEncryptedURLSafeId() : traceId;
WebApplicationConfiguration.getWebApplicationConfiguration().getExpirableDataManager().put(storeId, traceData,
traceDataExpireTimeInMilliSeconds());
return storeId;
}
/**
* Since we are lacking of necessary step information to judge if we should save or not, we only do the basic judgment for the init
* step. The sub class have the responsibility to handle other cases.
*
* @see ClassicalMultiStepFormFlowHandlerTrait#skipSaveTraceData(String, String, FormFlowTraceData)
*
*/
default boolean skipStoreTraceData(String currentStep, String renderTargetStep, FormFlowTraceData traceData) {
if (FormFlowConstants.FORM_STEP_BEFORE_FIRST.equals(currentStep)) {
return true;
} else {
return false;
}
}
/**
*
* retrieve the stored trace data.
*
* @param traceId
* @return
* @see #saveTraceMap(String, String, Map)
*/
default FormFlowTraceData retrieveTraceData(String traceId) {
return WebApplicationConfiguration.getWebApplicationConfiguration().getExpirableDataManager().get(traceId,
removeTraceDataWhenRetrieving());
}
/**
*
*
* @return
*/
default boolean removeTraceDataWhenRetrieving() {
return false;
}
/**
*
* clear the stored trace map.
*
* @param traceData
* @see #saveTraceMap(String, String, Map)
*/
default void clearStoredTraceData(String traceId) {
if (StringUtils.isNotEmpty(traceId)) {
WebApplicationConfiguration.getWebApplicationConfiguration().getExpirableDataManager().get(traceId, true);
}
}
/**
* Sub classes can override this method to customize how long the form flow trace data will keep alive.
* <p>
* The default value is 30 minutes.
*
* @return
*/
default long traceDataExpireTimeInMilliSeconds() {
// 30 minutes
return 30 * 60 * 1000L;
}
}
| astamuse/asta4d | 162 | Java | org.eclipse.core.resources.prefs | text/plain | 3,543,884,645,039,966,700 |
/*
* Copyright 2016 astamuse company,Ltd.
*
* Licensed under the Apache License, Version 2.0 (the "License");
* you may not use this file except in compliance with the License.
* You may obtain a copy of the License at
*
* http://www.apache.org/licenses/LICENSE-2.0
*
* Unless required by applicable law or agreed to in writing, software
* distributed under the License is distributed on an "AS IS" BASIS,
* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
* See the License for the specific language governing permissions and
* limitations under the License.
*
*/
package com.astamuse.asta4d.web.form.flow.base;
import java.util.Iterator;
import java.util.LinkedList;
import java.util.List;
import java.util.Map;
import java.util.concurrent.ConcurrentHashMap;
import org.apache.commons.lang3.StringUtils;
import org.jsoup.nodes.Element;
import com.astamuse.asta4d.Configuration;
import com.astamuse.asta4d.util.annotation.AnnotatedPropertyInfo;
import com.astamuse.asta4d.util.annotation.AnnotatedPropertyUtil;
import com.astamuse.asta4d.web.form.annotation.FormField;
import com.astamuse.asta4d.web.form.field.FormFieldValueRenderer;
public class BasicFormFlowTraitHelper {
public static class FieldRenderingInfo {
String editSelector;
String displaySelector;
FormFieldValueRenderer valueRenderer;
FieldRenderingInfo replaceArrayIndex(BasicFormFlowSnippetTrait snippet, int[] indexes) {
FieldRenderingInfo newInfo = new FieldRenderingInfo();
newInfo.editSelector = snippet.rewriteArrayIndexPlaceHolder(editSelector, indexes);
newInfo.displaySelector = snippet.rewriteArrayIndexPlaceHolder(displaySelector, indexes);
newInfo.valueRenderer = valueRenderer;
return newInfo;
}
}
private static final Map<String, List<AnnotatedPropertyInfo>> RenderingTargetFieldsMap = new ConcurrentHashMap<>();
private static final Map<AnnotatedPropertyInfo, BasicFormFlowTraitHelper.FieldRenderingInfo> FieldRenderingInfoMap = new ConcurrentHashMap<>();
static final List<AnnotatedPropertyInfo> retrieveRenderTargetFieldList(Object form) {
List<AnnotatedPropertyInfo> list = RenderingTargetFieldsMap.get(form.getClass().getName());
if (list == null) {
list = new LinkedList<AnnotatedPropertyInfo>(AnnotatedPropertyUtil.retrieveProperties(form.getClass()));
Iterator<AnnotatedPropertyInfo> it = list.iterator();
while (it.hasNext()) {
// remove all the non form field properties
if (it.next().getAnnotation(FormField.class) == null) {
it.remove();
}
}
RenderingTargetFieldsMap.put(form.getClass().getName(), list);
}
return list;
}
static final BasicFormFlowTraitHelper.FieldRenderingInfo getRenderingInfo(BasicFormFlowSnippetTrait snippet, AnnotatedPropertyInfo f,
int[] indexes) {
BasicFormFlowTraitHelper.FieldRenderingInfo info = FieldRenderingInfoMap.get(f);
if (info == null) {
info = new BasicFormFlowTraitHelper.FieldRenderingInfo();
FormField ffAnno = f.getAnnotation(FormField.class);
String fieldName = f.getName();
String editSelector = ffAnno.editSelector();
if (StringUtils.isEmpty(editSelector)) {
editSelector = snippet.defaultEditElementSelectorForField(fieldName);
}
info.editSelector = editSelector;
String displaySelector = ffAnno.displaySelector();
if (StringUtils.isEmpty(displaySelector)) {
displaySelector = snippet.defaultDisplayElementSelectorForField(fieldName);
}
info.displaySelector = displaySelector;
try {
info.valueRenderer = ffAnno.fieldValueRenderer().newInstance();
} catch (InstantiationException | IllegalAccessException e) {
throw new RuntimeException(e);
}
if (Configuration.getConfiguration().isCacheEnable()) {
FieldRenderingInfoMap.put(f, info);
}
}
if (indexes.length > 0) {
return info.replaceArrayIndex(snippet, indexes);
} else {
return info;
}
}
//@formatter:off
static final String[] DefaultCascadeFormFieldArrayRefTargetAttrs = {
"id",
"name",
"cascade-ref",
"cascade-ref-target",
"cascade-ref-info-1",
"cascade-ref-info-2",
"cascade-ref-info-3",
"cascade-ref-info-4",
"cascade-ref-info-5",
"cascade-ref-info-6",
"cascade-ref-info-7",
"cascade-ref-info-8",
"cascade-ref-info-9",
};
//@formatter:on
static Element ClientCascadeJsContentCache = null;
}
| astamuse/asta4d | 162 | Java | org.eclipse.core.resources.prefs | text/plain | -804,945,185,912,524,200 |
/*
* Copyright 2016 astamuse company,Ltd.
*
* Licensed under the Apache License, Version 2.0 (the "License");
* you may not use this file except in compliance with the License.
* You may obtain a copy of the License at
*
* http://www.apache.org/licenses/LICENSE-2.0
*
* Unless required by applicable law or agreed to in writing, software
* distributed under the License is distributed on an "AS IS" BASIS,
* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
* See the License for the specific language governing permissions and
* limitations under the License.
*
*/
package com.astamuse.asta4d.web.form.flow.base;
/**
* This interface suggests the validation process should validate the retrieved target rather than the form instance itself.
*
* @author e-ryu
*
*/
public interface StepAwaredValidatableForm {
/**
* The default implementation of this method is to retrieve the field annotated by {@link StepAwaredValidationTarget}.
*
* @param step
* @return
*/
default Object getValidationTarget(String step) {
return StepAwaredValidationFormHelper.getValidationTargetByAnnotation(this, step);
}
}
| astamuse/asta4d | 162 | Java | org.eclipse.core.resources.prefs | text/plain | -6,822,432,581,950,974,000 |
/*
* Copyright 2014 astamuse company,Ltd.
*
* Licensed under the Apache License, Version 2.0 (the "License");
* you may not use this file except in compliance with the License.
* You may obtain a copy of the License at
*
* http://www.apache.org/licenses/LICENSE-2.0
*
* Unless required by applicable law or agreed to in writing, software
* distributed under the License is distributed on an "AS IS" BASIS,
* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
* See the License for the specific language governing permissions and
* limitations under the License.
*
*/
package com.astamuse.asta4d.web.form.flow.base;
public class FormFlowConstants {
public static final String FORM_FLOW_TRACE_ID_QUERY_PARAM = "FlowFormConstants_FORM_FLOW_TRACE_ID_QP";
public static final String FORM_FLOW_TRACE_ID = "FlowFormConstants_FORM_FLOW_TRACE_ID";
public static final String FORM_FLOW_TRACE_DATA = "FlowFormConstants_FORM_FLOW_TRACE_DATA";
public static final String FORM_STEP_BEFORE_FIRST = "FlowFormConstants_FORM_STEP_BEFORE_FIRST";
public static final String FORM_STEP_RENDER_TARGET = "FlowFormConstants_FORM_STEP_RENDER_TARGET";
}
| astamuse/asta4d | 162 | Java | org.eclipse.core.resources.prefs | text/plain | 2,451,239,718,516,797,400 |
package com.astamuse.asta4d.web.form.flow.base;
import java.io.Serializable;
import java.util.List;
import com.astamuse.asta4d.Context;
import com.astamuse.asta4d.data.InjectTrace;
import com.astamuse.asta4d.web.WebApplicationContext;
import com.astamuse.asta4d.web.dispatch.RedirectInterceptor;
import com.astamuse.asta4d.web.dispatch.RedirectUtil;
public class InjectionTraceDataRedirectInterceptor implements RedirectInterceptor, Serializable {
private static final String PRE_INJECTION_TRACE_INFO = "PRE_INJECTION_TRACE_INFO#" +
InjectionTraceDataRedirectInterceptor.class.getName();
/**
*
*/
private static final long serialVersionUID = 1L;
@Override
public void beforeRedirect() {
RedirectUtil.addFlashScopeData(PRE_INJECTION_TRACE_INFO, InjectTrace.retrieveTraceList());
}
@Override
public void afterRedirectDataRestore() {
List list = (List) Context.getCurrentThreadContext().getData(WebApplicationContext.SCOPE_FLASH, PRE_INJECTION_TRACE_INFO);
InjectTrace.restoreTraceList(list);
}
}
| astamuse/asta4d | 162 | Java | org.eclipse.core.resources.prefs | text/plain | -6,998,248,017,289,080,000 |
/*
* Copyright 2016 astamuse company,Ltd.
*
* Licensed under the Apache License, Version 2.0 (the "License");
* you may not use this file except in compliance with the License.
* You may obtain a copy of the License at
*
* http://www.apache.org/licenses/LICENSE-2.0
*
* Unless required by applicable law or agreed to in writing, software
* distributed under the License is distributed on an "AS IS" BASIS,
* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
* See the License for the specific language governing permissions and
* limitations under the License.
*
*/
package com.astamuse.asta4d.web.form.flow.base;
import java.lang.reflect.InvocationTargetException;
import org.apache.commons.beanutils.BeanUtils;
/**
* Use this interface to indicate the representing input step when a single form class is to be used in different input steps.
*
* NOTE: This interface only works at rendering stage even the name suggests it may work at validation stage. This confusion will be fixed
* in future.
*
* @author e-ryu
*
*/
public interface StepRepresentableForm {
default void copyPropertiesFrom(Object from) {
try {
BeanUtils.copyProperties(this, from);
} catch (IllegalAccessException | InvocationTargetException e) {
throw new RuntimeException(e);
}
}
default void copyPropertiesTo(Object target) {
try {
BeanUtils.copyProperties(target, this);
} catch (IllegalAccessException | InvocationTargetException e) {
throw new RuntimeException(e);
}
}
public String[] retrieveRepresentingSteps();
}
| astamuse/asta4d | 162 | Java | org.eclipse.core.resources.prefs | text/plain | -8,170,261,012,925,834,000 |
/*
* Copyright 2014 astamuse company,Ltd.
*
* Licensed under the Apache License, Version 2.0 (the "License");
* you may not use this file except in compliance with the License.
* You may obtain a copy of the License at
*
* http://www.apache.org/licenses/LICENSE-2.0
*
* Unless required by applicable law or agreed to in writing, software
* distributed under the License is distributed on an "AS IS" BASIS,
* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
* See the License for the specific language governing permissions and
* limitations under the License.
*
*/
package com.astamuse.asta4d.web.form.validation;
public class FormValidationMessage {
private String fieldName;
private String message;
public FormValidationMessage(String fieldName, String message) {
super();
this.fieldName = fieldName;
this.message = message;
}
public String getFieldName() {
return fieldName;
}
public String getMessage() {
return message;
}
@Override
public String toString() {
return "FormValidationMessage:name=[" + fieldName + "], message=[" + message + "]";
}
}
| astamuse/asta4d | 162 | Java | org.eclipse.core.resources.prefs | text/plain | 2,532,643,986,574,666,000 |
/*
* Copyright 2014 astamuse company,Ltd.
*
* Licensed under the Apache License, Version 2.0 (the "License");
* you may not use this file except in compliance with the License.
* You may obtain a copy of the License at
*
* http://www.apache.org/licenses/LICENSE-2.0
*
* Unless required by applicable law or agreed to in writing, software
* distributed under the License is distributed on an "AS IS" BASIS,
* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
* See the License for the specific language governing permissions and
* limitations under the License.
*
*/
package com.astamuse.asta4d.web.form.validation;
import java.nio.charset.StandardCharsets;
import java.util.Iterator;
import java.util.List;
import java.util.Locale;
import java.util.MissingResourceException;
import java.util.ResourceBundle;
import java.util.Set;
import javax.validation.ConstraintViolation;
import javax.validation.ElementKind;
import javax.validation.Path;
import javax.validation.Path.Node;
import javax.validation.Validation;
import javax.validation.Validator;
import org.apache.commons.lang3.ArrayUtils;
import org.apache.commons.lang3.StringUtils;
import org.hibernate.validator.messageinterpolation.ResourceBundleMessageInterpolator;
import org.hibernate.validator.spi.resourceloading.ResourceBundleLocator;
import com.astamuse.asta4d.util.annotation.AnnotatedPropertyInfo;
import com.astamuse.asta4d.util.annotation.AnnotatedPropertyUtil;
import com.astamuse.asta4d.util.collection.ListConvertUtil;
import com.astamuse.asta4d.util.collection.RowConvertor;
import com.astamuse.asta4d.util.i18n.pattern.CharsetResourceBundleFactory;
import com.astamuse.asta4d.util.i18n.pattern.ResourceBundleFactory;
import com.astamuse.asta4d.web.WebApplicationContext;
import com.astamuse.asta4d.web.form.annotation.CascadeFormField;
public class JsrValidator extends CommonValidatorBase implements FormValidator {
protected static class Asta4DResourceBundleFactoryAdapter implements ResourceBundleLocator {
private String baseName;
private ResourceBundleFactory resourceBundleFactory;
public Asta4DResourceBundleFactoryAdapter(String baseName) {
this(baseName, new CharsetResourceBundleFactory(StandardCharsets.UTF_8));
}
public Asta4DResourceBundleFactoryAdapter(String baseName, ResourceBundleFactory resourceBundleFactory) {
this.baseName = baseName;
this.resourceBundleFactory = resourceBundleFactory;
}
@Override
public ResourceBundle getResourceBundle(Locale locale) {
try {
return resourceBundleFactory.retrieveResourceBundle(baseName, locale);
} catch (MissingResourceException mre) {
return null;
}
}
}
protected static class Asta4DIntegratedResourceBundleInterpolator extends ResourceBundleMessageInterpolator {
public Asta4DIntegratedResourceBundleInterpolator() {
super();
}
public Asta4DIntegratedResourceBundleInterpolator(ResourceBundleLocator userResourceBundleLocator, boolean cacheMessages) {
super(userResourceBundleLocator, cacheMessages);
}
public Asta4DIntegratedResourceBundleInterpolator(ResourceBundleLocator userResourceBundleLocator) {
super(userResourceBundleLocator);
}
protected Locale retrieveLocalFromAsta4d() {
Locale loc = WebApplicationContext.getCurrentThreadWebApplicationContext().getCurrentLocale();
if (loc == null) {
return Locale.getDefault();
} else {
return loc;
}
}
@Override
public String interpolate(String message, Context context) {
return super.interpolate(message, context, retrieveLocalFromAsta4d());
}
@Override
public String interpolate(String message, Context context, Locale locale) {
return super.interpolate(message, context, retrieveLocalFromAsta4d());
}
}
protected static class ValidationPropertyInfo {
Path path;
AnnotatedPropertyInfo field;
int[] indexes;
public ValidationPropertyInfo(Path path, AnnotatedPropertyInfo field, int[] indexes) {
super();
this.path = path;
this.field = field;
this.indexes = indexes;
}
}
protected Validator validator;
public JsrValidator() {
this(retrieveDefaultValidator());
}
public JsrValidator(Validator validator) {
this(validator, true);
}
public JsrValidator(Validator validator, boolean addFieldLablePrefixToMessage) {
super(addFieldLablePrefixToMessage);
this.validator = validator;
}
private static Validator defaultValidator = null;
protected static Validator retrieveDefaultValidator() {
// as an out-of-box default implementation, we do not mind we may create the instance many times.
if (defaultValidator == null) {
defaultValidator = Validation.byDefaultProvider().configure()
.messageInterpolator(new Asta4DIntegratedResourceBundleInterpolator()).buildValidatorFactory().getValidator();
}
return defaultValidator;
}
@Override
public List<FormValidationMessage> validate(final Object form) {
Set<ConstraintViolation<Object>> cvs = validator.validate(form);
return ListConvertUtil.transform(cvs, new RowConvertor<ConstraintViolation<Object>, FormValidationMessage>() {
@Override
public FormValidationMessage convert(int rowIndex, ConstraintViolation<Object> cv) {
ValidationPropertyInfo vp = retrieveValidationPropertyInfo(form.getClass(), cv.getPropertyPath());
String fieldName;
String msg;
if (vp.field == null) {
// which means we cannot retrieve the annotated form field information, thus we got a unpredicated validation error
fieldName = vp.path.toString();
msg = cv.getMessage();
} else {
fieldName = retrieveFieldName(vp.field, vp.indexes);
String fieldLabel = retrieveFieldLabel(vp.field, vp.indexes);
String annotatedMsg = retrieveFieldAnnotatedMessage(vp.field);
if (StringUtils.isNotEmpty(annotatedMsg)) {
msg = createAnnotatedMessage(vp.field.getType(), fieldName, fieldLabel, annotatedMsg);
} else {
String fieldTypeName = retrieveFieldTypeName(vp.field);
msg = createMessage(vp.field.getType(), fieldName, fieldLabel, fieldTypeName, cv.getMessage());
}
}
return new FormValidationMessage(fieldName, msg);
}
});
}
@SuppressWarnings("rawtypes")
protected String createMessage(Class formCls, String fieldName, String fieldLabel, String fieldTypeName, String cvMsg) {
if (addFieldLablePrefixToMessage) {
String msgTemplate = "%s: %s";
return String.format(msgTemplate, fieldLabel, cvMsg);
} else {
return cvMsg;
}
}
protected ValidationPropertyInfo retrieveValidationPropertyInfo(Class<?> formCls, Path path) {
Iterator<Node> it = path.iterator();
Class<?> cls = formCls;
int[] indexes = EMPTY_INDEXES;
try {
while (it.hasNext()) {
Node node = it.next();
if (node.getKind() != ElementKind.PROPERTY) {
// we cannot handle this case
return new ValidationPropertyInfo(path, null, indexes);
}
String name = node.getName();
if (it.hasNext()) {// not the last
AnnotatedPropertyInfo field = AnnotatedPropertyUtil.retrievePropertyByBeanPropertyName(cls, name).get(0);
CascadeFormField cff = field.getAnnotation(CascadeFormField.class);
if (cff == null) {
// regular fields
cls = field.getType();
} else if (StringUtils.isEmpty(cff.arrayLengthField())) {
// simple cascading
cls = field.getType();
} else {
// array cascading
cls = field.getType().getComponentType();
if (node.getIndex() != null) {
indexes = ArrayUtils.add(indexes, node.getIndex().intValue());
}
}
continue;
} else {// the last
AnnotatedPropertyInfo field = AnnotatedPropertyUtil.retrievePropertyByBeanPropertyName(cls, name).get(0);
if (field == null) {
// it seems we got a unexpected error
return new ValidationPropertyInfo(path, null, indexes);
} else {
if (node.getIndex() == null) {
// regular fields or simple cascading
return new ValidationPropertyInfo(path, field, indexes);
} else {
return new ValidationPropertyInfo(path, field, ArrayUtils.add(indexes, node.getIndex().intValue()));
}
}
}
}
// it seems impossible
return new ValidationPropertyInfo(path, null, indexes);
} catch (Exception e) {
throw new RuntimeException(e);
}
}
protected String retrieveFieldDisplayName(String fieldName) {
return fieldName;
}
}
| astamuse/asta4d | 162 | Java | org.eclipse.core.resources.prefs | text/plain | 7,857,740,036,551,519,000 |
/*
* Copyright 2014 astamuse company,Ltd.
*
* Licensed under the Apache License, Version 2.0 (the "License");
* you may not use this file except in compliance with the License.
* You may obtain a copy of the License at
*
* http://www.apache.org/licenses/LICENSE-2.0
*
* Unless required by applicable law or agreed to in writing, software
* distributed under the License is distributed on an "AS IS" BASIS,
* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
* See the License for the specific language governing permissions and
* limitations under the License.
*
*/
package com.astamuse.asta4d.web.form.validation;
import java.util.List;
public interface FormValidator {
public List<FormValidationMessage> validate(Object form);
}
| astamuse/asta4d | 162 | Java | org.eclipse.core.resources.prefs | text/plain | 5,457,972,947,299,936,000 |
/*
* Copyright 2014 astamuse company,Ltd.
*
* Licensed under the Apache License, Version 2.0 (the "License");
* you may not use this file except in compliance with the License.
* You may obtain a copy of the License at
*
* http://www.apache.org/licenses/LICENSE-2.0
*
* Unless required by applicable law or agreed to in writing, software
* distributed under the License is distributed on an "AS IS" BASIS,
* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
* See the License for the specific language governing permissions and
* limitations under the License.
*
*/
package com.astamuse.asta4d.web.form.validation;
import java.lang.reflect.Array;
import java.lang.reflect.InvocationTargetException;
import java.util.Arrays;
import java.util.LinkedList;
import java.util.List;
import org.apache.commons.lang3.ArrayUtils;
import org.apache.commons.lang3.StringUtils;
import com.astamuse.asta4d.data.ContextDataHolder;
import com.astamuse.asta4d.data.InjectTrace;
import com.astamuse.asta4d.util.annotation.AnnotatedPropertyInfo;
import com.astamuse.asta4d.util.annotation.AnnotatedPropertyUtil;
import com.astamuse.asta4d.util.collection.ListConvertUtil;
import com.astamuse.asta4d.util.collection.RowConvertor;
import com.astamuse.asta4d.web.form.annotation.CascadeFormField;
public class TypeUnMatchValidator extends CommonValidatorBase implements FormValidator {
public TypeUnMatchValidator() {
super();
}
public TypeUnMatchValidator(boolean addFieldLablePrefixToMessage) {
super(addFieldLablePrefixToMessage);
}
@Override
public List<FormValidationMessage> validate(Object form) {
List<FormValidationMessage> msgList = new LinkedList<>();
addMessage(msgList, form, EMPTY_INDEXES);
return msgList;
}
@SuppressWarnings("rawtypes")
private void addMessage(List<FormValidationMessage> msgList, Object form, int[] indexes) {
List<AnnotatedPropertyInfo> fieldList = AnnotatedPropertyUtil.retrieveProperties(form.getClass());
try {
for (AnnotatedPropertyInfo field : fieldList) {
CascadeFormField cff = field.getAnnotation(CascadeFormField.class);
if (cff != null) {
Object subform = field.retrieveValue(form);
if (StringUtils.isEmpty(cff.arrayLengthField())) {
// simple cascade form
addMessage(msgList, subform, indexes);
} else {
// array cascade form
int len = Array.getLength(subform);
for (int i = 0; i < len; i++) {
addMessage(msgList, Array.get(subform, i), ArrayUtils.add(indexes, i));
}
}
continue;
}
ContextDataHolder valueHolder;
if (field.getField() != null) {
valueHolder = InjectTrace.getInstanceInjectionTraceInfo(form, field.getField());
} else {
valueHolder = InjectTrace.getInstanceInjectionTraceInfo(form, field.getSetter());
}
if (valueHolder != null) {
msgList.add(createTypeUnMatchMessage(form.getClass(), field, valueHolder, indexes));
}
}
} catch (IllegalAccessException | IllegalArgumentException | InvocationTargetException e) {
throw new RuntimeException(e);
}
}
@SuppressWarnings("rawtypes")
protected FormValidationMessage createTypeUnMatchMessage(Class formCls, AnnotatedPropertyInfo field, ContextDataHolder valueHolder,
int[] indexes) {
String fieldName = retrieveFieldName(field, indexes);
String fieldLabel = retrieveFieldLabel(field, indexes);
String annotatedMsg = retrieveFieldAnnotatedMessage(field);
String msg;
if (StringUtils.isNotEmpty(annotatedMsg)) {
msg = createAnnotatedMessage(formCls, fieldName, fieldLabel, annotatedMsg);
} else {
String fieldTypeName = retrieveFieldTypeName(field);
String valueString = generateValueString(valueHolder.getFoundOriginalData(), field.getType());
msg = createMessage(formCls, fieldName, fieldLabel, fieldTypeName, valueString);
}
return new FormValidationMessage(fieldName, msg);
}
@SuppressWarnings("rawtypes")
protected String createMessage(Class formCls, String fieldName, String fieldLabel, String fieldTypeName, String valueString) {
if (addFieldLablePrefixToMessage) {
String msgTemplate = "%s: %s is expected but value[%s] found.";
return String.format(msgTemplate, fieldLabel, fieldTypeName, valueString);
} else {
String msgTemplate = "%s is expected but value[%s] found.";
return String.format(msgTemplate, fieldTypeName, valueString);
}
}
@SuppressWarnings("rawtypes")
protected String generateValueString(Object originalValue, Class targetType) {
String valueString;
boolean originalTypeIsArray = originalValue.getClass().isArray();
boolean targetTypeIsArray = targetType.isArray();
if (originalTypeIsArray && targetTypeIsArray) {
valueString = createOriginalValueString(Arrays.asList((Object[]) originalValue));
} else if (originalTypeIsArray) {
valueString = createOriginalValueString(Arrays.asList((Object[]) originalValue));
} else {
valueString = createSingleOriginalValueString(originalValue);
}
return valueString;
}
protected String createOriginalValueString(List<Object> valueList) {
List<String> list = ListConvertUtil.transform(valueList, new RowConvertor<Object, String>() {
@Override
public String convert(int rowIndex, Object obj) {
return createSingleOriginalValueString(obj);
}
});
return StringUtils.join(list, ",");
}
protected String createSingleOriginalValueString(Object value) {
if (value == null) {
// impossible?
return "null";
} else {
return value.toString();
}
}
}
| astamuse/asta4d | 162 | Java | org.eclipse.core.resources.prefs | text/plain | -6,188,318,474,569,173,000 |
/*
* Copyright 2014 astamuse company,Ltd.
*
* Licensed under the Apache License, Version 2.0 (the "License");
* you may not use this file except in compliance with the License.
* You may obtain a copy of the License at
*
* http://www.apache.org/licenses/LICENSE-2.0
*
* Unless required by applicable law or agreed to in writing, software
* distributed under the License is distributed on an "AS IS" BASIS,
* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
* See the License for the specific language governing permissions and
* limitations under the License.
*
*/
package com.astamuse.asta4d.web.form.validation;
import org.apache.commons.lang3.StringUtils;
import com.astamuse.asta4d.util.annotation.AnnotatedPropertyInfo;
import com.astamuse.asta4d.web.form.CascadeArrayFunctions;
import com.astamuse.asta4d.web.form.annotation.FormField;
public abstract class CommonValidatorBase implements CascadeArrayFunctions {
protected boolean addFieldLablePrefixToMessage;
public CommonValidatorBase() {
this(true);
}
public CommonValidatorBase(boolean addFieldLablePrefixToMessage) {
this.addFieldLablePrefixToMessage = addFieldLablePrefixToMessage;
}
@SuppressWarnings("rawtypes")
protected String createAnnotatedMessage(Class formCls, String fieldName, String fieldLabel, String annotatedMsg) {
if (addFieldLablePrefixToMessage) {
String msgTemplate = "%s: %s";
return String.format(msgTemplate, fieldLabel, annotatedMsg);
} else {
return annotatedMsg;
}
}
protected String retrieveFieldName(AnnotatedPropertyInfo field, int[] indexes) {
return rewriteArrayIndexPlaceHolder(field.getName(), indexes);
}
protected String retrieveFieldLabel(AnnotatedPropertyInfo field, int[] indexes) {
FormField ff = field.getAnnotation(FormField.class);
if (ff == null) {
// impossible but
throw new NullPointerException();
}
String label = ff.nameLabel();
if (StringUtils.isEmpty(label)) {
label = field.getName();
}
return rewriteArrayIndexPlaceHolder(label, indexes);
}
protected String retrieveFieldTypeName(AnnotatedPropertyInfo field) {
return field.getType().getSimpleName();
}
protected String retrieveFieldAnnotatedMessage(AnnotatedPropertyInfo field) {
FormField ff = field.getAnnotation(FormField.class);
if (ff == null) {
// impossible but
return "";
}
return ff.message();
}
}
| astamuse/asta4d | 162 | Java | org.eclipse.core.resources.prefs | text/plain | -4,549,644,622,161,414,000 |
function(){
var util = {};
util.buildCascadeInvokingParams = function(jqElem) {
var params = [];
var value;
for (var i = 1; i <= 9; i++) {
value = jqElem.attr("cascade-ref-info-" + i);
if (value) {
params.push(value);
} else {
break;
}
}
return params;
}
util.rewriteArrayRefAttrs = [
"id",
"name",
"cascade-ref",
"cascade-ref-target",
"cascade-ref-info-1",
"cascade-ref-info-2",
"cascade-ref-info-3",
"cascade-ref-info-4",
"cascade-ref-info-5",
"cascade-ref-info-6",
"cascade-ref-info-7",
"cascade-ref-info-8",
"cascade-ref-info-9",
];
util.replaceArrayIndexPlaceHolder = function(s, index, cascadeLayer) {
var reg = new RegExp("(^|.*[^@])(@{" + cascadeLayer + "})([^@].*|$)", "g");
var ret = s.replace(reg, "$1" + index + "$3");
return ret;
}
util.rewriteAttrs = function(elem, index, cascadeLayer) {
if (elem.length === 0) {
return;
}
for (var i = 0; i < util.rewriteArrayRefAttrs.length; i++) {
var attr = util.rewriteArrayRefAttrs[i];
elem
.each(function(idx, e) {
var jq = $(e);
var value = jq.attr(attr);
if (value) {
jq.attr(attr, util.replaceArrayIndexPlaceHolder(value, index,
cascadeLayer));
}
});
}
}
var rewriteArrayRefAttrsSelector;
util.rewriteArrayRefs = function(elem, index, cascadeLayer) {
if(!rewriteArrayRefAttrsSelector){
rewriteArrayRefAttrsSelector = util.rewriteArrayRefAttrs.map(
function(attr) {
return "[" + attr + "]";
}).join(",");
}
util.rewriteAttrs(elem.filter(rewriteArrayRefAttrsSelector), index, cascadeLayer);
util.rewriteAttrs(elem.find(rewriteArrayRefAttrsSelector), index, cascadeLayer);
}
util.addRow = function(appendTargetParentSelector,
lengthFieldSelector, copyTemplateSelector, cascadeLayer) {
if (arguments.length === 0) {
var params = util.buildCascadeInvokingParams($(this));
if (params.length === 0) {
throw "addRow requires necessary parameters.";
} else {
util.addRow.apply(this, params);
return;
}
}
if(cascadeLayer === undefined){
cascadeLayer = 1;
}
if (typeof cascadeLayer !== "number") {
cascadeLayer = parseInt(cascadeLayer);
}
var lengthElem = $(lengthFieldSelector);
var length = parseInt(lengthElem.val());
var templateElem = $(copyTemplateSelector);
templateElem = templateElem.clone();
templateElem.css("display", "");
util.rewriteArrayRefs(templateElem, length, cascadeLayer);
$(appendTargetParentSelector).append(templateElem);
lengthElem.val(length + 1);
}
util.removeRow=function(selector) {
if (arguments.length === 0) {
var params =util.buildCascadeInvokingParams($(this));
if (params.length === 0) {
throw "removeRow requires necessary parameters.";
} else {
util.removeRow.apply(this, params);
return;
}
}
$(selector).remove();
}
return util;
} | astamuse/asta4d | 162 | Java | org.eclipse.core.resources.prefs | text/plain | 7,277,625,786,603,648,000 |
<html>
<head>
</head>
<body>
<div id="msg-info"></div>
<div id="msg-warn"></div>
<div id="msg-err"></div>
</body>
</html> | astamuse/asta4d | 162 | Java | org.eclipse.core.resources.prefs | text/plain | 6,387,391,882,989,855,000 |
<html>
<head>
</head>
<body>
<div id="msg-info" afd:message-duplicator></div>
<div id="msg-warn" afd:message-duplicator></div>
<div id="msg-err" afd:message-duplicator></div>
</body>
</html> | astamuse/asta4d | 162 | Java | org.eclipse.core.resources.prefs | text/plain | 6,078,157,407,945,704,000 |
<html>
<head>
</head>
<body>
<div id="global-msg-container" style="width:90%;">
<ul id="info-msg">
<li style="background-color:#C1FFC1" afd:message-duplicator>
<span>info-msg-stub</span>
</ul>
<ul id="warn-msg">
<li style="background-color:#FFF68F" afd:message-duplicator>
<span>warn-msg-stub</span>
</ul>
<ul id="err-msg">
<li style="background-color:#FFC1C1" afd:message-duplicator>
<span>err-msg-stub</span>
</ul>
</div>
<div id="msg-info" afd:message-duplicator>
<span></span>
</div>
<div id="msg-warn" afd:message-duplicator>
<span></span>
</div>
<div id="msg-err" afd:message-duplicator>
<span></span>
</div>
</body>
</html> | astamuse/asta4d | 162 | Java | org.eclipse.core.resources.prefs | text/plain | 4,212,415,551,520,559,000 |
<html>
<head>
</head>
<body>
<div id="global-msg-container" style="width:90%;">
<ul id="info-msg">
<li style="background-color:#C1FFC1">iinnffoo1</li>
<li style="background-color:#C1FFC1">iinnffoo2</li>
</ul>
<ul id="warn-msg">
<li style="background-color:#FFF68F">warn-1</li>
</ul>
<ul id="err-msg">
<li style="background-color:#FFC1C1">err-1</li>
<li style="background-color:#FFC1C1">err-2</li>
<li style="background-color:#FFC1C1">err-3</li>
</ul>
</div>
<div id="msg-info"></div>
<div id="msg-warn"></div>
<div id="msg-err"></div>
</body>
</html> | astamuse/asta4d | 162 | Java | org.eclipse.core.resources.prefs | text/plain | 3,777,773,770,818,350,600 |
<html>
<head>
</head>
<body>
<div id="global-msg-container" style="width:90%;">
<ul id="info-msg">
<li style="background-color:#C1FFC1">iinnffoo1</li>
</ul>
<ul id="warn-msg">
</ul>
<ul id="err-msg">
<li style="background-color:#FFC1C1">err-1</li>
<li style="background-color:#FFC1C1">err-2</li>
</ul>
</div>
<div id="msg-info">
iinnffoo2
</div>
</body>
</html> | astamuse/asta4d | 162 | Java | org.eclipse.core.resources.prefs | text/plain | 5,214,323,089,800,102,000 |
<html>
<head>
</head>
<body>
<div id="global-msg-container" style="width:90%;">
<ul id="info-msg">
<li style="background-color:#C1FFC1"> <span>iinnffoo1</span> </li>
<li style="background-color:#C1FFC1"> <span>iinnffoo2</span> </li>
</ul>
<ul id="warn-msg">
<li style="background-color:#FFF68F"> <span>warn-1</span> </li>
</ul>
<ul id="err-msg">
</ul>
</div>
<div id="msg-warn">
<span>warn-2</span>
</div>
<div id="msg-err">
<span>err-1</span>
</div>
<div id="msg-err">
<span>err-2</span>
</div>
</body>
</html> | astamuse/asta4d | 162 | Java | org.eclipse.core.resources.prefs | text/plain | 1,093,338,220,772,804,700 |
<html>
<head>
</head>
<body>
<div id="global-msg-container" style="width:90%;">
<ul id="info-msg">
<li style="background-color:#C1FFC1">iinnffoo1</li>
</ul>
<ul id="warn-msg">
<li style="background-color:#FFF68F">warn-1</li>
</ul>
<ul id="err-msg">
<li style="background-color:#FFC1C1">err-2</li>
<li style="background-color:#FFC1C1">err-3</li>
</ul>
</div>
<div id="msg-info">
iinnffoo2
</div>
<div id="msg-err">
err-1
</div>
</body>
</html> | astamuse/asta4d | 162 | Java | org.eclipse.core.resources.prefs | text/plain | 2,065,137,951,842,927,900 |
<html>
<head>
</head>
<body>
<div id="msg-info">
iinnffoo1
</div>
<div id="msg-info">
iinnffoo2
</div>
<div id="msg-warn">
warn-1
</div>
<div id="msg-err">
err-1
</div>
<div id="msg-err">
err-2
</div>
<div id="msg-err">
err-3
</div>
</body>
</html> | astamuse/asta4d | 162 | Java | org.eclipse.core.resources.prefs | text/plain | -4,135,425,643,415,019,500 |
<html>
<head>
</head>
<body>
<afd:extension parent="/MultiStepForm_Base.html">
</afd:extension>
</body>
</html> | astamuse/asta4d | 162 | Java | org.eclipse.core.resources.prefs | text/plain | 5,053,768,244,525,531,000 |
<html>
<head>
</head>
<body>
<form afd:render="MultiStepFormTest$TestSnippet">
<input type="hidden" name="id">
<input type="text" name="data">
<input type="text" name="subData">
<input type="hidden" name="subArrayLength">
<div cascade-ref="subArray-container-@"><input type="text" name="year-@"></div>
<input type="hidden" name="subArrayLength2">
<div cascade-ref="subArray2-container-@"><input type="text" name="age-@"></div>
</form>
</body>
</html> | astamuse/asta4d | 162 | Java | org.eclipse.core.resources.prefs | text/plain | 359,254,376,429,532,100 |
<html>
<head>
</head>
<body>
<form afd:render="field.CheckboxTest$TestSnippet:duplicatedElement">
<input type="checkbox" id="xvalue-x" name="xvalue" checked></input><label for="xvalue-x">xc</label>
<input type="checkbox" id="xvalue-y" name="xvalue" checked></input><label for="xvalue-y">yc</label>
</form>
</body>
</html> | astamuse/asta4d | 162 | Java | org.eclipse.core.resources.prefs | text/plain | -3,815,033,078,262,939,000 |
<html>
<head>
</head>
<body>
<form afd:render="field.SelectSingleTest$TestSnippet:staticOptionDisplayValue">
<select name="nullvalue">
<option value="x">x:d</option>
<option value="y">y:d</option>
<option value="z">z:d</option>
</select>
<select name="nullvalue-2">
<option value="">:d</option>
<option value="x">x:d</option>
<option value="y">y:d</option>
<option value="z">z:d</option>
</select>
<select name="emptyvalue">
<option value="x">x:d</option>
<option value="y">y:d</option>
<option value="z">z:d</option>
</select>
<select name="emptyvalue-2">
<option value="">:d</option>
<option value="x">x:d</option>
<option value="y">y:d</option>
<option value="z">z:d</option>
</select>
<select name="spacevalue">
<option value="x">x:d</option>
<option value="y">y:d</option>
<option value="z">z:d</option>
</select>
<select name="spacevalue-2">
<option value=" "> :d</option>
<option value="x">x:d</option>
<option value="y">y:d</option>
<option value="z">z:d</option>
</select>
<select name="xvalue">
<option value="y">y:d</option>
<option value="z">z:d</option>
</select>
<div id="xvalue-display"></div>
<select name="xvalue-2">
<option value="x">x:d</option>
<option value="y">y:d</option>
<option value="z">z:d</option>
</select>
<div id="xvalue-2-display"></div>
<select name="yvalue">
<optgroup label="A">
<option value="x">x:d</option>
<option value="z">z:d</option>
</optgroup>
<optgroup label="AA">
<option value="xx">xx:d</option>
<option value="yy">yy:d</option>
<option value="zz">zz:d</option>
</optgroup>
</select>
<div id="yvalue-display"></div>
<select name="yvalue-2">
<optgroup label="A">
<option value="x">x:d</option>
<option value="y">y:d</option>
<option value="z">z:d</option>
</optgroup>
<optgroup label="AA">
<option value="xx">xx:d</option>
<option value="yy">yy:d</option>
<option value="zz">zz:d</option>
</optgroup>
</select>
<div id="yvalue-2-display"></div>
</form>
</body>
</html> | astamuse/asta4d | 162 | Java | org.eclipse.core.resources.prefs | text/plain | -6,615,372,191,683,472,000 |
<html>
<head>
</head>
<body>
<form afd:render="field.RadioTest$TestSnippet:staticOptionDisplayValue">
<input type="radio" id="nullvalue-x" name="nullvalue" value="x" checked></input><label for="nullvalue-x">xc</label>
<input type="radio" id="nullvalue-y" name="nullvalue" value="y"></input><label for="nullvalue-y">yc</label>
<input type="radio" id="nullvalue-z" name="nullvalue" value="z"></input><label for="nullvalue-z">zc</label>
<div></div>
<input type="radio" id="nullvalue-2-x" name="nullvalue-2" value="x"></input><label for="nullvalue-2-x">xc</label>
<input type="radio" id="nullvalue-2-y" name="nullvalue-2" value="y"></input><label for="nullvalue-2-y">yc</label>
<input type="radio" id="nullvalue-2-z" name="nullvalue-2" value="z"></input><label for="nullvalue-2-z">zc</label>
<input type="radio" id="nullvalue-2-" name="nullvalue-2" value=""></input><label for="nullvalue-2-">c</label>
<div></div>
<input type="radio" id="emptyvalue-x" name="emptyvalue" value="x" checked></input><label for="emptyvalue-x">xc</label>
<input type="radio" id="emptyvalue-y" name="emptyvalue" value="y"></input><label for="emptyvalue-y">yc</label>
<input type="radio" id="emptyvalue-z" name="emptyvalue" value="z"></input><label for="emptyvalue-z">zc</label>
<div></div>
<input type="radio" id="emptyvalue-2-x" name="emptyvalue-2" value="x"></input><label for="emptyvalue-2-x">xc</label>
<input type="radio" id="emptyvalue-2-y" name="emptyvalue-2" value="y"></input><label for="emptyvalue-2-y">yc</label>
<input type="radio" id="emptyvalue-2-z" name="emptyvalue-2" value="z"></input><label for="emptyvalue-2-z">zc</label>
<input type="radio" id="emptyvalue-2-" name="emptyvalue-2" value=""></input><label for="emptyvalue-2-">c</label>
<div></div>
<input type="radio" id="rvalue-s" name="rvalue" value="s"></input>
<div radio-label-for="rvalue-s"><img src=""/><label for="rvalue-s">sc</label></div>
<input type="radio" id="rvalue-t" name="rvalue" value="t"></input>
<div radio-label-for="rvalue-t"><img src=""/><label for="rvalue-t">tc</label></div>
<div></div>
<input type="radio" id="rvalue-2-r" name="rvalue-2" value="r"></input>
<div radio-label-for="rvalue-2-r"><img src=""/><label for="rvalue-2-r">rc</label></div>
<input type="radio" id="rvalue-2-s" name="rvalue-2" value="s"></input>
<div radio-label-for="rvalue-2-s"><img src=""/><label for="rvalue-2-s">sc</label></div>
<input type="radio" id="rvalue-2-t" name="rvalue-2" value="t"></input>
<div radio-label-for="rvalue-2-t"><img src=""/><label for="rvalue-2-t">tc</label></div>
<div></div>
<input type="radio" id="svalue-r" name="svalue" value="r"></input>
<div radio-label-for="svalue-r"><img src=""/><label for="svalue-r">rc</label></div>
<input type="radio" id="svalue-t" name="svalue" value="t"></input>
<div radio-label-for="svalue-t"><img src=""/><label for="svalue-t">tc</label></div>
<i id="svalue-display"></i>
<div></div>
<input type="radio" id="svalue-2-r" name="svalue-2" value="r"></input>
<div radio-label-for="svalue-2-r"><img src=""/><label for="svalue-2-r">rc</label></div>
<input type="radio" id="svalue-2-s" name="svalue-2" value="s"></input>
<div radio-label-for="svalue-2-s"><img src=""/><label for="svalue-2-s">sc</label></div>
<input type="radio" id="svalue-2-t" name="svalue-2" value="t"></input>
<div radio-label-for="svalue-2-t"><img src=""/><label for="svalue-2-t">tc</label></div>
<i id="svalue-2-display"></i>
<div></div>
<input type="radio" id="wvalue-y" name="wvalue" value="y"></input><label for="wvalue-y">yc</label>
<input type="radio" id="wvalue-z" name="wvalue" value="z"></input><label for="wvalue-z">zc</label>
<i id="wvalue-display"></i>
<div></div>
<input type="radio" id="wvalue-2-w" name="wvalue-2" value="w"></input><label for="wvalue-2-w">wc</label>
<input type="radio" id="wvalue-2-x" name="wvalue-2" value="x"></input><label for="wvalue-2-x">xc</label>
<input type="radio" id="wvalue-2-y" name="wvalue-2" value="y"></input><label for="wvalue-2-y">yc</label>
<input type="radio" id="wvalue-2-z" name="wvalue-2" value="z"></input><label for="wvalue-2-z">zc</label>
<i id="wvalue-2-display"></i>
<div></div>
<input type="radio" id="xvalue-y" name="xvalue" value="y"></input><label for="xvalue-y">yc</label>
<input type="radio" id="xvalue-z" name="xvalue" value="z"></input><label for="xvalue-z">zc</label>
<div></div>
<input type="radio" id="xvalue-2-x" name="xvalue-2" value="x"></input><label for="xvalue-2-x">xc</label>
<input type="radio" id="xvalue-2-y" name="xvalue-2" value="y"></input><label for="xvalue-2-y">yc</label>
<input type="radio" id="xvalue-2-z" name="xvalue-2" value="z"></input><label for="xvalue-2-z">zc</label>
<div></div>
<div class="yvalue-wrapper">
<input type="radio" id="yvalue-x" name="yvalue" value="x"></input>
<label for="yvalue-x">xc</label>
</div>
<div class="yvalue-wrapper">
<input type="radio" id="yvalue-" name="yvalue" value=""></input>
<label for="yvalue-">c</label>
</div>
<div class="yvalue-wrapper">
<input type="radio" id="yvalue-z" name="yvalue" value="z"></input>
<label for="yvalue-z">zc</label>
</div>
<div class="yvalue-2-wrapper">
<input type="radio" id="yvalue-2-x" name="yvalue-2" value="x"></input>
<label for="yvalue-2-x">xc</label>
</div>
<div class="yvalue-2-wrapper">
<input type="radio" id="yvalue-2-y" name="yvalue-2" value="y"></input>
<label for="yvalue-2-y">yc</label>
</div>
<div class="yvalue-2-wrapper">
<input type="radio" id="yvalue-2-z" name="yvalue-2" value="z"></input>
<label for="yvalue-2-z">zc</label>
</div>
</form>
</body>
</html> | astamuse/asta4d | 162 | Java | org.eclipse.core.resources.prefs | text/plain | -7,030,674,909,939,932,000 |
<html>
<head>
</head>
<body>
<form afd:render="field.CheckboxTest$TestSnippet:staticOptionEditMultiValue">
<input type="checkbox" id="nullvalue-x" name="nullvalue" value="x" checked></input><label for="nullvalue-x">xc</label>
<input type="checkbox" id="nullvalue-y" name="nullvalue" value="y"></input><label for="nullvalue-y">yc</label>
<input type="checkbox" id="nullvalue-z" name="nullvalue" value="z"></input><label for="nullvalue-z">zc</label>
<div></div>
<input type="checkbox" id="nullvalue-2-x" name="nullvalue-2" value="x"></input><label for="nullvalue-2-x">xc</label>
<input type="checkbox" id="nullvalue-2-y" name="nullvalue-2" value="y"></input><label for="nullvalue-2-y">yc</label>
<input type="checkbox" id="nullvalue-2-z" name="nullvalue-2" value="z"></input><label for="nullvalue-2-z">zc</label>
<input type="checkbox" id="nullvalue-2-" name="nullvalue-2" value=""></input><label for="nullvalue-2-">c</label>
<div></div>
<input type="checkbox" id="emptyvalue-x" name="emptyvalue" value="x" checked></input><label for="emptyvalue-x">xc</label>
<input type="checkbox" id="emptyvalue-y" name="emptyvalue" value="y"></input><label for="emptyvalue-y">yc</label>
<input type="checkbox" id="emptyvalue-z" name="emptyvalue" value="z"></input><label for="emptyvalue-z">zc</label>
<div></div>
<input type="checkbox" id="emptyvalue-2-x" name="emptyvalue-2" value="x"></input><label for="emptyvalue-2-x">xc</label>
<input type="checkbox" id="emptyvalue-2-y" name="emptyvalue-2" value="y"></input><label for="emptyvalue-2-y">yc</label>
<input type="checkbox" id="emptyvalue-2-z" name="emptyvalue-2" value="z"></input><label for="emptyvalue-2-z">zc</label>
<input type="checkbox" id="emptyvalue-2-" name="emptyvalue-2" value=""></input><label for="emptyvalue-2-">c</label>
<div></div>
<input type="checkbox" id="rvalue-s" name="rvalue" value="s"></input>
<div radio-label-for="rvalue-s"><img src=""/><label for="rvalue-s">sc</label></div>
<input type="checkbox" id="rvalue-t" name="rvalue" value="t"></input>
<div radio-label-for="rvalue-t"><img src=""/><label for="rvalue-t">tc</label></div>
<div></div>
<input type="checkbox" id="rvalue-2-r" name="rvalue-2" value="r"></input>
<div radio-label-for="rvalue-2-r"><img src=""/><label for="rvalue-2-r">rc</label></div>
<input type="checkbox" id="rvalue-2-s" name="rvalue-2" value="s"></input>
<div radio-label-for="rvalue-2-s"><img src=""/><label for="rvalue-2-s">sc</label></div>
<input type="checkbox" id="rvalue-2-t" name="rvalue-2" value="t"></input>
<div radio-label-for="rvalue-2-t"><img src=""/><label for="rvalue-2-t">tc</label></div>
<div></div>
<input type="checkbox" id="xvalue-y" name="xvalue" value="y"></input><label for="xvalue-y">yc</label>
<input type="checkbox" id="xvalue-z" name="xvalue" value="z"></input><label for="xvalue-z">zc</label>
<div></div>
<input type="checkbox" id="xvalue-2-x" name="xvalue-2" value="x"></input><label for="xvalue-2-x">xc</label>
<input type="checkbox" id="xvalue-2-y" name="xvalue-2" value="y"></input><label for="xvalue-2-y">yc</label>
<input type="checkbox" id="xvalue-2-z" name="xvalue-2" value="z"></input><label for="xvalue-2-z">zc</label>
<div></div>
<div class="yvalue-wrapper">
<input type="checkbox" id="yvalue-x" name="yvalue" value="x"></input>
<label for="yvalue-x">xc</label>
</div>
<div>
<input type="checkbox" id="yvalue-" name="yvalue" value=""></input>
<label for="yvalue-">c</label>
</div>
<div>
<input type="checkbox" id="yvalue-z" name="yvalue" value="z"></input>
<label for="yvalue-z">zc</label>
</div>
<div class="yvalue-2-wrapper">
<input type="checkbox" id="yvalue-2-x" name="yvalue-2" value="x"></input>
<label for="yvalue-2-x">xc</label>
</div>
<div class="yvalue-2-wrapper">
<input type="checkbox" id="yvalue-2-y" name="yvalue-2" value="y"></input>
<label for="yvalue-2-y">yc</label>
</div>
<div class="yvalue-2-wrapper">
<input type="checkbox" id="yvalue-2-z" name="yvalue-2" value="z"></input>
<label for="yvalue-2-z">zc</label>
</div>
</form>
</body>
</html> | astamuse/asta4d | 162 | Java | org.eclipse.core.resources.prefs | text/plain | 7,604,175,705,733,728,000 |
<html>
<head>
</head>
<body>
<form afd:render="field.SelectMultipleTest$TestSnippet:normalDisplayMultiValue">
<select multiple name="nullvalue">
<option value="xx" selected>xx</option>
<option value="yy" afd:clear>yy</option>
<option value="zz" afd:clear>zz</option>
</select>
<select multiple name="nullvalue-2">
<option value="xx">xx</option>
</select>
<select multiple name="emptyvalue">
<option value="xx">xx</option>
</select>
<select multiple name="emptyvalue-2">
<option value="xx">xx</option>
</select>
<select multiple name="spacevalue">
<option value="xx">xx</option>
</select>
<select multiple name="spacevalue-2">
<option value="xx">xx</option>
</select>
<select multiple name="xvalue">
<option value="xx">xx</option>
</select>
<div id="xvalue-display"></div>
<select multiple name="xvalue-2">
<option value="xx">xx</option>
</select>
<div id="xvalue-2-display"></div>
<select multiple name="yvalue">
<optgroup label="Ac">
<option value="xc" selected>xc</option>
<option value="yc" afd:clear>yc</option>
<option value="zc" afd:clear>zc</option>
</optgroup>
<optgroup label="AAc" afd:clear>
<option value="xx">xx</option>
<option value="yy">yy</option>
<option value="zz">zz</option>
</optgroup>
</select>
<div id="yvalue-display"></div>
<select multiple name="yvalue-2">
<optgroup label="Ac">
<option value="xc">xc</option>
<option value="y" afd:clear>y</option>
<option value="z" afd:clear>z</option>
</optgroup>
</select>
<div id="yvalue-2-display"></div>
<div id="zvalue-display"></div>
<div id="zvalue-2-display"></div>
</form>
</body>
</html> | astamuse/asta4d | 162 | Java | org.eclipse.core.resources.prefs | text/plain | -4,349,333,990,820,831,700 |
<html>
<head>
</head>
<body>
<form afd:render="field.CheckboxTest$TestSnippet:staticOptionEditValue">
<input type="checkbox" id="nullvalue-x" name="nullvalue" value="x" checked></input><label for="nullvalue-x">xc</label>
<input type="checkbox" id="nullvalue-y" name="nullvalue" value="y"></input><label for="nullvalue-y">yc</label>
<input type="checkbox" id="nullvalue-z" name="nullvalue" value="z"></input><label for="nullvalue-z">zc</label>
<div></div>
<input type="checkbox" id="nullvalue-2-x" name="nullvalue-2" value="x"></input><label for="nullvalue-2-x">xc</label>
<input type="checkbox" id="nullvalue-2-y" name="nullvalue-2" value="y"></input><label for="nullvalue-2-y">yc</label>
<input type="checkbox" id="nullvalue-2-z" name="nullvalue-2" value="z"></input><label for="nullvalue-2-z">zc</label>
<input type="checkbox" id="nullvalue-2-" name="nullvalue-2" value=""></input><label for="nullvalue-2-">c</label>
<div></div>
<input type="checkbox" id="emptyvalue-x" name="emptyvalue" value="x" checked></input><label for="emptyvalue-x">xc</label>
<input type="checkbox" id="emptyvalue-y" name="emptyvalue" value="y"></input><label for="emptyvalue-y">yc</label>
<input type="checkbox" id="emptyvalue-z" name="emptyvalue" value="z"></input><label for="emptyvalue-z">zc</label>
<div></div>
<input type="checkbox" id="emptyvalue-2-x" name="emptyvalue-2" value="x"></input><label for="emptyvalue-2-x">xc</label>
<input type="checkbox" id="emptyvalue-2-y" name="emptyvalue-2" value="y"></input><label for="emptyvalue-2-y">yc</label>
<input type="checkbox" id="emptyvalue-2-z" name="emptyvalue-2" value="z"></input><label for="emptyvalue-2-z">zc</label>
<input type="checkbox" id="emptyvalue-2-" name="emptyvalue-2" value=""></input><label for="emptyvalue-2-">c</label>
<div></div>
<input type="checkbox" id="rvalue-s" name="rvalue" value="s"></input>
<div radio-label-for="rvalue-s"><img src=""/><label for="rvalue-s">sc</label></div>
<input type="checkbox" id="rvalue-t" name="rvalue" value="t"></input>
<div radio-label-for="rvalue-t"><img src=""/><label for="rvalue-t">tc</label></div>
<div></div>
<input type="checkbox" id="rvalue-2-r" name="rvalue-2" value="r"></input>
<div radio-label-for="rvalue-2-r"><img src=""/><label for="rvalue-2-r">rc</label></div>
<input type="checkbox" id="rvalue-2-s" name="rvalue-2" value="s"></input>
<div radio-label-for="rvalue-2-s"><img src=""/><label for="rvalue-2-s">sc</label></div>
<input type="checkbox" id="rvalue-2-t" name="rvalue-2" value="t"></input>
<div radio-label-for="rvalue-2-t"><img src=""/><label for="rvalue-2-t">tc</label></div>
<div></div>
<input type="checkbox" id="xvalue-y" name="xvalue" value="y"></input><label for="xvalue-y">yc</label>
<input type="checkbox" id="xvalue-z" name="xvalue" value="z"></input><label for="xvalue-z">zc</label>
<div></div>
<input type="checkbox" id="xvalue-2-x" name="xvalue-2" value="x"></input><label for="xvalue-2-x">xc</label>
<input type="checkbox" id="xvalue-2-y" name="xvalue-2" value="y"></input><label for="xvalue-2-y">yc</label>
<input type="checkbox" id="xvalue-2-z" name="xvalue-2" value="z"></input><label for="xvalue-2-z">zc</label>
<div></div>
<div class="yvalue-wrapper">
<input type="checkbox" id="yvalue-x" name="yvalue" value="x"></input>
<label for="yvalue-x">xc</label>
</div>
<div>
<input type="checkbox" id="yvalue-" name="yvalue" value=""></input>
<label for="yvalue-">c</label>
</div>
<div>
<input type="checkbox" id="yvalue-z" name="yvalue" value="z"></input>
<label for="yvalue-z">zc</label>
</div>
<div class="yvalue-2-wrapper">
<input type="checkbox" id="yvalue-2-x" name="yvalue-2" value="x"></input>
<label for="yvalue-2-x">xc</label>
</div>
<div class="yvalue-2-wrapper">
<input type="checkbox" id="yvalue-2-y" name="yvalue-2" value="y"></input>
<label for="yvalue-2-y">yc</label>
</div>
<div class="yvalue-2-wrapper">
<input type="checkbox" id="yvalue-2-z" name="yvalue-2" value="z"></input>
<label for="yvalue-2-z">zc</label>
</div>
</form>
</body>
</html> | astamuse/asta4d | 162 | Java | org.eclipse.core.resources.prefs | text/plain | -3,789,507,324,227,998,000 |
<html>
<head>
</head>
<body>
<form afd:render="field.RadioTest$TestSnippet:normalDisplayValue">
<input type="radio" id="nullvalue-x" name="nullvalue" checked></input><label for="nullvalue-x">xc</label>
<input type="radio" id="nullvalue-y" name="nullvalue" afd:clear></input><label for="nullvalue-y" afd:clear>yc</label>
<input type="radio" id="nullvalue-z" name="nullvalue" afd:clear></input><label for="nullvalue-z" afd:clear>zc</label>
<div></div>
<input type="radio" id="nullvalue-2-x" name="nullvalue-2" ></input><label for="nullvalue-2-x">x</label>
<input type="radio" id="nullvalue-2-y" name="nullvalue-2" afd:clear></input><label for="nullvalue-2-y" afd:clear>y</label>
<input type="radio" id="nullvalue-2-z" name="nullvalue-2" afd:clear></input><label for="nullvalue-2-z" afd:clear>z</label>
<input type="radio" id="nullvalue-2-z" name="nullvalue-2" afd:clear></input><label for="nullvalue-2-z" afd:clear></label>
<div></div>
<input type="radio" id="emptyvalue-x" name="emptyvalue" checked></input><label for="emptyvalue-x">xc</label>
<input type="radio" id="emptyvalue-y" name="emptyvalue" afd:clear></input><label for="emptyvalue-y" afd:clear>yc</label>
<input type="radio" id="emptyvalue-z" name="emptyvalue" afd:clear></input><label for="emptyvalue-z" afd:clear>zc</label>
<div></div>
<input type="radio" id="emptyvalue-2-x" name="emptyvalue-2" ></input><label for="emptyvalue-2-x">xc</label>
<input type="radio" id="emptyvalue-2-y" name="emptyvalue-2" afd:clear></input><label for="emptyvalue-2-y" afd:clear>yc</label>
<input type="radio" id="emptyvalue-2-z" name="emptyvalue-2" afd:clear></input><label for="emptyvalue-2-z" afd:clear>zc</label>
<input type="radio" id="emptyvalue-2-z" name="emptyvalue-2" afd:clear></input><label for="emptyvalue-2-z" afd:clear>ccc</label>
<div></div>
<input type="radio" id="rvalue-s" name="rvalue"></input>
<div radio-label-for="rvalue-s"><img src=""/><label for="rvalue-s">sc</label></div>
<input type="radio" id="rvalue-t" name="rvalue" afd:clear></input>
<div radio-label-for="rvalue-t" afd:clear><img src=""/><label for="rvalue-t">tc</label></div>
<div></div>
<input type="radio" id="rvalue-2-r" name="rvalue-2"></input>
<div radio-label-for="rvalue-2-r"><img src=""/><label for="rvalue-2-r">rc</label></div>
<input type="radio" id="rvalue-2-s" name="rvalue-2" afd:clear></input>
<div radio-label-for="rvalue-2-s" afd:clear><img src=""/><label for="rvalue-2-s">sc</label></div>
<input type="radio" id="rvalue-2-t" name="rvalue-2" afd:clear></input>
<div radio-label-for="rvalue-2-t" afd:clear><img src=""/><label for="rvalue-2-t">tc</label></div>
<div></div>
<input type="radio" id="svalue-s" name="svalue"></input>
<div radio-label-for="svalue-s"><img src=""/><label for="svalue-s">sc</label></div>
<input type="radio" id="svalue-t" name="svalue" afd:clear></input>
<div radio-label-for="svalue-t" afd:clear><img src=""/><label for="svalue-t">tc</label></div>
<i id="svalue-display"></i>
<div></div>
<input type="radio" id="svalue-2-r" name="svalue-2"></input>
<div radio-label-for="svalue-2-r"><img src=""/><label for="svalue-2-r">rc</label></div>
<input type="radio" id="svalue-2-s" name="svalue-2" afd:clear></input>
<div radio-label-for="svalue-2-s" afd:clear><img src=""/><label for="svalue-2-s">sc</label></div>
<input type="radio" id="svalue-2-t" name="svalue-2" afd:clear></input>
<div radio-label-for="svalue-2-t" afd:clear><img src=""/><label for="svalue-2-t">tc</label></div>
<i id="svalue-2-display"></i>
<div></div>
<input type="radio" id="uvalue" name="uvalue"></input>
<div></div>
<input type="radio" id="uvalue-2" name="uvalue-2"></input>
<div></div>
<div>
<i id="wvalue-display"></i>
<i id="wvalue-2-display"></i>
</div>
<input type="radio" id="xvalue-y" name="xvalue"></input><label for="xvalue-y">yc</label>
<input type="radio" id="xvalue-z" name="xvalue" afd:clear></input><label for="xvalue-z" afd:clear>zc</label>
<div></div>
<input type="radio" id="xvalue-2-x" name="xvalue-2" ></input><label for="xvalue-2-x">xc</label>
<input type="radio" id="xvalue-2-y" name="xvalue-2" afd:clear></input><label for="xvalue-2-y" afd:clear>yc</label>
<input type="radio" id="xvalue-2-z" name="xvalue-2" afd:clear></input><label for="xvalue-2-z" afd:clear>zc</label>
<div></div>
<div class="yvalue-wrapper">
<input type="radio" id="yvalue-x" name="yvalue" ></input><label for="yvalue-x">xc</label>
</div>
<div afd:clear>
<input type="radio" id="yvalue-y" name="yvalue" ></input><label for="yvalue-y">yc</label>
</div>
<div afd:clear>
<input type="radio" id="yvalue-z" name="yvalue" ></input><label for="yvalue-z">zc</label>
</div>
<div class="yvalue-2-wrapper">
<input type="radio" id="yvalue-2-x" name="yvalue-2" ></input><label for="yvalue-2-x">xc</label>
</div>
<div afd:clear>
<input type="radio" id="yvalue-2-y" name="yvalue-2" ></input><label for="yvalue-2-y">yc</label>
</div>
<div afd:clear>
<input type="radio" id="yvalue-2-z" name="yvalue-2" ></input><label for="yvalue-2-z">zc</label>
</div>
<div class="zvalue-wrapper">
<input type="radio" id="zvalue-x" name="zvalue" ></input><label for="zvalue-x">xc</label>
</div>
<div afd:clear>
<input type="radio" id="zvalue-y" name="zvalue" ></input><label for="zvalue-y">yc</label>
</div>
<div afd:clear>
<input type="radio" id="zvalue-z" name="zvalue" ></input><label for="zvalue-z">zc</label>
</div>
<div><b id="zvalue-display"></b></div>
<div class="zvalue-2-wrapper">
<input type="radio" id="zvalue-2-x" name="zvalue-2" ></input><label for="zvalue-2-x">xc</label>
</div>
<div afd:clear>
<input type="radio" id="zvalue-2-y" name="zvalue-2" ></input><label for="zvalue-2-y">yc</label>
</div>
<div afd:clear>
<input type="radio" id="zvalue-2-z" name="zvalue-2" ></input><label for="zvalue-2-z">zc</label>
</div>
<div><b id="zvalue-2-display"></b></div>
</form>
</body>
</html> | astamuse/asta4d | 162 | Java | org.eclipse.core.resources.prefs | text/plain | -7,359,729,941,200,510,000 |
<html>
<head>
</head>
<body>
<form afd:render="field.RadioTest$TestSnippet:staticOptionDisplayValueError">
<!--
there is a fullwidth space before the id attribution(which means there is no id attr),
which will cause error in rendering, but we should throw a exception with friendly
information for this issue.
-->
<input type="radio" id="vv-x" name="vv" value="x" checked></input><label for="vv-x">xc</label>
<input type="radio" id="vv-y" name="vv" value="y"></input><label for="vv-y">yc</label>
<input type="radio" id="vv-z" name="vv" value="z"></input><label for="vv-z">zc</label>
</form>
</body>
</html> | astamuse/asta4d | 162 | Java | org.eclipse.core.resources.prefs | text/plain | -6,378,210,160,255,876,000 |
<html>
<head>
</head>
<body>
<form afd:render="field.CheckboxTest$TestSnippet:emptyIdElementInDuplicator">
<div class="radio-wrapper">
<input type="checkbox" name="xvalue" checked></input><label>xc</label>
</div>
</form>
</body>
</html> | astamuse/asta4d | 162 | Java | org.eclipse.core.resources.prefs | text/plain | 1,295,541,968,170,001,700 |
<html>
<head>
</head>
<body>
<form afd:render="field.CheckboxTest$TestSnippet:emptyIdElement">
<input type="checkbox" name="xvalue" checked></input>
<input type="checkbox" id="xvalue-y" name="xvalue" afd:clear></input><label for="xvalue-y">yc</label>
</form>
</body>
</html> | astamuse/asta4d | 162 | Java | org.eclipse.core.resources.prefs | text/plain | -6,608,815,855,499,953,000 |
<html>
<head>
</head>
<body>
<form afd:render="field.SelectSingleTest$TestSnippet:staticOptionEditValue">
<select name="nullvalue">
<option value="x">x:d</option>
<option value="y">y:d</option>
<option value="z">z:d</option>
</select>
<select name="nullvalue-2">
<option value="">:d</option>
<option value="x">x:d</option>
<option value="y">y:d</option>
<option value="z">z:d</option>
</select>
<select name="emptyvalue">
<option value="x">x:d</option>
<option value="y">y:d</option>
<option value="z">z:d</option>
</select>
<select name="emptyvalue-2">
<option value="">:d</option>
<option value="x">x:d</option>
<option value="y">y:d</option>
<option value="z">z:d</option>
</select>
<select name="spacevalue">
<option value="x">x:d</option>
<option value="y">y:d</option>
<option value="z">z:d</option>
</select>
<select name="spacevalue-2">
<option value=" "> :d</option>
<option value="x">x:d</option>
<option value="y">y:d</option>
<option value="z">z:d</option>
</select>
<select name="xvalue">
<option value="y">y:d</option>
<option value="z">z:d</option>
</select>
<select name="xvalue-2">
<option value="x">x:d</option>
<option value="y">y:d</option>
<option value="z">z:d</option>
</select>
<select name="yvalue">
<optgroup label="A">
<option value="x">x:d</option>
<option value="z">z:d</option>
</optgroup>
<optgroup label="AA">
<option value="xx">xx:d</option>
<option value="yy">yy:d</option>
<option value="zz">zz:d</option>
</optgroup>
</select>
<select name="yvalue-2">
<optgroup label="A">
<option value="x">x:d</option>
<option value="y">y:d</option>
<option value="z">z:d</option>
</optgroup>
<optgroup label="AA">
<option value="xx">xx:d</option>
<option value="yy">yy:d</option>
<option value="zz">zz:d</option>
</optgroup>
</select>
</form>
</body>
</html> | astamuse/asta4d | 162 | Java | org.eclipse.core.resources.prefs | text/plain | -4,714,652,022,666,486,000 |
<html>
<head>
</head>
<body>
<form afd:render="field.SelectMultipleTest$TestSnippet:staticOptionEditMultiValue">
<select multiple name="nullvalue">
<option value="x">x:d</option>
<option value="y">y:d</option>
<option value="z">z:d</option>
</select>
<select multiple name="nullvalue-2">
<option value="">:d</option>
<option value="x">x:d</option>
<option value="y">y:d</option>
<option value="z">z:d</option>
</select>
<select multiple name="emptyvalue">
<option value="x">x:d</option>
<option value="y">y:d</option>
<option value="z">z:d</option>
</select>
<select multiple name="emptyvalue-2">
<option value="">:d</option>
<option value="x">x:d</option>
<option value="y">y:d</option>
<option value="z">z:d</option>
</select>
<select multiple name="spacevalue">
<option value="x">x:d</option>
<option value="y">y:d</option>
<option value="z">z:d</option>
</select>
<select multiple name="spacevalue-2">
<option value=" "> :d</option>
<option value="x">x:d</option>
<option value="y">y:d</option>
<option value="z">z:d</option>
</select>
<select multiple name="xvalue">
<option value="y">y:d</option>
<option value="z">z:d</option>
</select>
<select multiple name="xvalue-2">
<option value="x">x:d</option>
<option value="y">y:d</option>
<option value="z">z:d</option>
</select>
<select multiple name="yvalue">
<optgroup label="A">
<option value="x">x:d</option>
<option value="z">z:d</option>
</optgroup>
<optgroup label="AA">
<option value="xx">xx:d</option>
<option value="yy">yy:d</option>
<option value="zz">zz:d</option>
</optgroup>
</select>
<select multiple name="yvalue-2">
<optgroup label="A">
<option value="x">x:d</option>
<option value="y">y:d</option>
<option value="z">z:d</option>
</optgroup>
<optgroup label="AA">
<option value="xx">xx:d</option>
<option value="yy">yy:d</option>
<option value="zz">zz:d</option>
</optgroup>
</select>
</form>
</body>
</html> | astamuse/asta4d | 162 | Java | org.eclipse.core.resources.prefs | text/plain | 4,399,099,036,984,273,000 |
<html>
<head>
</head>
<body>
<form afd:render="field.SelectMultipleTest$TestSnippet:staticOptionDisplayMultiValue">
<select multiple name="nullvalue">
<option value="x">x:d</option>
<option value="y">y:d</option>
<option value="z">z:d</option>
</select>
<select multiple name="nullvalue-2">
<option value="">:d</option>
<option value="x">x:d</option>
<option value="y">y:d</option>
<option value="z">z:d</option>
</select>
<select multiple name="emptyvalue">
<option value="x">x:d</option>
<option value="y">y:d</option>
<option value="z">z:d</option>
</select>
<select multiple name="emptyvalue-2">
<option value="">:d</option>
<option value="x">x:d</option>
<option value="y">y:d</option>
<option value="z">z:d</option>
</select>
<select multiple name="spacevalue">
<option value="x">x:d</option>
<option value="y">y:d</option>
<option value="z">z:d</option>
</select>
<select multiple name="spacevalue-2">
<option value=" "> :d</option>
<option value="x">x:d</option>
<option value="y">y:d</option>
<option value="z">z:d</option>
</select>
<select multiple name="xvalue">
<option value="y">y:d</option>
<option value="z">z:d</option>
</select>
<div id="xvalue-display"></div>
<select multiple name="xvalue-2">
<option value="x">x:d</option>
<option value="y">y:d</option>
<option value="z">z:d</option>
</select>
<div id="xvalue-2-display"></div>
<select multiple name="yvalue">
<optgroup label="A">
<option value="x">x:d</option>
<option value="z">z:d</option>
</optgroup>
<optgroup label="AA">
<option value="xx">xx:d</option>
<option value="yy">yy:d</option>
<option value="zz">zz:d</option>
</optgroup>
</select>
<div id="yvalue-display"></div>
<select multiple name="yvalue-2">
<optgroup label="A">
<option value="x">x:d</option>
<option value="y">y:d</option>
<option value="z">z:d</option>
</optgroup>
<optgroup label="AA">
<option value="xx">xx:d</option>
<option value="yy">yy:d</option>
<option value="zz">zz:d</option>
</optgroup>
</select>
<div id="yvalue-2-display"></div>
</form>
</body>
</html> | astamuse/asta4d | 162 | Java | org.eclipse.core.resources.prefs | text/plain | 4,758,293,046,800,862,000 |
<html>
<head>
</head>
<body>
<form afd:render="field.RadioTest$TestSnippet:duplicatedElement">
<input type="radio" id="xvalue-x" name="xvalue" checked></input><label for="xvalue-x">xc</label>
<input type="radio" id="xvalue-y" name="xvalue" checked></input><label for="xvalue-y">yc</label>
</form>
</body>
</html> | astamuse/asta4d | 162 | Java | org.eclipse.core.resources.prefs | text/plain | -6,489,175,572,403,207,000 |
<html>
<head>
</head>
<body>
<form afd:render="field.HiddenTest$TestSnippet:normalEditValue">
<input type="hidden" name="nullvalue">
<input type="hidden" name="emptyvalue">
<input type="hidden" name="xvalue">
</form>
<form afd:render="field.HiddenTest$TestSnippet:normalDisplayValue">
<input type="hidden" name="nullvalue">
<input type="hidden" name="emptyvalue">
<input type="hidden" name="xvalue">
</form>
</body>
</html> | astamuse/asta4d | 162 | Java | org.eclipse.core.resources.prefs | text/plain | 1,415,352,566,204,946,700 |
<html>
<head>
</head>
<body>
<afd:extension parent="/OneStepForm_Base.html">
</afd:extension>
</body>
</html> | astamuse/asta4d | 162 | Java | org.eclipse.core.resources.prefs | text/plain | 1,218,113,672,334,449,200 |
<html>
<head>
</head>
<body>
<form afd:render="field.SelectMultipleTest$TestSnippet:normalEditMultiValue">
<select multiple name="nullvalue">
<option value="xx" selected>xx</option>
<option value="yy" afd:clear>yy</option>
<option value="zz" afd:clear>zz</option>
</select>
<select multiple name="nullvalue-2">
<option value="xx">xx</option>
</select>
<select multiple name="emptyvalue">
<option value="xx">xx</option>
</select>
<select multiple name="emptyvalue-2">
<option value="xx">xx</option>
</select>
<select multiple name="spacevalue">
<option value="xx">xx</option>
</select>
<select multiple name="spacevalue-2">
<option value="xx">xx</option>
</select>
<select multiple name="xvalue">
<option value="xx">xx</option>
</select>
<select multiple name="xvalue-2">
<option value="xx">xx</option>
</select>
<select multiple name="yvalue">
<optgroup label="Ac">
<option value="xc" selected>xc</option>
<option value="yc" afd:clear>yc</option>
<option value="zc" afd:clear>zc</option>
</optgroup>
<optgroup label="AAc" afd:clear>
<option value="xx">xx</option>
<option value="yy">yy</option>
<option value="zz">zz</option>
</optgroup>
</select>
<select multiple name="yvalue-2">
<optgroup label="Ac">
<option value="xc">xc</option>
<option value="y" afd:clear>y</option>
<option value="z" afd:clear>z</option>
</optgroup>
</select>
</form>
</body>
</html> | astamuse/asta4d | 162 | Java | org.eclipse.core.resources.prefs | text/plain | -7,535,137,689,682,160,000 |
<html>
<head>
</head>
<body>
<form afd:render="field.SelectMultipleTest$TestSnippet:staticOptionDisplayValue">
<select multiple name="nullvalue">
<option value="x">x:d</option>
<option value="y">y:d</option>
<option value="z">z:d</option>
</select>
<select multiple name="nullvalue-2">
<option value="">:d</option>
<option value="x">x:d</option>
<option value="y">y:d</option>
<option value="z">z:d</option>
</select>
<select multiple name="emptyvalue">
<option value="x">x:d</option>
<option value="y">y:d</option>
<option value="z">z:d</option>
</select>
<select multiple name="emptyvalue-2">
<option value="">:d</option>
<option value="x">x:d</option>
<option value="y">y:d</option>
<option value="z">z:d</option>
</select>
<select multiple name="spacevalue">
<option value="x">x:d</option>
<option value="y">y:d</option>
<option value="z">z:d</option>
</select>
<select multiple name="spacevalue-2">
<option value=" "> :d</option>
<option value="x">x:d</option>
<option value="y">y:d</option>
<option value="z">z:d</option>
</select>
<select multiple name="xvalue">
<option value="y">y:d</option>
<option value="z">z:d</option>
</select>
<div id="xvalue-display"></div>
<select multiple name="xvalue-2">
<option value="x">x:d</option>
<option value="y">y:d</option>
<option value="z">z:d</option>
</select>
<div id="xvalue-2-display"></div>
<select multiple name="yvalue">
<optgroup label="A">
<option value="x">x:d</option>
<option value="z">z:d</option>
</optgroup>
<optgroup label="AA">
<option value="xx">xx:d</option>
<option value="yy">yy:d</option>
<option value="zz">zz:d</option>
</optgroup>
</select>
<div id="yvalue-display"></div>
<select multiple name="yvalue-2">
<optgroup label="A">
<option value="x">x:d</option>
<option value="y">y:d</option>
<option value="z">z:d</option>
</optgroup>
<optgroup label="AA">
<option value="xx">xx:d</option>
<option value="yy">yy:d</option>
<option value="zz">zz:d</option>
</optgroup>
</select>
<div id="yvalue-2-display"></div>
</form>
</body>
</html> | astamuse/asta4d | 162 | Java | org.eclipse.core.resources.prefs | text/plain | 8,082,186,951,455,921,000 |
<html>
<head>
</head>
<body>
<form afd:render="field.CheckboxTest$TestSnippet:staticOptionDisplayMultiValue">
<input type="checkbox" id="nullvalue-x" name="nullvalue" value="x" checked></input><label for="nullvalue-x">xc</label>
<input type="checkbox" id="nullvalue-y" name="nullvalue" value="y"></input><label for="nullvalue-y">yc</label>
<input type="checkbox" id="nullvalue-z" name="nullvalue" value="z"></input><label for="nullvalue-z">zc</label>
<div></div>
<input type="checkbox" id="nullvalue-2-x" name="nullvalue-2" value="x"></input><label for="nullvalue-2-x">xc</label>
<input type="checkbox" id="nullvalue-2-y" name="nullvalue-2" value="y"></input><label for="nullvalue-2-y">yc</label>
<input type="checkbox" id="nullvalue-2-z" name="nullvalue-2" value="z"></input><label for="nullvalue-2-z">zc</label>
<input type="checkbox" id="nullvalue-2-" name="nullvalue-2" value=""></input><label for="nullvalue-2-">c</label>
<div></div>
<input type="checkbox" id="emptyvalue-x" name="emptyvalue" value="x" checked></input><label for="emptyvalue-x">xc</label>
<input type="checkbox" id="emptyvalue-y" name="emptyvalue" value="y"></input><label for="emptyvalue-y">yc</label>
<input type="checkbox" id="emptyvalue-z" name="emptyvalue" value="z"></input><label for="emptyvalue-z">zc</label>
<div></div>
<input type="checkbox" id="emptyvalue-2-x" name="emptyvalue-2" value="x"></input><label for="emptyvalue-2-x">xc</label>
<input type="checkbox" id="emptyvalue-2-y" name="emptyvalue-2" value="y"></input><label for="emptyvalue-2-y">yc</label>
<input type="checkbox" id="emptyvalue-2-z" name="emptyvalue-2" value="z"></input><label for="emptyvalue-2-z">zc</label>
<input type="checkbox" id="emptyvalue-2-" name="emptyvalue-2" value=""></input><label for="emptyvalue-2-">c</label>
<div></div>
<input type="checkbox" id="rvalue-s" name="rvalue" value="s"></input>
<div radio-label-for="rvalue-s"><img src=""/><label for="rvalue-s">sc</label></div>
<input type="checkbox" id="rvalue-t" name="rvalue" value="t"></input>
<div radio-label-for="rvalue-t"><img src=""/><label for="rvalue-t">tc</label></div>
<div></div>
<input type="checkbox" id="rvalue-2-r" name="rvalue-2" value="r"></input>
<div radio-label-for="rvalue-2-r"><img src=""/><label for="rvalue-2-r">rc</label></div>
<input type="checkbox" id="rvalue-2-s" name="rvalue-2" value="s"></input>
<div radio-label-for="rvalue-2-s"><img src=""/><label for="rvalue-2-s">sc</label></div>
<input type="checkbox" id="rvalue-2-t" name="rvalue-2" value="t"></input>
<div radio-label-for="rvalue-2-t"><img src=""/><label for="rvalue-2-t">tc</label></div>
<div></div>
<input type="checkbox" id="svalue-r" name="svalue" value="r"></input>
<div radio-label-for="svalue-r"><img src=""/><label for="svalue-r">rc</label></div>
<input type="checkbox" id="svalue-t" name="svalue" value="t"></input>
<div radio-label-for="svalue-t"><img src=""/><label for="svalue-t">tc</label></div>
<i id="svalue-display"></i>
<div></div>
<input type="checkbox" id="svalue-2-r" name="svalue-2" value="r"></input>
<div radio-label-for="svalue-2-r"><img src=""/><label for="svalue-2-r">rc</label></div>
<input type="checkbox" id="svalue-2-s" name="svalue-2" value="s"></input>
<div radio-label-for="svalue-2-s"><img src=""/><label for="svalue-2-s">sc</label></div>
<input type="checkbox" id="svalue-2-t" name="svalue-2" value="t"></input>
<div radio-label-for="svalue-2-t"><img src=""/><label for="svalue-2-t">tc</label></div>
<i id="svalue-2-display"></i>
<div></div>
<input type="checkbox" id="wvalue-y" name="wvalue" value="y"></input><label for="wvalue-y">yc</label>
<input type="checkbox" id="wvalue-z" name="wvalue" value="z"></input><label for="wvalue-z">zc</label>
<i id="wvalue-display"></i>
<div></div>
<input type="checkbox" id="wvalue-2-w" name="wvalue-2" value="w"></input><label for="wvalue-2-w">wc</label>
<input type="checkbox" id="wvalue-2-x" name="wvalue-2" value="x"></input><label for="wvalue-2-x">xc</label>
<input type="checkbox" id="wvalue-2-y" name="wvalue-2" value="y"></input><label for="wvalue-2-y">yc</label>
<input type="checkbox" id="wvalue-2-z" name="wvalue-2" value="z"></input><label for="wvalue-2-z">zc</label>
<i id="wvalue-2-display"></i>
<div></div>
<input type="checkbox" id="xvalue-y" name="xvalue" value="y"></input><label for="xvalue-y">yc</label>
<input type="checkbox" id="xvalue-z" name="xvalue" value="z"></input><label for="xvalue-z">zc</label>
<div></div>
<input type="checkbox" id="xvalue-2-x" name="xvalue-2" value="x"></input><label for="xvalue-2-x">xc</label>
<input type="checkbox" id="xvalue-2-y" name="xvalue-2" value="y"></input><label for="xvalue-2-y">yc</label>
<input type="checkbox" id="xvalue-2-z" name="xvalue-2" value="z"></input><label for="xvalue-2-z">zc</label>
<div></div>
<div class="yvalue-wrapper">
<input type="checkbox" id="yvalue-x" name="yvalue" value="x"></input>
<label for="yvalue-x">xc</label>
</div>
<div class="yvalue-wrapper">
<input type="checkbox" id="yvalue-" name="yvalue" value=""></input>
<label for="yvalue-">c</label>
</div>
<div class="yvalue-wrapper">
<input type="checkbox" id="yvalue-z" name="yvalue" value="z"></input>
<label for="yvalue-z">zc</label>
</div>
<div class="yvalue-2-wrapper">
<input type="checkbox" id="yvalue-2-x" name="yvalue-2" value="x"></input>
<label for="yvalue-2-x">xc</label>
</div>
<div class="yvalue-2-wrapper">
<input type="checkbox" id="yvalue-2-y" name="yvalue-2" value="y"></input>
<label for="yvalue-2-y">yc</label>
</div>
<div class="yvalue-2-wrapper">
<input type="checkbox" id="yvalue-2-z" name="yvalue-2" value="z"></input>
<label for="yvalue-2-z">zc</label>
</div>
</form>
</body>
</html> | astamuse/asta4d | 162 | Java | org.eclipse.core.resources.prefs | text/plain | 3,885,807,924,855,277,600 |
<html>
<head>
</head>
<body>
<form afd:render="field.CheckboxTest$TestSnippet:normalEditValue">
<input type="checkbox" id="nullvalue-x" name="nullvalue" checked></input><label for="nullvalue-x">xc</label>
<input type="checkbox" id="nullvalue-y" name="nullvalue" afd:clear></input><label for="nullvalue-y" afd:clear>yc</label>
<input type="checkbox" id="nullvalue-z" name="nullvalue" afd:clear></input><label for="nullvalue-z" afd:clear>zc</label>
<div></div>
<input type="checkbox" id="nullvalue-2-x" name="nullvalue-2" ></input><label for="nullvalue-2-x">x</label>
<input type="checkbox" id="nullvalue-2-y" name="nullvalue-2" afd:clear></input><label for="nullvalue-2-y" afd:clear>y</label>
<input type="checkbox" id="nullvalue-2-z" name="nullvalue-2" afd:clear></input><label for="nullvalue-2-z" afd:clear>z</label>
<input type="checkbox" id="nullvalue-2-z" name="nullvalue-2" afd:clear></input><label for="nullvalue-2-z" afd:clear></label>
<div></div>
<input type="checkbox" id="emptyvalue-x" name="emptyvalue" checked></input><label for="emptyvalue-x">xc</label>
<input type="checkbox" id="emptyvalue-y" name="emptyvalue" afd:clear></input><label for="emptyvalue-y" afd:clear>yc</label>
<input type="checkbox" id="emptyvalue-z" name="emptyvalue" afd:clear></input><label for="emptyvalue-z" afd:clear>zc</label>
<div></div>
<input type="checkbox" id="emptyvalue-2-x" name="emptyvalue-2" ></input><label for="emptyvalue-2-x">xc</label>
<input type="checkbox" id="emptyvalue-2-y" name="emptyvalue-2" afd:clear></input><label for="emptyvalue-2-y" afd:clear>yc</label>
<input type="checkbox" id="emptyvalue-2-z" name="emptyvalue-2" afd:clear></input><label for="emptyvalue-2-z" afd:clear>zc</label>
<input type="checkbox" id="emptyvalue-2-z" name="emptyvalue-2" afd:clear></input><label for="emptyvalue-2-z" afd:clear>ccc</label>
<div></div>
<input type="checkbox" id="rvalue-s" name="rvalue"></input>
<div radio-label-for="rvalue-s"><img src=""/><label for="rvalue-s">sc</label></div>
<input type="checkbox" id="rvalue-t" name="rvalue" afd:clear></input>
<div radio-label-for="rvalue-t" afd:clear><img src=""/><label for="rvalue-t">tc</label></div>
<div></div>
<input type="checkbox" id="rvalue-2-r" name="rvalue-2"></input>
<div radio-label-for="rvalue-2-r"><img src=""/><label for="rvalue-2-r">rc</label></div>
<input type="checkbox" id="rvalue-2-s" name="rvalue-2" afd:clear></input>
<div radio-label-for="rvalue-2-s" afd:clear><img src=""/><label for="rvalue-2-s">sc</label></div>
<input type="checkbox" id="rvalue-2-t" name="rvalue-2" afd:clear></input>
<div radio-label-for="rvalue-2-t" afd:clear><img src=""/><label for="rvalue-2-t">tc</label></div>
<div></div>
<input type="checkbox" id="uvalue" name="uvalue"></input>
<div></div>
<input type="checkbox" id="uvalue-2" name="uvalue-2"></input>
<div></div>
<input type="checkbox" id="xvalue-y" name="xvalue"></input><label for="xvalue-y">yc</label>
<input type="checkbox" id="xvalue-z" name="xvalue" afd:clear></input><label for="xvalue-z" afd:clear>zc</label>
<div></div>
<input type="checkbox" id="xvalue-2-x" name="xvalue-2" ></input><label for="xvalue-2-x">xc</label>
<input type="checkbox" id="xvalue-2-y" name="xvalue-2" afd:clear></input><label for="xvalue-2-y" afd:clear>yc</label>
<input type="checkbox" id="xvalue-2-z" name="xvalue-2" afd:clear></input><label for="xvalue-2-z" afd:clear>zc</label>
<div></div>
<div class="yvalue-wrapper">
<input type="checkbox" id="yvalue-x" name="yvalue" ></input><label for="yvalue-x">xc</label>
</div>
<div afd:clear>
<input type="checkbox" id="yvalue-y" name="yvalue" ></input><label for="yvalue-y">yc</label>
</div>
<div afd:clear>
<input type="checkbox" id="yvalue-z" name="yvalue" ></input><label for="yvalue-z">zc</label>
</div>
<div class="yvalue-2-wrapper">
<input type="checkbox" id="yvalue-2-x" name="yvalue-2" ></input><label for="yvalue-2-x">xc</label>
</div>
<div afd:clear>
<input type="checkbox" id="yvalue-2-y" name="yvalue-2" ></input><label for="yvalue-2-y">yc</label>
</div>
<div afd:clear>
<input type="checkbox" id="yvalue-2-z" name="yvalue-2" ></input><label for="yvalue-2-z">zc</label>
</div>
</form>
</body>
</html> | astamuse/asta4d | 162 | Java | org.eclipse.core.resources.prefs | text/plain | -5,459,788,236,815,198,000 |
<html>
<head>
</head>
<body>
<form afd:render="field.RadioTest$TestSnippet:staticOptionEditValue">
<input type="radio" id="nullvalue-x" name="nullvalue" value="x" checked></input><label for="nullvalue-x">xc</label>
<input type="radio" id="nullvalue-y" name="nullvalue" value="y"></input><label for="nullvalue-y">yc</label>
<input type="radio" id="nullvalue-z" name="nullvalue" value="z"></input><label for="nullvalue-z">zc</label>
<div></div>
<input type="radio" id="nullvalue-2-x" name="nullvalue-2" value="x"></input><label for="nullvalue-2-x">xc</label>
<input type="radio" id="nullvalue-2-y" name="nullvalue-2" value="y"></input><label for="nullvalue-2-y">yc</label>
<input type="radio" id="nullvalue-2-z" name="nullvalue-2" value="z"></input><label for="nullvalue-2-z">zc</label>
<input type="radio" id="nullvalue-2-" name="nullvalue-2" value=""></input><label for="nullvalue-2-">c</label>
<div></div>
<input type="radio" id="emptyvalue-x" name="emptyvalue" value="x" checked></input><label for="emptyvalue-x">xc</label>
<input type="radio" id="emptyvalue-y" name="emptyvalue" value="y"></input><label for="emptyvalue-y">yc</label>
<input type="radio" id="emptyvalue-z" name="emptyvalue" value="z"></input><label for="emptyvalue-z">zc</label>
<div></div>
<input type="radio" id="emptyvalue-2-x" name="emptyvalue-2" value="x"></input><label for="emptyvalue-2-x">xc</label>
<input type="radio" id="emptyvalue-2-y" name="emptyvalue-2" value="y"></input><label for="emptyvalue-2-y">yc</label>
<input type="radio" id="emptyvalue-2-z" name="emptyvalue-2" value="z"></input><label for="emptyvalue-2-z">zc</label>
<input type="radio" id="emptyvalue-2-" name="emptyvalue-2" value=""></input><label for="emptyvalue-2-">c</label>
<div></div>
<input type="radio" id="rvalue-s" name="rvalue" value="s"></input>
<div radio-label-for="rvalue-s"><img src=""/><label for="rvalue-s">sc</label></div>
<input type="radio" id="rvalue-t" name="rvalue" value="t"></input>
<div radio-label-for="rvalue-t"><img src=""/><label for="rvalue-t">tc</label></div>
<div></div>
<input type="radio" id="rvalue-2-r" name="rvalue-2" value="r"></input>
<div radio-label-for="rvalue-2-r"><img src=""/><label for="rvalue-2-r">rc</label></div>
<input type="radio" id="rvalue-2-s" name="rvalue-2" value="s"></input>
<div radio-label-for="rvalue-2-s"><img src=""/><label for="rvalue-2-s">sc</label></div>
<input type="radio" id="rvalue-2-t" name="rvalue-2" value="t"></input>
<div radio-label-for="rvalue-2-t"><img src=""/><label for="rvalue-2-t">tc</label></div>
<div></div>
<input type="radio" id="xvalue-y" name="xvalue" value="y"></input><label for="xvalue-y">yc</label>
<input type="radio" id="xvalue-z" name="xvalue" value="z"></input><label for="xvalue-z">zc</label>
<div></div>
<input type="radio" id="xvalue-2-x" name="xvalue-2" value="x"></input><label for="xvalue-2-x">xc</label>
<input type="radio" id="xvalue-2-y" name="xvalue-2" value="y"></input><label for="xvalue-2-y">yc</label>
<input type="radio" id="xvalue-2-z" name="xvalue-2" value="z"></input><label for="xvalue-2-z">zc</label>
<div></div>
<div class="yvalue-wrapper">
<input type="radio" id="yvalue-x" name="yvalue" value="x"></input>
<label for="yvalue-x">xc</label>
</div>
<div>
<input type="radio" id="yvalue-" name="yvalue" value=""></input>
<label for="yvalue-">c</label>
</div>
<div>
<input type="radio" id="yvalue-z" name="yvalue" value="z"></input>
<label for="yvalue-z">zc</label>
</div>
<div class="yvalue-2-wrapper">
<input type="radio" id="yvalue-2-x" name="yvalue-2" value="x"></input>
<label for="yvalue-2-x">xc</label>
</div>
<div class="yvalue-2-wrapper">
<input type="radio" id="yvalue-2-y" name="yvalue-2" value="y"></input>
<label for="yvalue-2-y">yc</label>
</div>
<div class="yvalue-2-wrapper">
<input type="radio" id="yvalue-2-z" name="yvalue-2" value="z"></input>
<label for="yvalue-2-z">zc</label>
</div>
</form>
</body>
</html> | astamuse/asta4d | 162 | Java | org.eclipse.core.resources.prefs | text/plain | 58,067,781,326,171,720 |
<html>
<head>
</head>
<body>
<form afd:render="field.RadioTest$TestSnippet:duplicatedElementInDuplicator">
<div class="radio-wrapper">
<input type="radio" id="xvalue-x" name="xvalue" checked></input><label for="xvalue-x">xc</label>
</div>
<div class="radio-wrapper">
<input type="radio" id="xvalue-y" name="xvalue" checked></input><label for="xvalue-y">xc</label>
</div>
</form>
</body>
</html> | astamuse/asta4d | 162 | Java | org.eclipse.core.resources.prefs | text/plain | -8,743,011,007,397,463,000 |
<html>
<head>
</head>
<body>
<form afd:render="field.TimeTest$TestSnippet:normalEditValue">
<input type="time" name="nullvalue">
<input type="time" name="emptyvalue">
<input type="time" name="datevalue">
<input type="time" name="jodadatetimevalue">
<input type="time" name="jodalocaltimevalue">
<input type="time" name="java8instantvalue">
<input type="date" name="java8localdatetimevalue">
<input type="time" name="java8localtimevalue">
</form>
<form afd:render="field.TimeTest$TestSnippet:normalDisplayValue">
<input type="time" name="nullvalue">
<input type="time" name="emptyvalue">
<input type="time" name="datevalue">
<input type="time" name="jodadatetimevalue"><div id="jodadatetimevalue-display"></div>
<div id="jodalocaltimevalue-display"></div>
<input type="time" name="java8instantvalue">
<input type="date" name="java8localdatetimevalue">
<input type="time" name="java8localtimevalue">
</form>
</body>
</html> | astamuse/asta4d | 162 | Java | org.eclipse.core.resources.prefs | text/plain | -4,274,352,452,806,134,000 |
<html>
<head>
</head>
<body>
<form afd:render="field.RadioTest$TestSnippet:displayMissingEditTarget">
</form>
</body>
</html> | astamuse/asta4d | 162 | Java | org.eclipse.core.resources.prefs | text/plain | -1,402,001,293,367,727,600 |
<html>
<head>
</head>
<body>
<form afd:render="field.RadioTest$TestSnippet:emptyIdElement">
<input type="radio" name="xvalue" checked></input>
<input type="radio" id="xvalue-y" name="xvalue" afd:clear></input><label for="xvalue-y">yc</label>
</form>
</body>
</html> | astamuse/asta4d | 162 | Java | org.eclipse.core.resources.prefs | text/plain | 7,652,156,696,647,137,000 |
<html>
<head>
</head>
<body>
<form afd:render="field.CheckboxTest$TestSnippet:normalEditMultiValue">
<input type="checkbox" id="nullvalue-x" name="nullvalue" checked></input><label for="nullvalue-x">xc</label>
<input type="checkbox" id="nullvalue-y" name="nullvalue" afd:clear></input><label for="nullvalue-y" afd:clear>yc</label>
<input type="checkbox" id="nullvalue-z" name="nullvalue" afd:clear></input><label for="nullvalue-z" afd:clear>zc</label>
<div></div>
<input type="checkbox" id="nullvalue-2-x" name="nullvalue-2" ></input><label for="nullvalue-2-x">x</label>
<input type="checkbox" id="nullvalue-2-y" name="nullvalue-2" afd:clear></input><label for="nullvalue-2-y" afd:clear>y</label>
<input type="checkbox" id="nullvalue-2-z" name="nullvalue-2" afd:clear></input><label for="nullvalue-2-z" afd:clear>z</label>
<input type="checkbox" id="nullvalue-2-z" name="nullvalue-2" afd:clear></input><label for="nullvalue-2-z" afd:clear></label>
<div></div>
<input type="checkbox" id="emptyvalue-x" name="emptyvalue" checked></input><label for="emptyvalue-x">xc</label>
<input type="checkbox" id="emptyvalue-y" name="emptyvalue" afd:clear></input><label for="emptyvalue-y" afd:clear>yc</label>
<input type="checkbox" id="emptyvalue-z" name="emptyvalue" afd:clear></input><label for="emptyvalue-z" afd:clear>zc</label>
<div></div>
<input type="checkbox" id="emptyvalue-2-x" name="emptyvalue-2" ></input><label for="emptyvalue-2-x">xc</label>
<input type="checkbox" id="emptyvalue-2-y" name="emptyvalue-2" afd:clear></input><label for="emptyvalue-2-y" afd:clear>yc</label>
<input type="checkbox" id="emptyvalue-2-z" name="emptyvalue-2" afd:clear></input><label for="emptyvalue-2-z" afd:clear>zc</label>
<input type="checkbox" id="emptyvalue-2-z" name="emptyvalue-2" afd:clear></input><label for="emptyvalue-2-z" afd:clear>ccc</label>
<div></div>
<input type="checkbox" id="rvalue-s" name="rvalue"></input>
<div radio-label-for="rvalue-s"><img src=""/><label for="rvalue-s">sc</label></div>
<input type="checkbox" id="rvalue-t" name="rvalue" afd:clear></input>
<div radio-label-for="rvalue-t" afd:clear><img src=""/><label for="rvalue-t">tc</label></div>
<div></div>
<input type="checkbox" id="rvalue-2-r" name="rvalue-2"></input>
<div radio-label-for="rvalue-2-r"><img src=""/><label for="rvalue-2-r">rc</label></div>
<input type="checkbox" id="rvalue-2-s" name="rvalue-2" afd:clear></input>
<div radio-label-for="rvalue-2-s" afd:clear><img src=""/><label for="rvalue-2-s">sc</label></div>
<input type="checkbox" id="rvalue-2-t" name="rvalue-2" afd:clear></input>
<div radio-label-for="rvalue-2-t" afd:clear><img src=""/><label for="rvalue-2-t">tc</label></div>
<div></div>
<input type="checkbox" id="uvalue" name="uvalue"></input>
<div></div>
<input type="checkbox" id="uvalue-2" name="uvalue-2"></input>
<div></div>
<input type="checkbox" id="xvalue-y" name="xvalue"></input><label for="xvalue-y">yc</label>
<input type="checkbox" id="xvalue-z" name="xvalue" afd:clear></input><label for="xvalue-z" afd:clear>zc</label>
<div></div>
<input type="checkbox" id="xvalue-2-x" name="xvalue-2" ></input><label for="xvalue-2-x">xc</label>
<input type="checkbox" id="xvalue-2-y" name="xvalue-2" afd:clear></input><label for="xvalue-2-y" afd:clear>yc</label>
<input type="checkbox" id="xvalue-2-z" name="xvalue-2" afd:clear></input><label for="xvalue-2-z" afd:clear>zc</label>
<div></div>
<div class="yvalue-wrapper">
<input type="checkbox" id="yvalue-x" name="yvalue" ></input><label for="yvalue-x">xc</label>
</div>
<div afd:clear>
<input type="checkbox" id="yvalue-y" name="yvalue" ></input><label for="yvalue-y">yc</label>
</div>
<div afd:clear>
<input type="checkbox" id="yvalue-z" name="yvalue" ></input><label for="yvalue-z">zc</label>
</div>
<div class="yvalue-2-wrapper">
<input type="checkbox" id="yvalue-2-x" name="yvalue-2" ></input><label for="yvalue-2-x">xc</label>
</div>
<div afd:clear>
<input type="checkbox" id="yvalue-2-y" name="yvalue-2" ></input><label for="yvalue-2-y">yc</label>
</div>
<div afd:clear>
<input type="checkbox" id="yvalue-2-z" name="yvalue-2" ></input><label for="yvalue-2-z">zc</label>
</div>
</form>
</body>
</html> | astamuse/asta4d | 162 | Java | org.eclipse.core.resources.prefs | text/plain | -7,858,901,176,899,624,000 |
<html>
<head>
</head>
<body>
<form afd:render="field.CheckboxTest$TestSnippet:normalDisplayValue">
<input type="checkbox" id="nullvalue-x" name="nullvalue" checked></input><label for="nullvalue-x">xc</label>
<input type="checkbox" id="nullvalue-y" name="nullvalue" afd:clear></input><label for="nullvalue-y" afd:clear>yc</label>
<input type="checkbox" id="nullvalue-z" name="nullvalue" afd:clear></input><label for="nullvalue-z" afd:clear>zc</label>
<div></div>
<input type="checkbox" id="nullvalue-2-x" name="nullvalue-2" ></input><label for="nullvalue-2-x">x</label>
<input type="checkbox" id="nullvalue-2-y" name="nullvalue-2" afd:clear></input><label for="nullvalue-2-y" afd:clear>y</label>
<input type="checkbox" id="nullvalue-2-z" name="nullvalue-2" afd:clear></input><label for="nullvalue-2-z" afd:clear>z</label>
<input type="checkbox" id="nullvalue-2-z" name="nullvalue-2" afd:clear></input><label for="nullvalue-2-z" afd:clear></label>
<div></div>
<input type="checkbox" id="emptyvalue-x" name="emptyvalue" checked></input><label for="emptyvalue-x">xc</label>
<input type="checkbox" id="emptyvalue-y" name="emptyvalue" afd:clear></input><label for="emptyvalue-y" afd:clear>yc</label>
<input type="checkbox" id="emptyvalue-z" name="emptyvalue" afd:clear></input><label for="emptyvalue-z" afd:clear>zc</label>
<div></div>
<input type="checkbox" id="emptyvalue-2-x" name="emptyvalue-2" ></input><label for="emptyvalue-2-x">xc</label>
<input type="checkbox" id="emptyvalue-2-y" name="emptyvalue-2" afd:clear></input><label for="emptyvalue-2-y" afd:clear>yc</label>
<input type="checkbox" id="emptyvalue-2-z" name="emptyvalue-2" afd:clear></input><label for="emptyvalue-2-z" afd:clear>zc</label>
<input type="checkbox" id="emptyvalue-2-z" name="emptyvalue-2" afd:clear></input><label for="emptyvalue-2-z" afd:clear>ccc</label>
<div></div>
<input type="checkbox" id="rvalue-s" name="rvalue"></input>
<div radio-label-for="rvalue-s"><img src=""/><label for="rvalue-s">sc</label></div>
<input type="checkbox" id="rvalue-t" name="rvalue" afd:clear></input>
<div radio-label-for="rvalue-t" afd:clear><img src=""/><label for="rvalue-t">tc</label></div>
<div></div>
<input type="checkbox" id="rvalue-2-r" name="rvalue-2"></input>
<div radio-label-for="rvalue-2-r"><img src=""/><label for="rvalue-2-r">rc</label></div>
<input type="checkbox" id="rvalue-2-s" name="rvalue-2" afd:clear></input>
<div radio-label-for="rvalue-2-s" afd:clear><img src=""/><label for="rvalue-2-s">sc</label></div>
<input type="checkbox" id="rvalue-2-t" name="rvalue-2" afd:clear></input>
<div radio-label-for="rvalue-2-t" afd:clear><img src=""/><label for="rvalue-2-t">tc</label></div>
<div></div>
<input type="checkbox" id="svalue-s" name="svalue"></input>
<div radio-label-for="svalue-s"><img src=""/><label for="svalue-s">sc</label></div>
<input type="checkbox" id="svalue-t" name="svalue" afd:clear></input>
<div radio-label-for="svalue-t" afd:clear><img src=""/><label for="svalue-t">tc</label></div>
<i id="svalue-display"></i>
<div></div>
<input type="checkbox" id="svalue-2-r" name="svalue-2"></input>
<div radio-label-for="svalue-2-r"><img src=""/><label for="svalue-2-r">rc</label></div>
<input type="checkbox" id="svalue-2-s" name="svalue-2" afd:clear></input>
<div radio-label-for="svalue-2-s" afd:clear><img src=""/><label for="svalue-2-s">sc</label></div>
<input type="checkbox" id="svalue-2-t" name="svalue-2" afd:clear></input>
<div radio-label-for="svalue-2-t" afd:clear><img src=""/><label for="svalue-2-t">tc</label></div>
<i id="svalue-2-display"></i>
<div></div>
<input type="checkbox" id="uvalue" name="uvalue"></input>
<div></div>
<input type="checkbox" id="uvalue-2" name="uvalue-2"></input>
<div></div>
<div>
<i id="wvalue-display"></i>
<i id="wvalue-2-display"></i>
</div>
<input type="checkbox" id="xvalue-y" name="xvalue"></input><label for="xvalue-y">yc</label>
<input type="checkbox" id="xvalue-z" name="xvalue" afd:clear></input><label for="xvalue-z" afd:clear>zc</label>
<div></div>
<input type="checkbox" id="xvalue-2-x" name="xvalue-2" ></input><label for="xvalue-2-x">xc</label>
<input type="checkbox" id="xvalue-2-y" name="xvalue-2" afd:clear></input><label for="xvalue-2-y" afd:clear>yc</label>
<input type="checkbox" id="xvalue-2-z" name="xvalue-2" afd:clear></input><label for="xvalue-2-z" afd:clear>zc</label>
<div></div>
<div class="yvalue-wrapper">
<input type="checkbox" id="yvalue-x" name="yvalue" ></input><label for="yvalue-x">xc</label>
</div>
<div afd:clear>
<input type="checkbox" id="yvalue-y" name="yvalue" ></input><label for="yvalue-y">yc</label>
</div>
<div afd:clear>
<input type="checkbox" id="yvalue-z" name="yvalue" ></input><label for="yvalue-z">zc</label>
</div>
<div class="yvalue-2-wrapper">
<input type="checkbox" id="yvalue-2-x" name="yvalue-2" ></input><label for="yvalue-2-x">xc</label>
</div>
<div afd:clear>
<input type="checkbox" id="yvalue-2-y" name="yvalue-2" ></input><label for="yvalue-2-y">yc</label>
</div>
<div afd:clear>
<input type="checkbox" id="yvalue-2-z" name="yvalue-2" ></input><label for="yvalue-2-z">zc</label>
</div>
<div class="zvalue-wrapper">
<input type="checkbox" id="zvalue-x" name="zvalue" ></input><label for="zvalue-x">xc</label>
</div>
<div afd:clear>
<input type="checkbox" id="zvalue-y" name="zvalue" ></input><label for="zvalue-y">yc</label>
</div>
<div afd:clear>
<input type="checkbox" id="zvalue-z" name="zvalue" ></input><label for="zvalue-z">zc</label>
</div>
<div><b id="zvalue-display"></b></div>
<div class="zvalue-2-wrapper">
<input type="checkbox" id="zvalue-2-x" name="zvalue-2" ></input><label for="zvalue-2-x">xc</label>
</div>
<div afd:clear>
<input type="checkbox" id="zvalue-2-y" name="zvalue-2" ></input><label for="zvalue-2-y">yc</label>
</div>
<div afd:clear>
<input type="checkbox" id="zvalue-2-z" name="zvalue-2" ></input><label for="zvalue-2-z">zc</label>
</div>
<div><b id="zvalue-2-display"></b></div>
</form>
</body>
</html> | astamuse/asta4d | 162 | Java | org.eclipse.core.resources.prefs | text/plain | 8,158,261,291,076,689,000 |
<html>
<head>
</head>
<body>
<form afd:render="field.SelectMultipleTest$TestSnippet:normalEditValue">
<select multiple name="nullvalue">
<option value="xx" selected>xx</option>
<option value="yy" afd:clear>yy</option>
<option value="zz" afd:clear>zz</option>
</select>
<select multiple name="nullvalue-2">
<option value="xx">xx</option>
</select>
<select multiple name="emptyvalue">
<option value="xx">xx</option>
</select>
<select multiple name="emptyvalue-2">
<option value="xx">xx</option>
</select>
<select multiple name="spacevalue">
<option value="xx">xx</option>
</select>
<select multiple name="spacevalue-2">
<option value="xx">xx</option>
</select>
<select multiple name="xvalue">
<option value="xx">xx</option>
</select>
<select multiple name="xvalue-2">
<option value="xx">xx</option>
</select>
<select multiple name="yvalue">
<optgroup label="Ac">
<option value="xc" selected>xc</option>
<option value="yc" afd:clear>yc</option>
<option value="zc" afd:clear>zc</option>
</optgroup>
<optgroup label="AAc" afd:clear>
<option value="xx">xx</option>
<option value="yy">yy</option>
<option value="zz">zz</option>
</optgroup>
</select>
<select multiple name="yvalue-2">
<optgroup label="Ac">
<option value="xc">xc</option>
<option value="y" afd:clear>y</option>
<option value="z" afd:clear>z</option>
</optgroup>
</select>
</form>
</body>
</html> | astamuse/asta4d | 162 | Java | org.eclipse.core.resources.prefs | text/plain | -5,133,304,715,075,761,000 |
<html>
<head>
</head>
<body>
<form afd:render="field.InputDefaultTest$TestSnippet:normalEditValue">
<input type="text" name="nullvalue">
<input type="text" name="emptyvalue">
<input type="text" name="xvalue">
</form>
<form afd:render="field.InputDefaultTest$TestSnippet:normalDisplayValue">
<input type="text" name="nullvalue">
<input type="text" name="emptyvalue">
<input type="text" name="xvalue">
<input type="text" name="yvalue"><div id="yvalue-display"></div>
<div id="zvalue-display"></div>
</form>
</body>
</html> | astamuse/asta4d | 162 | Java | org.eclipse.core.resources.prefs | text/plain | 4,474,707,315,190,256,600 |
<html>
<head>
</head>
<body>
<form afd:render="OneStepFormTest$TestSnippet">
<input type="hidden" name="id">
<input type="text" name="data">
<input type="text" name="subData">
<input type="hidden" name="subArrayLength">
<div cascade-ref="subArray-container-@"><input type="text" name="year-@"></div>
<input type="hidden" name="subArrayLength2">
<div cascade-ref="subArray2-container-@"><input type="text" name="age-@"></div>
</form>
</body>
</html> | astamuse/asta4d | 162 | Java | org.eclipse.core.resources.prefs | text/plain | -4,162,318,448,004,067,300 |
<html>
<head>
</head>
<body>
<div afd:render="MultiStepFormTest$TestSnippet">
<div id="data-display"></div>
<div id="subData-display"></div>
<div cascade-ref="subArray-container-@">
<span id="year-@-display"></span>
</div>
<div cascade-ref="subArray2-container-@">
<span id="age-@-display"></span>
</div>
</div>
</body>
</html> | astamuse/asta4d | 162 | Java | org.eclipse.core.resources.prefs | text/plain | 6,706,395,650,080,706,000 |
<html>
<head>
</head>
<body>
<form afd:render="field.RadioTest$TestSnippet:normalEditValue">
<input type="radio" id="nullvalue-x" name="nullvalue" checked></input><label for="nullvalue-x">xc</label>
<input type="radio" id="nullvalue-y" name="nullvalue" afd:clear></input><label for="nullvalue-y" afd:clear>yc</label>
<input type="radio" id="nullvalue-z" name="nullvalue" afd:clear></input><label for="nullvalue-z" afd:clear>zc</label>
<div></div>
<input type="radio" id="nullvalue-2-x" name="nullvalue-2" ></input><label for="nullvalue-2-x">x</label>
<input type="radio" id="nullvalue-2-y" name="nullvalue-2" afd:clear></input><label for="nullvalue-2-y" afd:clear>y</label>
<input type="radio" id="nullvalue-2-z" name="nullvalue-2" afd:clear></input><label for="nullvalue-2-z" afd:clear>z</label>
<input type="radio" id="nullvalue-2-z" name="nullvalue-2" afd:clear></input><label for="nullvalue-2-z" afd:clear></label>
<div></div>
<input type="radio" id="emptyvalue-x" name="emptyvalue" checked></input><label for="emptyvalue-x">xc</label>
<input type="radio" id="emptyvalue-y" name="emptyvalue" afd:clear></input><label for="emptyvalue-y" afd:clear>yc</label>
<input type="radio" id="emptyvalue-z" name="emptyvalue" afd:clear></input><label for="emptyvalue-z" afd:clear>zc</label>
<div></div>
<input type="radio" id="emptyvalue-2-x" name="emptyvalue-2" ></input><label for="emptyvalue-2-x">xc</label>
<input type="radio" id="emptyvalue-2-y" name="emptyvalue-2" afd:clear></input><label for="emptyvalue-2-y" afd:clear>yc</label>
<input type="radio" id="emptyvalue-2-z" name="emptyvalue-2" afd:clear></input><label for="emptyvalue-2-z" afd:clear>zc</label>
<input type="radio" id="emptyvalue-2-z" name="emptyvalue-2" afd:clear></input><label for="emptyvalue-2-z" afd:clear>ccc</label>
<div></div>
<input type="radio" id="rvalue-s" name="rvalue"></input>
<div radio-label-for="rvalue-s"><img src=""/><label for="rvalue-s">sc</label></div>
<input type="radio" id="rvalue-t" name="rvalue" afd:clear></input>
<div radio-label-for="rvalue-t" afd:clear><img src=""/><label for="rvalue-t">tc</label></div>
<div></div>
<input type="radio" id="rvalue-2-r" name="rvalue-2"></input>
<div radio-label-for="rvalue-2-r"><img src=""/><label for="rvalue-2-r">rc</label></div>
<input type="radio" id="rvalue-2-s" name="rvalue-2" afd:clear></input>
<div radio-label-for="rvalue-2-s" afd:clear><img src=""/><label for="rvalue-2-s">sc</label></div>
<input type="radio" id="rvalue-2-t" name="rvalue-2" afd:clear></input>
<div radio-label-for="rvalue-2-t" afd:clear><img src=""/><label for="rvalue-2-t">tc</label></div>
<div></div>
<input type="radio" id="uvalue" name="uvalue"></input>
<div></div>
<input type="radio" id="uvalue-2" name="uvalue-2"></input>
<div></div>
<input type="radio" id="xvalue-y" name="xvalue"></input><label for="xvalue-y">yc</label>
<input type="radio" id="xvalue-z" name="xvalue" afd:clear></input><label for="xvalue-z" afd:clear>zc</label>
<div></div>
<input type="radio" id="xvalue-2-x" name="xvalue-2" ></input><label for="xvalue-2-x">xc</label>
<input type="radio" id="xvalue-2-y" name="xvalue-2" afd:clear></input><label for="xvalue-2-y" afd:clear>yc</label>
<input type="radio" id="xvalue-2-z" name="xvalue-2" afd:clear></input><label for="xvalue-2-z" afd:clear>zc</label>
<div></div>
<div class="yvalue-wrapper">
<input type="radio" id="yvalue-x" name="yvalue" ></input><label for="yvalue-x">xc</label>
</div>
<div afd:clear>
<input type="radio" id="yvalue-y" name="yvalue" ></input><label for="yvalue-y">yc</label>
</div>
<div afd:clear>
<input type="radio" id="yvalue-z" name="yvalue" ></input><label for="yvalue-z">zc</label>
</div>
<div class="yvalue-2-wrapper">
<input type="radio" id="yvalue-2-x" name="yvalue-2" ></input><label for="yvalue-2-x">xc</label>
</div>
<div afd:clear>
<input type="radio" id="yvalue-2-y" name="yvalue-2" ></input><label for="yvalue-2-y">yc</label>
</div>
<div afd:clear>
<input type="radio" id="yvalue-2-z" name="yvalue-2" ></input><label for="yvalue-2-z">zc</label>
</div>
</form>
</body>
</html> | astamuse/asta4d | 162 | Java | org.eclipse.core.resources.prefs | text/plain | 28,787,811,029,431,430 |
<html>
<head>
</head>
<body>
<form afd:render="field.DateTest$TestSnippet:normalEditValue">
<input type="date" name="nullvalue">
<input type="date" name="emptyvalue">
<input type="date" name="datevalue">
<input type="date" name="jodadatetimevalue">
<input type="date" name="jodalocaldatevalue">
<input type="date" name="java8instantvalue">
<input type="date" name="java8localdatetimevalue">
<input type="date" name="java8localdatevalue">
</form>
<form afd:render="field.DateTest$TestSnippet:normalDisplayValue">
<input type="date" name="nullvalue">
<input type="date" name="emptyvalue">
<input type="date" name="datevalue">
<input type="date" name="jodadatetimevalue"><div id="jodadatetimevalue-display"></div>
<div id="jodalocaldatevalue-display"></div>
<input type="date" name="java8instantvalue">
<input type="date" name="java8localdatetimevalue">
<input type="date" name="java8localdatevalue">
</form>
</body>
</html> | astamuse/asta4d | 162 | Java | org.eclipse.core.resources.prefs | text/plain | 7,528,234,648,040,260,000 |
<html>
<head>
</head>
<body>
<form afd:render="field.TextareaTest$TestSnippet:normalEditValue">
<textarea name="nullvalue">
</textarea>
<textarea name="emptyvalue">
</textarea>
<textarea name="xvalue">
</textarea>
</form>
<form afd:render="field.TextareaTest$TestSnippet:normalDisplayValue">
<textarea name="nullvalue">
</textarea>
<textarea name="emptyvalue">
</textarea>
<textarea name="xvalue">
</textarea>
<textarea name="yvalue">
</textarea><i id="yvalue-display"></i>
<div id="zvalue-display"></div>
</form>
</body>
</html> | astamuse/asta4d | 162 | Java | org.eclipse.core.resources.prefs | text/plain | -6,797,543,234,800,135,000 |
<html>
<head>
</head>
<body>
<form afd:render="field.SelectMultipleTest$TestSnippet:staticOptionEditValue">
<select multiple name="nullvalue">
<option value="x">x:d</option>
<option value="y">y:d</option>
<option value="z">z:d</option>
</select>
<select multiple name="nullvalue-2">
<option value="">:d</option>
<option value="x">x:d</option>
<option value="y">y:d</option>
<option value="z">z:d</option>
</select>
<select multiple name="emptyvalue">
<option value="x">x:d</option>
<option value="y">y:d</option>
<option value="z">z:d</option>
</select>
<select multiple name="emptyvalue-2">
<option value="">:d</option>
<option value="x">x:d</option>
<option value="y">y:d</option>
<option value="z">z:d</option>
</select>
<select multiple name="spacevalue">
<option value="x">x:d</option>
<option value="y">y:d</option>
<option value="z">z:d</option>
</select>
<select multiple name="spacevalue-2">
<option value=" "> :d</option>
<option value="x">x:d</option>
<option value="y">y:d</option>
<option value="z">z:d</option>
</select>
<select multiple name="xvalue">
<option value="y">y:d</option>
<option value="z">z:d</option>
</select>
<select multiple name="xvalue-2">
<option value="x">x:d</option>
<option value="y">y:d</option>
<option value="z">z:d</option>
</select>
<select multiple name="yvalue">
<optgroup label="A">
<option value="x">x:d</option>
<option value="z">z:d</option>
</optgroup>
<optgroup label="AA">
<option value="xx">xx:d</option>
<option value="yy">yy:d</option>
<option value="zz">zz:d</option>
</optgroup>
</select>
<select multiple name="yvalue-2">
<optgroup label="A">
<option value="x">x:d</option>
<option value="y">y:d</option>
<option value="z">z:d</option>
</optgroup>
<optgroup label="AA">
<option value="xx">xx:d</option>
<option value="yy">yy:d</option>
<option value="zz">zz:d</option>
</optgroup>
</select>
</form>
</body>
</html> | astamuse/asta4d | 162 | Java | org.eclipse.core.resources.prefs | text/plain | -3,267,312,135,385,399,300 |