小编Nin*_*jin的帖子

如何使用参数重定向动作作为Struts中的帖子?

将操作重定向到另一个操作struts.xml:

<action name="CheckLogin" class="LoginS" method="checkLogin">
    <result name="input" type="redirectAction">
        <param name="actionName">SectorDisplay</param>
        <param name="branch_id">${branch_id}</param>
    </result>
</action>
Run Code Online (Sandbox Code Playgroud)

参数虽然发送,branch_idurl它显示为

http://localhost:8085/Display/SectorDisplay.action?branch_id=110
Run Code Online (Sandbox Code Playgroud)

我认为它不是POST,它的GET.

我不想在URL上显示参数,是否有任何方法可以隐藏它或如何将其发布到操作中?

谢谢..

parameters post struts2

5
推荐指数
1
解决办法
1万
查看次数

如何从 jasperReports 上的barcode4j-2.1.jar 修复java.lang.NoClassDefFoundError?

我正在尝试使用 Java(Web 应用程序)和使用 Jaspoersoft iReport Designer 4.5.0 打印条形码

这是我的 Java 代码:

public String onBtnPrintClick() throws JRException, IOException {
    Integer pos_number = getMst_posService().getPosById((Integer) getSession().get("pos_id")).getPos_number();
    Date dateNow = new Date();
    SimpleDateFormat dateFormatter = new SimpleDateFormat("yyyy-MM-dd HH:mm:ss");
    Integer total_paid = getPaidCard() + getPaidCash();

//      Bill printing   


    View_transactionprod_pos transactionProdToBill = new View_transactionprod_pos();
    transactionProdToBill.setTransaction_id(getTransactionIdFromMakeSale());

    listProdToBill = getView_transactionprod_posService().getViewTransactionProdPosListByModel(transactionProdToBill);

    Map<String, Object> parameters = new HashMap<String,Object>();
    parameters.put("transaction_id", getTransactionIdFromMakeSale());
    parameters.put("pos_number", pos_number);
    parameters.put("transaction_date", dateFormatter.format(dateNow));
    parameters.put("total_price", getTotalPriceToSell());
    parameters.put("total_paid", total_paid);
    parameters.put("change", getChange());
    parameters.put("barcode", getTransactionIdFromMakeSale());

    return "pdf";
}
Run Code Online (Sandbox Code Playgroud)

xml :

    <action name="MakeSalePrint" class="MakeSaleS" …
Run Code Online (Sandbox Code Playgroud)

java jasper-reports barcode-printing barcode4j

4
推荐指数
2
解决办法
9714
查看次数

单击按钮时如何聚焦下一个文本字段?

HTML:

<input type="text" class="mytextbox">
<input type="text" class="mytextbox">
<input type="text" class="mytextbox">
<input type="text" class="mytextbox">

<input type="button" class="mybutton" value="focus next" onclick="focusNext()">
<input type="button" class="mybutton" value="focus prev" onclick="focusPrev()">
Run Code Online (Sandbox Code Playgroud)

JS代码:

//focused is getting last focused textfield
var focused = null;
$(".mytextbox").focus(function(){
    focused = $(this);
});

//focus next
function focusNext(){
    $(".mytextbox").each(

        //checking is this textbox focused
        if($(this)[0] == focused[0]){
              $(this).next().focus(); 
              //or
              $(this).next(".mytextbox").focus(); 
        }
    );
}

//focus prev
function focusPrev(){
    $(".mytextbox").each(

        //checking is this textbox focused
        if($(this)[0] == focused[0]){
              $(this).prev().focus(); 
              //or
              $(this).prev(".mytextbox").focus(); 
        }
    );
}
Run Code Online (Sandbox Code Playgroud)

我认为 …

html javascript jquery

2
推荐指数
1
解决办法
1618
查看次数