dynamic

JSF Dynamic Rendered Component's Value becomes null when the form is submitted

时光毁灭记忆、已成空白 提交于 2019-12-08 07:52:44
问题 I have a JSF page which renders a text field depending on the value of a drop down using primefaces ajax listner. The dynamic rendering is done fine. but the problem is once I submit the form the the bound value of that textfield doesn't get bound instead it is shown as null. this is the part of my JSF only the necessary fields are included here <h:panelGroup id="textPanel" > <h:form id="main" prependId="false"> <h:outputText value="WorkFlow ID:" /> <h:selectOneMenu id="workFlows" value="#

Ways to include a dynamically generated facelet

荒凉一梦 提交于 2019-12-08 07:50:43
问题 In current project I need to create a panel that will contain an HTML content created by the user elsewhere in the application. This content can be easily inserted like this: <h:outputText value="#{myBean.dynamicHTMLContent}" escape="false"/> An example content: <p>User text</p> Now we need to give the user more freedom and allow him to use tokens in the HTML code that will be resolved by the application later: <p>User text</p><p>User image: {niceImage}</p> The application parses user content

Pointer to dynamic array of pointers to objects

五迷三道 提交于 2019-12-08 07:44:24
问题 Card class header class card { public: string rtn_suit() { return suit; } int rtn_rank() { return rank; } void set_suit(string new_suit){ suit = new_suit; } void set_rank(int new_rank) { rank = new_rank; } card(); card(string suit, int rank); card(const card& copyCARD); ~card(); private: string suit; int rank; }; #endif card.cpp #include "card.h" card::card() { set_suit("default"); set_rank(0); } card::card(string new_suit, int new_rank) { // allows for using private class member variables

Wicket Dynamic Resource Displayed in HTML

╄→尐↘猪︶ㄣ 提交于 2019-12-08 07:39:23
问题 I have a Wicket page which will dynamically display an image. Let's say the image is the current date/time. In HTML, I would have something like <img src="[dynamically generated]"/> Assume I have a utility method which returns to me a byte[] of the current image. public byte[] getCurrImage(); How do I implement this dynamic resource in Wicket (HTML/Java)? I can't mount a shared resource because the image will keep changing all the time. Do I need to save the image somewhere? Thanks 回答1:

Android - dynamic gridview (multiple columns binded rows)

不问归期 提交于 2019-12-08 07:36:07
问题 I would like to implement a gridview within Android, which will basically consist of 4 columns (it will be actiing similary to a table). This will essentially be a list of items spread across 4 columns (name, qty, p1, p2). So each row contains 4 columns is unique to 1 items. Therefore, I need a way to bind these 4 columns together so that when i select anywhere within those 4 columns the whole row will be selected, whilst returning the 'name' column as the text id. Is there an easy way that

JSF Dynamic Rendered Component's Value becomes null when the form is submitted

妖精的绣舞 提交于 2019-12-08 07:27:30
I have a JSF page which renders a text field depending on the value of a drop down using primefaces ajax listner. The dynamic rendering is done fine. but the problem is once I submit the form the the bound value of that textfield doesn't get bound instead it is shown as null. this is the part of my JSF only the necessary fields are included here <h:panelGroup id="textPanel" > <h:form id="main" prependId="false"> <h:outputText value="WorkFlow ID:" /> <h:selectOneMenu id="workFlows" value="#{workFlowSelectionController.selectedWorkFlowId}" > <p:ajax event="change" listener="#

Jquery to populate <table> based on <select>

流过昼夜 提交于 2019-12-08 07:26:58
问题 So I've got a form with a drop down at the top that is populated with values from a mysql table. Basically this form is to allow the addition of players to a team. $seasonid = $_SESSION['SEASON_ID']; $sql="SELECT TEAM_ID, TEAM_NAME FROM TEAMS WHERE SEASON_ID=$seasonid"; $result=mysql_query($sql); $options=""; while ($row=mysql_fetch_array($result)) { $tid=$row["TEAM_ID"]; $tname=$row["TEAM_NAME"]; $options.="<OPTION VALUE=\"$tid\">".$tname; } What I'd like to do is when a team is selected

how to dynamically change the textview height and cell height according to the text length without the scroll

走远了吗. 提交于 2019-12-08 07:26:03
问题 this is my code that shows data in table,my complete data is not showing in cell. 1st image is when i set scrollable to no ,2nd image when i do not set scrollable.i am a beginner.plz help me out of this. - (void)textViewDidChange:(UITextView *)textView{ [table beginUpdates]; [table endUpdates]; } -(void)createdatabase{ BOOL success; NSFileManager *filemanager = [NSFileManager defaultManager]; success = [filemanager fileExistsAtPath:datapath]; if (success)return; NSString *databasefromapp = [[

jQuery .click() not triggering on links dynamically created with .wrapInner()

六月ゝ 毕业季﹏ 提交于 2019-12-08 07:22:54
问题 I'm having an issue with this script and for the life of me I can't figure out what's wrong with it. Quick run through what I have: The HTML: <ul> <li id="wildcard_1"> <div> <a href="#">test</a> </div> </li> </ul> <a href="#" class="reset">reset</a> The jQuery: // Main function $("[id^=wildcard_]").children('div').children('a').click(function() { $(this).replaceWith($(this).text()); }); // Temporary reset function $("a.reset").click(function() { $("[id^=wildcard_]").children('div').wrapInner(

dynamic token parsing

纵饮孤独 提交于 2019-12-08 07:09:16
问题 I have a mail script that I use in one of my projects, and I'd like to allow customization of this letter. the problem is that parts of the email are dynamically generated from the database. I have predefined tokens that I use to describe what should replace the token, but I'd like to simplify this but writing a better parser that can interpret the token and figure out which variable to use to replace it. Right now I have a very large array with all the possible tokens and their corresponding