我正在从Oracle在线教程学习JSF .在netbeans上构建其示例"hello1"时,它会在行中显示以下错误import javax.faces.bean.ManagedBean;
:
包javax.faces.bean不存在
这是怎么造成的,我该如何解决?
我创建了一个组合组件来将 TouchableNativeFeedback 组合到 wrapperComponent。
export default function withFeedback2(
WrappedComponent
) {
return class extends BaseComponent {
constructor(props) {
super(props);
}
render() {
return (
<View>
<TouchableNativeFeedback
onPress={() => this.props.onContainerViewPress()}
>
<WrappedComponent {...this.props} />
</TouchableNativeFeedback>
{/* <TouchableOpacity
onPress={this.props.onContainerViewPress ? () => this.props.onContainerViewPress() : null}
>
<WrappedComponent {...this.props} />
</TouchableOpacity> */}
</View>
);
}
};
}
Run Code Online (Sandbox Code Playgroud)
但是TochableNativeFeedback 的 OnPress事件没有触发。而 OnPress 事件被正确触发,并且如果 wrappercomponent 包装在 TouchableOpacity 下,则调用 wrappercomponent 的onContainerViewPress道具。
我正在 Android 平台上对此进行测试。
react-native react-native-android touchableopacity react-navigation touchablewithoutfeedback