1
私はPrimefaces 3.0.1を使用し、プログラムで塗りつぶされたモデルを持つメニューバーを構築します。 depotDetails.xhtmlのようなリンクが必要ですか?SetPropertyActionListenerを正しく追加する方法は?
FacesContext facesContext = FacesContext.getCurrentInstance();
ValueExpression target = facesContext.getApplication().getExpressionFactory().createValueExpression(FacesContext.getCurrentInstance().getELContext(), "#{DepotBean.currentDepot}",String.class);
ValueExpression value = facesContext.getApplication().getExpressionFactory().createValueExpression(FacesContext.getCurrentInstance().getELContext(), "ehnemeneee",String.class);
ActionListener handler = new SetPropertyActionListenerImpl(target, value);
item.addActionListener(handler);
が、それもいけない仕事:= 1 IDが、私は私のメニュー項目のためにこれらのURLを使用する場合
item.setUrl("depotDetail.xhtml?id=1"); // that dont work
はので、私はActionListenerを追加しようとしました。誰でも助けることができますか?
は、私は解決策を持って...しかし、それは正しい方法であるトーマス・
item.setUrl( "depotDetail.xhtml?id = 1")とは何ですか? //それは動作しませんか? URLが呼び出されていないか、またはURLまたは不完全なURLが含まれていませんか? –
あなたはitem.setUrl( "depotDetail.jsf?id = 1")を試してみましたか? ? – Daniel
はい、私はそれを試したが、パラメータなしでdepotDetail.xhtmlを渡すだけです – thomas