运行FILE1.XHTML我在控制台中看不到打印。
运行FILE2.XHTML,我可以在控制台中看到 print 语句。
以下是代码片段,有人可以解释一下,为什么会发生这种情况?
Bean.java
public String Deleterule(int id) {
System.out.println("bean action----------------------------"+id);
return "";
}
FILE1.XHTML (不工作action="#{repricing.Deleterule(ruleVar.id)}"
)
<h:form id="Retreiving">
<div class="box-padd">
<div class="panel panel-default">
<div class="panel-heading head-bg">Repricing Rules</div>
<div class="panel-body">
<div class="clearfix "></div>
<ui:repeat var="ruleVar" value="#{repricing.repricingRules}" varStatus="status" >
<div class="panel-group" style="margin-top: 45px;" >
<div class="panel panel-default">
<div class="panel-heading col-sm-12">
<div class="">
<div data-toggle="collapse" href="##{status.index}">
<div class="col-md-1">
<i class="glyphicon glyphicon-tags" aria-hidden="true"
style="font-size: 25px;"></i>
</div>
<div class="col-md-3">#{ruleVar.name}</div>
<div class="col-md-7">#{ruleVar.description}</div>
<div class="col-md-1">
<!-- <span aria-hidden="true" class="glyphicon glyphicon-trash" ></span> -->
</div>
</div>
<h:commandLink value="Delete" action="#{repricing.Deleterule(ruleVar.id)}" >
</h:commandLink>
</div>
</div>
<div id="#{status.index}" class="panel-collapse collapse">
<div class="panel-body">
<div class="contetn-box">
<form>
<div class=" col-md-12 borderline">
<h4>Repricing logic</h4>
<div class="col-md-12 padding">
<h:selectBooleanCheckbox id="abool" value="#{ruleVar.checkboxOne}" disabled="true">
</h:selectBooleanCheckbox> I want my new price to be
<h:selectOneMenu disabled="true" id="a1menu" value="#{ruleVar.rowOneDropdownOne}" class="selectpicker" style="margin-left: 5px; margin-right: 15px;">
<f:selectItem itemValue="Below"/>
<f:selectItem itemValue="Equal To"/>
<f:selectItem itemValue="Above"/>
</h:selectOneMenu>
<span style="margin-left: 5px; margin-right: 15px;">
<h:selectOneMenu disabled="true" value="#{ruleVar.rowOneDropdownTwo}" class="selectpicker">
<f:selectItem itemValue="Highest of"/>
<f:selectItem itemValue="Lowest of"/>
<f:selectItem itemValue="Avg. of"/>
</h:selectOneMenu>
</span>
<span>
<input type="button" disabled="disabled" value="#{ruleVar.numberOfSelectedCompetitors} selected Competitors" style="width: auto; float: none; display: inline-block; padding: 0 6px; margin-right: 15px;" class="btn btn-default" data-toggle="modal" data-target="#addModal1"></input>
</span>by
<h:inputText value="#{ruleVar.rowOneByValue}" disabled="true" type="text" style="text-align: center; width: 36px;"
placeholder="0">
</h:inputText>
<h:selectOneMenu value="#{ruleVar.rowOneCurrencyType}" disabled="true" class="selectpicker" style="text-align: center; width: 48px; padding: 3px; margin-left: 10px;">
<f:selectItem itemValue="%"/>
<f:selectItem itemValue="$"/>
</h:selectOneMenu>
</div>
<div class="col-md-12 padding">
<h:selectBooleanCheckbox value="#{ruleVar.checkboxTwo}" disabled="true" /> I want my new price to be
<span style="margin-left: 5px; margin-right: 15px;">
<h:selectOneMenu value="#{ruleVar.rowTwoDropdownOne}" disabled="true" class="selectpicker" style="width: 80px; padding: 4px">
<f:selectItem itemValue="Below"/>
<f:selectItem itemValue="Equal To"/>
<f:selectItem itemValue="Above"/>
</h:selectOneMenu>
</span>
<span style="margin-left: 5px; margin-right: 15px;">
<h:selectOneMenu value="#{ruleVar.rowTwoDropdownTwo}" disabled="true" class="selectpicker" style="width: 245px; padding: 4px">
<f:selectItem itemValue= "1st Top Competitor (By Price)"/>
<f:selectItem itemValue= "2nd Top Competitor (By Price)"/>
<f:selectItem itemValue= "3rd Top Competitor (By Price)"/>
<f:selectItem itemValue="4th Top Competitor (By Price)" />
</h:selectOneMenu>
</span> by
<h:inputText value="#{ruleVar.rowTwoByValue}" disabled="true" type="text" style="text-align: center; width: 36px;" placeholder="0" >
</h:inputText>
<h:selectOneMenu value="#{ruleVar.rowTwoCurrencyType}" disabled="true" class="selectpicker" style="text-align: center; width: 48px; padding: 3px; margin-left: 10px;">
<f:selectItem itemValue="%"/>
<f:selectItem itemValue="$"/>
</h:selectOneMenu>
</div>
<div class="col-md-12 padding">
<h:selectBooleanCheckbox value="#{ruleVar.checkboxThree}" disabled="true"/> I want my new price to be
<span style="margin-left: 5px; margin-right: 15px;">
<h:selectOneMenu value="#{ruleVar.rowThreeDropdownOne}" disabled="true" class="selectpicker" style="width: 80px; padding: 4px">
<f:selectItem itemValue="Below"/>
<f:selectItem itemValue="Equal To"/>
<f:selectItem itemValue="Above"/>
</h:selectOneMenu>
</span>
<span style="margin-left: 5px; margin-right: 15px;">
<h:selectOneMenu value="#{ruleVar.rowThreeDropdownTwo}" disabled="true" class="selectpicker" style="width: 245px; padding: 4px">
<f:selectItem itemValue= "1st Top Competitor (By Price)"/>
<f:selectItem itemValue= "2nd Top Competitor (By Price)"/>
<f:selectItem itemValue= "3rd Top Competitor (By Price)"/>
<f:selectItem itemValue="4th Top Competitor (By Price)" />
</h:selectOneMenu>
</span> by
<h:inputText value="#{ruleVar.rowThreeByValue}" disabled="true" type="text" style="text-align: center; width: 36px;" placeholder="0" >
</h:inputText>
<h:selectOneMenu value="#{ruleVar.rowThreeCurrencyType}" disabled="true" class="selectpicker" style="text-align: center; width: 48px; padding: 3px; margin-left: 10px;">
<f:selectItem itemValue="%"/>
<f:selectItem itemValue="$"/>
</h:selectOneMenu>
</div>
<div class="col-md-12 padding">
<h:selectBooleanCheckbox value="#{ruleVar.checkboxFour}" disabled="true" />
Reprice based on Price +
Shipping (may change based on destination)
</div>
<div class="col-md-12 padding ">
<h:selectBooleanCheckbox value="#{ruleVar.checkboxFive}" disabled="true" /> Ignore competitors under
min price
</div>
</div>
<div class=" col-md-12">
<h4>Rule PriceGuard</h4>
<div class="col-md-12 padding">
<p>What should WisePricer do if the Rule's New Price is
below your Min. Price column?</p>
<p>Keep in mind that if you do not have a Min. Price
column we will use your Store PriceGuard as minimum price</p>
</div>
<div class="col-md-12 padding">
<h:selectBooleanCheckbox type="radio" disabled="true" value="#{ruleVar.checkboxSix}" /> Leave product at current
price
</div>
<div class="col-md-12 padding">
<h:selectBooleanCheckbox type="radio" value="#{ruleVar.checkboxSeven}" disabled="true"/> Set it to minimum price
</div>
<div class="col-md-12 padding">
<h:selectBooleanCheckbox disabled="true" type="checkbox" value="#{ruleVar.checkboxEight}" /> Set it to
<h:inputText disabled="true" type="text" value="#{ruleVar.rowEightByValue}" placeholder="0" style="text-align: center; width: 50px; margin-left: 15px;" ></h:inputText>
<h:selectOneMenu disabled="true" value="#{ruleVar.rowEightCurrencyType}" class="selectpicker" style="text-align: center; width: 48px; padding: 3px; margin-left: 10px;">
<f:selectItem itemValue="%"/>
<f:selectItem itemValue="$"/>
</h:selectOneMenu> above cost (or minimum price if higher)
</div>
</div>
</div>
</div>
</div>
</div>
</div> </ui:repeat>
</h:form>
FILE2.XHTML(工作action="#{repricing.Deleterule(ruleVar.id)}"
)
<h:form id="Retreiving">
<ui:repeat var="ruleVar" value="#{repricing.repricingRules}" >
<h:outputText value = "#{ruleVar.id}"></h:outputText>
<h:commandLink value="#{ruleVar.id}" action="#{repricing.Deleterule(ruleVar.id)}" >
</h:commandLink>
</ui:repeat></h:form>